Re: Removing all dynamics from MIDI

2022-04-18 Thread David Kastrup
Simon Albrecht  writes:

> Hi David,
>
> On 16/04/2022 18:11, David Santamauro wrote:
>> Hi, it seems removing the Dynamic_performer doesn’t actually remove
>> performance of articulations.
>
>
> Articulations are Script grobs, not Dynamics. Maybe removing
> Script_engraver as well would do the trick? I don’t work with MIDI
> much, so I don’t know whether it will.

Removing _engravers_ will not have any impact on MIDI generation.  Only
performers and translators make a difference here.  In this case, I
don't think there is a separate performer to remove: this is handled by
the Note_performer .

-- 
David Kastrup



Re: Removing all dynamics from MIDI

2022-04-18 Thread Simon Albrecht

Hi David,

On 16/04/2022 18:11, David Santamauro wrote:
Hi, it seems removing the Dynamic_performer doesn’t actually remove 
performance of articulations.



Articulations are Script grobs, not Dynamics. Maybe removing 
Script_engraver as well would do the trick? I don’t work with MIDI much, 
so I don’t know whether it will.


Best, Simon




Re: Removing all dynamics from MIDI

2022-04-18 Thread Thomas Morley
Am Mo., 18. Apr. 2022 um 10:48 Uhr schrieb David Santamauro
:
>
>
> On Apr 17, 2022, at 11:53 AM, Lukas-Fabian Moser  wrote:
>
> Hi David,
>
> After tracking this string throughout the source code, I finally found where 
> the property is set: ly/script-init.ly
>
> accent = #(make-articulation 'accent
>'midi-extra-velocity 20)
>
> marcato = #(make-articulation 'marcato
> 'midi-extra-velocity 40)
>
> You can just repeat those definitions from script-init.ly without the 
> midi-extra-velocity setting:
>
>
>
> For now, I just copied the file, removed all MIDI interpretations attached to 
> articulations and “include” the new file.
>
> Also notice that your version indication (\version 2.22.2) does not match the 
> source you seem to haved used for reference: If I'm not mistaken, the change 
> I made in the definition of articulation symbols switching from
>
>
>
>
> I just cloned the source for this exercise, but yes, my installation is 2.22.
>
> Thanks
>
>
>

Does

mus = \relative c { c''4\mp c-^ c-> c }

\musicMap
  #(lambda (m)
(if (music-is-of-type? m 'articulation-event)
(ly:music-set-property! m 'midi-extra-velocity 0))
m)
  \mus

do the trick for articulations?

Cheers,
  Harm



Re: Removing all dynamics from MIDI

2022-04-18 Thread David Santamauro

> On Apr 17, 2022, at 11:53 AM, Lukas-Fabian Moser  wrote:
> 
> Hi David,
> 
>> After tracking this string throughout the source code, I finally found where 
>> the property is set: ly/script-init.ly 
>> 
>> accent = #(make-articulation 'accent
>>'midi-extra-velocity 20)
>> 
>> marcato = #(make-articulation 'marcato
>> 'midi-extra-velocity 40)
> You can just repeat those definitions from script-init.ly without the 
> midi-extra-velocity setting:
> 
> 

For now, I just copied the file, removed all MIDI interpretations attached to 
articulations and “include” the new file.

> Also notice that your version indication (\version 2.22.2) does not match the 
> source you seem to haved used for reference: If I'm   not mistaken, the 
> change I made in the definition of articulation symbols switching from
> 
> 


I just cloned the source for this exercise, but yes, my installation is 2.22.

Thanks





Re: Removing all dynamics from MIDI

2022-04-17 Thread Lukas-Fabian Moser

Hi David,

After tracking this string throughout the source code, I finally found 
where the property is set: ly/script-init.ly 


accent = #(make-articulation 'accent
'midi-extra-velocity 20)

marcato = #(make-articulation 'marcato
'midi-extra-velocity 40)


You can just repeat those definitions from script-init.ly without the 
midi-extra-velocity setting:


accent = #(make-articulation 'accent)
marcato = #(make-articulation 'marcato)

Don't forget to also re-issue

dashHat = \marcato
dashLarger = \accent

in order to update the shorthands -^ etc.

Also notice that your version indication (\version 2.22.2) does not 
match the source you seem to haved used for reference: If I'm not 
mistaken, the change I made in the definition of articulation symbols 
switching from


#(make-articulation "accent")

to

#(make-articulation 'accent)

is only available in high 2.23.x versions, not in the 2.22 series.

Lukas

Re: Removing all dynamics from MIDI

2022-04-16 Thread David Santamauro
After some digging, in note-performer.cc I found

velocity += from_scm (get_property (ev, "midi-extra-velocity"), 0);

After tracking this string throughout the source code, I finally found where 
the property is set: ly/script-init.ly

accent = #(make-articulation 'accent
   'midi-extra-velocity 20)

marcato = #(make-articulation 'marcato
'midi-extra-velocity 40)

etc…

I tracked its inclusion through ly/declarations-init.ly and then ultimately to 
ly/init.ly. I have no idea where init.ly gets loaded so that’s about as far as 
I can take this. If someone could shed some light on this, I would be grateful.

thanks


> On Apr 16, 2022, at 12:11 PM, David Santamauro  
> wrote:
> 
> Hi, it seems removing the Dynamic_performer doesn’t actually remove 
> performance of articulations. E.g.,
> 
> \version "2.22.2"
> 
> \include "english.ly "
> 
> hits = \relative c { c''4\mp c-^ c-> c }
> 
> \score {
> 
>   \hits
> 
>   \layout {}
>   \midi   {
> \context {
>   \Voice \remove "Dynamic_performer"
> }
>   }
> }
> 
> The score (attachment)
> 
> 
> The midi events (attachment)
> 
> 
> How can I get the MIDI to contain only the midi events as pitches and 
> durations, i.e., absolutely no interpretation of dynamics or articulations?
> 
> thanks
> 



Removing all dynamics from MIDI

2022-04-16 Thread David Santamauro
Hi, it seems removing the Dynamic_performer doesn’t actually remove performance 
of articulations. E.g.,

\version "2.22.2"

\include "english.ly"

hits = \relative c { c''4\mp c-^ c-> c }

\score {

  \hits

  \layout {}
  \midi   {
\context {
  \Voice \remove "Dynamic_performer"
}
  }
}

The score (attachment)


The midi events (attachment)


How can I get the MIDI to contain only the midi events as pitches and 
durations, i.e., absolutely no interpretation of dynamics or articulations?

thanks