Thanks David and Simon for your kind help. I used David's solution and it works brilliantly. Very nice. I didn't know of this NullVoice context, I'll take a look at it.
Nice day to all of you Joseph On Mon, Apr 4, 2016 at 7:57 AM -0700, "Simon Albrecht" <simon.albre...@mail.de<mailto:simon.albre...@mail.de>> wrote: Hi Joseph, a more common approach to the situation is using a separate music variable containing information common to all parts. E.g. %%%%%%%%%%%%% aux = { \tempo 4 = 100 s1 \bar "|." } musicOne = { e'1 } musicTwo = { c'1 } \score { << \new Staff << \new NullVoice \aux \new Voice \musicOne >> \new Staff \new Voice \musicTwo >> \layout {} } \score { \new Staff << \new NullVoice \aux \new Voice \musicOne >> \midi {} } %%%%%%%%%%%%%% HTH, Simon On 04.04.2016 13:43, Joseph Chrestien wrote: > > Hi all, > > is it possible to change all notes in a voice to skips through a > function ? > > E.g. ` \silence c4 \tempo 4=100 f8\p g8 ` would be compiled as ` s4 \tempo > 4=100 s8\p s8 `. Note all other events would stay the same. > > Below are the context and minimal code. > > Thanks! > Jo Chrestien > > > > > ----- > > PS. Context : I am editing a choral score with multiple MIDI > outputs (4 voice-by-voice MIDI outputs and 1 polyphonic output). My > goal is > to tweak the tempo in all MIDI outputs with only one hand entry. > > So far I indicated (invisible) tempo changes in only one of the > voices. This > works like a charm for the polyphonic output, but when individual > voices are > printed to MIDI it logically does not affect their tempo. > > So I want to generate a silent clone of that "tempo-adapted" voice and > include > > it in the split MIDI output, as a new voice. > > Is there some kind of \silence function I could call to change tempo in > split MIDI? This function would force all note events of \sopranoMusic to > become skip events (e.g. c4 --> s4). > > ------ > PPS. Minimal code: > > ``` > \version "2.18.2" > > sopranoMusic = \relative c'' { > \cadenzaOn > % here are the invisible tempo marks that I don't want to copy > manually in > other voices > \set Score.tempoHideNote = ##t > \tempo 4=200 > c\breve g\breve > \tempo 4=60 > a8 b8 c4 > } > > altoMusic = \relative c' { > \cadenzaOn > e\breve e\breve > f8 g8 e2 > } > > silence = #(define-music-function (parser location my-music) > (ly:music?) > ;change everything to silence > ;........... > my-music) > > > % alto-only MIDI output > \score { > \new Staff << > \new Voice = "1" { \silence \sopranoMusic } > > % just to get the tempo modifications : no music should be played > \new Voice = "2" { \altoMusic } % > >> > \midi{} > } > > ``` > > > > _______________________________________________ > 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