Re: dynamic and midi velocity

2010-03-11 Thread David Raleigh Arnold
On Saturday 06 March 2010 03:12:11 David Kastrup wrote:
 David Raleigh Arnold d...@openguitar.com writes:
  Ideally the volume should be preset for each instrument according to
  ratios expressing the relative natural loudness of the instrument, IOW
  set it and forget it, and only velocity should be used for dynamics.
  That is obviously the purpose of the design.  Why fight it?  No good
  can come from twiddling the volume in the middle of the performance.
 
 I have a (not quite cheap) Ketron Keyboard with a volume pedal.  I was
 rather surprised to realize that putting it to zero would
 a) considerably lower the volume of notes already hit
 b) completely stop new notes from being sounded
 
 I would have thought that it would act more or less as a simple analog
 volume control, but it would appear that it _partially_ affects notes
 already hit.
 
 Interesting.  I have not checked the corresponding Midi messages,
 though.
 

Ha!  The volumes should be part of the instrument specifications for
any lilypond/midi document, and dynamics should relate to velocity
alone.  To do otherwise was a major mistake in the midi implementation in
lilypond.  It would be a very good idea to quit trying to make
it work in some other way.

Of course the solution to the problem is to instantiate a new
voice, instrument and volume for every dynamic.  Surely a lot
of trouble for nothing.  Regards, daveA


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


Re: dynamic and midi velocity

2010-03-11 Thread Hugh Myers
Go right a head and implement your suggestion--- Lilypond is open
source you know...

---hsm

On Thu, Mar 11, 2010 at 8:38 AM, David Raleigh Arnold
d...@openguitar.com wrote:
 On Saturday 06 March 2010 03:12:11 David Kastrup wrote:
 David Raleigh Arnold d...@openguitar.com writes:
  Ideally the volume should be preset for each instrument according to
  ratios expressing the relative natural loudness of the instrument, IOW
  set it and forget it, and only velocity should be used for dynamics.
  That is obviously the purpose of the design.  Why fight it?  No good
  can come from twiddling the volume in the middle of the performance.

 I have a (not quite cheap) Ketron Keyboard with a volume pedal.  I was
 rather surprised to realize that putting it to zero would
 a) considerably lower the volume of notes already hit
 b) completely stop new notes from being sounded

 I would have thought that it would act more or less as a simple analog
 volume control, but it would appear that it _partially_ affects notes
 already hit.

 Interesting.  I have not checked the corresponding Midi messages,
 though.


 Ha!  The volumes should be part of the instrument specifications for
 any lilypond/midi document, and dynamics should relate to velocity
 alone.  To do otherwise was a major mistake in the midi implementation in
 lilypond.  It would be a very good idea to quit trying to make
 it work in some other way.

 Of course the solution to the problem is to instantiate a new
 voice, instrument and volume for every dynamic.  Surely a lot
 of trouble for nothing.  Regards, daveA


 ___
 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: dynamic and midi velocity

2010-03-06 Thread David Kastrup
David Raleigh Arnold d...@openguitar.com writes:

 Ideally the volume should be preset for each instrument according to
 ratios expressing the relative natural loudness of the instrument, IOW
 set it and forget it, and only velocity should be used for dynamics.
 That is obviously the purpose of the design.  Why fight it?  No good
 can come from twiddling the volume in the middle of the performance.

I have a (not quite cheap) Ketron Keyboard with a volume pedal.  I was
rather surprised to realize that putting it to zero would
a) considerably lower the volume of notes already hit
b) completely stop new notes from being sounded

I would have thought that it would act more or less as a simple analog
volume control, but it would appear that it _partially_ affects notes
already hit.

Interesting.  I have not checked the corresponding Midi messages,
though.

-- 
David Kastrup



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


Re: dynamic and midi velocity

2010-03-06 Thread Reinhold Kainhofer
Am Samstag, 6. März 2010 08:47:56 schrieb David Raleigh Arnold:
 Ideally the volume should be preset for each instrument according to
 ratios expressing the relative natural loudness of the instrument, IOW
 set it and forget it, and only velocity should be used for dynamics.  That
 is obviously the purpose of the design.  Why fight it?  No good can come
 from twiddling the volume in the middle of the performance.

