On Fri 30 Sep 2016 at 10:26:28 (+0200), bart deruyter wrote: > 2016-09-29 20:28 GMT+02:00 Simon Albrecht <simon.albre...@mail.de>: > > you can try something like > > \book { > > \score { > > … > > \midi { … } > > } > > \bookOutputName "andante" > > } > > for each of the etudes, and one \book{} for all the pdf output. > thanks for the tip, but that won't work I'm afraid :-) . It are short > etudes, so i can have several scores, two, three or even four on one page. > If I'd use the \book - technique, each etude would be separated by a page > break, which I do not want. It would be a waste of paper :-).
I post-process the midi files from LP because the default names don't sort correctly. Simply put, I insert "-00" into the first, then "0" into the next nine single-digit files. After that, the default filenames will now sort into the correct position. This process is done on each bookpart independently, if they exist, by spotting the first file in each sequence: MIDI output to `adeste-choir.midi'... MIDI output to `adeste-organ.midi'... MIDI output to `adeste-organ-1.midi'... MIDI output to `adeste-organ-2.midi'... MIDI output to `adeste.midi'... MIDI output to `adeste-1.midi'... MIDI output to `adeste-2.midi'... MIDI output to `adeste-3.midi'... MIDI output to `adeste-4.midi'... gets turned into: adeste-choir-00.midi adeste-organ-00.midi adeste-organ-01.midi adeste-organ-02.midi adeste-00.midi adeste-01.midi adeste-02.midi adeste-03.midi adeste-04.midi However, if you print a distinguishable string whenever you create a midi file, it would be a relatively simple matter to rename each midi filename to each respective string: New name for MIDI file:Adeste fideles congo.mid New name for MIDI file:Adeste fideles organ.mid New name for MIDI file:Adeste fideles right.mid New name for MIDI file:Adeste fideles left+pedal.mid New name for MIDI file:Adeste fideles descant.mid New name for MIDI file:Adeste fideles soprano.mid New name for MIDI file:Adeste fideles alto.mid New name for MIDI file:Adeste fideles tenor.mid New name for MIDI file:Adeste fideles bass.mid The challenge for my doing this without using bash arrays¹ would be getting each line in the output: MIDI output to `adeste-choir.midi'... to be immediately preceded or followed by: New name for MIDI file:Adeste fideles congo.mid because the only methods I know for printing an arbitrary line will print them all in a heap at the very end, after the last PostScript file has been converted and deleted. #(format (current-error-port) "New name for MIDI file:Adeste fideles congo.mid\n") \midi % MIDI-generating command placed before or after as convenient. is the method I currently use for writing strings. "write-me" is allegedly another method. "ly:message" might be another, but any documentation on these things is either opaque or absent. Perhaps someone else will chip in... ¹or you could pack the filenames in one bash string, delimited with a forbidden character like / or : between each one. Cheers, David. _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user