Follow

Thinking about building a command line tool to create pngs of music notation so I can write about music theory on my wiki. Playing with @neauoire's nasu as a way to generate the sprites I'll be using.

· · Web · 6 · 5 · 20

Generation of palette-based PNGs. I wanted to write this entirely by hand, but it turns out that the PNG compression algorithm is more complicated than I want to deal with right now (I might end up switching to GIF later as that algo is simpler). So, I pulled in zlib and banged my head against it until it worked. Having test data from schaik.com/pngsuite/pngsuite_b to do byte-by-byte comparisons via xxd helped a lot

playing with sizing. this is the narrowest possible staff height (a charmingly awkward 9 pixels)

Starting to build the language for entering notes. You enter notes using the first letter of solfege, and it'll pick the note closest to the previous one. You can move the cursor up or down to make bigger leaps with '+' or '-'. This is "notate 'drmfs-s+rtd'

@clarity wow just thought about how fun it would be to play around in an ncurses music notation editor

@joemama mine is probably going to be non-interactive because it'll be part of a larger pipeline, but I could definitely see that being really cool!

@guenther ah, prior art might be a good reference point, thank you. I definitely want to write this myself, because that's in line with the general philosophy of the wiki

@clarity @neauoire i would be interested in that - i have a project running on github to add features to gitlab community edition - essentially define anything in text and it will render a png from it and replace the text with it. right now it understands about plantuml (graphwiz) as well as gnuplot and tex but im always looking for new stuff: github.com/elbosso/plantumlint

@clarity @neauoire very neat! Following to see how this goes. I'm much involved in using verovio to make SVGs (and midi) from musicXML, but it might be nice to see how a smaller project approaches this task.

@zachdecook Yeah, I considered SVG as an output format, but I've found in practice that on average low-color, low-res PNGs can be much smaller in filesize than the equivalent SVG, not to mention the aesthetic appeal (my whole wiki is built on dithered low-res images).

Sign in to participate in the conversation
XOXO Zone

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!