I know several choral pieces where the dynamics change on a single note. E.g. 
in Reutter's  Ecce Quomodo  there is a whole note with p on the first two 
beats and f on the last two beats. This cannot be expressed by velocity, which 
is modelled after a keyboard, but is unable to express dynamic changes other 
instruments are able to do.
Similarly, an organ swell on a single note cannot be done with velocity, but 
only via volume.

Cheers,
Reinhod

-- 
--
Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/
 * Financial  Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org


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


Re: dynamic and midi velocity

2010-03-06 Thread Reinhold Kainhofer
Am Samstag, 6. März 2010 09:12:11 schrieb David Kastrup:
 I have a (not quite cheap) Ketron Keyboard with a volume pedal.  I was
 rather surprised to realize that putting it to zero would
 a) considerably lower the volume of notes already hit
 b) completely stop new notes from being sounded
 
 I would have thought that it would act more or less as a simple analog
 volume control, but it would appear that it _partially_ affects notes
 already hit.
 
 Interesting.  

If you are only used to playing piano then that might come as a surprise. But 
for any string or wind or organ player or singer it is just normal that the 
dynamics of ongoing notes can be changed, and e.g. the volume can be increased 
while a note is sounding.

Cheers,
Reinhold

-- 
--
Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/
 * Financial  Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org


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


Re: dynamic and midi velocity

2010-03-06 Thread David Santamauro
On Sat, 6 Mar 2010 11:40:32 +0100
Reinhold Kainhofer reinh...@kainhofer.com wrote:

 Am Samstag, 6. März 2010 09:12:11 schrieb David Kastrup:
  I have a (not quite cheap) Ketron Keyboard with a volume pedal.  I
  was rather surprised to realize that putting it to zero would
  a) considerably lower the volume of notes already hit
  b) completely stop new notes from being sounded
  
  I would have thought that it would act more or less as a simple
  analog volume control, but it would appear that it _partially_
  affects notes already hit.
  
  Interesting.  
 
 If you are only used to playing piano then that might come as a
 surprise. But for any string or wind or organ player or singer it is
 just normal that the dynamics of ongoing notes can be changed, and
 e.g. the volume can be increased while a note is sounding.
 

In addition, your pedal is probably sending expression messages (CC11)
by default.

Just as an aside: when I code a (de)crescendo in MIDI, I use a
combination of velocity and expression. Velocity, as said before not
only influences the relative perception of volume but also changes the
timbre of most instruments. I only ever adjust volume (CC7) for mix
purposes on an over-all basis, never as a continuous controller.

my $.02 ...

David





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


Re: dynamic and midi velocity

2010-03-06 Thread Francisco Vila
2010/3/6 Reinhold Kainhofer reinh...@kainhofer.com:
 Am Samstag, 6. März 2010 08:47:56 schrieb David Raleigh Arnold:
 Ideally the volume should be preset for each instrument according to
 ratios expressing the relative natural loudness of the instrument, IOW
 set it and forget it, and only velocity should be used for dynamics.  That
 is obviously the purpose of the design.  Why fight it?  No good can come
 from twiddling the volume in the middle of the performance.

 I know several choral pieces where the dynamics change on a single note. E.g.
 in Reutter's  Ecce Quomodo  there is a whole note with p on the first two
 beats and f on the last two beats. This cannot be expressed by velocity, which
 is modelled after a keyboard, but is unable to express dynamic changes other
 instruments are able to do.
 Similarly, an organ swell on a single note cannot be done with velocity, but
 only via volume.

there are also channel pressure and polyphonic pressure. Not much used
and not very compatible, though

-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com


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


Re: dynamic and midi velocity

