Midi Optimizer and LilyPond

Discuss methods, books, lessons, and websites you use to learn.
No explicit, hateful, or hurtful language. Nothing illegal.
Post Reply
Synthesia Donor
Posts: 1180

Post by TonE » 09-30-14 2:59 am

... by outputting some position information in real-time, in steps of bars.
No Synthesia does it already, if Synthesia does not block output of lyrics and other text events in midi files? A preprocessor can add such text events per bar, then a background listener would do something at each such event. Simple and efficient. Strange, why it took me so long to find this option we had all the time. So Synthesia has already real-time pdf score switching support when looked this way. Great.

Nicholas if Synthesia currently is blocking such text events from its output, could you unblock it or give a new option for this? Then we could have YouTube demonstrations, left screen half with Synthesia, right screen half with SumatraPdf with a loaded score of the same midi file on the left, both move in sync, page by page on the right side. An automatic page turner, as is done in piano concerts by real humans.

For automatic segmentation, Synthesia can use pitchclass chroma features, too, putting a marker where this curve has its biggest changes. Giving at each step for each of the 12 pitchclasses a value between 0 and 1, writing it into a 12 dimensional vector, calculating the vector differences from step to step. Biggest changes happen where values of zero get non-zero or the opposite. Counting the zero-toggling actions between steps. Midi Optimizer above uses chroma features, too, as you can see.
Last edited by TonE on 10-01-14 1:00 am, edited 1 time in total.

User avatar
Posts: 1809
Location: Illinois

Post by jimhenry » 09-30-14 8:26 am

Does LilyPond support the creation of Music XML? If so, support of Music XML is coming, in rev 11 I believe. Music XML will give all the functionality of MIDI file in Synthesia but with much better looking sheet music display.
Jim Henry
Author of the Miditzer, a free virtual theatre pipe organ

Synthesia Donor
Posts: 1178

Post by kiwi » 09-30-14 9:40 am

I don't think cause it's specified save as midi file.

Synthesia Donor
Posts: 1180

Post by TonE » 09-30-14 10:59 am

LilyPond has its converter mid2ly.py, you can try it without the above Midi Optimizer and with, comparing the differences. If useful, go, if not, ignore. When Synthesia has MusicXML support, of course you can use it additionally, but we have already millions of midi files, but not millions of MusicXML files, so midi is still more important, in the large.

Posts: 12401

Post by Nicholas » 10-01-14 12:20 am

TonE wrote:Too bad, Synthesia does not support syncing pdf files to its playback...
This is something I'd still like to do! There might finally be time after Synthesia 11.
jimhenry wrote:Does LilyPond support the creation of Music XML?
It looks like there have been suggestions and it's listed as a feature request on their site, but for now I'm only seeing image formats and PDF output from Lilypond.

Synthesia Donor
Posts: 1180

Post by TonE » 10-01-14 2:26 am

Or better, instead of text events, special notes can be used as auto-page turning signals. For example on midi channel 10, a very short, duration = 1/128, very low, pitch = 0, very low loudness, velocity = 1, note. Nobody would hear it, but it would still exist and can be used for other purposes, like page turning signaling.

Posts: 12401

Post by Nicholas » 10-01-14 3:17 am

If you can already generate arbitrary MIDI events, I'd sooner add a page-turn shortcut that would let you bind whatever you want (including silent MIDI controller messages) at your leisure.

Synthesia Donor
Posts: 1180

Post by TonE » 10-01-14 3:36 am

I will use following method:
1. Preprocessing midi files, using Keykit, its command line variant as lowkey.exe in that package, for adding the above mentioned special midi notes.
2. Playing this preprocessed midi file in Synthesia.
3. Having a background listener to those special notes, in my case simply using AutoHotkey, then doing somewhere something on those signals, in my case, activating SumatraPDF, checking from another text file despcription on which page which bar is, so jumping to correct page when we reach the right bar value.

It is not a Synthesia standalone method, it needs Keykit, AutoHotkey, SumatraPDF, and the converted pdf score, via Midi Optimizer and LilyPond, additionally. Using screen halfing and disabling score in Synthesia you can have best of both worlds, great falling notes in Synthesia, great score in pdf from LilyPond. If you have enough money, you can take your printed score and let the Berlin Philharmonic Orchestra play it. :)

Posts: 191

Post by monkel » 01-03-20 7:17 am

Nice 10 min intro to lilypond:

https://media.ccc.de/v/36c3-74-lilypond ... cal-scores

Find out what lies at the intersection of music and programming with this brief look at LilyPond, the free programmable musical typesetter!


Post Reply