lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scheme function to force any noteEvent to a skipEvent


From: Joseph Chrestien
Subject: Scheme function to force any noteEvent to a skipEvent
Date: Mon, 4 Apr 2016 11:43:10 +0000

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{}
}

```


reply via email to

[Prev in Thread] Current Thread [Next in Thread]