2010-03-05 Thread David Raleigh Arnold
On Thursday 04 March 2010 18:36:01 Philippe Hezaine wrote:
 Martin Tarenskeen a écrit :
  On Thu, 4 Mar 2010, David Raleigh Arnold wrote:
  So why on earth is conversion from velocity to volume in decibels an
  issue?  If you are using ppp pp p mp mf f ff fff why convert at all?
  Just use velocity.  Regards, daveA
 
  That was not the issue being discussed here.
 
  When we are talking about Velocity and Volume we are talking - at
  least in this thread - about two different specific MIDI messages.
 
  Velocity is a 7 bit value (0~127) that is part of a MIDI Note-On or MIDI
  Note-Off message. Each single note has such a value in a MIDI stream.
 
  Volume is one of the MIDI Control Change messages, Nr. 7 to be exactly.
  These can not be specified for each single note, but for each of the 16
  MIDI channels.
 
  Velocity and Volume are used for different purposes in MIDI sequencers
  and MIDI files.
 
  Currently if Lilypond scores are exported as MIDI files, the ppp mf ff
  and so on are written as MIDI Volume values, not as MIDI Velocity values.
 
  In many cases MIDI Velocity messages are more suitable to translate such
  dynamics into MIDI. That's why people are interested in that conversion
  script. (including me)
 
 Here are excerpts of discussions with Dominic Sacré when I used
 mididings instead of midicomp.
 
 The problem you're probably noticing here is that CC7 (and all other
 controllers) always pertain to a whole MIDI channel. The only way to
 have two notes at the same time on the same channel, but with different
 volumes, is to use the note-on velocities (as you know).
 
 
 The volume controller doesn't interact with individual notes at all. It
 just changes the volume immediately, affecting all notes on the
 respective channel, even those which are already playing at that time.
 
 
 ... all tracks in your MIDI file are on the same channel, so CC #7
 messages on one track will affect the other tracks as well.
 
 Hope this helps to understand some differences between CC7 (volume) and
 velocities.
 Cheers.
 

It couldn't be simpler.

Ideally the volume should be preset for each instrument according to
ratios expressing the relative natural loudness of the instrument, IOW
set it and forget it, and only velocity should be used for dynamics.  That is 
obviously the purpose of the design.  Why fight it?  No good can come from 
twiddling the volume in the middle of the performance.  Regards, daveA

-- 
For beginners: very easy guitar music, solos, duets, exercises. Early
intermediate guitar solos. One best scale set for all guitarists.
http://www.openguitar.com/scalescomparison.html ::: plus new and
better chord and arpeggio exercises.  http://www.openguitar.com 


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


Re: dynamic and midi velocity

2010-03-04 Thread David Raleigh Arnold
On Tuesday 02 March 2010 19:03:26 Peter Chubb wrote:
  bachelet == bachelet  w...@theps.net writes:
 
 bachelet any luck finding this script, I'd like to use it, too
 
 
 It was in this mailing list, at
 http://www.mail-archive.com/bug-lilyp...@gnu.org/msg03960.html
 
 Peter C
 
The velocity is the speed at which a midi keyboard key is moving just
before, ideally exactly when, it hits bottom.  If the midi keyboard
measured how hard the key hit bottom, the instrument would be beaten
to pieces in short order.  The velocity can be measured by electronic
or electric means, so the measurement is not much affected by physical
wear.  The absolute volume is proportional to the energy of the hit,
which is proportional to the square of the velocity.  But if the
volume is measured in decibels, it is proportional to the velocity.
So why on earth is conversion from velocity to volume in decibels an
issue?  If you are using ppp pp p mp mf f ff fff why convert at all?
Just use velocity.  Regards, daveA

-- 
For beginners: very easy guitar music, solos, duets, exercises. Early
intermediate guitar solos. One best scale set for all guitarists.
http://www.openguitar.com/scalescomparison.html ::: plus new and
better chord and arpeggio exercises.  http://www.openguitar.com 


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


Re: dynamic and midi velocity

2010-03-04 Thread Martin Tarenskeen



On Thu, 4 Mar 2010, David Raleigh Arnold wrote:


So why on earth is conversion from velocity to volume in decibels an
issue?  If you are using ppp pp p mp mf f ff fff why convert at all?
Just use velocity.  Regards, daveA


That was not the issue being discussed here.

When we are talking about Velocity and Volume we are talking - at 
least in this thread - about two different specific MIDI messages.


Velocity is a 7 bit value (0~127) that is part of a MIDI Note-On or MIDI 
Note-Off message. Each single note has such a value in a MIDI stream.


Volume is one of the MIDI Control Change messages, Nr. 7 to be exactly.
These can not be specified for each single note, but for each of the 16 
MIDI channels.


Velocity and Volume are used for different purposes in MIDI sequencers and 
MIDI files.


Currently if Lilypond scores are exported as MIDI files, the ppp mf ff and 
so on are written as MIDI Volume values, not as MIDI Velocity values.


In many cases MIDI Velocity messages are more suitable to translate such 
dynamics into MIDI. That's why people are interested in that conversion 
script. (including me)


--

Martin



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


Re: dynamic and midi velocity

2010-03-04 Thread Philippe Hezaine

Martin Tarenskeen a écrit :



