Re: MIDI, dynamics and expression

2023-04-07 Thread Knute Snortum
On Fri, Apr 7, 2023 at 2:02 AM Dario Marrini 
wrote:

> Hi lilypond people,
> I tried adding these :
>
> midiMinimumVolume = #0.05
> midiMaximumVolume = #0.95
>
> but I got no so different results;
>

Hmm, with the code below, I got very noticable results:

%%%
\version "2.24.1"

\score {
  \new Voice { c'4\pp\< 4 4 4 | 4 4 4 4\ff }
  \midi {
\tempo 4 = 120
\context {
  \Score
  midiMinimumVolume = #0.1
  % midiMinimumVolume = #0.50
  midiMaximumVolume = #0.99
  % midiMaximumVolume = #0.50
}
  }
  \layout {}
}
%%%

--
Knute Snortum


Re: MIDI, dynamics and expression

2023-04-07 Thread Dario Marrini
Hi lilypond people,
I tried adding these :

midiMinimumVolume = #0.05
midiMaximumVolume = #0.95

but I got no so different results; at this point, I should know how to set
a specific output volume to a specific dynamic signs; even because I don't
know default values

regards

Il giorno ven 7 apr 2023 alle ore 10:14 Dario Marrini <
dario.marr...@gmail.com> ha scritto:

> Hi lilypond people,
> I'm trying to understand how all this works; there is a short code file as
> attachment, with midi and pdf ones;  I tried to use dynamics and other
> signs, but the difference on sound between signed (with 'p' and others
> signs) and not signed notes it's quite not hearable; I found in docs
> instructions about how to modify the output level of each midi instrument ,
> and the same about output level of applied signs; every time docs refers to
> a scm/midi.scm file, for default settings, but I can't understand its
> values; I need to know what defaults settings are, for trying to manage
> them. Any help about is very appreciated
>
> regards
>
> dario m.
>
>
>


MIDI, dynamics and expression

2023-04-07 Thread Dario Marrini
Hi lilypond people,
I'm trying to understand how all this works; there is a short code file as
attachment, with midi and pdf ones;  I tried to use dynamics and other
signs, but the difference on sound between signed (with 'p' and others
signs) and not signed notes it's quite not hearable; I found in docs
instructions about how to modify the output level of each midi instrument ,
and the same about output level of applied signs; every time docs refers to
a scm/midi.scm file, for default settings, but I can't understand its
values; I need to know what defaults settings are, for trying to manage
them. Any help about is very appreciated

regards

dario m.


legature_e_dinamiche.midi
Description: MIDI audio
\version "2.24.1"

global = {
  \key c \major
  \time 4/4
  \tempo "Allegro" 4=128
}

violin = \relative c' {
  \global
  % Qui segue la musica.
  c4 d8 e f g a b c4 b8 a g f e d
  c4\p\cresc\( d8 e f g a b\) c4\f\dim b8 a g f e d 
  c4\p\cresc\( d8 e\) f\( g a b\) c4\ff\dim b8 a g f e d\! 
  c2 r
}

\score {
  \new Staff \with {
instrumentName = "Violino"
midiInstrument = "string ensemble 1"
  } \violin
  \layout { }
  \midi {
\tempo 4=128
  }
}


legature_e_dinamiche.pdf
Description: Adobe PDF document


Re: Bug on MIDI dynamics

2019-11-18 Thread Paolo Prete
 Thanks Thomas. Your note fixed all.
I found the per-voice association casually, then I even googled "lilypond 
dynamics per-voice" but could not find anything specific for 2.19: then, 
without your suggestion, given that this default behaviour is not documented 
and the official snippets use another default behaviour, it seemed a bug.
Il lunedì 18 novembre 2019, 22:09:49 CET, Thomas Morley 
 ha scritto:  
 
 Am Mo., 18. Nov. 2019 um 17:00 Uhr schrieb Paolo Prete :
>
> Hello,
>
> Regarding my previous question,

Please link to it.

> I just checked that there's a bug on the dynamics of the produced midi output 
> for a piano staff.
> The bug can be reproduced on the 2.19  version. Please, check this snippet ( 
> from  http://lsr.di.unimi.it/LSR/Item?id=357 ), with Lilybin
>
> http://lilybin.com/eg700v/1
>
>
> The same error doesn't occur if you compile the snippet with 2.18 version.
>
> 1) Is there a workaround for that?
> 2) Is there a particular version of the 2.19 branch that doesn't cause the 
> bug?
>
> Thanks
> Paolo

I don't see any bug- nor error-description...

Dynamics are associated per Voice since 2.19.x.
In a Dynamics-context usually spacers are used, so it's pure graphic.

The voice-association seems to be a reasonable default.
If you want it different, add the "Dynamic_performer" to the context
of your choice in \midi {}

Probably a documentation-issue.

Cheers,
  Harm
  

Re: Bug on MIDI dynamics

2019-11-18 Thread Thomas Morley
Am Mo., 18. Nov. 2019 um 17:00 Uhr schrieb Paolo Prete :
>
> Hello,
>
> Regarding my previous question,

Please link to it.

> I just checked that there's a bug on the dynamics of the produced midi output 
> for a piano staff.
> The bug can be reproduced on the 2.19  version. Please, check this snippet ( 
> from  http://lsr.di.unimi.it/LSR/Item?id=357 ), with Lilybin
>
> http://lilybin.com/eg700v/1
>
>
> The same error doesn't occur if you compile the snippet with 2.18 version.
>
> 1) Is there a workaround for that?
> 2) Is there a particular version of the 2.19 branch that doesn't cause the 
> bug?
>
> Thanks
> Paolo

I don't see any bug- nor error-description...

Dynamics are associated per Voice since 2.19.x.
In a Dynamics-context usually spacers are used, so it's pure graphic.

The voice-association seems to be a reasonable default.
If you want it different, add the "Dynamic_performer" to the context
of your choice in \midi {}

Probably a documentation-issue.

Cheers,
  Harm



Re: Bug on MIDI dynamics

2019-11-18 Thread Paolo Prete
 It appears to happen because the 2.19 version seems to associate the MIDI 
output per-voice instead of per-staff. As a (ugly) workaround I used this 
(setting and soon after unsetting a voice):
LilyPond Score

| 
| 
|  | 
LilyPond Score

LilyPond Score made using LilyBin.
 |

 |

 |


It works, but I wonder if is there something better for fixing the problem, 
even as a workaround...

Il lunedì 18 novembre 2019, 17:00:36 CET, Paolo Prete 
 ha scritto:  
 
 Hello,
Regarding my previous question, I just checked that there's a bug on the 
dynamics of the produced midi output for a piano staff.The bug can be 
reproduced on the 2.19  version. Please, check this snippet ( from  
http://lsr.di.unimi.it/LSR/Item?id=357 ), with Lilybin
http://lilybin.com/eg700v/1


The same error doesn't occur if you compile the snippet with 2.18 version.
1) Is there a workaround for that?2) Is there a particular version of the 2.19 
branch that doesn't cause the bug? 
ThanksPaolo  

Bug on MIDI dynamics

2019-11-18 Thread Paolo Prete
Hello,
Regarding my previous question, I just checked that there's a bug on the 
dynamics of the produced midi output for a piano staff.The bug can be 
reproduced on the 2.19  version. Please, check this snippet ( from  
http://lsr.di.unimi.it/LSR/Item?id=357 ), with Lilybin
http://lilybin.com/eg700v/1


The same error doesn't occur if you compile the snippet with 2.18 version.
1) Is there a workaround for that?2) Is there a particular version of the 2.19 
branch that doesn't cause the bug? 
ThanksPaolo

Re: Controlling midi dynamics

2019-07-17 Thread David Sumbler
Thank you for all your help on this.  I now have an include file that
does more or less what I want, and of course I can tweak in further in
the future.

David


On Tue, 2019-07-16 at 15:11 +0200, Jean ABOU SAMRA wrote:
> 
> \version "2.19.83"
> 
> 
> 
> 
> %{ From 
> http://lilypond.org/doc/v2.19/Documentation/notation/controlling-midi-dynamics.fr.html
> 
> 
> midiMinimumVolume + (midiMaximumVolume - midiMinimumVolume) *
> fraction
> 
> 
> These are the volume coefficients ('fraction' above) applied to each
> dynamic.
> %}
> #(define (my-dynamic-absolute-volume-function dynamic-name)
>   (assoc-get dynamic-name
> '(
>   ; Adjust these values to get what you would like.
>   ; You can add other dynamics.
>   ; If an dynamic name is not found, the default dynamic values
> are used.
>   ("ff" . 0.95)
>   ("pp" . 0.3)
> )
> (default-dynamic-absolute-volume dynamic-name)))
> 
> 
> %{ These are the default equalizations applied to each MIDI
> instrument.
> An equalization consists in (min . max) where min is the value to
> apply for midiMinimumVolume and max for midiMaximumVolume.
> Keep refering to the formula above!
> %}
> #(define (my-instrument-equalizer instrument-name)
>   (assoc-get instrument-name
> '(
>   ; Adjust these values to get what you would like.
>   ; You can add other instrument names.
>   ; If an instrument name is not found, the default equalizer is
> used.
>   ("violin" . (0.1 . 0.4))
>   ("cello" . (0.5 1.0))
> )
> (default-instrument-equalizer instrument-name)))
> 
> 
> 
> 
> \midi {
>   \context {
> \Score
> instrumentEqualizer = #my-instrument-equalizer
> dynamicAbsoluteVolumeFunction = #my-dynamic-absolute-volume-
> function
>   }
> }
> 
> 
> 
> 
> violin = \new Voice \relative { c'4\pp d e f g\ff a b c }
> cello = \new Voice \relative { a,4\pp b c d e\ff f gis a }
> 
> 
> \score {
>   <<
> \new Staff \with { midiInstrument = "violin" } { \violin }
> \new Staff \with { midiInstrument = "cello" } { \cello }
>   >>
>   \midi { }
> }
> 
> 
> You can use an instrument equalizer and custom dynamic absolute
> volume values at the same time.
> Of course, instrument equalization can be achieved using \set
> Staff.midiMinimumVolume = min  \set Staff.maximumVolume = max …but
> the power of an instrument equalizer is that you can put it in a
> separate file and\include it, as you say that you generally want to
> hear the cello louder and the violin less loud.
> By the way, I find that the example given on
> http://lilypond.org/doc/v2.19/Documentation/notation/controlling-midi-dynamics.html#setting-midi-volumein
>  selected snippets at "Replacing default MIDI instrument
> equalization"is overly complicated. Why define the alist empty to
> append to it later?And why not just use assoc-get? It could be easily
> improved.
> Best regards,Jean Abou Samra
> > Le 15 juil. 2019 à 18:26, David Sumbler  a
> > écrit :
> > 
> > Hi Jean
> > 
> > That's great - I certainly now can get a greater range of dynamic
> > than before.  Thank you very much.
> > 
> > But I find that altering values in 'my-instrument-equalizer-alist'
> > has no effect at all.  How can I adjust the relative volumes of 2
> > different instruments - say, 'violin' and 'cello'.  (I find that in
> > the fluidr3_gm sound font, the cello is far quieter than the other
> > stringed instruments.) 
> > 
> > David
> > 
> > 
> > On Mon, 2019-07-15 at 17:41 +0200, Jean ABOU SAMRA wrote:
> > > Hi David,
> > > Your problem is not with the instrument, it's with the dynamics
> > > themselves.
> > > The algorithm that affects a volume to a note does a scale
> > > between midiMinimumVolume and midiMaximumVolume that includes all
> > > dynamics. Mathematically, you can think:
> > > volume = midiMinimumVolume + (midiMaximumVolume -
> > > midiMinimumVolume)*dynamic
> > > 
> > > Let me try a diagram:
> > > 
> > > 0   |   ppp   pp  p  mp  mf f ff
> > > fff     f sf  | 1
> > > no soundmidiMinimumVolume
> > >  midiMaximumVolume maximum volume
> > > possible
> > > 
> > > 
> > > Here you set midiMinimumVolume to 0 or almost and
> > > midiMaximumVolume to 1, so if there is not enough difference for
> > > you, you need to influence the scale between the two in addition
> > > to minimum and maximum volume.
> > > 
> > > Taking a look at 
> > > http://lilypond.org/doc/v2.19/Documentation/internals/dynamic_005fperformer
> > > suggests to set the dynamicAbsoluteVolumeFunction property. You
> > > will find its default in scm/midi.scm:
> > > 
> > > ;; define factor of total volume per dynamic marking(define-
> > > session-public absolute-volume-alist '())(set! absolute-volume-
> > > alist  (append   '( ("sf" . 1.00)   
> > >  

Re: Controlling midi dynamics

2019-07-16 Thread Jean ABOU SAMRA

\version "2.19.83"


%{ From 
http://lilypond.org/doc/v2.19/Documentation/notation/controlling-midi-dynamics.fr.html

midiMinimumVolume + (midiMaximumVolume - midiMinimumVolume) * fraction

These are the volume coefficients ('fraction' above) applied to each dynamic.
%}
#(define (my-dynamic-absolute-volume-function dynamic-name)
  (assoc-get dynamic-name
'(
  ; Adjust these values to get what you would like.
  ; You can add other dynamics.
  ; If an dynamic name is not found, the default dynamic values are used.
  ("ff" . 0.95)
  ("pp" . 0.3)
)
(default-dynamic-absolute-volume dynamic-name)))

%{ These are the default equalizations applied to each MIDI instrument.
An equalization consists in (min . max) where min is the value to apply for 
midiMinimumVolume and max for midiMaximumVolume.
Keep refering to the formula above!
%}
#(define (my-instrument-equalizer instrument-name)
  (assoc-get instrument-name
'(
  ; Adjust these values to get what you would like.
  ; You can add other instrument names.
  ; If an instrument name is not found, the default equalizer is used.
  ("violin" . (0.1 . 0.4))
  ("cello" . (0.5 1.0))
)
(default-instrument-equalizer instrument-name)))


