Recently, I saw a post from a music student mentioning that they were thinking of writing up some stuff on the techniques they'd learned while using GNU Lilypond - i.e. a LaTeX-like "music typesetter" with its own custom input/programming language (doused / polluted with a heavy dose of Guile-Scheme).
This post gathers up some of my own notes on my own journey with these tools, and how this has tied into where I am today. Come to think of it, this year actually marks something like "just over two decades ago" that I was doing this shit (since IIRC, I probably started doing all this back in 2004!) - jeez... time flies and makes you feel old when put like that!
The biggest legacies of my time working with Lilypond are:
1) I still use the "note-input-language" (for lack of a better term) as the way I jot down snippets "on the go" - I can just jot it on paper, or with phone stylus, or even just tap it out with whatever qwerty keyboard I have at the time, without the need for any special apps or staff-paper, or having to miraculously draw out 5 straight parallel lines (evenly spaced) in a mad rush...
2) It lead to my first experiences working with a Unix system - i.e. via Cygwin... Downloaded over several weeks using dialup! (And anyone former kids from that era would know, with the aid of a "download helper/manager", tons of patience, and hours of praying that no-one would accidentally lift the phone off the hook causing a disconnect / that the connections didn't drop out!)
3) Learned LaTeX as a result of it
a) I started back when it still generated LaTeX as an intermediate format (+ required going via the ".dvi" pipeline to get a viewable PDF)
b) "lilypond-book" (or whatever that was called) was another major motivating factor! (i.e. I used it for all my in-class music homework, instead of futzing around with cutting + gluing tiny fragments of staff paper onto lined-refill, and having to painstakingly judge the amount of space to leave for those / etc.)
c) This knowledge / grounding in LaTeX has served me really well over the years. Particular highlights:
- i) During my first year of uni, it felt great being able to hand in reports written in a "superior professional tool" than all the MsWord slop others were producing (with the associated horrors of EndNote + chasing captions / auto-numbering weirdness around everytime you so much as added a space in the wrong place).
- Highlight 1: There's one report for a simulation + modelling class I'm particularly proud of where I "pulled out all the stops" (and correspondingly ended up producing what the teaching staff claimed was the best report they'd ever seen)... of course, this was after half-assing the first one (it was a "work in pairs" situation) *ahem*
- Highlight 2: Apparently I made a bit of a name for my self in the physics courses as "the guy who typesets his lab reports in LaTeX", which is just as well, as honestly, I was pretty hopeless across all other aspects of that discipline (hampered particularly by my crappy algebra / symbol-shuffling non-skills, + often dodgy random miscalculations).
Side Note: As part of those reports, I also ended up hacking up a Python package to abstract away the tediousness of all the "uncertainties calculations" (i.e. see "Physlabtools" - https://github.com/Aligorith/physlabtools), which I regarded as "tedious accounting busywork that a computer is better suited to accurately manage".
- ii) Of course, I used it for my thesis (see also, my LaTeX thesis / stylesheet template that I extracted out a few years ago, when I got a request from a French PhD candidate (now graduate) - https://github.com/Aligorith/jsl_latex_thesis_template), as well as for all the papers I've published to date (not that there are actually all that many of them to brag about... yeah, as an academic, I kindof suck 😜)
Some other little known facts from my time actively using Lilypond:
* It was actually the first FOSS community I really followed / got involved in (i.e. before I started working on Blender)
(Also, I might add that my switchover to being more heavily involved in Blender coincided with the Dutch founders of Lilypond moving on to other endeavours - e.g. jobs with Google)
* Back in the day, I got a patch merged for the (then new) Windows installer, to add an option so that it wouldn't clobber my existing Python install with the one it came with
(I can't remember if there was another one, but that is the main one that comes to mind)
Time as a Music Student
Oh and I probably did high-school music "the hard way" using Lilypond for all my composition assignments...
If MuseScore had existed back then, I'd probably have used it instead (and maybe been able to do a better job, as playing with ideas would've been easier + more accurate to judge)
Alas, school was doing the hard sell on Sibelius, and me back then didn't want a bar of that (FOSS zealot stage, etc.)
So, clunky recompile cycles + nasty midi playbacks it was!
---
EDIT: Hmm... come to think of it, on second thought, I wonder if I really would have used MuseScore if it existed back then either though. While I probably would've jumped at having an easier visual tool with nicer audio playback to noodle around in for this, back then I was also going through a phase where I was drawn to all these text-based / markup-language approaches as being maybe superior to traditional GUI-based input approaches. (Heck, I even tried POV Ray (and would've used "Renderman" too, if there was a working free implementation) for making CG Art around that time - though a few weeks of struggling to position things while trying to put together the 2-3 scenes I ultimately made with it probably showed me the errors of my ways going down that path!)
Ludwig van Byteoven
Another little known fact:
I built "Ludwig van Byteoven" (my first really major "serious" programming project) to generate pieces of randomly generated music with Lilypond as the output format / renderer (for both scores + playbacks)
This project started life as a little "random startup tune generator" for the "music notation editor" I'd originally been trying to build.
* As you can imagine, of course that notation editor project never really ended up happening back then, nor has it happened since, though I do periodically do end up trying to dabble again every few years with an idea of how I'd build my dream music input app for the fastest most natural input for me (while avoiding all the pain-points I usually experience) - the most recent time being just a few weeks ago over this recent Christmas break! (i.e. it was just a few pages of sketches on how such a music input "sketchpad" UI would look - with buttons layouts + interaction scheme notes this time)
* As for that notation app, what I did have working was:
1) An on screen midi-keyboard that played notes when you clicked on the buttons
2) The start screen with the music generator (IIRC, it played a random chord each time)
3) Screens to generate scales / choose key signatures
4) Maybe a timesignature choosing screen too?
5) ... Was that it? Can't remember now!
Ludwig quickly became "the main project":
- It started life as a couple of modules/classes within the VB6 project that I'd been trying to build the notation editor in (with particular project at one stage having a weird gremlin where the VB editor started changing the case of all the keywords or something, but only for that project!)
- Following that incident, I happened to stumble across Python around the same time. Hence, I ended up porting all of my VB6 code for Ludwig over to that (including most notably, the "scale generator" + "midi 2 Lilypond pitches" converter I made back then, which I'm still quite proud of now)
- From then on, the lessons came rolling in fast:
1) My first really big timeframe blowout - i.e. I thought from the speed of getting the initial random pitch generation working that getting rhythm creation + typesetting working would also take just a few days...
Result: It took weeks to do the rhythm conversion (i.e. from "slots" / "ticks" into your standard minim / crotchet / quaver / semiquaver / triplets / ties / etc., and all made to fit within the timesignature in play, with respect to barlines, etc.), and then the whole thing dragged on for several more months, as I gradually built up the rest of the system before running out of steam + time.
(I must say though, that the "tonerow" module I hacked in was one of the biggest successes of the whole affair, as was the "random markov-chain walk over a weighted network" I built for generating chord progressions - both of which came to mind immediately as the technical implementation solutions when I heard of those concepts being discussed in class)
2) My first real experience in combinatorial explosion + memory management - Yeah, I tried generating out all possible rhythm combinations so the random number generator could pick an item from the set to insert them... Guess what? That would sometimes generate datasets so large my pitiful 124mb usable RAM at the time (224 officially, but ~124 was when interminable thrashing + slowness would kick in as the thing went into SWAP! Ugh... to this day I still HATE the concept / implementation / perf-implications of SWAP) would fall to its knees and make my box grind to a half! IIRC, I ended up using Python's "mmap" (memory mapped files - NOTE: Link points to Py3 version, but this was Py2 back then)
3) Experience building a major codebase / serious project - As I've mentioned, this was quite a formative experience working on this project, and really honing my skills bashing code together on something non-GUI related.
4) Version Control - Though I didn't have a proper version control system, early on I recognised the need (also maybe as I was scared of stuffing it up). So, I started saving up a folder of zip-files of snapshotted states of the thing after each batch of significant changes. Alongside that, I also started keeping a text file which acted as a diary / todolist / changelog - aka... I'd invented a crude version of local-only (manual) Git, complete with full codebase snapshots + mandatory commit messages, BUT without any of the branching or merging or fancy operations involving a server 😜
No comments:
Post a Comment