On Thu, 4 Mar 2010, David Raleigh Arnold wrote:


So why on earth is conversion from velocity to volume in decibels an
issue?  If you are using ppp pp p mp mf f ff fff why convert at all?
Just use velocity.  Regards, daveA


That was not the issue being discussed here.

When we are talking about Velocity and Volume we are talking - at 
least in this thread - about two different specific MIDI messages.


Velocity is a 7 bit value (0~127) that is part of a MIDI Note-On or MIDI 
Note-Off message. Each single note has such a value in a MIDI stream.


Volume is one of the MIDI Control Change messages, Nr. 7 to be exactly.
These can not be specified for each single note, but for each of the 16 
MIDI channels.


Velocity and Volume are used for different purposes in MIDI sequencers 
and MIDI files.


Currently if Lilypond scores are exported as MIDI files, the ppp mf ff 
and so on are written as MIDI Volume values, not as MIDI Velocity values.


In many cases MIDI Velocity messages are more suitable to translate such 
dynamics into MIDI. That's why people are interested in that conversion 
script. (including me)





Here are excerpts of discussions with Dominic Sacré when I used 
mididings instead of midicomp.


The problem you're probably noticing here is that CC7 (and all other 
controllers) always pertain to a whole MIDI channel. The only way to 
have two notes at the same time on the same channel, but with different 
volumes, is to use the note-on velocities (as you know).



The volume controller doesn't interact with individual notes at all. It 
just changes the volume immediately, affecting all notes on the 
respective channel, even those which are already playing at that time.



... all tracks in your MIDI file are on the same channel, so CC #7 
messages on one track will affect the other tracks as well.


Hope this helps to understand some differences between CC7 (volume) and 
velocities.

Cheers.
--
  Phil.


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


Re: dynamic and midi velocity

2010-03-03 Thread Peter Chubb
 bachelet == bachelet  w...@theps.net writes:

bachelet any luck finding this script, I'd like to use it, too


It was in this mailing list, at
http://www.mail-archive.com/bug-lilyp...@gnu.org/msg03960.html 

Peter C


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


Re: dynamic and midi velocity

2010-03-02 Thread bachelet

any luck finding this script, I'd like to use it, too 


philippe hezaine wrote:
 
 Hi,
 
 Lilypond uses a separate volume channel, rather than velocity, to
 control MIDI dynamics.  There's a perl script `ConvertToVeolcity.perl'
 that can convert the midi output and add velocity info to each note.

 
 That's a bug then. Musically \p means velocity change and not volume.
 
 Where do you find this perl script? I have no success in my search.
 Thanks.
 -- 
Phil.
 
 
 ___
 lilypond-user mailing list
 lilypond-user@gnu.org
 http://lists.gnu.org/mailman/listinfo/lilypond-user
 
 

-- 
View this message in context: 
http://old.nabble.com/dynamic-and-midi-velocity-tp27633725p27759370.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.



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


Re: dynamic and midi velocity

2010-02-19 Thread Philippe Hezaine

Brett McCoy a écrit :

On Thu, Feb 18, 2010 at 7:27 PM, Peter Chubb
lily.u...@chubb.wattle.id.au wrote:


I had a quick look at what it would take to generate notes with
different velocities instead of just CC 7 events.  It's harder than it
should be: dynamic events always come after the notes they affect, so
I couldn't see an obvious/easy way to get the current dynamics while
processing a note, ... 



Sorry for my bad English but may be this can help you.
When I was beginning the Drummer's Gigsaw I was using mididings which
is a Python app. It takes me a lot of time to understand why I always
get a few errors when I processed CC7-to-velocity.py (a script Dominic
Sacré especially wrote for this case). Finally I had to give up
mididings because it was unable to convert the midi output of Lilypond
which is not clean (an odd thing (bug?)). Dominic's answer was: Nothing
to do with mididings in this case. Fortunately I found midicomp.
 In the current Gigsaw's ugly hack I've found a solution. Here is the
excerpt in question:

 lancer midicomp pour obtenir le ascii
 Launch midicomp and get the ascii
:silent! !midicomp -vt MY-SONG.midi  MY-SONG.asc
:w!

 Ouvrir le .asc
 Open the .asc
:gvim MY-SONG.asc

 A cause d'une bizarrerie dans la sortie midi de Lilypond, rectifier
l'ordre d'apparition des Param
 Because of an odd thing (bug?) in the Lilypond's midi output, I