\midi {
  \context {
\Score
instrumentEqualizer = #my-instrument-equalizer
dynamicAbsoluteVolumeFunction = #my-dynamic-absolute-volume-function
  }
}


violin = \new Voice \relative { c'4\pp d e f g\ff a b c }
cello = \new Voice \relative { a,4\pp b c d e\ff f gis a }

\score {
  <<
\new Staff \with { midiInstrument = "violin" } { \violin }
\new Staff \with { midiInstrument = "cello" } { \cello }
  >>
  \midi { }
}



You can use an instrument equalizer and custom dynamic absolute volume values 
at the same time.

Of course, instrument equalization can be achieved using
 \set Staff.midiMinimumVolume = min  \set Staff.maximumVolume = max …
but the power of an instrument equalizer is that you can put it in a separate 
file and
\include it, as you say that you generally want to hear the cello louder and 
the violin less loud.

By the way, I find that the example given on
http://lilypond.org/doc/v2.19/Documentation/notation/controlling-midi-dynamics.html#setting-midi-volume
 

in selected snippets at "Replacing default MIDI instrument equalization"
is overly complicated. Why define the alist empty to append to it later?
And why not just use assoc-get? It could be easily improved.

Best regards,
Jean Abou Samra

> Le 15 juil. 2019 à 18:26, David Sumbler  a écrit :
> 
> Hi Jean
> 
> That's great - I certainly now can get a greater range of dynamic than 
> before. Thank you very much.
> 
> But I find that altering values in 'my-instrument-equalizer-alist' has no 
> effect at all. How can I adjust the relative volumes of 2 different 
> instruments - say, 'violin' and 'cello'. (I find that in the fluidr3_gm sound 
> font, the cello is far quieter than the other stringed instruments.)
> 
> David
> 
> 
> On Mon, 2019-07-15 at 17:41 +0200, Jean ABOU SAMRA wrote:
>> Hi David,
>> 
>> Your problem is not with the instrument, it's with the dynamics themselves.
>> The algorithm that affects a volume to a note does a scale between 
>> midiMinimumVolume and midiMaximumVolume that includes all dynamics. 
>> Mathematically, you can think:
>> volume = midiMinimumVolume + (midiMaximumVolume - midiMinimumVolume)*dynamic
>> 
>> Let me try a diagram:
>> 
>> 0   |   ppp   pp  p  mp  mf f ff fff     
>> f sf  | 1
>> no soundmidiMinimumVolume
>>   midiMaximumVolume maximum volume possible
>> 
>> 
>> Here you set midiMinimumVolume to 0 or almost and midiMaximumVolume to 1, so 
>> if there is not enough difference for you, you need to influence the scale 
>> between the two in addition to minimum and maximum volume.
>> 
>> Taking a look at 
>> http://lilypond.org/doc/v2.19/Documentation/internals/dynamic_005fperformer 
>> 
>> suggests to set the dynamicAbsoluteVolumeFunction property. You will find 
>> its default in scm/midi.scm:
>> 
>> ;; define factor of total volume per dynamic marking
>> (define-session-public absolute-volume-alist '())
>> (set! absolute-volume-alist
>>   (append
>>'(
>>  ("sf" . 1.00)
>>  ("f" . 0.95)
>>  ("" . 0.92)
>>  ("fff" . 0.85)
>>  ("ff" . 0.80)
>>  ("f" . 0.75)
>>  ("mf" . 0.68)
>>  ("mp" . 0.61)
>>  ("p" . 0.55)
>>  ("pp" . 0.49)
>>  ("ppp" . 0.42)
>>  ("" . 0.34)
>>  ("p" . 0.25)
>>  )
>>

Re: Controlling midi dynamics

2019-07-15 Thread David Sumbler
Hi Jean

That's great - I certainly now can get a greater range of dynamic than
before.  Thank you very much.

But I find that altering values in 'my-instrument-equalizer-alist' has
no effect at all.  How can I adjust the relative volumes of 2 different
instruments - say, 'violin' and 'cello'.  (I find that in the
fluidr3_gm sound font, the cello is far quieter than the other stringed
instruments.) 

David


On Mon, 2019-07-15 at 17:41 +0200, Jean ABOU SAMRA wrote:
> Hi David,
> Your problem is not with the instrument, it's with the dynamics
> themselves.
> The algorithm that affects a volume to a note does a scale between
> midiMinimumVolume and midiMaximumVolume that includes all dynamics.
> Mathematically, you can think:
> volume = midiMinimumVolume + (midiMaximumVolume -
> midiMinimumVolume)*dynamic
> 
> Let me try a diagram:
> 
> 0   |   ppp   pp  p  mp  mf f ff fff
>     f sf  | 1
> no soundmidiMinimumVolume
>  midiMaximumVolume maximum volume possible
> 
> 
> Here you set midiMinimumVolume to 0 or almost and midiMaximumVolume
> to 1, so if there is not enough difference for you, you need to
> influence the scale between the two in addition to minimum and
> maximum volume.
> 
> Taking a look at 
> http://lilypond.org/doc/v2.19/Documentation/internals/dynamic_005fperformer
> suggests to set the dynamicAbsoluteVolumeFunction property. You will
> find its default in scm/midi.scm:
> 
> ;; define factor of total volume per dynamic marking(define-session-
> public absolute-volume-alist '())(set! absolute-volume-alist 
> (append   '( ("sf" . 1.00) ("f" . 0.95) 
>("" . 0.92) ("fff" . 0.85) ("ff" . 0.80) 
>("f" . 0.75) ("mf" . 0.68) ("mp" . 0.61)   
>  ("p" . 0.55) ("pp" . 0.49) ("ppp" . 0.42)   
>  ("" . 0.34) ("p" . 0.25) )   absolute-
> volume-alist))
> (define-public (default-dynamic-absolute-volume s)  (assoc-get s
> absolute-volume-alist))
> so now you can modify it, for example:
> 
> \version "2.19.83"
> 
> 
> #(define (my-dynamic-absolute-volume-function dynamic-name)
>  (assoc-get dynamic-name
>   '(
>  ("sf" . 1.00)
>  ("f" . 0.95)
>  ("" . 0.92)
>  ("fff" . 0.85)
>  ("ff" . 0.95) ;; was 0.80
>  ("f" . 0.75)
>  ("mf" . 0.68)
>  ("mp" . 0.61)
>  ("p" . 0.55)
>  ("pp" . 0.10) ;; was 0.49
>  ("ppp" . 0.42)
>  ("" . 0.34)
>  ("p" . 0.25)
>)))
> 
> 
> \score {
>  \new Staff \with { midiInstrument = "trumpet" } {
>\set Score.midiMinimumVolume = 0.0
>\set Score.midiMaximumVolume = 1.0
>\set Score.dynamicAbsoluteVolumeFunction = #my-dynamic-absolute-
> volume-function
>a'8\pp b' cis'' d'' e''-.\ff d''-. cis''-. b'-. a'
>  }
>  \midi { }
> \layout { }
> }
> 
> You understand that default 'piano' is not so piano because we have
> to go to p.
> By adjusting the values in that associative list, you can play with
> dynamics and get the exact contrast you would like.
> Hope that helps.Kind regards,Jean Abou Samra.
> > Le 15 juil. 2019 à 16:16, David Sumbler  a
> > écrit :
> > 
> > 
> > \version "2.19.82"
> > 
> > #(define my-instrument-equalizer-alist '())
> > 
> > #(set! my-instrument-equalizer-alist
> >   (append
> >'(
> >  ("trumpet" . (0.01 . 0.99)))
> >my-instrument-equalizer-alist))
> > 
> > #(define (my-instrument-equalizer s)
> >   (let ((entry (assoc s my-instrument-equalizer-alist)))
> > (if entry
> >   (cdr entry
> > 
> > \score {
> >   \new Staff \with { midiInstrument = "trumpet" } {
> > %\set Score.midiMaximumVolume = #1
> > %\set Score.midiMinimumVolume = #0
> > \set Score.instrumentEqualizer = #my-instrument-equalizer
> > a'8\pp b' cis'' d'' e''-.\ff d''-. cis''-. b'-. a'
> >   }
> >   \midi { }
> > }
> > 
> > 
> > Can somebody explain how I can control the absolute minimum and
> > maximum
> > values of individual instruments in midi?
> > 
> > In the above snippet, I expect to find the first bar almost
> > inaudible
> > and the second bar extremely loud.  However, I find that the
> > difference
> > between the pp section and the ff is quite limited.  If I reduce
> > the
> > supposed maximum volume of the trumpet to, say, 0.5, then the pp
> > will
> > indeed be very quiet, but when I restore the second parameter to
> > 0.99
> > as here, then the pp passage is much louder than previously.
> > 
> > If I uncomment the Score.midiMaximumVolume line and the following
> > one,
> > it makes little difference.  The Internals Reference states that
> > valid
> > values for these 2 parameters are 

Re: Controlling midi dynamics

2019-07-15 Thread Jean ABOU SAMRA
Hi David,

Your problem is not with the instrument, it's with the dynamics themselves.
The algorithm that affects a volume to a note does a scale between 
midiMinimumVolume and midiMaximumVolume that includes all dynamics. 
Mathematically, you can think:
volume = midiMinimumVolume + (midiMaximumVolume - midiMinimumVolume)*dynamic

Let me try a diagram:

0   |   ppp   pp  p  mp  mf f ff fff     
f sf  | 1
no soundmidiMinimumVolume   
   midiMaximumVolume maximum volume possible


Here you set midiMinimumVolume to 0 or almost and midiMaximumVolume to 1, so if 
there is not enough difference for you, you need to influence the scale between 
the two in addition to minimum and maximum volume.

Taking a look at 
http://lilypond.org/doc/v2.19/Documentation/internals/dynamic_005fperformer 

suggests to set the dynamicAbsoluteVolumeFunction property. You will find its 
default in scm/midi.scm:

;; define factor of total volume per dynamic marking
(define-session-public absolute-volume-alist '())
(set! absolute-volume-alist
  (append
   '(
 ("sf" . 1.00)
 ("f" . 0.95)
 ("" . 0.92)
 ("fff" . 0.85)
 ("ff" . 0.80)
 ("f" . 0.75)
 ("mf" . 0.68)
 ("mp" . 0.61)
 ("p" . 0.55)
 ("pp" . 0.49)
 ("ppp" . 0.42)
 ("" . 0.34)
 ("p" . 0.25)
 )
   absolute-volume-alist))

(define-public (default-dynamic-absolute-volume s)
  (assoc-get s absolute-volume-alist))

so now you can modify it, for example:


\version "2.19.83"

#(define (my-dynamic-absolute-volume-function dynamic-name)
 (assoc-get dynamic-name
  '(
 ("sf" . 1.00)
 ("f" . 0.95)
 ("" . 0.92)
 ("fff" . 0.85)
 ("ff" . 0.95) ;; was 0.80
 ("f" . 0.75)
 ("mf" . 0.68)
 ("mp" . 0.61)
 ("p" . 0.55)
 ("pp" . 0.10) ;; was 0.49
 ("ppp" . 0.42)
 ("" . 0.34)
 ("p" . 0.25)
   )))

\score {
 \new Staff \with { midiInstrument = "trumpet" } {
   \set Score.midiMinimumVolume = 0.0
   \set Score.midiMaximumVolume = 1.0
   \set Score.dynamicAbsoluteVolumeFunction = 
#my-dynamic-absolute-volume-function
   a'8\pp b' cis'' d'' e''-.\ff d''-. cis''-. b'-. a'
 }
 \midi { }
\layout { }
}


You understand that default 'piano' is not so piano because we have to go to 
p.

By adjusting the values in that associative list, you can play with dynamics 
and get the exact contrast you would like.

Hope that helps.
Kind regards,
Jean Abou Samra.

> Le 15 juil. 2019 à 16:16, David Sumbler  a écrit :
> 
> 
> \version "2.19.82"
> 
> #(define my-instrument-equalizer-alist '())
> 
> #(set! my-instrument-equalizer-alist
>  (append
>   '(
> ("trumpet" . (0.01 . 0.99)))
>   my-instrument-equalizer-alist))
> 
> #(define (my-instrument-equalizer s)
>  (let ((entry (assoc s my-instrument-equalizer-alist)))
>(if entry
>  (cdr entry
> 
> \score {
>  \new Staff \with { midiInstrument = "trumpet" } {
> %\set Score.midiMaximumVolume = #1
> %\set Score.midiMinimumVolume = #0
>\set Score.instrumentEqualizer = #my-instrument-equalizer
>a'8\pp b' cis'' d'' e''-.\ff d''-. cis''-. b'-. a'
>  }
>  \midi { }
> }
> 
> 
> Can somebody explain how I can control the absolute minimum and maximum
> values of individual instruments in midi?
> 
> In the above snippet, I expect to find the first bar almost inaudible
> and the second bar extremely loud.  However, I find that the difference
> between the pp section and the ff is quite limited.  If I reduce the
> supposed maximum volume of the trumpet to, say, 0.5, then the pp will
> indeed be very quiet, but when I restore the second parameter to 0.99
> as here, then the pp passage is much louder than previously.
> 
> If I uncomment the Score.midiMaximumVolume line and the following one,
> it makes little difference.  The Internals Reference states that valid
> values for these 2 parameters are numbers between 0 and 1.  However, if
> I set midiMaximumVolume to 2, I find that the pp and the ff sections
> have the same volume as each other.  Further increases in
> midiMaximumVolume do not seem to make any difference.
> 
> In every case, the total dynamic range is considerably less than I
> would like.  How can I extend the dynamic range beyond the limited
> range I can currently get?
> 
> David
> 
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user

___
lilypond-user mailing list

Controlling midi dynamics

2019-07-15 Thread David Sumbler

\version "2.19.82"

#(define my-instrument-equalizer-alist '())

#(set! my-instrument-equalizer-alist
  (append
   '(
 ("trumpet" . (0.01 . 0.99)))
   my-instrument-equalizer-alist))
  
#(define (my-instrument-equalizer s)
  (let ((entry (assoc s my-instrument-equalizer-alist)))
(if entry
  (cdr entry

\score {
  \new Staff \with { midiInstrument = "trumpet" } {
%\set Score.midiMaximumVolume = #1
%\set Score.midiMinimumVolume = #0
\set Score.instrumentEqualizer = #my-instrument-equalizer
a'8\pp b' cis'' d'' e''-.\ff d''-. cis''-. b'-. a'
  }
  \midi { }
}


Can somebody explain how I can control the absolute minimum and maximum
values of individual instruments in midi?

In the above snippet, I expect to find the first bar almost inaudible
and the second bar extremely loud.  However, I find that the difference
between the pp section and the ff is quite limited.  If I reduce the
supposed maximum volume of the trumpet to, say, 0.5, then the pp will
indeed be very quiet, but when I restore the second parameter to 0.99
as here, then the pp passage is much louder than previously.

If I uncomment the Score.midiMaximumVolume line and the following one,
it makes little difference.  The Internals Reference states that valid
values for these 2 parameters are numbers between 0 and 1.  However, if
I set midiMaximumVolume to 2, I find that the pp and the ff sections
have the same volume as each other.  Further increases in
midiMaximumVolume do not seem to make any difference.

In every case, the total dynamic range is considerably less than I
would like.  How can I extend the dynamic range beyond the limited
range I can currently get?

David


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: How do I get MIDI dynamics from a \Dynamics staff?

2018-09-20 Thread H. S. Teoh
On Thu, Sep 20, 2018 at 05:06:48PM +0100, Peter Toye wrote:
>Guy,
> 
>Thanks. I've found the thread. It seems fairly complicated, and as
>I only use MIDI for proof-reading (proof-hearing?) I’ll ignore the
>dynamics altogether! Life's too short.

My usual approach, as always, is to use a separate score for midi:

%
% Just write your music this way:
%

upperPart = { ... }
dynPart = {
s1\ff   % ... etc.
}
lowerPart = { ... }

%
% The following can be pretty much copy-and-pasted to each
% piece:
%

% Score for layout
\score {
\new Staff { \upperPart }
\new Dynamics { \dynPart }
\new Staff { \lowerPart }
\layout {}
}

% Score for midi
\score {
% Explicitly merge dynPart into both parts so that
% dynamics will be applied correctly to both.
\new Staff << \upperPart \dynPart >>
\new Staff << \lowerPart \dynPart >>
\midi {}
}


T

-- 
Shin: (n.) A device for finding furniture in the dark.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: How do I get MIDI dynamics from a \Dynamics staff?

2018-09-20 Thread Peter Toye
Guy,

Thanks. I've found the thread. It seems fairly complicated, and as I only use 
MIDI for proof-reading (proof-hearing?) I’ll ignore the dynamics altogether! 
Life's too short.

Best regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com

-
Thursday, September 20, 2018, 1:45:25 PM, Guy Stalnaker wrote:


Peter,

Do a search in the list archives. There was an extended discussion about this 
very thing in the past month with multiple offered solutions.

Regards,

Guy

On Thu, Sep 20, 2018, 6:34 AM Peter Toye  wrote:
I want to have a Dynamics staff between the music staves on a PianoStaff, but 
this doesn't change the dynamics on the MIDI output. Is there any way of 
getting the MIDI output to use the \Dynamics? In the example below they all 
have the same (presumably default) dynamic (at least, when played through Nero 
Showtime).

\version "2.19.52"

\language "english"

\score {
 \new PianoStaff {
   <<
   \new Staff {
 \clef "treble"
 c''4 4 4 4
   }
   \new Dynamics {
s4\f 4\pp 4\ff 4\mp
   }
   \new Staff {
 \clef "bass"
 c4 4 4 4
   }
   >>
 }
 \midi {}

}


Regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.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: How do I get MIDI dynamics from a \Dynamics staff?

2018-09-20 Thread Guy Stalnaker
Peter,

Do a search in the list archives. There was an extended discussion about
this very thing in the past month with multiple offered solutions.

Regards,

Guy

On Thu, Sep 20, 2018, 6:34 AM Peter Toye  wrote:

> I want to have a Dynamics staff between the music staves on a PianoStaff,
> but this doesn't change the dynamics on the MIDI output. Is there any way
> of getting the MIDI output to use the \Dynamics? In the example below they
> all have the same (presumably default) dynamic (at least, when played
> through Nero Showtime).
>
> \version "2.19.52"
>
> \language "english"
>
> \score {
>  \new PianoStaff {
><<
>\new Staff {
>  \clef "treble"
>  c''4 4 4 4
>}
>\new Dynamics {
> s4\f 4\pp 4\ff 4\mp
>}
>\new Staff {
>  \clef "bass"
>  c4 4 4 4
>}
>>>
>  }
>  \midi {}
>
> }
>
>
> Regards,
>
> Peter
> mailto:lilyp...@ptoye.com 
> www.ptoye.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


How do I get MIDI dynamics from a \Dynamics staff?

2018-09-20 Thread Peter Toye
I want to have a Dynamics staff between the music staves on a PianoStaff, but 
this doesn't change the dynamics on the MIDI output. Is there any way of 
getting the MIDI output to use the \Dynamics? In the example below they all 
have the same (presumably default) dynamic (at least, when played through Nero 
Showtime).

\version "2.19.52"

\language "english"

\score {
  \new PianoStaff {
<<
\new Staff {
  \clef "treble"
  c''4 4 4 4
}
\new Dynamics {
 s4\f 4\pp 4\ff 4\mp
}
\new Staff {
  \clef "bass"
  c4 4 4 4
}
>>
  }
  \midi {}

}

 
Regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics

2018-02-04 Thread Hilary Snaden

On 04/02/18 05:19, Abraham Lee wrote:

Hi, Hilary!

On Sat, Feb 3, 2018 at 9:42 PM Hilary Snaden  wrote:


I have been trying to get LilyPond to generate MIDI versions of some
piano music. The music script renders nicely, and there are no errors or
warnings, but the MIDI file plays with no dynamics at all. What am I
doing wrong? (LilyPond 2.18.2.)

\score {
\unfoldRepeats
\new Staff
<<
  { \tempo 4=86 }
  \new Voice = "v1" {
\set Staff.midiInstrument = "Acoustic grand"
\set Staff.midiMinimumVolume = #0.2
\set Staff.midiMaximumVolume = #0.8
\upper
  }
  \new Voice = "v2" {
\set Staff.midiInstrument = "Acoustic grand"
\set Staff.midiMinimumVolume = #0.2
\set Staff.midiMaximumVolume = #0.8
\lower
  }
  \new Dynamics \pianodynamics
>>
\midi { }
}



In order for dynamics to affect the notes, they need to be directly
attached to them. Since this score is solely for playback, instead of
creating a separate dynamics context (which is really more helpful for the
engraving part), make \pianodynamics simultaneous with the variables \upper
and \lower *within the Voice contexts*. So, something like this:

\new Voice { ... } <<
   \upper
   \pianodynamics




and remove the Dynamics context completely since it doesn’t have a direct
affect on playback.

Hope that helps,
Abraham



It does help, thanks. I found that I also had to move the midi volume 
adjustments into the staff context, so the midi block now looks like this:


\score {
  \unfoldRepeats
  \new Staff {
\set Staff.midiInstrument = "Acoustic grand"
\set Staff.midiMinimumVolume = #0.05
\set Staff.midiMaximumVolume = #0.85
<<
  { \upper }
  { \lower }
  { \pianodynamics }
  { \tempi }
>>
  }
  \midi { }
}

For best results I'll need to add explicit levels at the end of every 
cresc and dim in the variable containing the dynamics, but this is still 
a significant improvement over no dynamics at all. Cheers!


--
Hilary


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics

2018-02-04 Thread Caagr98
I'd suggest either moving the DynamicsPerformer to the Staff context or 
replacing the \upper with << \upper \dynamics >> (and the same for \lower). 
Normally, dynamics only affect the voice they are in, which in your example is 
a different voice from the ones the notes are in.

On 02/04/18 01:55, Hilary Snaden wrote:
> I have been trying to get LilyPond to generate MIDI versions of some piano 
> music. The music script renders nicely, and there are no errors or warnings, 
> but the MIDI file plays with no dynamics at all. What am I doing wrong? 
> (LilyPond 2.18.2.)
> 
> \score {
>   \unfoldRepeats
>   \new Staff
>   <<
>     { \tempo 4=86 }
>     \new Voice = "v1" {
>   \set Staff.midiInstrument = "Acoustic grand"
>   \set Staff.midiMinimumVolume = #0.2
>   \set Staff.midiMaximumVolume = #0.8
>   \upper
>     }
>     \new Voice = "v2" {
>   \set Staff.midiInstrument = "Acoustic grand"
>   \set Staff.midiMinimumVolume = #0.2
>   \set Staff.midiMaximumVolume = #0.8
>   \lower
>     }
>     \new Dynamics \pianodynamics
>   >>
>   \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


Re: MIDI dynamics

2018-02-03 Thread Abraham Lee
Hi, Hilary!

On Sat, Feb 3, 2018 at 9:42 PM Hilary Snaden  wrote:

> I have been trying to get LilyPond to generate MIDI versions of some
> piano music. The music script renders nicely, and there are no errors or
> warnings, but the MIDI file plays with no dynamics at all. What am I
> doing wrong? (LilyPond 2.18.2.)
>
> \score {
>\unfoldRepeats
>\new Staff
><<
>  { \tempo 4=86 }
>  \new Voice = "v1" {
>\set Staff.midiInstrument = "Acoustic grand"
>\set Staff.midiMinimumVolume = #0.2
>\set Staff.midiMaximumVolume = #0.8
>\upper
>  }
>  \new Voice = "v2" {
>\set Staff.midiInstrument = "Acoustic grand"
>\set Staff.midiMinimumVolume = #0.2
>\set Staff.midiMaximumVolume = #0.8
>\lower
>  }
>  \new Dynamics \pianodynamics
>>>
>\midi { }
> }


In order for dynamics to affect the notes, they need to be directly
attached to them. Since this score is solely for playback, instead of
creating a separate dynamics context (which is really more helpful for the
engraving part), make \pianodynamics simultaneous with the variables \upper
and \lower *within the Voice contexts*. So, something like this:

\new Voice { ... } <<
  \upper
  \pianodynamics
>>

and remove the Dynamics context completely since it doesn’t have a direct
affect on playback.

Hope that helps,
Abraham
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


MIDI dynamics

2018-02-03 Thread Hilary Snaden
I have been trying to get LilyPond to generate MIDI versions of some 
piano music. The music script renders nicely, and there are no errors or 
warnings, but the MIDI file plays with no dynamics at all. What am I 
doing wrong? (LilyPond 2.18.2.)


\score {
  \unfoldRepeats
  \new Staff
  <<
{ \tempo 4=86 }
\new Voice = "v1" {
  \set Staff.midiInstrument = "Acoustic grand"
  \set Staff.midiMinimumVolume = #0.2
  \set Staff.midiMaximumVolume = #0.8
  \upper
}
\new Voice = "v2" {
  \set Staff.midiInstrument = "Acoustic grand"
  \set Staff.midiMinimumVolume = #0.2
  \set Staff.midiMaximumVolume = #0.8
  \lower
}
\new Dynamics \pianodynamics
  >>
  \midi { }
}


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics parsing error

2016-10-12 Thread David Kastrup
Dominicus  writes:

> Flaming Hakama by Elaine wrote
>>> I'm dealing with several of these MIDI errors during compilation of a
>>> long
>>> piece.
>>> "programming error: Impossible or ambiguous (de)crescendo in MIDI."
>>>
>>> I tried to get rid of these by placing a starting volume, but alas, it's
>>> not
>>> that simple.
>> 
>> The approach I use is to define some dynamics that don't print, and use
>> them when necessary.
>
> Indeed, I'm aware of this solution.  But v2.18 won't state which line or
> measure is triggering the errors.
>
> Since I'm cleaning up a long piece, finding which notes eliminate the errors
> is non-trivial.  Trial/error search is very time-consuming due to compile
> time and the hundreds of hairpins to review.  Since the issue relates to
> starting volume, commenting out sections of the piece hoping to isolate to
> fewer measures injects its own set of issues.
>
> It would be a welcome enhancement to state either measure of line when
> raising this error.  Has this been addressed in later versions?

-*- mode: compilation; default-directory: "/tmp/" -*-
Compilation started at Wed Oct 12 08:00:03

lilypond /tmp/ga.ly
GNU LilyPond 2.19.44
Processing `/tmp/ga.ly'
Parsing...
/tmp/ga.ly:1: warning: no \version statement found, please add

\version "2.19.44"

for future compatibility
Interpreting music...
/tmp/ga.ly:2:7: warning: (De)crescendo with unspecified starting volume in MIDI.
  { c1
  \< }
MIDI output to `ga.midi'...
Success: compilation successfully completed

Compilation finished at Wed Oct 12 08:00:04


-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics parsing error

2016-10-09 Thread Dominicus
I'm dealing with several of these MIDI errors during compilation of a long
piece.
"programming error: Impossible or ambiguous (de)crescendo in MIDI."

I tried to get rid of these by placing a starting volume, but alas, it's not
that simple.  I'm not the original typesetter for the piece, and I have 250
bars to inspect and plenty of polyphonic sections.

I'm compiling with v2.18.2.  Do later LilyPond versions reveal the offending
line# when raising this error?
If not, it would be a welcome enhancement to specify the offending bar along
with this error.

I've spent hours searching for a hairpin in the haystack (pun intended)




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/MIDI-dynamics-parsing-error-tp162479p195255.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: Midi dynamics behaviour changed in latest git HEAD

2016-08-22 Thread H. S. Teoh
On Sat, Aug 20, 2016 at 03:25:10PM +0300, Heikki Tauriainen wrote:
> Hi,
> 
> On Fri, 2016-08-19 at 10:16 -0700, H. S. Teoh wrote:
> > I've been using lilypond from git HEAD (mainly because lilypond in
> > my distro is too old, still stuck at 2.18, and I need features and
> > fixes in 2.19), and recently I noticed that midi dynamics in my
> > piano scores aren't being rendered correctly anymore.  Looking into
> > the commit log, I saw this:
> > 
> > Issue 4947: Link notes to dynamics in Dynamic_performer rather
> > than Staff_performer.  Dynamics in different voices are now
> > independent.
[...]
> Would instantiating the Voice contexts explicitly in the MIDI \score,
> 
> <<
>     \new Staff \new Voice << \rightHandPart \dynamicsPart >>
>     \new Staff \new Voice << \leftHandPart \dynamicsPart >>
> >>
> 
> help?  This is what I'd try first to ensure that \rightHandPart and
> \dynamicsPart will end up in the same Voice (and not in any separate
> implicit Voices which could get instantiated implicitly otherwise).
[...]

That did the trick.  Thanks a lot!!!


T

-- 
Famous last words: I wonder what will happen if I do *this*...

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Midi dynamics behaviour changed in latest git HEAD

2016-08-20 Thread Heikki Tauriainen
Hi,

On Fri, 2016-08-19 at 10:16 -0700, H. S. Teoh wrote:
> I've been using lilypond from git HEAD (mainly because lilypond in my
> distro is too old, still stuck at 2.18, and I need features and fixes
> in 2.19), and recently I noticed that midi dynamics in my piano
> scores aren't being rendered correctly anymore.  Looking into the
> commit log, I saw this:
> 
> Issue 4947: Link notes to dynamics in Dynamic_performer rather
> than Staff_performer.  Dynamics in different voices are now
> independent.

For some background information, see <https://codereview.appspot.com/30
2930043/> for some discussion (related to Issue #4920) which I believe
led to this change.  (In short, the previous behavior, where all
identically named Voices within a Staff would share their dynamic
changes, was considered to be a bug by some developers, so the behavior
was changed; after the change, every Voice instance will have its
dynamics controlled independently of any other Voice regardless of its
name.)

> It seems that this is the probable cause of the problem, because in
> my piano scores I use a separate Dynamics context to put all
> dynamics, something like this:
> 
>   % This is what midi is actually generated from
>   \score {
>   <<
>   \new Staff << \rightHandPart \dynamicsPart >>
>   \new Staff << \leftHandPart \dynamicsPart >>
>   >>
>   \midi {}
>   }

[...]

> Prior to the above git commit, the construct << \rightHandPart
> \dynamicsPart >> would cause dynamics to be merged into
> \rightHandPart.  However, now it appears to be interpreted
> as two separate voices with independent dynamics, so none of the
> dynamics are applied to the actual notes anymore.

Would instantiating the Voice contexts explicitly in the MIDI \score,

<<
    \new Staff \new Voice << \rightHandPart \dynamicsPart >>
    \new
Staff \new Voice << \leftHandPart \dynamicsPart >>  >>

help?  This is what I'd try first to ensure that \rightHandPart and
\dynamicsPart will end up in the same Voice (and not in any separate
implicit Voices which could get instantiated implicitly otherwise).

-- 
Heikki Tauriainen


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Midi dynamics behaviour changed in latest git HEAD

2016-08-19 Thread H. S. Teoh
I've been using lilypond from git HEAD (mainly because lilypond in my
distro is too old, still stuck at 2.18, and I need features and fixes in
2.19), and recently I noticed that midi dynamics in my piano scores
aren't being rendered correctly anymore.  Looking into the commit log, I
saw this:

commit 980df8c5df6b784d573f1c3d16bb9c8f3ab8
Author: Dan Eble <nine.fierce.ball...@gmail.com>
Date:   Wed Jun 15 18:54:53 2016 -0400

Issue 4947: Link notes to dynamics in Dynamic_performer rather than
Staff_performer.  Dynamics in different voices are now independent.


It seems that this is the probable cause of the problem, because in my
piano scores I use a separate Dynamics context to put all dynamics,
something like this:

rightHandPart = { c'1 ... }
dynamicsPart = { s1\mf ... }
leftHandPart = { c1 ... }

% Note: this is for layout only
\score {
\new PianoStaff <<
\new Staff { \rightHandPart }
\new Dynamics { \dynamicsPart }
\new Staff { \leftHandPart }
>>
\layout {}
}

% This is what midi is actually generated from
\score {
<<
\new Staff << \rightHandPart \dynamicsPart >>
\new Staff << \leftHandPart \dynamicsPart >>
>>
\midi {}
}

As you can see, \dynamicsPart is used for typesetting dynamics in the
layout score so that it will appear between the two staves, as is the
convention for piano notation. But for MIDI output I merge the dynamics
part with the parts for each hand. Prior to the above git commit, the
construct << \rightHandPart \dynamicsPart >> would cause dynamics to be
merged into \rightHandPart.  However, now it appears to be interpreted
as two separate voices with independent dynamics, so none of the
dynamics are applied to the actual notes anymore.

Is there some way to work around this?  How do I make lilypond merge the
dynamics from the Dynamics context into the LH/RH parts?

Thanks!


T

-- 
All men are mortal. Socrates is mortal. Therefore all men are Socrates.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Defining custom MIDI dynamics

2014-09-09 Thread Knute Snortum
I'm wondering why I have gotten no responses.  Did I frame the question
poorly?  Did it get to the list?


Knute Snortum
(via Gmail)

On Mon, Sep 8, 2014 at 9:48 AM, Knute Snortum ksnor...@gmail.com wrote:

 I know how to set a single custom dynamic:

 #(define (myDynamics dynamic)
(if (equal? dynamic pTresDouxMarkup )
  0.55
   (default-dynamic-absolute-volume dynamic

 ..but do I set two or more dynamics like this:

 #(define (myDynamics dynamic)
(cond (equal? dynamic pTresDouxMarkup )
  0.55
  (equal? dynamic pLegerMarkup)
  0.77
  (else
   (default-dynamic-absolute-volume dynamic

 ...or with multiple #defines?

 Knute Snortum
 (via Gmail)

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Defining custom MIDI dynamics

2014-09-09 Thread Simon Albrecht

Hello Knute,

perhaps its just an unusual topic few have experience with?
At least I don’t; yet after a look in the NR section on the topic I 
think you’re on the right path with the cond approach. After all, you 
want to define a single function to pass it on as 
dynamicAbsoluteVolumeFunction. And to do this, you tell Lily what she 
will do with some exceptional values (like pTresDouxMarkup and the like 
in your example) and to resort to the usual procedure 
(default-dynamic-absolute-volume) in all other cases.

Only there are some brackets missing, see below.

Am 09.09.2014 um 20:55 schrieb Knute Snortum:
I'm wondering why I have gotten no responses.  Did I frame the 
question poorly?  Did it get to the list?



Knute Snortum
(via Gmail)

On Mon, Sep 8, 2014 at 9:48 AM, Knute Snortum ksnor...@gmail.com 
mailto:ksnor...@gmail.com wrote:


I know how to set a single custom dynamic:

(“how to define the absolute midi volume for a single custom dynamic” 
would have hit the nail on the head)



#(define (myDynamics dynamic)
   (if (equal? dynamic pTresDouxMarkup )
 0.55
(default-dynamic-absolute-volume dynamic

..but how do I set two or more dynamics like this:

#(define (myDynamics dynamic)
   (cond (equal? dynamic pTresDouxMarkup )
 0.55
 (equal? dynamic pLegerMarkup)
 0.77
 (else
(default-dynamic-absolute-volume dynamic


This should be
#(define (myDynamics dynamic)
   (cond
 ;; each (test expression …) sequence must be wrapped
 ;; into brackets
 ((equal? dynamic pTresDouxMarkup)
  0.55)
 ((equal? dynamic pLegerMarkup)
  0.77)
 ;; and so forth: insert as many as you like
 (else
  (default-dynamic-absolute-volume dynamic

See 
http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-7.html#%_sec_4.1.5 
for more information on syntax and semantics of (cond …).

(which document is the first place for delving deeper into scheme)

If instead of this approach you use multiple defines, the latter ones 
will override the former IIUC, so that’s no good idea.


I may encourage you to do some trial and error – it can’t do any harm 
and it will help in posting more specific questions.


HTH, Simon

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Defining custom MIDI dynamics

2014-09-08 Thread Knute Snortum
I know how to set a single custom dynamic:

#(define (myDynamics dynamic)
   (if (equal? dynamic pTresDouxMarkup )
 0.55
  (default-dynamic-absolute-volume dynamic

..but do I set two or more dynamics like this:

#(define (myDynamics dynamic)
   (cond (equal? dynamic pTresDouxMarkup )
 0.55
 (equal? dynamic pLegerMarkup)
 0.77
 (else
  (default-dynamic-absolute-volume dynamic

...or with multiple #defines?

Knute Snortum
(via Gmail)
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics parsing error

2014-05-20 Thread Knute Snortum
(Note: the above code still emits a warning: Programming error: impossible
or ambiguous (de) crescendo)

One of the things I really liked about LilyPond was the ability to compile
sheet music and MIDI from the same source.  It seems to me that this
behavior is getting away from that value.  I would think that in piano and
choral music if you create a temporary voice, not only do you want the
original dynamic to carry over into the temporary, you want any dynamic
mark to carry over back into the original after the temporary is over.

If I understand you correctly, the only way to set a dynamic change while
temporary voices are active is to set the mark on one voice, set and omit
it on the other(s), and set and omit it on the original voice once the
temporary voices are done.  This seems unnecessarily complex for a
situation that I would think happens many times.


Knute Snortum
(via Gmail)


On Mon, May 19, 2014 at 12:34 PM, Heikki Tauriainen g034...@welho.comwrote:

 On Sun, 2014-05-18 at 10:40 -0700, Paul Morris wrote:
  Conor Cook wrote
   It is my impression that a decrescendo starts where you are and gets
   quieter.  Does Lilypond not have a default (e.g. mf) MIDI dynamic like
   Sibelius?
 
  Good point.  Wouldn't it make sense to just use a default volume for
 MIDI,
  if it has not been specified in the score with a dynamics mark, rather
 than
  issuing this warning?
 
  -Paul

 When this warning is shown, LilyPond will actually use the middle of the
 available note velocity range as the starting velocity (volume).

 (This is an exception to most other MIDI settings, such as the MIDI
 instrument, where no defaults are enforced if they are not set
 explicitly.  However, for note velocities LilyPond likely needs to
 always use *some* value for MIDI output, which is probably why a default
 is used in this case.)

 However, one purpose of the warning is to direct the user's attention to
 input locations where the MIDI output is possibly not what the user
 might expect: for example, since every Voice has by default a separate
 dynamic performer for MIDI, the default volume can easily take effect
 accidentally in temporary polyphonic passages such as follows:

 \version 2.18.2

 \score {
   \new Staff {
 \new Voice {
   % ... a long monophonic passage
   c'1\p
   
 \new Voice {
   c''2\ % starts at the default velocity, not \p
   g'2\!
 }
 \new Voice {
   c'1% this note also gets the default velocity
 }
   
   % ... continue with a single Voice
 }
   }
   \layout { }
   \midi { }
 }

 In this case the warning could be helpful in signaling the user that
 LilyPond may need some additional help in guessing the correct initial
 note velocities for the Voices in the temporary polyphonic passage.

 As to the original problem of including the \mf only in MIDI to suppress
 the warning, one could of course also use tags as a workaround, however
 at the cost of duplicating part of the music and the entire \score block
 (personally I nevertheless usually use this approach since, after the
 initial \score setup, it allows customizing MIDI output independently
 from the layout whenever needed):


 \version 2.18.2
 \language english

 upper = \relative c {
   | gf16-. \f ef-. df-. cf-. bf ( \sf df cf af )
 gf-. \sf ef-. df-. cf-. bf ( \sf df cf af )
   |
   
 { \tag #'layout { bf4\ } \tag #'midi { bf4\mf\ } a16 ( \sf gf' f
 ef ) bf4 %{ \mf %} \ a16 ( \sf gf' f ef ) }
 \\
 { af, f16 q q q a4 af f16 q q q a4 }
   
 }

 \score {
   \new Staff = up {
 \clef treble
 \keepWithTag #'layout \upper
   }
   \layout {
   }
 }

 \score {
   \new Staff = up {
 \keepWithTag #'midi \upper
   }
   \midi {
 \tempo 4 = 120
   }
 }


 Now that I looked at the original example, it looks like this example
 also triggers the creation of separate dynamic performers for the upper
 and lower parts of the  { ... } \\ { ... }  passage.  Therefore the
 crescendos in the upper part will probably have no effect on the notes
 in the lower part, all of which will then sound with the default
 volume (since no initial volume has been specified).  If this is not
 what is intended (possibly not if looking at the typeset output), the
 explicit initial volume and the crescendos should be repeated also in
 the lower part to have them applied to these notes in MIDI...

 --
 Heikki Tauriainen



 ___
 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: MIDI dynamics parsing error

2014-05-20 Thread Simon Albrecht


Am 20.05.2014 15:41, schrieb Knute Snortum:
(Note: the above code still emits a warning: Programming error: 
impossible or ambiguous (de) crescendo)


One of the things I really liked about LilyPond was the ability to 
compile sheet music and MIDI from the same source. It seems to me that 
this behavior is getting away from that value. I would think that in 
piano and choral music if you create a temporary voice, not only do 
you want the original dynamic to carry over into the temporary, you 
want any dynamic mark to carry over back into the original after the 
temporary is over.


If I understand you correctly, the only way to set a dynamic change 
while temporary voices are active is to set the mark on one voice, set 
and omit it on the other(s), and set and omit it on the original voice 
once the temporary voices are done. This seems unnecessarily complex 
for a situation that I would think happens many times.


Perhaps it’s possible to move the Dynamics_engraver and _performer to 
staff level for this purpose?


Best, Simon

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics parsing error

2014-05-20 Thread Heikki Tauriainen
On Tue, 2014-05-20 at 06:41 -0700, Knute Snortum wrote:
 (Note: the above code still emits a warning: Programming error:
 impossible or ambiguous (de) crescendo)

That's true - sorry, I was really commenting only on the unspecified
starting volume warning.

 One of the things I really liked about LilyPond was the ability to
 compile sheet music and MIDI from the same source.

That's exactly the same thought that I had when I started learning to
use LilyPond - the idea of producing multiple different kinds of output
for different purposes from the same source feels very attractive.

 It seems to me that this behavior is getting away from that value.  I
 would think that in piano and choral music if you create a temporary
 voice, not only do you want the original dynamic to carry over into
 the temporary, you want any dynamic mark to carry over back into the
 original after the temporary is over.

I've often wondered the same thing - the default behavior of having a
separate dynamic performer per every Voice context probably works well
in cases where a Staff never contains more than a single Voice, but
especially with piano music, where it's convenient to use temporary
polyphony with new Voice contexts to achieve the intended layout, the
default behavior of Voices can easily give unsatisfactory (or even
surprising, if one doesn't know what's going on) results for MIDI unless
extra care is taken to work around this behavior.

 If I understand you correctly, the only way to set a dynamic change
 while temporary voices are active is to set the mark on one voice, set
 and omit it on the other(s), and set and omit it on the original voice
 once the temporary voices are done.  This seems unnecessarily complex
 for a situation that I would think happens many times.

This is indeed a cumbersome solution, but at least it'll likely do the
job...

An alternative might be to try to remove the dynamic performer from all
Voice contexts, and add one to the Staff containing the voices instead
(this example still uses tags to reset the MIDI velocity level from \sf
to \mf to avoid the warnings):

\version 2.18.2
\language english

upper = \relative c \new Voice \with { \remove Dynamic_performer }
{
  | gf16-. \f ef-. df-. cf-. bf ( \sf df cf af )
gf-. \sf ef-. df-. cf-. bf ( \sf df cf af )
  |
  
\new Voice \with { \remove Dynamic_performer } { bf4 -\tag #'midi
\mf -\ a16 ( \sf gf' f
ef ) bf4 -\tag #'midi \mf \ a16 ( \sf gf' f ef ) }
\new Voice \with { \remove Dynamic_performer } { af, f16 q q q
a4 af f16 q q q a4 }
  
}

\score {
  \new Staff = up {
\clef treble
\keepWithTag #'layout \upper
  }
  \layout {
  }
}

\score {
  \new Staff = up \with { \consists Dynamic_performer } {
\keepWithTag #'midi \upper
  }
  \midi {
\tempo 4 = 120
  }
}

However, I'm not entirely sure how reliably this is guaranteed to work
(if at all) since I believe that at least some of the MIDI-related
performers are targeted to work correctly only within a particular type
of context and therefore cannot really be moved entirely freely between
different contexts.  With this particular example, however, the end
result sounds to me as if the dynamic changes would get applied to all
Voices in the parallel music expression.

-- 
Heikki Tauriainen



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics parsing error

2014-05-19 Thread David Kastrup
Thomas Morley thomasmorle...@gmail.com writes:

 Sorry if I was not clear enough.
 I was looking for a method to circumvent the midi-error, but keep the
 visual output.

 Let me be a bit more verbose:

 The following gives nice visual output, though triggers an error with midi:

   { c'1\ c' c'\! }

 Inserting an expicit Dynamic resolves the midi-error, though, the
 Hairpin starts at the right of the DynamicText, ofcourse.

   { c'1\mf\ c' c'\! }

 Trying to remove the printed DynamicText via \hide or \omit or
 #point-stencil, leaves the Hairpin untouched, i.e. starting to the
 right of the now invisible or non-existent DynamicText-stencil.
 (Little different with \hide)

   { c'1-\hide\mf\ c' c'\! }
   { c'1-\omit\mf\ c' c'\! }
   { c'1-\tweak #'stencil #point-stencil \mf\ c' c'\! }

The question then is what the right look is.  If the right look is the
one with the Midi error, and apparently it is what we get in other
situations, then arguably the code for typesetting the hairpin should
explicitly check for an _omitted_ stencil (one being #f) and in that
case revert to the anchorless behavior.

In short: if \omit does not do the trick now, I think it should (bug
report?).  We don't have a separate override shortcut for point-stencil
in case one still wants an anchor around.  The still-discussed
appearance override would allow using something like

\behold \markup \null \mf

in this function if it is really necessary for some case.  But I think
that in the use case of \omit\mf, the desire really is to only have an
acoustic representation without a visual impact.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics parsing error

2014-05-19 Thread Heikki Tauriainen
On Sun, 2014-05-18 at 10:40 -0700, Paul Morris wrote:
 Conor Cook wrote
  It is my impression that a decrescendo starts where you are and gets
  quieter.  Does Lilypond not have a default (e.g. mf) MIDI dynamic like
  Sibelius?
 
 Good point.  Wouldn't it make sense to just use a default volume for MIDI,
 if it has not been specified in the score with a dynamics mark, rather than
 issuing this warning?
 
 -Paul

When this warning is shown, LilyPond will actually use the middle of the
available note velocity range as the starting velocity (volume).

(This is an exception to most other MIDI settings, such as the MIDI
instrument, where no defaults are enforced if they are not set
explicitly.  However, for note velocities LilyPond likely needs to
always use *some* value for MIDI output, which is probably why a default
is used in this case.)

However, one purpose of the warning is to direct the user's attention to
input locations where the MIDI output is possibly not what the user
might expect: for example, since every Voice has by default a separate
dynamic performer for MIDI, the default volume can easily take effect
accidentally in temporary polyphonic passages such as follows:

\version 2.18.2

\score {
  \new Staff {
\new Voice {
  % ... a long monophonic passage
  c'1\p
  
\new Voice {
  c''2\ % starts at the default velocity, not \p
  g'2\!
}
\new Voice {
  c'1% this note also gets the default velocity
}
  
  % ... continue with a single Voice
}
  }
  \layout { }
  \midi { }
}

In this case the warning could be helpful in signaling the user that
LilyPond may need some additional help in guessing the correct initial
note velocities for the Voices in the temporary polyphonic passage.

As to the original problem of including the \mf only in MIDI to suppress
the warning, one could of course also use tags as a workaround, however
at the cost of duplicating part of the music and the entire \score block
(personally I nevertheless usually use this approach since, after the
initial \score setup, it allows customizing MIDI output independently
from the layout whenever needed):


\version 2.18.2
\language english

upper = \relative c {
  | gf16-. \f ef-. df-. cf-. bf ( \sf df cf af )
gf-. \sf ef-. df-. cf-. bf ( \sf df cf af )
  |
  
{ \tag #'layout { bf4\ } \tag #'midi { bf4\mf\ } a16 ( \sf gf' f
ef ) bf4 %{ \mf %} \ a16 ( \sf gf' f ef ) }
\\
{ af, f16 q q q a4 af f16 q q q a4 }
  
}

\score {
  \new Staff = up {
\clef treble
\keepWithTag #'layout \upper
  }
  \layout {
  }
}

\score {
  \new Staff = up {
\keepWithTag #'midi \upper
  }
  \midi {
\tempo 4 = 120
  }
}


Now that I looked at the original example, it looks like this example
also triggers the creation of separate dynamic performers for the upper
and lower parts of the  { ... } \\ { ... }  passage.  Therefore the
crescendos in the upper part will probably have no effect on the notes
in the lower part, all of which will then sound with the default
volume (since no initial volume has been specified).  If this is not
what is intended (possibly not if looking at the typeset output), the
explicit initial volume and the crescendos should be repeated also in
the lower part to have them applied to these notes in MIDI...

-- 
Heikki Tauriainen



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics parsing error

2014-05-18 Thread Thomas Morley
2014-05-18 7:20 GMT+02:00 David Kastrup d...@gnu.org:
 Knute Snortum ksnor...@gmail.com writes:

 My situation is I need to transcribe a crescendo starting without a dynamic
 marking.  If I put in a \mf then I don't get warning.  If I can hide the
 dynamic mark, all will be fine.  Is there a \hide syntax that will work?

 Anything wrong with




 --
 David Kastrup

 ___
 lilypond-user mailing list
 lilypond-user@gnu.org
 https://lists.gnu.org/mailman/listinfo/lilypond-user


Omitting the DynamicText.stencil will not cause the Hairpin to start as usual.
Resetting the parent of the Hairpin my work:

\version 2.18.0

\score
{
  {
\once \override Hairpin.after-line-breaking =
  #(lambda (grob)
 (let ((dyn-txt (ly:spanner-bound grob LEFT)))
   (ly:grob-set-property! dyn-txt 'stencil #f)
   (ly:spanner-set-bound! grob LEFT (ly:grob-parent dyn-txt X
c'1\mf\ c' c'\!
  }
  \layout {}
  \midi {}
}

Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics parsing error

2014-05-18 Thread David Kastrup
Thomas Morley thomasmorle...@gmail.com writes:

 2014-05-18 7:20 GMT+02:00 David Kastrup d...@gnu.org:
 Knute Snortum ksnor...@gmail.com writes:

 My situation is I need to transcribe a crescendo starting without a dynamic
 marking.  If I put in a \mf then I don't get warning.  If I can hide the
 dynamic mark, all will be fine.  Is there a \hide syntax that will work?

 Omitting the DynamicText.stencil will not cause the Hairpin to start as usual.
 Resetting the parent of the Hairpin my work:

 \version 2.18.0

 \score
 {
   {
 \once \override Hairpin.after-line-breaking =
   #(lambda (grob)
  (let ((dyn-txt (ly:spanner-bound grob LEFT)))
(ly:grob-set-property! dyn-txt 'stencil #f)
(ly:spanner-set-bound! grob LEFT (ly:grob-parent dyn-txt X
 c'1\mf\ c' c'\!
   }
   \layout {}
   \midi {}
 }

If \omit is too strong and \hide leaves too much space, maybe overriding
the stencil with point-stencil will work?

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics parsing error

2014-05-18 Thread Knute Snortum
Thanks!  The \omit works better than the \hide.


Knute Snortum
(via Gmail)


On Sat, May 17, 2014 at 6:56 PM, Paul Morris p...@paulwmorris.com wrote:

 Knute Snortum wrote
  My situation is I need to transcribe a crescendo starting without a
  dynamic
  marking.  If I put in a \mf then I don't get warning.  If I can hide the
  dynamic mark, all will be fine.  Is there a \hide syntax that will work?

 \version 2.18.2

 \once \omit DynamicText c-\mf

 There's also \hide, but I think you want \omit, more on these in the
 manuals:

 http://lilypond.org/doc/v2.18/Documentation/notation/visibility-of-objects#index-_005chide

 HTH,
 -Paul



 --
 View this message in context:
 http://lilypond.1069038.n5.nabble.com/MIDI-dynamics-parsing-error-tp162479p162523.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: MIDI dynamics parsing error

2014-05-18 Thread Thomas Morley
2014-05-18 12:28 GMT+02:00 David Kastrup d...@gnu.org:
 Thomas Morley thomasmorle...@gmail.com writes:

 2014-05-18 7:20 GMT+02:00 David Kastrup d...@gnu.org:
 Knute Snortum ksnor...@gmail.com writes:

 My situation is I need to transcribe a crescendo starting without a dynamic
 marking.  If I put in a \mf then I don't get warning.  If I can hide the
 dynamic mark, all will be fine.  Is there a \hide syntax that will work?

 Omitting the DynamicText.stencil will not cause the Hairpin to start as 
 usual.
 Resetting the parent of the Hairpin my work:

 \version 2.18.0

 \score
 {
   {
 \once \override Hairpin.after-line-breaking =
   #(lambda (grob)
  (let ((dyn-txt (ly:spanner-bound grob LEFT)))
(ly:grob-set-property! dyn-txt 'stencil #f)
(ly:spanner-set-bound! grob LEFT (ly:grob-parent dyn-txt X
 c'1\mf\ c' c'\!
   }
   \layout {}
   \midi {}
 }

 If \omit is too strong and \hide leaves too much space, maybe overriding
 the stencil with point-stencil will work?

 --
 David Kastrup

Using point-stencil doesn't work either.

\version 2.18.0

\score
{
  {
   \override DynamicText.stencil = #point-stencil
c'1\mf\ c' c'\!
  }
  \layout {}
  \midi {}
}

Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics parsing error

2014-05-18 Thread David Kastrup
Thomas Morley thomasmorle...@gmail.com writes:

 2014-05-18 12:28 GMT+02:00 David Kastrup d...@gnu.org:
 Thomas Morley thomasmorle...@gmail.com writes:

 2014-05-18 7:20 GMT+02:00 David Kastrup d...@gnu.org:
 Knute Snortum ksnor...@gmail.com writes:

 My situation is I need to transcribe a crescendo starting without a 
 dynamic
 marking.  If I put in a \mf then I don't get warning.  If I can hide the
 dynamic mark, all will be fine.  Is there a \hide syntax that will work?

 Omitting the DynamicText.stencil will not cause the Hairpin to start as 
 usual.
 Resetting the parent of the Hairpin my work:

 \version 2.18.0

 \score
 {
   {
 \once \override Hairpin.after-line-breaking =
   #(lambda (grob)
  (let ((dyn-txt (ly:spanner-bound grob LEFT)))
(ly:grob-set-property! dyn-txt 'stencil #f)
(ly:spanner-set-bound! grob LEFT (ly:grob-parent dyn-txt X
 c'1\mf\ c' c'\!
   }
   \layout {}
   \midi {}
 }

 If \omit is too strong and \hide leaves too much space, maybe overriding
 the stencil with point-stencil will work?

 Using point-stencil doesn't work either.

 \version 2.18.0

 \score
 {
   {
\override DynamicText.stencil = #point-stencil
 c'1\mf\ c' c'\!
   }
   \layout {}
   \midi {}
 }

Ok, I'll bite: what does doesn't work mean?  I see the same results
for overriding with point-stencil and omitting, and those results are

a) without error message
b) looking as expected when compared to the version with visible \mf

Either way, I find the stopping position of the hairpin somewhat
strange/early, but it is exactly the same as it would be without
override.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


/omit and /hide, was Re: MIDI dynamics parsing error

2014-05-18 Thread Patrick or Cynthia Karl

On May 18, 2014, at 12:28:22 +0200, David Kastrup wrote:

 Message: 1
 Date: Sun, 18 May 2014 12:28:22 +0200
 From: David Kastrup d...@gnu.org
 To: Thomas Morley thomasmorle...@gmail.com
 Subject: Re: MIDI dynamics parsing error
 
 
 If \omit is too strong and \hide leaves too much space, maybe overriding
 the stencil with point-stencil will work?

Shouldn't \omit and \hide appear in the Notation Reference Manual, in 
particular in Appendix E LilyPond command index?  I cannot find either command, 
neither in Appendix E nor by searching the Notation Manual.  

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: /omit and /hide, was Re: MIDI dynamics parsing error

2014-05-18 Thread Urs Liska

Am 18.05.2014 16:33, schrieb Patrick or Cynthia Karl:


On May 18, 2014, at 12:28:22 +0200, David Kastrup wrote:


Message: 1
Date: Sun, 18 May 2014 12:28:22 +0200
From: David Kastrup d...@gnu.org
To: Thomas Morley thomasmorle...@gmail.com
Subject: Re: MIDI dynamics parsing error


If \omit is too strong and \hide leaves too much space, maybe overriding
the stencil with point-stencil will work?


Shouldn't \omit and \hide appear in the Notation Reference Manual, in 
particular in Appendix E LilyPond command index?  I cannot find either command, 
neither in Appendix E nor by searching the Notation Manual.



I which manual version did you look?
http://www.lilypond.org/doc/v2.18/Documentation/notation/available-music-functions#index-omit-1


___
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: /omit and /hide, was Re: MIDI dynamics parsing error

2014-05-18 Thread David Kastrup
Patrick or Cynthia Karl pck...@mac.com writes:

 On May 18, 2014, at 12:28:22 +0200, David Kastrup wrote:

 Message: 1
 Date: Sun, 18 May 2014 12:28:22 +0200
 From: David Kastrup d...@gnu.org
 To: Thomas Morley thomasmorle...@gmail.com
 Subject: Re: MIDI dynamics parsing error
 
 
 If \omit is too strong and \hide leaves too much space, maybe overriding
 the stencil with point-stencil will work?

 Shouldn't \omit and \hide appear in the Notation Reference Manual, in
 particular in Appendix E LilyPond command index?  I cannot find either
 command, neither in Appendix E nor by searching the Notation Manual.

URL:http://lilypond.org/doc/v2.18/Documentation/notation/visibility-of-objects#index-_005comit
is to be found in the index
URL:http://lilypond.org/doc/v2.18/Documentation/notation/lilypond-index#lilypond-index_cp_symbol-16
under \omit

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics parsing error

2014-05-18 Thread Thomas Morley
2014-05-18 16:18 GMT+02:00 David Kastrup d...@gnu.org:
 Thomas Morley thomasmorle...@gmail.com writes:

 2014-05-18 12:28 GMT+02:00 David Kastrup d...@gnu.org:
 Thomas Morley thomasmorle...@gmail.com writes:

 2014-05-18 7:20 GMT+02:00 David Kastrup d...@gnu.org:
 Knute Snortum ksnor...@gmail.com writes:

 My situation is I need to transcribe a crescendo starting without a 
 dynamic
 marking.  If I put in a \mf then I don't get warning.  If I can hide the
 dynamic mark, all will be fine.  Is there a \hide syntax that will work?

 Omitting the DynamicText.stencil will not cause the Hairpin to start as 
 usual.
 Resetting the parent of the Hairpin my work:

 \version 2.18.0

 \score
 {
   {
 \once \override Hairpin.after-line-breaking =
   #(lambda (grob)
  (let ((dyn-txt (ly:spanner-bound grob LEFT)))
(ly:grob-set-property! dyn-txt 'stencil #f)
(ly:spanner-set-bound! grob LEFT (ly:grob-parent dyn-txt X
 c'1\mf\ c' c'\!
   }
   \layout {}
   \midi {}
 }

 If \omit is too strong and \hide leaves too much space, maybe overriding
 the stencil with point-stencil will work?

 Using point-stencil doesn't work either.

 \version 2.18.0

 \score
 {
   {
\override DynamicText.stencil = #point-stencil
 c'1\mf\ c' c'\!
   }
   \layout {}
   \midi {}
 }

 Ok, I'll bite: what does doesn't work mean?  I see the same results
 for overriding with point-stencil and omitting, and those results are

 a) without error message
 b) looking as expected when compared to the version with visible \mf

 Either way, I find the stopping position of the hairpin somewhat
 strange/early, but it is exactly the same as it would be without
 override.

 --
 David Kastrup

Sorry if I was not clear enough.
I was looking for a method to circumvent the midi-error, but keep the
visual output.

Let me be a bit more verbose:

The following gives nice visual output, though triggers an error with midi:

  { c'1\ c' c'\! }

Inserting an expicit Dynamic resolves the midi-error, though, the
Hairpin starts at the right of the DynamicText, ofcourse.

  { c'1\mf\ c' c'\! }

Trying to remove the printed DynamicText via \hide or \omit or
#point-stencil, leaves the Hairpin untouched, i.e. starting to the
right of the now invisible or non-existent DynamicText-stencil.
(Little different with \hide)

  { c'1-\hide\mf\ c' c'\! }
  { c'1-\omit\mf\ c' c'\! }
  { c'1-\tweak #'stencil #point-stencil \mf\ c' c'\! }

The only way I've found to get back the output without the explicit
DynamicText was to set Hairpins left-bound to DynamicText-parent (and
setting DynamicText.stencil #f ofcourse).

  {
c'1\mf -\tweak #'after-line-breaking
 #(lambda (grob)
  (let ((dyn-txt (ly:spanner-bound grob LEFT)))
(ly:grob-set-property! dyn-txt 'stencil #f)
(ly:spanner-set-bound! grob LEFT
  (ly:grob-parent dyn-txt X


   \
c' c'\!
  }

Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics parsing error

2014-05-18 Thread Paul Morris
Conor Cook wrote
 It is my impression that a decrescendo starts where you are and gets
 quieter.  Does Lilypond not have a default (e.g. mf) MIDI dynamic like
 Sibelius?

Good point.  Wouldn't it make sense to just use a default volume for MIDI,
if it has not been specified in the score with a dynamics mark, rather than
issuing this warning?

-Paul



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/MIDI-dynamics-parsing-error-tp162479p162563.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: /omit and /hide, was Re: MIDI dynamics parsing error

2014-05-18 Thread Richard Shann
It's sorted under the \ character:
http://www.lilypond.org/doc/v2.18/Documentation/notation/visibility-of-objects#index-_005comit-1

On Sun, 2014-05-18 at 09:33 -0500, Patrick or Cynthia Karl wrote:
 On May 18, 2014, at 12:28:22 +0200, David Kastrup wrote:
 
  Message: 1
  Date: Sun, 18 May 2014 12:28:22 +0200
  From: David Kastrup d...@gnu.org
  To: Thomas Morley thomasmorle...@gmail.com
  Subject: Re: MIDI dynamics parsing error
  
  
  If \omit is too strong and \hide leaves too much space, maybe overriding
  the stencil with point-stencil will work?
 
 Shouldn't \omit and \hide appear in the Notation Reference Manual, in 
 particular in Appendix E LilyPond command index?  I cannot find either 
 command, neither in Appendix E nor by searching the Notation Manual.  
 
 ___
 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: MIDI dynamics parsing error

2014-05-17 Thread Knute Snortum
My situation is I need to transcribe a crescendo starting without a dynamic
marking.  If I put in a \mf then I don't get warning.  If I can hide the
dynamic mark, all will be fine.  Is there a \hide syntax that will work?


Knute Snortum
(via Gmail)


On Fri, May 16, 2014 at 3:14 PM, Conor Cook conor.p.c...@gmail.com wrote:

 It is my impression that a decrescendo starts where you are and gets
 quieter.  Does Lilypond not have a default (e.g. mf) MIDI dynamic like
 Sibelius?

 Best,
 Conor Cook

 On May 16, 2014, at 4:32 PM, Simon Albrecht simon.albre...@mail.de
 wrote:

 I recently encountered this problem in a composition of my own and just
 ignored the warning, because the MIDI dynamics rendition did not have any
 importance for me.
 As a matter of fact, this notation may seem illogical, but there are many
 occurences of it, and many have asked what it means. I find it pretty
 straightforward, once you have an idea of its use: With a decrescendo, its
 meaning is similar to an accent, only perhaps more gentle and espressivo;
 that is to say, start a little above the dynamic you previously had and
 return to it by means of a diminuendo. With a crescendo, there is some
 ambiguity: either you return to the dynamic value from before the
 crescendo, or you stay where you arrived through the crescendo. Other
 interpretations may be possible, but I don’t think unambiguity needs to be
 avoided, since it’s a question of style also: in the 18th century and
 beginning 19th, dynamics are specified with increasing exactness, but for a
 long time remain incomprehensive and from later perspective leave gaps,
 which the performer is required to fill himself. And it would be inadequate
 to eliminate these seeming inconsequencies, which are typical. As I said, I
 was very happy to have this in a composition of my own (which was actually
 kept in some early 19th century style) and it expressed exactly what I
 meant. So don’t be over-correct :-)

 Simon Albrecht

 Am 16.05.2014 18:15, schrieb Phil Holmes:

 Well, LilyPond has the same problem as a performer would.  If you're
 crescendoing, at what dynamic are you starting from?

 --
 Phil Holmes



 - Original Message -
 *From:* Knute Snortum ksnor...@gmail.com
 *To:* lilypond-user@gnu.org
 *Sent:* Friday, May 16, 2014 3:21 PM
 *Subject:* MIDI dynamics parsing error

  Short Description: I get an error from LilyPond that it can't figure out
 the MIDI volume to start a crescendo with in some situations.

  Details:  The error message is...

   (De)crescendo with unspecified starting volume in MIDI.
  { bf4 %{ \mf %}
  \ a16 ( \sf gf' f ef ) bf4 %{ \mf %} \ a16 ( \sf
 gf' f ef ) }

   programming error: Impossible or ambiguous (de)crescendo in MIDI.
  continuing, cross fingers


  The source code is...

  \version 2.18.2
 \language english

  upper = \relative c {
   | gf16-. \f ef-. df-. cf-. bf ( \sf df cf af )
 gf-. \sf ef-. df-. cf-. bf ( \sf df cf af )
   |
   
 { bf4 %{ \mf %} \ a16 ( \sf gf' f ef ) bf4 %{ \mf %} \ a16 ( \sf gf'
 f ef ) }
 \\
 { af, f16 q q q a4 af f16 q q q a4 }
   
 }

  \score {
   \new Staff = up {
 \clef treble
 \upper
   }
   \layout {
   }
   \midi {
 \tempo 4 = 120
   }
 }

  If you uncomment the \mf in line nine, the problem goes away.  At first
 I thought this was because of the two voices, but when I compile the
 \relative part by itself, that is, no \score section, there is no warning.

  I'm assuming this is a bug in LilyPond and adding the \mf dynamic mark
 is a workaround. If not, please show me the correct way to do this.

  Since Mussorgsky didn't write the \mf, I want to hide it, but \hide
 Dynamics doesn't seem to work.  How would I do this, or is there a better
 way around this problem?

  Knute Snortum
 (via Gmail)

  --
 ___
 lilypond-user mailing list
 lilypond-user@gnu.org
 https://lists.gnu.org/mailman/listinfo/lilypond-user



 ___
 lilypond-user mailing 
 listlilypond-user@gnu.orghttps://lists.gnu.org/mailman/listinfo/lilypond-user


 ___
 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


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics parsing error

2014-05-17 Thread Colin Campbell

On 05/17/2014 07:15 PM, Knute Snortum wrote:
My situation is I need to transcribe a crescendo starting without a 
dynamic marking.  If I put in a \mf then I don't get warning.  If I 
can hide the dynamic mark, all will be fine.  Is there a \hide syntax 
that will work?



Knute Snortum
(via Gmail)




Here you go, Knute. Not tested with MIDI, but the appearance should be 
what you want:


\version 2.19.6


{

\once \hide Staff.DynamicText c'1\mf\ c' c'\!

}




Cheers,
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: MIDI dynamics parsing error

2014-05-17 Thread Paul Morris
Knute Snortum wrote
 My situation is I need to transcribe a crescendo starting without a
 dynamic
 marking.  If I put in a \mf then I don't get warning.  If I can hide the
 dynamic mark, all will be fine.  Is there a \hide syntax that will work?

\version 2.18.2

\once \omit DynamicText c-\mf

There's also \hide, but I think you want \omit, more on these in the
manuals:
http://lilypond.org/doc/v2.18/Documentation/notation/visibility-of-objects#index-_005chide

HTH,
-Paul



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/MIDI-dynamics-parsing-error-tp162479p162523.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: MIDI dynamics parsing error

2014-05-17 Thread Paul Morris
Knute Snortum wrote
 (De)crescendo with unspecified starting volume in MIDI.
 
 programming error: Impossible or ambiguous (de)crescendo in MIDI.
 continuing, cross fingers

BTW, I've run into this type of error before as well (with Mutopia files),
and hadn't taken the time to figure out the cause, so thanks for that!
-Paul



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/MIDI-dynamics-parsing-error-tp162479p162524.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: MIDI dynamics parsing error

2014-05-17 Thread David Kastrup
Knute Snortum ksnor...@gmail.com writes:

 My situation is I need to transcribe a crescendo starting without a dynamic
 marking.  If I put in a \mf then I don't get warning.  If I can hide the
 dynamic mark, all will be fine.  Is there a \hide syntax that will work?

Anything wrong with

\version 2.18.0

\score
{
  {
c'1-\omit\mf\ c' c'\!
  }
  \layout {}
  \midi {}
}



-- 
David Kastrup
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


MIDI dynamics parsing error

2014-05-16 Thread Knute Snortum
Short Description: I get an error from LilyPond that it can't figure out
the MIDI volume to start a crescendo with in some situations.

Details:  The error message is...

(De)crescendo with unspecified starting volume in MIDI.
{ bf4 %{ \mf %}
\ a16 ( \sf gf' f ef ) bf4 %{ \mf %} \ a16 ( \sf gf'
f ef ) }

programming error: Impossible or ambiguous (de)crescendo in MIDI.
continuing, cross fingers


The source code is...

\version 2.18.2
\language english

upper = \relative c {
  | gf16-. \f ef-. df-. cf-. bf ( \sf df cf af )
gf-. \sf ef-. df-. cf-. bf ( \sf df cf af )
  |
  
{ bf4 %{ \mf %} \ a16 ( \sf gf' f ef ) bf4 %{ \mf %} \ a16 ( \sf gf'
f ef ) }
\\
{ af, f16 q q q a4 af f16 q q q a4 }
  
}

\score {
  \new Staff = up {
\clef treble
\upper
  }
  \layout {
  }
  \midi {
\tempo 4 = 120
  }
}

If you uncomment the \mf in line nine, the problem goes away.  At first I
thought this was because of the two voices, but when I compile the
\relative part by itself, that is, no \score section, there is no warning.

I'm assuming this is a bug in LilyPond and adding the \mf dynamic mark is a
workaround. If not, please show me the correct way to do this.

Since Mussorgsky didn't write the \mf, I want to hide it, but \hide
Dynamics doesn't seem to work.  How would I do this, or is there a better
way around this problem?

Knute Snortum
(via Gmail)
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics parsing error

2014-05-16 Thread Phil Holmes
Well, LilyPond has the same problem as a performer would.  If you're 
crescendoing, at what dynamic are you starting from?

--
Phil Holmes


  - Original Message - 
  From: Knute Snortum 
  To: lilypond-user@gnu.org 
  Sent: Friday, May 16, 2014 3:21 PM
  Subject: MIDI dynamics parsing error


  Short Description: I get an error from LilyPond that it can't figure out the 
MIDI volume to start a crescendo with in some situations.


  Details:  The error message is...


(De)crescendo with unspecified starting volume in MIDI.
{ bf4 %{ \mf %} 
\ a16 ( \sf gf' f ef ) bf4 %{ \mf %} \ a16 ( \sf gf' 
f ef ) }


programming error: Impossible or ambiguous (de)crescendo in MIDI.
continuing, cross fingers


  The source code is...


  \version 2.18.2
  \language english


  upper = \relative c {
| gf16-. \f ef-. df-. cf-. bf ( \sf df cf af )
  gf-. \sf ef-. df-. cf-. bf ( \sf df cf af )
|

  { bf4 %{ \mf %} \ a16 ( \sf gf' f ef ) bf4 %{ \mf %} \ a16 ( \sf gf' f 
ef ) }
  \\
  { af, f16 q q q a4 af f16 q q q a4 }

  }


  \score {
\new Staff = up {
  \clef treble
  \upper
}
\layout {
}
\midi {
  \tempo 4 = 120
}
  }


  If you uncomment the \mf in line nine, the problem goes away.  At first I 
thought this was because of the two voices, but when I compile the \relative 
part by itself, that is, no \score section, there is no warning.


  I'm assuming this is a bug in LilyPond and adding the \mf dynamic mark is a 
workaround. If not, please show me the correct way to do this.


  Since Mussorgsky didn't write the \mf, I want to hide it, but \hide Dynamics 
doesn't seem to work.  How would I do this, or is there a better way around 
this problem?


  Knute Snortum
  (via Gmail)


--


  ___
  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: MIDI dynamics parsing error

2014-05-16 Thread Simon Albrecht
I recently encountered this problem in a composition of my own and just 
ignored the warning, because the MIDI dynamics rendition did not have 
any importance for me.
As a matter of fact, this notation may seem illogical, but there are 
many occurences of it, and many have asked what it means. I find it 
pretty straightforward, once you have an idea of its use: With a 
decrescendo, its meaning is similar to an accent, only perhaps more 
gentle and espressivo; that is to say, start a little above the dynamic 
you previously had and return to it by means of a diminuendo. With a 
crescendo, there is some ambiguity: either you return to the dynamic 
value from before the crescendo, or you stay where you arrived through 
the crescendo. Other interpretations may be possible, but I don't think 
unambiguity needs to be avoided, since it's a question of style also: in 
the 18th century and beginning 19th, dynamics are specified with 
increasing exactness, but for a long time remain incomprehensive and 
from later perspective leave gaps, which the performer is required to 
fill himself. And it would be inadequate to eliminate these seeming 
inconsequencies, which are typical. As I said, I was very happy to have 
this in a composition of my own (which was actually kept in some early 
19th century style) and it expressed exactly what I meant. So don't be 
over-correct :-)


Simon Albrecht

Am 16.05.2014 18:15, schrieb Phil Holmes:
Well, LilyPond has the same problem as a performer would.  If you're 
crescendoing, at what dynamic are you starting from?


--
Phil Holmes

- Original Message -
*From:* Knute Snortum mailto:ksnor...@gmail.com
*To:* lilypond-user@gnu.org mailto:lilypond-user@gnu.org
*Sent:* Friday, May 16, 2014 3:21 PM
*Subject:* MIDI dynamics parsing error

Short Description: I get an error from LilyPond that it can't
figure out the MIDI volume to start a crescendo with in some
situations.

Details:  The error message is...

(De)crescendo with unspecified starting volume in MIDI.
{ bf4 %{ \mf %}
  \ a16 ( \sf gf' f ef ) bf4 %{ \mf %} \ a16 ( \sf gf' f ef ) }

programming error: Impossible or ambiguous (de)crescendo in MIDI.
continuing, cross fingers


The source code is...

\version 2.18.2
\language english

upper = \relative c {
  | gf16-. \f ef-. df-. cf-. bf ( \sf df cf af )
gf-. \sf ef-. df-. cf-. bf ( \sf df cf af )
  |
  
{ bf4 %{ \mf %} \ a16 ( \sf gf' f ef ) bf4 %{ \mf %} \ a16 (
\sf gf' f ef ) }
\\
{ af, f16 q q q a4 af f16 q q q a4 }
  
}

\score {
  \new Staff = up {
\clef treble
\upper
  }
  \layout {
  }
  \midi {
\tempo 4 = 120
  }
}

If you uncomment the \mf in line nine, the problem goes away.  At
first I thought this was because of the two voices, but when I
compile the \relative part by itself, that is, no \score section,
there is no warning.

I'm assuming this is a bug in LilyPond and adding the \mf dynamic
mark is a workaround. If not, please show me the correct way to do
this.

Since Mussorgsky didn't write the \mf, I want to hide it, but
\hide Dynamics doesn't seem to work.  How would I do this, or is
there a better way around this problem?

Knute Snortum
(via Gmail)


___
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


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics parsing error

2014-05-16 Thread Conor Cook
It is my impression that a decrescendo starts where you are and gets quieter.  
Does Lilypond not have a default (e.g. mf) MIDI dynamic like Sibelius?

Best,
Conor Cook

 On May 16, 2014, at 4:32 PM, Simon Albrecht simon.albre...@mail.de wrote:
 
 I recently encountered this problem in a composition of my own and just 
 ignored the warning, because the MIDI dynamics rendition did not have any 
 importance for me.
 As a matter of fact, this notation may seem illogical, but there are many 
 occurences of it, and many have asked what it means. I find it pretty 
 straightforward, once you have an idea of its use: With a decrescendo, its 
 meaning is similar to an accent, only perhaps more gentle and espressivo; 
 that is to say, start a little above the dynamic you previously had and 
 return to it by means of a diminuendo. With a crescendo, there is some 
 ambiguity: either you return to the dynamic value from before the crescendo, 
 or you stay where you arrived through the crescendo. Other interpretations 
 may be possible, but I don’t think unambiguity needs to be avoided, since 
 it’s a question of style also: in the 18th century and beginning 19th, 
 dynamics are specified with increasing exactness, but for a long time remain 
 incomprehensive and from later perspective leave gaps, which the performer is 
 required to fill himself. And it would be inadequate to eliminate these 
 seeming inconsequencies, which are typical. As I said, I was very happy to 
 have this in a composition of my own (which was actually kept in some early 
 19th century style) and it expressed exactly what I meant. So don’t be 
 over-correct :-)
 
 Simon Albrecht
 
 Am 16.05.2014 18:15, schrieb Phil Holmes:
 Well, LilyPond has the same problem as a performer would.  If you're 
 crescendoing, at what dynamic are you starting from?
 
 --
 Phil Holmes
  
  
 - Original Message -
 From: Knute Snortum
 To: lilypond-user@gnu.org
 Sent: Friday, May 16, 2014 3:21 PM
 Subject: MIDI dynamics parsing error
 
 Short Description: I get an error from LilyPond that it can't figure out the 
 MIDI volume to start a crescendo with in some situations.
 
 Details:  The error message is...
 
 (De)crescendo with unspecified starting volume in MIDI.
 { bf4 %{ \mf %} 
 \ a16 ( \sf gf' f ef ) bf4 %{ \mf %} \ a16 ( \sf gf' f 
 ef ) }
 
 programming error: Impossible or ambiguous (de)crescendo in MIDI.
 continuing, cross fingers
 
 The source code is...
 
 \version 2.18.2
 \language english
 
 upper = \relative c {
   | gf16-. \f ef-. df-. cf-. bf ( \sf df cf af )
 gf-. \sf ef-. df-. cf-. bf ( \sf df cf af )
   |
   
 { bf4 %{ \mf %} \ a16 ( \sf gf' f ef ) bf4 %{ \mf %} \ a16 ( \sf gf' f 
 ef ) }
 \\
 { af, f16 q q q a4 af f16 q q q a4 }
   
 }
 
 \score {
   \new Staff = up {
 \clef treble
 \upper
   }
   \layout {
   }
   \midi {
 \tempo 4 = 120
   }
 }
 
 If you uncomment the \mf in line nine, the problem goes away.  At first I 
 thought this was because of the two voices, but when I compile the \relative 
 part by itself, that is, no \score section, there is no warning.
 
 I'm assuming this is a bug in LilyPond and adding the \mf dynamic mark is a 
 workaround. If not, please show me the correct way to do this.
 
 Since Mussorgsky didn't write the \mf, I want to hide it, but \hide Dynamics 
 doesn't seem to work.  How would I do this, or is there a better way around 
 this problem?
 
 Knute Snortum
 (via Gmail)
 ___
 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
 
 ___
 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


MIDI Dynamics

2012-01-28 Thread Helge Kruse

Hello,

I want to generate a MIDI file with the correct dynamics. Although it is 
possible to have different dynamics in left and tight hand I want to 
have the upper staff the same volume as the lower staff. Therefore I 
want only to write the dynamics to the upper staff. How can I apply the 
same dynamics to the lower staff without printing it in both staves?


\score {

\new PianoStaff 
\new Staff = up \relative c'' { c\f\ d e f\! g\p a }
\new Staff = down \relative c' { c\f\ d e f\! g\p a }


\layout { }
\midi { }
}

In this example the dynamics in the down staff is necessary for MIDI but 
no wanted for the layout.


Seconds question: Can I add another PianoStaff and assign one piano to 
the left stereo channel and one to the other? Is there a Windows program 
available to do this quite easy after generation with Lilypond?


Regards,
Helge


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI Dynamics

2012-01-28 Thread Marc Hohl

Am 28.01.2012 13:45, schrieb Helge Kruse:

Hello,

I want to generate a MIDI file with the correct dynamics. Although it 
is possible to have different dynamics in left and tight hand I want 
to have the upper staff the same volume as the lower staff. Therefore 
I want only to write the dynamics to the upper staff. How can I apply 
the same dynamics to the lower staff without printing it in both staves?


\score {

\new PianoStaff 
\new Staff = up \relative c'' { c\f\ d e f\! g\p a }
\new Staff = down \relative c' { c\f\ d e f\! g\p a }


\layout { }
\midi { }
}


Have you tried a separate dynamics context?

music = { c d e f g }

dyn = { s\f\ s s s\! s\p s }

\score {

\new PianoStaff 
  \new Staff=up { \music }
  \new Dynamics { \dyn }
  \new Staff=down { \music }


\layout { }
\midi { }
}

This is untested, and I believe that it should work with midi.

HTH,

Marc



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI Dynamics

2012-01-28 Thread Christopher R. Maden
On 01/28/2012 07:45 AM, Helge Kruse wrote:
 In this example the dynamics in the down staff is necessary for MIDI
 but no wanted for the layout.

I almost always end up with separate scores for layout and MIDI.

dynamics = { s4\f\ s4*3\! s4\p s4 }
right = \relative c'' { c d e f g a }
left = \relative c' { c d e f g a }

\score {
  \new PianoStaff 
\new Staff = up \right
\new Dynamics \dynamics
\new Staff = down \left
  
  \layout {}
}

\score {
  \new PianoStaff 
\new Staff = up 
  \right
  \dynamics

\new Staff = down 
  \left
  \dynamics

  
  \midi {}
}

... but see URL:
http://lilypond.org/doc/v2.12/Documentation/user/lilypond-learning/Piano-templates
, Piano Centered Dynamics, for the shenanigans in \layout{} to enable
the Dynamics context.

 Seconds question: Can I add another PianoStaff and assign one piano
 to the left stereo channel and one to the other? Is there a Windows
 program available to do this quite easy after generation with
 Lilypond?

I don’t know the answer to that, sorry.

~Chris
-- 
Chris Maden, text nerd  URL: http://crism.maden.org/ 
“Be wary of great leaders.  Hope that there are many, many small
 leaders.” — Pete Seeger

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI Dynamics

2012-01-28 Thread Helge Kruse

Am 28.01.2012 17:51, schrieb Christopher R. Maden:

I almost always end up with separate scores for layout and MIDI.

dynamics = { s4\f\  s4*3\! s4\p s4 }
right = \relative c'' { c d e f g a }
left = \relative c' { c d e f g a }

\score {
   \new PianoStaff
 \new Staff = up \right
 \new Dynamics \dynamics
 \new Staff = down \left
   
   \layout {}
}

\score {
   \new PianoStaff
 \new Staff = up
   \right
   \dynamics
 
 \new Staff = down
   \left
   \dynamics
 
   
   \midi {}
}


Great, that works. A separate score for the MIDI output has the benefit 
that you can make adjustments that won't affect the score layout.



... but seeURL:
http://lilypond.org/doc/v2.12/Documentation/user/lilypond-learning/Piano-templates

, Piano Centered Dynamics, for the shenanigans in \layout{} to enable

the Dynamics context.
Nope, this was not necessary in the current Lilypond version 2.14.2. The 
template you mentioned is for Lilypond version 2.12.3).


Thanks,
Helge

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: midi dynamics

2008-09-22 Thread Trevor Daniels


Mats Bengtsson

Quoting Werner LEMBERG [EMAIL PROTECTED]:



if I need a `p espr.' mark, it's probably best (from a typographical
point of view) to write

 c\markup { \dynamic p \italic  espr. }


No, this is not the best solution from a typographical point of view.
If you for example have a hairpin ending on the same note and want
your dynamic indication vertically aligned with the hairpin, you should 
instead use make-dynamic-script, as described in the Notation Reference, 
section New dynamic marks. Tricks to get horizontal alignment

on the p have been discussed recently on the mailing list.


to correctly align the horizontal and vertical distance of the `espr.'
string with the `p' dynamic sign.  However, this has the disadvantage
that the MIDI performer no longer recognizes the `p' as such.

My idea was to simply adjust the MIDI volume manually.  However, this
is much more tricky than expected, since LilyPond apparently doesn't
provide a simple means to do that.


Yes, it would be very convenient if make-dynamic-script was extended
so you also could specify the MIDI interpretation of the new dynamics 
mark.




Section 3.5.5 Controlling MIDI dynamics in the
2.11 docs shows two methods for controlling the
MIDI volume for user-created dynamic marks.

Trevor



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: midi dynamics

2008-09-22 Thread Werner LEMBERG

  Yes, it would be very convenient if make-dynamic-script was
  extended so you also could specify the MIDI interpretation of the
  new dynamics mark.
 
 Section 3.5.5 Controlling MIDI dynamics in the 2.11 docs shows two
 methods for controlling the MIDI volume for user-created dynamic
 marks.

Trevor, I know that, but the outlined method is far too complicated to
be of any convenience.  I want to have a possibility to control the
midi volume ad-hoc, without having lilypond walk over an alist.


Werner


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


midi dynamics

2008-09-17 Thread Werner LEMBERG

Folks,


if I need a `p espr.' mark, it's probably best (from a typographical
point of view) to write

  c\markup { \dynamic p \italic  espr. }

to correctly align the horizontal and vertical distance of the `espr.'
string with the `p' dynamic sign.  However, this has the disadvantage
that the MIDI performer no longer recognizes the `p' as such.

My idea was to simply adjust the MIDI volume manually.  However, this
is much more tricky than expected, since LilyPond apparently doesn't
provide a simple means to do that.

Any idea how to define a, say, `\midip' macro which sets the volume
similar to `\p', without any (typesetting) side effects?  Currently, I
disable the dynamic stencil once and write `\p':

  \once DynamicText #'stencil = ##f
  c\p

I consider this not very elegant; additionally, it causes

  programming error: cannot align on self: empty element

which appears to be harmless, but might frighten some users.


Werner


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: midi dynamics

2008-09-17 Thread Mats Bengtsson

Quoting Werner LEMBERG [EMAIL PROTECTED]:



Folks,


if I need a `p espr.' mark, it's probably best (from a typographical
point of view) to write

 c\markup { \dynamic p \italic  espr. }


No, this is not the best solution from a typographical point of view.
If you for example have a hairpin ending on the same note and want
your dynamic indication vertically aligned with the hairpin, you should 
instead use make-dynamic-script, as described in the Notation 
Reference, section New dynamic marks. Tricks to get horizontal 
alignment

on the p have been discussed recently on the mailing list.


to correctly align the horizontal and vertical distance of the `espr.'
string with the `p' dynamic sign.  However, this has the disadvantage
that the MIDI performer no longer recognizes the `p' as such.

My idea was to simply adjust the MIDI volume manually.  However, this
is much more tricky than expected, since LilyPond apparently doesn't
provide a simple means to do that.


Yes, it would be very convenient if make-dynamic-script was extended
so you also could specify the MIDI interpretation of the new dynamics mark.

   /Mats



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: midi dynamics

2008-09-17 Thread Werner LEMBERG
  if I need a `p espr.' mark, it's probably best (from a typographical
  point of view) to write
 
   c\markup { \dynamic p \italic  espr. }
 
 No, this is not the best solution from a typographical point of
 view.

It *is*, since it is one (abbreviated) phrase: `piano espressivo' --
this is not the same as tagging the note with `piano', adding
`espressivo' somewhere else, say, on the top.


Werner


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: midi dynamics

2008-09-17 Thread Mats Bengtsson

Quoting Werner LEMBERG [EMAIL PROTECTED]:


 if I need a `p espr.' mark, it's probably best (from a typographical
 point of view) to write

  c\markup { \dynamic p \italic  espr. }

No, this is not the best solution from a typographical point of
view.


It *is*, since it is one (abbreviated) phrase: `piano espressivo' --
this is not the same as tagging the note with `piano', adding
`espressivo' somewhere else, say, on the top.


Are you sure that the vertical alignment shouldn't be the same
as a preceding hairpin in such a case?


  /Mats



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: midi dynamics

2008-09-17 Thread Werner LEMBERG
   if I need a `p espr.' mark, it's probably best (from a
   typographical point of view) to write
  
c\markup { \dynamic p \italic  espr. }
 
  No, this is not the best solution from a typographical point of
  view.
 
  It *is*, since it is one (abbreviated) phrase: `piano espressivo'
  -- this is not the same as tagging the note with `piano', adding
  `espressivo' somewhere else, say, on the top.
 
 Are you sure that the vertical alignment shouldn't be the same as a
 preceding hairpin in such a case?

Ah, I've misunderstood you.  Yes, constructing a new dynamic sign
is good.  However, there's still the problem with MIDI (which was my
main concern)...


Werner


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: midi dynamics

2008-09-17 Thread Kieren MacMillan

Hi Werner,


It *is*, since it is one (abbreviated) phrase: `piano espressivo' --
this is not the same as tagging the note with `piano', adding
`espressivo' somewhere else, say, on the top.


I apologise if I've misinterpreted your response, but it seems like  
you don't get what Mats is saying…


Below, you'll find a sample of what I think he's talking about — and  
I definitely agree with him. Note that this is not tagging the note  
with 'piano', and adding 'espressivo' somewhere else, but is  
typesetting the one phrase 'p espr.' as a dynamic mark, rather than  
as a markup (which behaves quite differently, particularly with  
regard to alignment).


HTH!
Kieren.

p.s. Mats: is there any way to avoid having the \dynX tweak?  
Unfortunately, I've never found a way to code the alignment within  
the dynamic script itself…


%%%
\version 2.11.57

dynX = { \once \override DynamicText #'X-offset = #-1 }
pEspr = #(make-dynamic-script (markup #:hspace 0 #:raise -1 #:line 
(#:dynamic pp #:hspace -0.3 #:normal-text #:italic espr. )))


theMusic = \relative
{
c'2 \dynX e4(\pEspr d) c1
}

\score
{
\theMusic
}
%%%

___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: midi dynamics

2008-09-17 Thread Mats Bengtsson

Kieren MacMillan wrote:


p.s. Mats: is there any way to avoid having the \dynX tweak? 
Unfortunately, I've never found a way to code the alignment within the 
dynamic script itself…
One alternative is Solution 6 in the snippet Horizontally  aligning 
... at 
http://lilypond.org/doc/v2.11/input/lsr/lilypond-snippets/Expressive-marks#Expressive-marks


  /Mats


%%%
\version 2.11.57

dynX = { \once \override DynamicText #'X-offset = #-1 }
pEspr = #(make-dynamic-script (markup #:hspace 0 #:raise -1 
#:line(#:dynamic pp #:hspace -0.3 #:normal-text #:italic espr. )))


theMusic = \relative
{
c'2 \dynX e4(\pEspr d) c1
}

\score
{
\theMusic
}
%%%



--
=
Mats Bengtsson
Signal Processing
School of Electrical Engineering
Royal Institute of Technology (KTH)
SE-100 44  STOCKHOLM
Sweden
Phone: (+46) 8 790 8463 
   Fax:   (+46) 8 790 7260
Email: [EMAIL PROTECTED]
WWW: http://www.s3.kth.se/~mabe
=



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: midi dynamics

2008-09-17 Thread Kieren MacMillan

Hi Mats,

p.s. Mats: is there any way to avoid having the \dynX tweak?  
Unfortunately, I've never found a way to code the alignment within  
the dynamic script itself…
One alternative is Solution 6 in the snippet Horizontally   
aligning ... at http://lilypond.org/doc/v2.11/input/lsr/lilypond- 
snippets/Expressive-marks#Expressive-marks


Unless I'm misunderstanding, what you pointed to is exactly what I'm  
trying to avoid — in fact, I think Solution 6 came from me in the  
first place!  =)
I want the Scheme code to set the #'X-offset internally, as opposed  
to just \translating the DynamicText (which, as seen on the page you  
linked to, is no real solution).


Best,
Kieren.

___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


RE: MIDI dynamics seem completely broken

2005-12-13 Thread Linda Cantoni
Not long ago I saw a message here that it is a bug.  You can turn dynamics
off in the midi in order to get the notes to be heard, albeit without the
crescendi and decrescendi.  (They'll still be in the printed output.)
Here's the command:

\midi { \tempo 4 = 84
  \context {
\Voice
\remove Dynamic_performer
\remove Span_dynamic_performer
   }

Linda

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Anders Kaseorg
Sent: Monday, December 12, 2005 11:18 PM
To: lilypond-user@gnu.org
Subject: MIDI dynamics seem completely broken

If I run the following simple test of dynamics through lilypond (I've 
tried both 2.6.3 and 2.7.22):

\version 2.6.0
\score {
   \relative c'' {
 c16\p c c c c\ d e f g\f g g g g\ f e d c\p c c c c4
   }
   \midi {}
   \layout {}
}

and play the resulting MIDI file with timidity, all but eight of the 
notes are completely silent. (I hear the first five Cs, the first and 
last Gs, and the next C.)

Is it just me? I'd be surprised that this kind of a bug would go unnoticed.

Anders



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user




___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics seem completely broken

2005-12-13 Thread Cameron Horsburgh
Anders Kaseorg wrote:
 If I run the following simple test of dynamics through lilypond (I've
 tried both 2.6.3 and 2.7.22):
 
 \version 2.6.0
 \score {
   \relative c'' {
 c16\p c c c c\ d e f g\f g g g g\ f e d c\p c c c c4
   }
   \midi {}
   \layout {}
 }
 
 and play the resulting MIDI file with timidity, all but eight of the
 notes are completely silent. (I hear the first five Cs, the first and
 last Gs, and the next C.)
 
 Is it just me? I'd be surprised that this kind of a bug would go unnoticed.
 
 Anders
 
 
 
 ___
 lilypond-user mailing list
 lilypond-user@gnu.org
 http://lists.gnu.org/mailman/listinfo/lilypond-user
 


You can fix this by explicitly terminating a (de)crescendo with a \!

So try:

\version 2.6.0
\score {
  \relative c'' {
c16\p c c c c\ d e f g\!\f g g g g\ f e d c\!\p c c c c4
  }
  \midi {}
  \layout {}
}


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: MIDI dynamics seem completely broken

2005-12-13 Thread Magnus Lewis-Smith
The silent notes will sound properly if you terminate the (de)crescendi 
with \! before the next dynamic mark...  as in


\relative c'' {
   c16\p c c c c\ d e f g\!\f g g g g\ f e d c\!\p c c c c4
}

Magnus


Anders Kaseorg wrote:

If I run the following simple test of dynamics through lilypond (I've 
tried both 2.6.3 and 2.7.22):


\version 2.6.0
\score {
  \relative c'' {
c16\p c c c c\ d e f g\f g g g g\ f e d c\p c c c c4
  }
  \midi {}
  \layout {}
}

and play the resulting MIDI file with timidity, all but eight of the 
notes are completely silent. (I hear the first five Cs, the first and 
last Gs, and the next C.)


Is it just me? I'd be surprised that this kind of a bug would go 
unnoticed.


Anders



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user







___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


MIDI dynamics seem completely broken

2005-12-12 Thread Anders Kaseorg
If I run the following simple test of dynamics through lilypond (I've 
tried both 2.6.3 and 2.7.22):


\version 2.6.0
\score {
  \relative c'' {
c16\p c c c c\ d e f g\f g g g g\ f e d c\p c c c c4
  }
  \midi {}
  \layout {}
}

and play the resulting MIDI file with timidity, all but eight of the 
notes are completely silent. (I hear the first five Cs, the first and 
last Gs, and the next C.)


Is it just me? I'd be surprised that this kind of a bug would go unnoticed.

Anders



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Removing MIDI Dynamics

2004-05-23 Thread J. Garcia
Is there now any way to remove all dynamics from a
MIDI file? The
  \translator { \remove Dynamic_performer }
trick doesn't seem to work anymore.  I know this
question has been posted before, but didn't receive
any response.
-J. Garcia





__
Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 


___
lilypond-user mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/lilypond-user


Re: Removing MIDI Dynamics

2004-05-23 Thread Michael Welsh Duggan
J. Garcia [EMAIL PROTECTED] writes:

 Is there now any way to remove all dynamics from a
 MIDI file? The
   \translator { \remove Dynamic_performer }
 trick doesn't seem to work anymore.  I know this
 question has been posted before, but didn't receive
 any response.

\midi {
\context {
\VoiceContext
\remove Dynamic_performer
\remove Span_dynamic_performer
}
}

-- 
Michael Welsh Duggan
([EMAIL PROTECTED])


___
lilypond-user mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/lilypond-user