Re: command line lilypond, midi to stdout
I wrote: I was hoping to combine lilypond with this on the command line like this: cat mysong.ly | lilypond - | velchanger | mysong.midi Anybody have any ideas how I can accomplish that in a single command? My cycle is edit,convert-to-midi,listen-in-garage-band, and I'm trying to get it down to as few steps as possible to go from the edit to hearing it and Graham Percival replied Write a shell script: - songtomidi.sh #!/bin/sh FILE=$(basename -s ly $1 ) lilypond ${FILE}.ly velchanger ${FILE}.midi ... etc Thanks, Graham, I'm a little embarrassed that I didn't think to do that. That will solve the problem. Pondering The lilypond doc (for 2.8.8) suggests that there are certain extensions a user can make by including some scheme code in her .ly file (at least that's my understanding of what I read). Is control of midi note velocity something I could accomplish that way? I have snooped through the lilypond source code (2.9.29) and I see all notes have velocity=127 (called dynamic_byte_) assigned in the constructor and it appears they are never altered. But I wonder if note objects are something I can modify using a scheme extension. Is it possible? Are there examples of what sort things can be done with extensions? Bob H ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
command line lilypond, midi to stdout
Howdy, I'm wondering if there is a way to have command-line lilypond produce midi on stdout. My typical use is to feed a .ly file into lilypond to create a .midi output, then take thatinto garage band (a mac program which I would describe as a midi recorder and track editor). Unfortunately lilypond sets the velocity of every note to the max, 127, and for instruments like a bass or a guitar garage band plays vel=127 as sort of a temporary pitch shift (like a very hard string pluck and maybe some motion on the fret). To work around this, I wrote a simple command-line program to receive a midi file on stdin, change all the note-on velocities to a specified value, and spit the result out on stdout. I was hoping to combine lilypond with this on the command line like this: cat mysong.ly | lilypond - | velchanger | mysong.midi Unfortunatley, it appears lilypond provides no way to output on stdout. Instead it creates -.midi, requiring a second command line to process the result. Anybody have any ideas how I can accomplish that in a single command? My cycle is edit,convert-to-midi,listen-in-garage-band, and I'm trying to get it down to as few steps as possible to go from the edit to hearing it. Thanks, Bob H ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user