correct the range of Param
:silent! g/\(.*\)On.*\n\1Param/normal ddp
:w!

 Seulement maintenant copier les valeurs des Param vers les Note On
 Now i can paste the Param values to the Note On
autre commande possible
one another command
:g/On/s/127/\=matchstr(getline(line('.')-1), 'val=\zs\d\+')
:silent! %s/val=\(\d\+\).*\n.*On.*vol=\zs\d\+/\1/
:w!

 Effacer toutes les lignes  Param
 Delete all the Param line
:silent! g/Param/d
:w!

 Retransformer le ascii en midi en l'envoyant dans MA-BASE
 Transform again the .asc to midi   MY-BASE
:silent! !midicomp -c MY-SONG.asc  MY-SONG.midi



...nor is it obvious to me how to get at notes in the
same voice as a dynamic indication at the same timestep.


In the Gigsaw each element of a chord burst out in its own variable,
hence a track for each drums instrument (or Voice, here I mean Voice in
a musical sense, ie. a fugue with 4 voices). It becomes a linear format.



Nor is it obvioous to me how to tell which voices dynamic indications
should be applied to.  Sometimes they should be for several (e.g.,
centered piano dynamics), sometimes just to the voice they are
attached to. And there's still the issue of handling what instruments
are capable of, and adjusting expression accordingly.

There are three classes of instruments I can think of:
 1.  Instruments that play at a fixed volume no matter what you do:
 -- harpsichord, most organ stops, recorder, etc.
 2.  Instruments where the volume is determined at the start of a
 note, but you can't change it afterwards:
 -- piano, clavichord, most percussion, plucked strings, etc.
 3.  Instruments that can change volume anywhere -- most woodwinds and brass,
 swell stops on the organ, etc.

So I'm leaving it in the `too hard' basket for now.

... [skip]


-- Brett


Cheers.
--
  Phil.





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


Re: dynamic and midi velocity

2010-02-19 Thread peter
 Bertalan == Bertalan Fodor (LilyPondTool) lilypondt...@organum.hu 
 writes:

 Tim Reeves wrote: Peter Chubb wrote:

 Lilypond uses a separate volume channel, rather
  than velocity, to  control MIDI dynamics.  There's a perl script
  `ConvertToVeolcity.perl' that can convert the midi output
   and add velocity info to each note.

Bertalan That's a bug then. Musically \p means velocity
Bertalan change and not volume.

Tim Bert,

Tim I'm curious what you mean by this comment. \p does not
Tim mean low volume but low velocity?  Do you mean you use (when
Tim you play an instrument) a low velocity (air velocity,
Tim velocity of striking a key or drum, velocity of bowing,
Tim etc.) in order to create a low volume (sound level) and so
Tim it's the velocity that you have to control?

Bertalan I definitely talk about playing a keyboard instrument. It is
Bertalan quite easy to feel the difference between volume and
Bertalan velocity if you think about that:

Bertalan When you see p in the score, you play with less force on the
Bertalan keys, with lower velocity.  When you see ff in the score,
Bertalan you play with much force on the keys, with high velocity.

That depends on the keyboard.  On the organ I've sometimes played, how
hard you press the notes does asolutely nothing; to control volume you
use the swell pedal (and it works only on some stops).  There's also
several milliseconds delay between playing a note and hearing it,
which is `interesting' to say the least.

I thnk the MIDI designers were mostly thinking about pianos when they
designed the protocols; CC11 for expression feels like an
afterthought.

Peter C


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


Re: dynamic and midi velocity

