[HN Gopher] "Compiling" Music
       ___________________________________________________________________
        
       "Compiling" Music
        
       Author : franek
       Score  : 117 points
       Date   : 2022-03-10 10:47 UTC (12 hours ago)
        
 (HTM) web link (lilypond.org)
 (TXT) w3m dump (lilypond.org)
        
       | username223 wrote:
       | I'm happy to be reminded that Lilypond is still around. I used it
       | to produce scores (and MIDIs) 15+ years ago, because it offered
       | the same experience as LaTeX -- beautiful results if you're
       | willing to code and, occasionally, battle eldritch horrors
       | beneath its surface. Like (La)TeX and Emacs, I hope it becomes
       | one of those rare pieces of software that lasts longer than a
       | human lifetime. Few things we build these days, not just
       | software, endure so long.
        
       | Aaargh20318 wrote:
       | Anyone else disappointed this is not about music meant to be
       | played while compiling code ?
        
         | HPsquared wrote:
         | That, or music produced by a compiler to indicate its status.
        
           | klyrs wrote:
           | If a compiler comes with musak, will that reduce the
           | complaints about slow compilation speeds?
        
         | leeter wrote:
         | I was more disappointed they didn't seem to have a "Make MIDI"
         | option; or if they did I missed it.
        
           | Jackim wrote:
           | https://lilypond.org/doc/v2.23/Documentation/notation/creati.
           | ..
        
         | Rochus wrote:
         | Have a look at https://chuck.stanford.edu/ or
         | https://supercollider.github.io/.
        
         | polypodiopsi wrote:
         | Check out toplab.org for all things music-livecoding related.
         | Tidalcycles which is haskellnased is one of the favorites of
         | the scene but there are many options. Or one of the
         | reccomendations in the thread here (esp. supercollider which is
         | lisp based or c-sound for max renderingperformance stuff)
        
         | severak_cz wrote:
         | check out https://alda.io/ - it takes some form of music
         | notation and plays it using general MIDI synth
        
         | ciroduran wrote:
         | That's what https://musicforprogramming.net/ is for
        
         | franek wrote:
         | The title is indeed ambiguous. It could just as well refer to
         | sound-coding systems/languages like Sonic Pi, or to what you
         | imagined. (Which would be an oddly specific kind of music, but
         | cool! The operation of a compiler turned into music, somehow?)
         | 
         | That said, I am not disappointed. But then I am also the one
         | who posted this link in the first place. I started using
         | Lilypond last year for transcribing the melody voices from
         | complex sheet music and automatically transposing them into
         | different keys when needed (which is immensely useful). Just
         | recently I discovered that it can also generate MIDI output, so
         | in addition to having a convenient tool to get beautiful sheet
         | music in whatever key I need, I can now easily have my computer
         | _play_ the melodies and memorise them by listening (which for
         | me, on my current instrument, is much easier than playing from
         | notes directly).
        
         | 52-6F-62 wrote:
         | Not me. It's nice and refreshing to see software that is about
         | improving playing music for people rather than people saying
         | "we've solved music with our new algorithm" (as if the thing to
         | solve with music we're somehow a singular aspect of the
         | mechanics).
        
       | aidenn0 wrote:
       | I love lilypond. My son plays the piano now and I make simplified
       | arrangements of songs for him. He can pick out songs by ear and
       | I'm teaching him to hand annotate first, because I don't know a
       | better way to encourage familiarity with the notation, but I'll
       | get him set up with lilypond eventually.
       | 
       | There are various nicer IDEs for it, but I just run side-by-side
       | windows with zathura and emacs; zathura will automatically reload
       | when PDFs change on disk so I can see my changes immediately.
        
       | softwarebeware wrote:
       | Good thing "compiling" is in quotes. I don't think it actually
       | meets the definition. It's more like "encoding."
        
       | tunesmith wrote:
       | Lilypond is freaking awesome. As a hobbyist with a music degree
       | but unrelated career, I switched a while back, and it's saved me
       | multiple times over just because of backwards compatibility and
       | free software. My old version of Sibelius doesn't run on newer
       | hardware, so some old scores I never ported are lost if I don't
       | spend money just to export. But my old lilypond scores will
       | always be fine.
        
       | andrewzah wrote:
       | I'm greatly thankful for the hard work put into lilypond and
       | frescobaldi.
       | 
       | I use lilypond to type up leadsheets for jazz and some other
       | genres [0], inspired by Mark Veltzer's Openbook [1]. I've gotten
       | pretty fast at typing up songs over time. The goal is to have a
       | CLI or web interface to generate a pdf for concert/bb/bass
       | clef/etc, optionally include lyrics/QR codes, and so on.
       | 
       | Being able to transpose is quite handy, although I'm working on a
       | system to automatically handle larger transpositions (e.g. for Eb
       | instruments or for bass clef). The problem is if I statically
       | pick one direction (up or down), some leadsheets will have the
       | notes too high or low. I think I can resolve it with having all
       | songs entered in absolute pitches and scanning for the
       | lowest/highest note.
       | 
       | 0: https://github.com/andrewzah/openbook-dev
       | 
       | 1: https://github.com/veltzer/openbook
        
       | beepbooptheory wrote:
       | Lilypond also has a guile API, and if you are not interested in
       | the actual notation generation or at least how it looks, it can
       | make some pretty weird and cool midi files. You can turn it into
       | a kind of makeshift lisp Supercollider pattern generator.
        
         | agentwiggles wrote:
         | That is really cool, I had a ton of fun playing with Overtone a
         | few years ago (Clojure Supercollider wrapper).
         | 
         | There's also Impromptu, which I think is Scheme... There's an
         | incredibly cool talk by Andrew Sorensen using it:
         | https://youtu.be/yY1FSsUV-8c
        
         | sramsay wrote:
         | Can you say a bit more about this? I know I can go look at the
         | API, but I had no idea that it was capable of generating (?)
         | MIDI files (I don't have cause to use Lilypond, really). Do you
         | personally use it for generative music? Or something adjacent
         | to that?
        
       | lelandfe wrote:
       | One of my family members is a music theory professor, here's what
       | they had to say about this:
       | 
       | > [Lilypond] was one of a handful of early programs turning
       | notation into ASCII text. Older program but still useful.
       | MusicXML has made a lot of these older systems less productive
       | these days, though: https://www.musicxml.com/
       | 
       | > Developed by Michael Goode at Stanford - it's now the
       | international standard for music encoding.
        
       | pdpi wrote:
       | As an untrained but interested bystander/hobbyist, the scores
       | engraved by Lilypond are orders of magnitude better than those
       | produced by the mainstream WYSIWYG editors, in the same "I deeply
       | care about typography" sort of way that you get from documents
       | produced with TeX but not Word or Google Docs.
       | 
       | My ex-wife is a musician and a music teacher, and (especially for
       | her teaching job) ends up writing a fair bit of sheet music. She
       | used one of the point-and-click scorewriters for a while
       | (Sibelius maybe?) and was thorough displeased with both the
       | output quality and the editing process itself. After some poking
       | and prodding, and getting her to overcome the "but it's writing
       | code!" barrier, she fell in love with how productive it is and
       | still uses it, some 15 years later. It was pretty interesting to
       | see somebody with no exposure to the software world develop their
       | own habits and code style.
        
         | cesaref wrote:
         | My wife writes choral music with Sibelius.
         | 
         | One of the problems she has is versioning, and it's pretty
         | obvious that something like LilyPond + source control would be
         | a massive benefit to her for managing the creative process, as
         | pieces are rehearsed and modified/corrected it turns into a
         | versioning problem with various performers unsure which copy of
         | the piece they are working from.
         | 
         | I should really look into this, especially what printing
         | support looks like (she typically prints double sided on A3 so
         | that it folds correctly into a music folder), and what support
         | for playback looks like.
         | 
         | It's a pretty cool project, I really have been meaning to
         | investigate it, so maybe it's time to pull down a copy and kick
         | the tyres.
        
           | TylerE wrote:
           | This is fairly trivially handled. All the commercial packages
           | easily allow putting a last modification time stamp on the
           | page footer, or something like that.
        
           | ramses0 wrote:
           | Minimally you can look at the pdf tools / toolkit and
           | "imposition".
           | 
           | Basically, Lilypond has like a zillion different output
           | formats and page sizes:
           | 
           | https://lilypond.org/doc/v2.22/Documentation/notation/paper-.
           | ..
           | 
           | ...then you can take one or more *.pdf as a linear set of
           | sheets and run it through some imposition (booklet) tooling.
           | 
           | https://stackoverflow.com/questions/465271/gluing-
           | imposition...
           | 
           | https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
           | 
           | https://pypi.org/project/pdfimpose/
           | 
           | It wouldn't be terribly hard to whip up a Makefile and/or a
           | few shell scripts which would "do the right thing" 99.9% of
           | the time.
           | 
           | eg:
           | 
           | build.sh => make && xdg-open ./output.pdf
           | 
           | commit.sh => git add -u * && git commit -m '$DATE' && git
           | push origin
           | 
           | add-new-files.sh => git add * && git commit -m '$DATE - new
           | files' && git push origin || notify-send "HEELLLPP!"
           | 
           | booklet.sh => make && pdfimpose $OPTIONS ./output.pdf -o
           | booklet.pdf && xdg-open ./booklet.pdf
           | 
           | Good Luck, Have Fun! :-)
        
         | TylerE wrote:
         | Not quite as true anymore, as Dorico can produce output that is
         | AT LEAST as good.
        
           | bsedlm wrote:
           | going way off the rail (but this is a good example for some
           | general thoughs regardings to software in society)
           | 
           | this illustrates two different approaches (goals? paths?)
           | about software in society:
           | 
           | on the one hand: the lilypond way -- the old-school hobbyist
           | open/free source "communist" approach, the path-being-
           | abandonded. In which there's a learning curve but once
           | learned it opens a world of possibilities.
           | 
           | on the other hand: the dorico way -- the commercialist
           | (mercantilist), Microsoft-pionered world of private and
           | commercial software _products_ in which companies work to
           | reduce the learning curve but also end up turning the afore
           | mentioned world of possibilities into a constrained hallway
           | or a boxed easy-to-use shelf of products (an app store) which
           | is also difficult to customize (enter the  'contractors
           | ecosystem' who will do it for you; or app marketplace).
           | 
           | The path we're being dragged into (at least I feel like I'm
           | getting dragged, I prefer the other path but this is a
           | collective decision, so my own individual choice is discarded
           | in the face of the overall social choice)
        
             | zozbot234 wrote:
             | Tools like Lilypond are not just for hobbyists or non-
             | commercial users; in fact, there's a pretty long history of
             | Lilypond devs getting paid for adding new features to the
             | software, as well as for general support/maintenance work.
        
         | jancsika wrote:
         | > As an untrained but interested bystander/hobbyist, the scores
         | engraved by Lilypond are orders of magnitude better than those
         | produced by the mainstream WYSIWYG editors
         | 
         | tldr; Lilypond needs to compile a perfect engraving. If it does
         | then you get a great looking score for the least effort. If it
         | doesn't then you'll likely eat all your time tweaking. This
         | makes it good for single instrument parts, not so good for more
         | complex scores.
         | 
         | It's at least an order of magnitude more difficult to tweak
         | anything in Lilypond than it is with a WYSIWYG editor.
         | 
         | Moreover, with WYSIWYG you can take a 30 minute class offered
         | by an expert who will show you how to change the defaults to
         | get a decent-looking score. Even moreover, that expert could
         | literally sit in front of your laptop and drag an indication to
         | a better spot to teach you something about
         | whitespace/alignment/etc.
         | 
         | If you can figure out how to make a small tweak to a Lilypond
         | score in less than 10 minutes you're doing well. And you'll
         | probably have to recompile at least twice since you'll estimate
         | the distance of the tweak wrong, especially if you're a new
         | user. For each tweak.
         | 
         | Oh, and recompilation time scales with score length. Good luck
         | changing the position of an indication in the last bar right
         | before a deadline. I think I'd rather track down an XHTML error
         | in a tax form than do that.
        
         | throw0101a wrote:
         | Is there a LyX-like tool for music: enter data in a GUI, but a
         | 'code' file is saved and output is generated in the background?
        
           | zozbot234 wrote:
           | There are some tools along these lines, but most people
           | simply use Frescobaldi as an integrated editing environment
           | for Lilypond. The most GUI-like tools (including Musescore)
           | are based on MusicXML which is intended as a semantic
           | representation of sheet music, usable for more than
           | typesetting; unfortunately, there isn't good interoperability
           | between Lilypond and MusicXML right now, only some hacked-
           | together attempts at basic import and export.
        
           | franek wrote:
           | I haven't seriously tried any of them, but have a look a the
           | list at:
           | 
           | http://lilypond.org/easier-editing.html
           | 
           | Maybe Denemo: http://denemo.org/
        
         | jfk13 wrote:
         | My wife is also a musician and music teacher, but I have not
         | been able to persuade her to tackle Lilypond. (I have
         | occasionally done projects in Lilypond for her, and the results
         | are great, but the barrier to entry is too high for her to
         | scale.)
         | 
         | What she has found much more approachable is MuseScore
         | (https://musescore.org/). I haven't done a careful comparison
         | of the output to see which scores better [sorry!], but it's
         | certainly adequate for her everyday needs, and with a cheap
         | midi keyboard as input device, it was remarkably easy to get
         | started.
        
           | tasty_freeze wrote:
           | Musescore is usable but isn't great. I haven't used lilypond,
           | but I'm sure lilypond is miles better.
           | 
           | The focus of musescore has changed over the past year or two,
           | all triggered by a funny youtube sh*tpost criticizing its UI
           | (it was one series of such videos taking shots at all the big
           | notation programs).
           | 
           | https://www.youtube.com/watch?v=4hZxo96x48A
           | 
           | The guy who created it is a trifecta: a composer, a
           | typographer, and UI expert. The team at musescore took the
           | criticism in good humor, and hired the creator of the video
           | (Tantacrul, aka Martin Keary) to help them change it. The
           | first phase was getting rid of some low-hanging fruit in the
           | UI department. That work is ongoing.
           | 
           | The main focus of the next phase (musescore 4.0) is the
           | quality of the layout. Some of those improvements already
           | landed in musescore 3.6.
        
         | franek wrote:
         | > As an untrained but interested bystander/hobbyist, the scores
         | engraved by Lilypond are orders of magnitude better than those
         | produced by the mainstream WYSIWYG editors, in the same "I
         | deeply care about typography" sort of way that you get from
         | documents produced with TeX but not Word or Google Docs.
         | 
         | This deep care is documented in the "Essay on automated music
         | engraving" in the Lilypond docs:
         | 
         | http://lilypond.org/doc/v2.23/Documentation/essay-big-page.h...
         | 
         | Previously discussed (I guess -- different title and dead
         | link):
         | 
         | https://news.ycombinator.com/item?id=1515262
        
       | recursive wrote:
       | More like compiling music notation, even though this is the
       | original title.
        
         | klyrs wrote:
         | In addition to the music engraver, you can also use lilypond to
         | generate midi scores.
        
       | Aidevah wrote:
       | I've been using Lilypond for a number of years now and it's a
       | truly remarkable piece of software. The quality of the engraving
       | is extremely high, the amount of customization you can carry out
       | is unrivalled, and it is also incredibly versatile. Out of the
       | box it supports stuff ranging from Guitar and lute tablature[1]
       | and notation specific to percussion[2] to modern chord names[3]
       | and Baroque figured bass [4]. Did you know you can also use it to
       | typeset neumes for Gregorian chant[5] and mensural notation[6]?
       | 
       | Nevertheless I should mention that Lilypond serves a different
       | purpose and is aimed at a different audience when compared to
       | popular scorewriters such as musescore. It is primarily an
       | engraver and should be used to typeset existing music, composing
       | directly into it is always going to be very awkward compared to
       | WYSIWYG editors or even just manuscript paper. The learning curve
       | is also quite large and you must be ready to constantly refer
       | back to its (very well written) documentation. But like any
       | complex tool, acquiring familiarity with it is very rewarding in
       | the long run.
       | 
       | [1]
       | http://lilypond.org/doc/v2.22/Documentation/notation/common-...
       | 
       | [2]
       | http://lilypond.org/doc/v2.22/Documentation/notation/common-...
       | 
       | [3]
       | http://lilypond.org/doc/v2.22/Documentation/notation/display...
       | 
       | [4]
       | http://lilypond.org/doc/v2.22/Documentation/notation/figured...
       | 
       | [5]
       | http://lilypond.org/doc/v2.22/Documentation/notation/typeset...
       | 
       | [6]
       | http://lilypond.org/doc/v2.22/Documentation/notation/typeset...
        
       | dang wrote:
       | Related:
       | 
       |  _Lyp - The Lilypond Swiss Army Knife_ -
       | https://news.ycombinator.com/item?id=13259590 - Dec 2016 (7
       | comments)
       | 
       |  _LilyBin, an Online Musical Score Editor (using LilyPond)_ -
       | https://news.ycombinator.com/item?id=9414004 - April 2015 (1
       | comment)
       | 
       |  _Obsessed with putting ink on paper or What 's wrong with
       | computer music notation?_ -
       | https://news.ycombinator.com/item?id=1515262 - July 2010 (36
       | comments)
       | 
       |  _Open source typesetter for sheet music_ -
       | https://news.ycombinator.com/item?id=1192289 - March 2010 (23
       | comments)
       | 
       |  _LilyPond architecture (music notation software in Lisp)_ -
       | https://news.ycombinator.com/item?id=379234 - Nov 2008 (2
       | comments)
        
       | Shugyousha wrote:
       | I was pleasantly surprised when I first saw this. I always
       | thought that lilypond was a WYSWYG for music sheets but it turned
       | out that it's more a LaTex for music sheets which is what I
       | prefer for typesetting text.
        
       | samfriedman wrote:
       | Lilypond helped me learn a lot of music theory I had missed in my
       | learning to play piano; I use it to transcribe music now and it's
       | a fantastic piece of software (with fantastic docs!)
        
       | nlake906 wrote:
       | Interesting. Looks very similar to CSound score notation, with
       | CSound being oriented towards rendering audio files, rather than
       | printable documents. CSound is also FOSS, and has a sound
       | generation side that is incredibly deep and detailed.
       | 
       | https://csound.com/
        
       | flyinghamster wrote:
       | If creating your scores in vimacs and then typing "make" isn't
       | your cup of tea, there's Frescobaldi, essentially an IDE for
       | Lilypond.
       | 
       | https://frescobaldi.org/
        
       | roddux wrote:
       | LaTeX for music? nice!
        
         | BeFlatXIII wrote:
         | I came to LaTeX the other way around: Lilypond for text? Sign
         | me up!
        
       ___________________________________________________________________
       (page generated 2022-03-10 23:01 UTC)