midi volume/ s1*0 trick in Frescobaldi Score Wizard (was Re: Off-topic: Automatically create rehearsal files from SATB midi file)
Op Mon, 20 Jan 2014 09:41:06 +0100 Johan Vromans jvrom...@squirrel.nl schreef: BTW: Whoever maintains the new score wizard: the s1*0\f trick to get the midi volume right is no longer necessary for LilyPond 2.18. I changed it in the following way: diff --git a/frescobaldi_app/scorewiz/parts/vocal.py b/frescobaldi_app/scorewiz/parts/vocal.py index 79857bc..1d7500d 100644 --- a/frescobaldi_app/scorewiz/parts/vocal.py +++ b/frescobaldi_app/scorewiz/parts/vocal.py @@ -615,7 +615,8 @@ class Choir(VocalPart): # Append voice to the rehearsalMidi function name = voice2id[voice] + str(num or '') seq = ly.dom.Seq(ly.dom.Voice(name, parent=ly.dom.Staff(name, parent=choir))) -ly.dom.Text('s1*0\\f', seq) # add one dynamic +if builder.lyVersion (2, 18, 0): +ly.dom.Text('\\f', seq) # add one dynamic ly.dom.Identifier(ref, seq) # add the reference to the voice book = ly.dom.Book() It seems to work correctly. Wilbert -- Wilbert Berendsen (http://www.wilbertberendsen.nl) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
Federico Bruni: 2014/1/21 Vaughan McAlley vaug...@mcalley.net.au On 20 January 2014 07:09, Colin Campbell c...@shaw.ca wrote: \set Score.midiPanPosition = #RIGHT \set Staff.midiPanPosition = #LEFT This is missing in the 2.18 changes, so I didn’t know about it until now. Very nice! It's not even documented yet: https://code.google.com/p/lilypond/issues/detail?id=3601 http://www.lilypond.org/doc/v2.18/Documentation/internals/midi_005fcontrol_005ffunction_005fperformer Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
Am 2014-01-22 um 03:35 schrieb k...@aspodata.se: Federico Bruni: 2014/1/21 Vaughan McAlley vaug...@mcalley.net.au On 20 January 2014 07:09, Colin Campbell c...@shaw.ca wrote: \set Score.midiPanPosition = #RIGHT \set Staff.midiPanPosition = #LEFT This is missing in the 2.18 changes, so I didn’t know about it until now. Very nice! It's not even documented yet: https://code.google.com/p/lilypond/issues/detail?id=3601 http://www.lilypond.org/doc/v2.18/Documentation/internals/midi_005fcontrol_005ffunction_005fperformer Good hints! Can you explain the difference between Pan and Balance? Greetlings, Hraban --- fiëé visuëlle Henning Hraban Ramm http://www.fiee.net http://angerweit.tikon.ch/lieder/ https://www.cacert.org (I'm an assurer) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
Henning Hraban Ramm lilypon...@fiee.net writes: Am 2014-01-22 um 03:35 schrieb k...@aspodata.se: Federico Bruni: 2014/1/21 Vaughan McAlley vaug...@mcalley.net.au On 20 January 2014 07:09, Colin Campbell c...@shaw.ca wrote: \set Score.midiPanPosition = #RIGHT \set Staff.midiPanPosition = #LEFT This is missing in the 2.18 changes, so I didn’t know about it until now. Very nice! It's not even documented yet: https://code.google.com/p/lilypond/issues/detail?id=3601 http://www.lilypond.org/doc/v2.18/Documentation/internals/midi_005fcontrol_005ffunction_005fperformer Good hints! Can you explain the difference between Pan and Balance? It is likely not distinguished all too much in software synthesizers, but if you take an accordion as an example instrument, Pan indicates where the instrument is standing in relation to the listener, and Balance indicates the volume distribution between bass and treble side. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
Colin Campbell c...@shaw.ca writes: You're on the right track with File|New Score With Wizard. The Parts tab has a section for Vocal and under it, you should choose Choir. That opens a set of parameters on the right side of the panel, and among them is the option to generate rehearsal MIDI files. Okay, found it. I'm gonna give this a try. Do you know why \rehearsalMidi requires the lyrics? It doesn't seem to serve a purpose. BTW: Whoever maintains the new score wizard: the s1*0\f trick to get the midi volume right is no longer necessary for LilyPond 2.18. -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
Johan Vromans jvrom...@squirrel.nl writes: Colin Campbell c...@shaw.ca writes: You're on the right track with File|New Score With Wizard. The Parts tab has a section for Vocal and under it, you should choose Choir. That opens a set of parameters on the right side of the panel, and among them is the option to generate rehearsal MIDI files. Okay, found it. I'm gonna give this a try. Do you know why \rehearsalMidi requires the lyrics? It doesn't seem to serve a purpose. BTW: Whoever maintains the new score wizard: the s1*0\f trick to get the midi volume right is no longer necessary for LilyPond 2.18. For templates, I'd strongly advise against s1*0 anyway. Better use (namely, a chord without content) which does not set the default duration to something that will cause serious headaches when following material relies on a default information. For example, if you write \new Voice { g a b c' } { \f } \addlyrics { Is this for real? } you get /tmp/rup.ly:2:17: warning: Two simultaneous lyric events, junking this one \addlyrics { Is this for real? } /tmp/rup.ly:2:14: warning: Previous lyric event here \addlyrics { Is this for real? } /tmp/rup.ly:2:22: warning: Two simultaneous lyric events, junking this one \addlyrics { Is this for real? } /tmp/rup.ly:2:14: warning: Previous lyric event here \addlyrics { Is this for real? } /tmp/rup.ly:2:26: warning: Two simultaneous lyric events, junking this one \addlyrics { Is this for real? } /tmp/rup.ly:2:14: warning: Previous lyric event here \addlyrics { Is this for real? } And no lyrics at all appear. Using instead of s1*0 does not have the problem. Since a template is _supposed_ to be augmented by the user, it's better to use elements that carry fewer surprises with them. as a means to anchor events on should work for LilyPond versions reaching back into ancient history. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
David Kastrup d...@gnu.org writes: Johan Vromans jvrom...@squirrel.nl writes: Colin Campbell c...@shaw.ca writes: You're on the right track with File|New Score With Wizard. The Parts tab has a section for Vocal and under it, you should choose Choir. That opens a set of parameters on the right side of the panel, and among them is the option to generate rehearsal MIDI files. Okay, found it. I'm gonna give this a try. Do you know why \rehearsalMidi requires the lyrics? It doesn't seem to serve a purpose. BTW: Whoever maintains the new score wizard: the s1*0\f trick to get the midi volume right is no longer necessary for LilyPond 2.18. For templates, I'd strongly advise against s1*0 anyway. Better use (namely, a chord without content) which does not set the default duration to something that will cause serious headaches when following material relies on a default information. For example, if you write \new Voice { g a b c' } { \f } \addlyrics { Is this for real? } Argh. The above is the _fixed_ version. The defective version is, of course: \new Voice { g a b c' } { s1*0\f } \addlyrics { Is this for real? } The rest stands: you get /tmp/rup.ly:2:17: warning: Two simultaneous lyric events, junking this one \addlyrics { Is this for real? } /tmp/rup.ly:2:14: warning: Previous lyric event here \addlyrics { Is this for real? } /tmp/rup.ly:2:22: warning: Two simultaneous lyric events, junking this one \addlyrics { Is this for real? } /tmp/rup.ly:2:14: warning: Previous lyric event here \addlyrics { Is this for real? } /tmp/rup.ly:2:26: warning: Two simultaneous lyric events, junking this one \addlyrics { Is this for real? } /tmp/rup.ly:2:14: warning: Previous lyric event here \addlyrics { Is this for real? } And no lyrics at all appear. Using instead of s1*0 does not have the problem. Since a template is _supposed_ to be augmented by the user, it's better to use elements that carry fewer surprises with them. as a means to anchor events on should work for LilyPond versions reaching back into ancient history. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
Hi, I used this (which might be adapted from Frescobaldi or the LSR). It requires the music to be written into \soprano \alto \tenor and \bass (but this can for sure be adapted). The Score uses the default instrument and has a reduced volume compared to the Staff given by the name variable. This Staff can also have a different instrument. Usage: \rehearsalMidi soprano oboe \text Here is the function definition: rehearsalMidi = #(define-music-function (parser location name midiInstrument lyrics) (string? string? ly:music?) #{ \unfoldRepeats \new Staff = soprano \new Voice = soprano { \f \soprano } \new Staff = alto \new Voice = alto { \f \alto } \new Staff = tenor \new Voice = tenor { \f \tenor } \new Staff = bass \new Voice = bass { \f \bass } \context Staff = $name { \set Score.midiMinimumVolume = #0.5 \set Score.midiMaximumVolume = #0.5 \set Score.tempoWholesPerMinute = #(ly:make-moment 80 4) \set Staff.midiMinimumVolume = #0.8 \set Staff.midiMaximumVolume = #1.0 \set Staff.midiInstrument = $midiInstrument } \new Lyrics \with { alignBelowContext = $name } \lyricsto $name $lyrics #}) Cheers, Joram PS: I always wanted to have it surrounded by this book and score blocks, but that never worked out: midifor = # (define-scheme-function (parser location name midiInstrument lyrics) (string? string? ly:music?) #{ \book { \bookOutputSuffix $name \score { \rehearsalMidi $name $midiInstrument $lyrics \midi { } } } #}) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
Noeck noeck.marb...@gmx.de writes: I used this (which might be adapted from Frescobaldi or the LSR). It requires the music to be written into \soprano \alto \tenor and \bass (but this can for sure be adapted). So you want lyrics events in the midi. For karaoke? -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
So you want lyrics events in the midi. For karaoke? It's more like Why not/Just because I can. I implemented it like that back then. As at least in Timidity the timing of music and the lyrics is not in sync, I would remove it, if I used it now. Cheers, Joram ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
Noeck noeck.marb...@gmx.de writes: So you want lyrics events in the midi. For karaoke? It's more like Why not/Just because I can. I implemented it like that back then. As at least in Timidity the timing of music and the lyrics is not in sync, I would remove it, if I used it now. Timidity has several options affecting synchronization. I haven't managed to get useful results using any combination of them. Historically, LilyPond was to blame for _some_ discrepancies because different defaults for autoBeaming in layout and midi led to different melismata. However, even after fixing this (issue 2414, version 2.15.43) and after Rosegarden (a Midi sequencer) displays sensibly aligned lyrics, Timidity tends to be totally off, regardless which options one tries playing with. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
On 20 January 2014 07:09, Colin Campbell c...@shaw.ca wrote: \set Score.midiPanPosition = #RIGHT \set Staff.midiPanPosition = #LEFT This is missing in the 2.18 changes, so I didn’t know about it until now. Very nice! Vaughan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
2014/1/21 Vaughan McAlley vaug...@mcalley.net.au On 20 January 2014 07:09, Colin Campbell c...@shaw.ca wrote: \set Score.midiPanPosition = #RIGHT \set Staff.midiPanPosition = #LEFT This is missing in the 2.18 changes, so I didn’t know about it until now. Very nice! It's not even documented yet: https://code.google.com/p/lilypond/issues/detail?id=3601 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Off-topic: Automatically create rehearsal files from SATB midi file
I'm sorry that that I'm going off-topic here (well, it's not /that/ off-topic), but I thought that if I could find anybody who knew how to do what I'm trying to achieve right now, it would be a hardcore LilyPond user :) Anyhow, I'm using LilyPond to output midi files of my SATB arrangements. Now, I want to create individual mp3 rehearsal files for each voice. That is, for sopranos, I want a file that is mixed so that the soprano part is the loudest, for the altos I want the alto part to be the loudest, and so on. I'm writing a bash script for achieving all this, but where I run into trouble is when I try to play a midi file from the terminal while setting the initial volume for each track. I simply don't know how to achieve this. I've tried using timidity http://timidity.sourceforge.net/ but it doesn't seem to have any way of achieving this. I've also tried fluidsynth, and have managed to send CC#7 and CC#11 commands at very start, but fluidsynth seems to send these before the midi file has been properly set up, which mean they don't have any effect (see discussion of this attempt here http://nongnu.13855.n7.nabble.com/How-can-I-start-fluidsynth-playback-with-certain-cc-commands-specified-from-the-very-start-td177680.html ). So, right now, I'm kind of stuck. I've been trying to solve this problem for a couple of days now but without geting anywhere. Does anyone in the LilyPond community have any suggestions on how to do it? -- View this message in context: http://lilypond.1069038.n5.nabble.com/Off-topic-Automatically-create-rehearsal-files-from-SATB-midi-file-tp158190.html Sent from the User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
Speldosa wrote Sunday, January 19, 2014 12:51 PM Anyhow, I'm using LilyPond to output midi files of my SATB arrangements. Now, I want to create individual mp3 rehearsal files for each voice. That is, for sopranos, I want a file that is mixed so that the soprano part is the loudest, for the altos I want the alto part to be the loudest, and so on. Why not run LilyPond four times with the voice you want set to \fff and all the rest to \ppp? Trevor ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
After beating my head against the wall on a problem like that for days i would change the dynamics in the LilyPond file and run a special rehearsal version, until you figure out the more clever method you propose. Shane On Sun, Jan 19, 2014 at 7:51 AM, Speldosa l4rs...@gmail.com wrote: I'm sorry that that I'm going off-topic here (well, it's not /that/ off-topic), but I thought that if I could find anybody who knew how to do what I'm trying to achieve right now, it would be a hardcore LilyPond user :) Anyhow, I'm using LilyPond to output midi files of my SATB arrangements. Now, I want to create individual mp3 rehearsal files for each voice. That is, for sopranos, I want a file that is mixed so that the soprano part is the loudest, for the altos I want the alto part to be the loudest, and so on. I'm writing a bash script for achieving all this, but where I run into trouble is when I try to play a midi file from the terminal while setting the initial volume for each track. I simply don't know how to achieve this. I've tried using timidity http://timidity.sourceforge.net/ but it doesn't seem to have any way of achieving this. I've also tried fluidsynth, and have managed to send CC#7 and CC#11 commands at very start, but fluidsynth seems to send these before the midi file has been properly set up, which mean they don't have any effect (see discussion of this attempt here http://nongnu.13855.n7.nabble.com/How-can-I-start-fluidsynth-playback-with-certain-cc-commands-specified-from-the-very-start-td177680.html ). So, right now, I'm kind of stuck. I've been trying to solve this problem for a couple of days now but without geting anywhere. Does anyone in the LilyPond community have any suggestions on how to do it? -- View this message in context: http://lilypond.1069038.n5.nabble.com/Off-topic-Automatically-create-rehearsal-files-from-SATB-midi-file-tp158190.html Sent from the User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
2014/1/19 Shane Brandes sh...@grayskies.net: After beating my head against the wall on a problem like that for days i would change the dynamics in the LilyPond file and run a special rehearsal version, until you figure out the more clever method you propose. For balancing volumes of different voices it would probably be best to use midiMaximumVolume and midiMinimumVolume. I use something like this, you may see here: https://github.com/janek-warchol/warsztat-nutowy/tree/master/szablony/ch%C3%B3ralny%20dla%20epifanii (in Polish, but it may help you nevertheless) best, Janek ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
Well, I could come to think of several different solutions if I just wanted to do this a couple of times. However, these are files that I constantly update and change and I would like to not have to make the changes in 9 different files every time (some of the arrangements are for SSAATTBB). I did things like that last year. Never again! 2014 is the year of automation for me :) -- View this message in context: http://lilypond.1069038.n5.nabble.com/Off-topic-Automatically-create-rehearsal-files-from-SATB-midi-file-tp158190p158199.html Sent from the User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
Speldosa l4rs...@gmail.com writes: Anyhow, I'm using LilyPond to output midi files of my SATB arrangements. Now, I want to create individual mp3 rehearsal files for each voice. That is, for sopranos, I want a file that is mixed so that the soprano part is the loudest, for the altos I want the alto part to be the loudest, and so on. I wrote (and still use) a tool that does (almost) exactly that. It reads a MIDI with chords and voices, and outputs a separate MIDI for each voice, with the accompagniment mixed in at a lower volume. It does not mix in the other voices although that's a small change. It requires predefined names for the individual voices, but that can be adapted easily. Let me know if you're interested, I'm more than happy to share. -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
On 19.01.2014 13:51, Speldosa wrote: I want a file that is mixed so that the soprano part isthe loudest, for the altos I want the alto part to be the loudest, and so on. I don't understand your problem, but I do this without volume adjustments, based on several midi scores along the lines of: \new Staff = backing { \set Staff.midiInstrument = #choir aahs ..allvoices.. } \new Staff = solo { \set Staff.midiInstrument = violin ..chosenvoice.. } Cheers, Robin ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
On 01/19/2014 05:51 AM, Speldosa wrote: I'm sorry that that I'm going off-topic here (well, it's not /that/ off-topic), but I thought that if I could find anybody who knew how to do what I'm trying to achieve right now, it would be a hardcore LilyPond user :) Anyhow, I'm using LilyPond to output midi files of my SATB arrangements. Now, I want to create individual mp3 rehearsal files for each voice. That is, for sopranos, I want a file that is mixed so that the soprano part is the loudest, for the altos I want the alto part to be the loudest, and so on. If you're using Frescobaldi, just set up a new score and on the Parts tab, check the box for rehearsal MIDI files. Then, go into the rehearsalMidi section of the generated score and make the following tweaks: first, \set Score.midiMaximumVolume = #0.6 instead of the default 0.5, which gives (harmless) errors about (de) crescendos when it's equal to MinimumVolume next, add the following lines, in the same section: \set Score.midiPanPosition = #RIGHT \set Staff.midiPanPosition = #LEFT This gives separate MIDI files for each part, with the chosen part on the left and the other voices on the right. The last step is to convert the MIDI files to MP3 with Timidity, and I have a bash script in my ~/bin(called midi2mp3) to do that: *% #!/bin/bash for f in *.mid*; do timidity -Ow -o - $f | lame - $f.mp3; done ***%*** The above is known to work with LP 2.19 and requires timidity and lame. I was delighted when the new midi functions came into LilyPond, as I used to generate the MIDIs then open them with Rosegarden to set the panning four times for each piece. With the new midiPanPosition function, that's all done in the compilation step, and I heap praises on the heads of all who have made it possible. HTH Colin -- I've learned that you shouldn't go through life with a catcher's mitt on both hands. You need to be able to throw something back. -Maya Angelou, poet (1928- ) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
Colin Campbell c...@shaw.ca writes: If you're using Frescobaldi, just set up a new score and on the Parts tab, check the box for rehearsal MIDI files. Then, go into the rehearsalMidi section of the generated score and make the following tweaks: You lost me completely... set up a new score -- with the wizard, apparently on the Parts tab check the box for rehearsal MIDI files -- I can't add the voices (S A T B) here, but there's no check box. Can you give more precise/specific instructions? -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Off-topic: Automatically create rehearsal files from SATB midi file
On 01/19/2014 03:20 PM, Johan Vromans wrote: Colin Campbell c...@shaw.ca writes: If you're using Frescobaldi, just set up a new score and on the Parts tab, check the box for rehearsal MIDI files. Then, go into the rehearsalMidi section of the generated score and make the following tweaks: You lost me completely... set up a new score -- with the wizard, apparently on the Parts tab check the box for rehearsal MIDI files -- I can't add the voices (S A T B) here, but there's no check box. Can you give more precise/specific instructions? Sorry, Johan, I was a bit rushed earlier. You're on the right track with File|New Score With Wizard. The Parts tab has a section for Vocal and under it, you should choose Choir. That opens a set of parameters on the right side of the panel, and among them is the option to generate rehearsal MIDI files. Cheers, Colin -- I find television very educating. Every time somebody turns on the set, I go into the other room and read a book. -Groucho Marx, 1890-1977 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user