2010-02-19 Thread David Santamauro
On Fri, 19 Feb 2010 09:54:06 +1100
pe...@chubb.wattle.id.au wrote:

 
 Bertalan When you see p in the score, you play with less force on the
 Bertalan keys, with lower velocity.  When you see ff in the score,
 Bertalan you play with much force on the keys, with high velocity.
 
 That depends on the keyboard.  On the organ I've sometimes played, how
 hard you press the notes does asolutely nothing; to control volume you
 use the swell pedal (and it works only on some stops).  There's also
 several milliseconds delay between playing a note and hearing it,
 which is `interesting' to say the least.
 
 I thnk the MIDI designers were mostly thinking about pianos when they
 designed the protocols; CC11 for expression feels like an
 afterthought.

Maybe so, but expression (cc11) is essential in expressing (no pun
intended) dynamic variations from one note to the next in the context
of an overall (cc7) volume. Obviously velocity differences between notes
can also represent changes in dynamics but sustained (de)crescendos need
continuous controllers.

David


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


Re: dynamic and midi velocity

2010-02-18 Thread Philippe Hezaine

miquel parera a écrit :

Hello.

I want translate the dynamics of one note (\, \ff etc) to midi 
velocity values (0-127) I'ts possible?


Thanks.


Look at midi.scm in /usr/share/Lilypond
HTH.
--
  Phil.



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


Re: dynamic and midi velocity

2010-02-18 Thread Philippe Hezaine

Philippe Hezaine a écrit :

miquel parera a écrit :

Hello.

I want translate the dynamics of one note (\, \ff etc) to midi 
velocity values (0-127) I'ts possible?


Thanks.


Look at midi.scm in /usr/share/Lilypond
HTH.


...or put this in a .ly file and call it with an \include (Thanks to
Nicolas Sceaux):

#(define my-dynamic-absolute-volume
   (let ((absolute-volume-alist '((sf . 1.00)
  (f . 0.95)
  ( . 0.91)
  (fff . 0.83)
  (ff . 0.75)
  (f . 0.67)
  (mf . 0.60)
  (mp . 0.53)
  (p . 0.46)
  (pp . 0.39)
  (ppp . 0.32)
  ( . 0.25)
  (p . 0.12
 (lambda (s)
   (let ((entry (assoc s absolute-volume-alist)))
 (if entry
 (cdr entry))

You have to add a \context in midi block in your .ly file like this:

  \midi {
\context {
  \Score
   dynamicAbsoluteVolumeFunction = #my-dynamic-absolute-volume
 }
}

Notice the values are scm values.
Have fun.
--
  Phil.




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


Re: dynamic and midi velocity

2010-02-18 Thread Bertalan Fodor (LilyPondTool)

Peter Chubb wrote:

miquel == miquel parera computer.music.n...@gmail.com writes:




miquel I want translate the dynamics of one note (\, \ff etc) to
miquel midi velocity values (0-127) I'ts possible?

Lilypond uses a separate volume channel, rather than velocity, to
control MIDI dynamics.  There's a perl script `ConvertToVeolcity.perl'
that can convert the midi output and add velocity info to each note.
  

That's a bug then. Musically \p means velocity change and not volume.
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: dynamic and midi velocity

2010-02-18 Thread Philippe Hezaine

Hi,


Lilypond uses a separate volume channel, rather than velocity, to
control MIDI dynamics.  There's a perl script `ConvertToVeolcity.perl'
that can convert the midi output and add velocity info to each note.




That's a bug then. Musically \p means velocity change and not volume.


Where do you find this perl script? I have no success in my search.
Thanks.
--
  Phil.


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


Re: dynamic and midi velocity

2010-02-18 Thread Bertalan Fodor (LilyPondTool)

Tim Reeves wrote:

Peter Chubb wrote:


Lilypond uses a separate volume channel, rather than velocity, to
control MIDI dynamics.  There's a perl script `ConvertToVeolcity.perl'
that can convert the midi output and add velocity info to each note.

  

That's a bug then. Musically \p means velocity change and not volume.





Bert,

I'm curious what you mean by this comment. \p does not mean low volume but 
low velocity?
Do you mean you use (when you play an instrument) a low velocity (air 
velocity, velocity of striking a key or drum, velocity of bowing, etc.) in 
order to create a low volume (sound level) and so it's the velocity that 
you have to control?
  
I definitely talk about playing a keyboard instrument. It is quite easy 
to feel the difference between volume and velocity if you think about that:


When you see p in the score, you play with less force on the keys,  with 
lower velocity.
When you see ff in the score, you play with much force on the keys, with 
high velocity.


But you don't touch the volume control in either case. I suppose :)

Bert


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


Re: dynamic and midi velocity

2010-02-18 Thread Francisco Vila
2010/2/18 Bertalan Fodor (LilyPondTool) lilypondt...@organum.hu:
 I definitely talk about playing a keyboard instrument. It is quite easy to
 feel the difference between volume and velocity if you think about that:

 When you see p in the score, you play with less force on the keys,  with
 lower velocity.
 When you see ff in the score, you play with much force on the keys, with
 high velocity.

 But you don't touch the volume control in either case. I suppose :)

