[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MIDI and template for dynamics
From: |
Jan-Peter Voigt |
Subject: |
Re: MIDI and template for dynamics |
Date: |
Tue, 31 May 2016 10:07:04 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 |
Hello Kaj,
while writing my last message, I was distracted and in a hurry ;-)
Am 31.05.2016 um 08:33 schrieb Kaj Persson:
Sorry, I do not exactly understand the intention of your proposal. I
am almost always using two \score sections, one for the midi and one
for the layout (pdf). There are many reasons for that, among others
"\unfoldRepeats" to take care of repeats. There are also other
circumstances motivating this procedure.
...
I might have misunderstood you, and do not see the innermost intention
with your suggestion, so please come back and explain.
If you have two score, one for MIDI and one for PDF, you can tag dynamic
events with (for example) \tag #'only-midi and then \removeWithTag
#'only-midi inside the PDF score, when you combine more then one voice
in the Staff. There are sometimes different needs for dynamics, when
creating PDF or MIDI.
If this is a common need, you might also take a look at
http://lsr.di.unimi.it/LSR/Item?id=372
After all, your suggestion with including the dynamics template in the
voice itself is the best for the moment, because it in fact does work.
I have tested with the music I am working with for the moment. The
result is what I want, and the midi, the strength of the notes is
following the dynamics template. However it is a pity that one has to
define the template in every voice, instead of every staff or even
group of staves. And still, I cannot understand why I have to do so,
and what is happening when I put a name on one of the voices, as it
works without this name.
I don't understand, why it *does* work in your first example without a
name. As long as the dynamic events are created in a separate voice,
they shouldn't touch the midi-notes in any *other* voice. If you add the
template to the staff, it should create a separate voice context (if not
already defined with \new Voice). I didn't work that much with MIDI in
lilypond, so I don't know, if the dynamic level somehow relates to or is
stored with the context-id.
But I did work a lot on vocal music. You might have a look at my article
at http://lilypondblog.org/2014/07/trees-music-and-lilypond/, where I
describe some theoretical aspects on the hierarchical structure of
lilypond scores.
To make it short: If you have one function "createScore" that looks for
a global - in your case dynamic - variable/template for this score, it
can automatically construct the needed score and add the dynamics to
every voice.
If you are interested, I can explain more concisely.
HTH
Jan-Peter
Re: MIDI and template for dynamics, Phil Holmes, 2016/05/30