Yes. Also think on a loudly played record of the sound of a piano
played \p. Clearly it's not the same as a softly played sound record
of a piano played \f.

Most MIDI sound generators change its sound with velocity, so that the
per-note brilliance raises with velocity, making the instrument sound
more natural. I think that's why \p and \f should generate per-note
velocities.

-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org , www.csmbadajoz.com


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


Re: dynamic and midi velocity

2010-02-18 Thread Brett McCoy
On Thu, Feb 18, 2010 at 2:35 PM, Bertalan Fodor (LilyPondTool)
lilypondt...@organum.hu wrote:

 I definitely talk about playing a keyboard instrument. It is quite easy to
 feel the difference between volume and velocity if you think about that:

 When you see p in the score, you play with less force on the keys,  with
 lower velocity.
 When you see ff in the score, you play with much force on the keys, with
 high velocity.

 But you don't touch the volume control in either case. I suppose :)

Generally, for MIDI sequencing, velocity is used to control volume for
single notes that don't change (like an acoustic piano or percussion
instruments) -- the loudness of the note will remain the same for the
entire note. You really want to use expression (CC#11) for instruments
that can change loudness over the course of a note (like a dimenuendo
or crescendo in a string section), and volume (CC#7) is best used to
control the overall volume of the entire track (like would be used in
a volume slider on a mixer). Many playback synths (especially
samplers) will have different recorded sounds playback based on the
velocity, so when you play a ppp you will get a note that has a
different sound quality than a note played at fff. You don't get this
using volume or expression.

-- Brett

In the rhythm of music a secret is hidden;
If I were to divulge it, it would overturn the world.
   -- Jelaleddin Rumi


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


Re: dynamic and midi velocity

2010-02-18 Thread Tim Reeves
 Date: Thu, 18 Feb 2010 11:16:05 +0100
 From: Bertalan Fodor (LilyPondTool) lilypondt...@organum.hu
 Subject: Re: dynamic and midi velocity
 To: Peter Chubb lily.u...@chubb.wattle.id.au
 Cc: miquel parera computer.music.n...@gmail.com,
lilypond-user@gnu.org
 Message-ID: 4b7d1365.1030...@organum.hu
 Content-Type: text/plain; charset=iso-8859-1
 
 Peter Chubb wrote:
  miquel == miquel parera computer.music.n...@gmail.com writes:
  
 
 
  miquel I want translate the dynamics of one note (\, \ff etc) to
  miquel midi velocity values (0-127) I'ts possible?
 
  Lilypond uses a separate volume channel, rather than velocity, to
  control MIDI dynamics.  There's a perl script `ConvertToVeolcity.perl'
  that can convert the midi output and add velocity info to each note.
  
 That's a bug then. Musically \p means velocity change and not volume.



Bert,

I'm curious what you mean by this comment. \p does not mean low volume but 
low velocity?
Do you mean you use (when you play an instrument) a low velocity (air 
velocity, velocity of striking a key or drum, velocity of bowing, etc.) in 
order to create a low volume (sound level) and so it's the velocity that 
you have to control?
AFAIK, MIDI velocity corresponds to the velocity of striking a key on a 
keyboard instrument (since that is what MIDI is usually controlled by, and 
modeled after) which is why things like pitch bends and other non-keyboard 
instrument specific effects are hard or impossible to represent in MIDI.
When I play the horn, I don't consciously think low velocity when I see 
a 'p' in my part. I think 'play soft'. My body reacts by reducing the 
velocity (and volume) of air going into the horn, but I wouldn't say it's 
a bug that I think 'p'=low volume or soft.
Bottom line, in *MIDI*, \p means velocity change and not volume. But 
*musically*, \p means low volume. MIDI is not music, but that's another 
discussion. ;-)
(There's a book out now, 'You Are Not a Gadget', that talks briefly about 
the limitations of MIDI and how we're kind of stuck with them since we 
enshrined MIDI as a standard.)

Tim Reeves


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


Re: dynamic and midi velocity

2010-02-18 Thread Bertalan Fodor



Bertalan When you see p in the score, you play with less force on the
Bertalan keys, with lower velocity.  When you see ff in the score,
Bertalan you play with much force on the keys, with high velocity.

That depends on the keyboard.  On the organ I've sometimes played, how
hard you press the notes does asolutely nothing; to control volume you
use the swell pedal (and it works only on some stops).  There's also
several milliseconds delay between playing a note and hearing it,
which is `interesting' to say the least.
  
I thnk the MIDI designers were mostly thinking about pianos when they

designed the protocols; CC11 for expression feels like an
afterthought.
  


Well, the Schwellwerk itself is an afterthought :)

Bert


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


Re: dynamic and midi velocity

2010-02-18 Thread Peter Chubb

I had a quick look at what it would take to generate notes with
different velocities instead of just CC 7 events.  It's harder than it
should be: dynamic events always come after the notes they affect, so
I couldn't see an obvious/easy way to get the current dynamics while
processing a note, nor is it obvious to me how to get at notes in the
same voice as a dynamic indication at the same timestep.

Nor is it obvioous to me how to tell which voices dynamic indications
should be applied to.  Sometimes they should be for several (e.g.,
centered piano dynamics), sometimes just to the voice they are
attached to.  And there's still the issue of handling what instruments
are capable of, and adjusting expression accordingly.

There are three classes of instruments I can think of:
  1.  Instruments that play at a fixed volume no matter what you do:
  -- harpsichord, most organ stops, recorder, etc.
  2.  Instruments where the volume is determined at the start of a
  note, but you can't change it afterwards:
  -- piano, clavichord, most percussion, plucked strings, etc.
  3.  Instruments that can change volume anywhere -- most woodwinds and brass,
  swell stops on the organ, etc.

So I'm leaving it in the `too hard' basket for now.

Peter C

--
Dr Peter Chubb  peter DOT chubb AT nicta.com.au
http://www.ertos.nicta.com.au   ERTOS within National ICT Australia
All things shall perish from under the sky/Music alone shall live, never to die


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


Re: dynamic and midi velocity

2010-02-18 Thread Brett McCoy
On Thu, Feb 18, 2010 at 7:27 PM, Peter Chubb
lily.u...@chubb.wattle.id.au wrote:

 I had a quick look at what it would take to generate notes with
 different velocities instead of just CC 7 events.  It's harder than it
 should be: dynamic events always come after the notes they affect, so
 I couldn't see an obvious/easy way to get the current dynamics while
 processing a note, nor is it obvious to me how to get at notes in the
 same voice as a dynamic indication at the same timestep.

 Nor is it obvioous to me how to tell which voices dynamic indications
 should be applied to.  Sometimes they should be for several (e.g.,
 centered piano dynamics), sometimes just to the voice they are
 attached to.  And there's still the issue of handling what instruments
 are capable of, and adjusting expression accordingly.

 There are three classes of instruments I can think of:
  1.  Instruments that play at a fixed volume no matter what you do:
      -- harpsichord, most organ stops, recorder, etc.
  2.  Instruments where the volume is determined at the start of a
      note, but you can't change it afterwards:
      -- piano, clavichord, most percussion, plucked strings, etc.
  3.  Instruments that can change volume anywhere -- most woodwinds and brass,
      swell stops on the organ, etc.

 So I'm leaving it in the `too hard' basket for now.

I think you've hit the same issue that WYSIWYG notation programs hit
-- it's hard to get good performance data directly from notation to
MIDI. Speaking from my own experience, using a linear sequencer to
hand tweak performance data (velocity, expression, volume, not to
mention humanizing the notes so they don't sound mechanical) will
always give you better results. I am currently taking some composing
courses via Berklee college (yes, and using Lilypond for all of my
classwork!), and the overriding philosophy on this is to do notation
with the notation editor and use a sequencer like Digital Performer or
Cubase for the performance (in my case, I am using Rosegarden for
sequencing). It's a lot more work, but it's worth it, IMHO.

-- Brett

In the rhythm of music a secret is hidden;
If I were to divulge it, it would overturn the world.
   -- Jelaleddin Rumi


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


Re: dynamic and midi velocity

2010-02-17 Thread Peter Chubb
 miquel == miquel parera computer.music.n...@gmail.com writes:


miquel I want translate the dynamics of one note (\, \ff etc) to
miquel midi velocity values (0-127) I'ts possible?

Lilypond uses a separate volume channel, rather than velocity, to
control MIDI dynamics.  There's a perl script `ConvertToVeolcity.perl'
that can convert the midi output and add velocity info to each note.

--
Dr Peter Chubb  peter DOT chubb AT nicta.com.au
http://www.ertos.nicta.com.au   ERTOS within National ICT Australia
All things shall perish from under the sky/Music alone shall live, never to die


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