denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] dynamics


From: Richard Shann
Subject: Re: [Denemo-devel] dynamics
Date: Wed, 25 Mar 2009 17:21:44 +0000

On Wed, 2009-03-25 at 11:14 -0500, Jeremiah Benham wrote:
> On Wed, 2009-03-25 at 14:44 +0000, Richard Shann wrote:
> > I've put a sample menu item (Markings->Text
> > Markings->Dynamics->Fortissimo) into git. There is some work to be done
> > on positioning the FF sign relative to the chord, but it will do to
> > start work on the MIDI.
> > The script is this:
> > 
> > ;;;Fortissimo
> > (d-DirectivePut-chord-graphic "Dynamic"  "Fortissimo" )
> > (d-DirectivePut-chord-gx "Dynamic"  -10)
> > (d-DirectivePut-chord-gy "Dynamic"  30)
> > (d-DirectivePut-chord-postfix "Dynamic"  "\\ff")
> > (d-DirectivePut-chord-minpixels  "Dynamic" 20)
> > (d-RefreshDisplay)
> > 
> > It's very basic - we would want to add a script
> > actions/editscripts/Dynamics.scm to allow the dynamic to be changed
> > easily etc. But it provides a place to put a line
> > (d-DirectivePut-chord-midivolume "Dynamics" 10) or whatever it is we
> > need.
> > Looking purely at the handling of dynamics in exportmidi.c that you have
> > just checked in, it would seem that you just need a int field to
> > announce a volume to set. Then we would do a function call
> > set_volume(curchord->directives, &cur_volume) to put any new value that
> > may be set in any of the directives into cur_volume.
> > *HOWEVER* give some thought to what are the range of things you might
> > want to announce to the exportmidi code from a directive, and see how
> > they may be bundled up. For example, I imagine a crescendo will be one
> > of these, so a single step change in volume would better be represented
> > as a special sort of crescendo; then we don't have more fields and more
> > special code than we need. 
> 
> I am thinking: 
> 
> volume settings like piano, forte, accents, etc...
So what represents these in MIDI? A 0-255 value? What distinguishes an
accent from a forte? The question is how many fields do we need to pass
all the information we would want MIDI to respond to, and what should
they be called.
> note length settings like staccato, marcato, fermata, Tenuto, etc...
again would this be an single int value, what would the semantic be - a
value relative to the written duration ...
> Pitch settings like tuning system, portamento, glissando, vibrato 
tuning system sounds like per Voice rather than per note?
What would be needed to describe a gliss?
> 
> > The crescendo is a case where we may want open/close directives: 
> 
> This will be probably be true with portamento and glissando as well. 
> 
> > I have
> > proposed to cater for this explicitly only for standalone directives: if
> > we want the dynamics to be attached to a chord (it is probably best)
> > then we need to re-visit the open/close issue - no code has been written
> > around this yet.
> 
> Ok. I am not sure as to what code now. Do you want me to create more
> scripts to match the Fortissimo example but for the other volumes like
> ppp, pp, p, mp etc ...?
No, we only need one to get the system worked out. We need a (hopefully
standardized) representation of the things we will want the exportmidi.c
code to slurp up off of the CHORD structures as it passes over them. So
if MIDI uses a 0-255 volume indicator and we want to represent a change
from one volume to another in so many time steps (what would the units
be?) we might want, I don't know, three ints, or perhaps there is some
packing that is done in some standard encoding that we could use...

> 
> > What other sorts of things does MIDI want to know about as the music
> > goes along (tempo changes evidently ...)?
> 
> Yes. tempo changes and all the things mentioned above. 
Would tempo change be a field called, say, bpm representing the number
of quarter notes per minute - is an integer good enough? I am guessing
that this value is internal to the exportmidi.c code - the MIDI output
values just reflect the tempo changes in the different timings that
exportmidi.c assigns to the note? In which case, what we should store is
the value as used by exportmidi.c unless it's very obscure and the
script writer will find it easier to write something that will be
converted to the internal thing used by exportmidi.c 

Once you have a set of names and their meanings you can create fields in
the structure DenemoDirective to hold them, and start writing code in
exportmidi.c to extract them and act on them.
I'll implement them so that, for example, 
(d-Directive-put-chord-<yourfieldname> "Dynamic" 50)
will set the directive->yourfieldname to the value 50.

whereupon your code in exportmidi.c will do something with that value,
and the user will hear fortissimo or whatever...

Richard



> Jeremiah
> 
> > Richard
> > 
> > 
> > On Wed, 2009-03-25 at 08:29 -0500, Jeremiah Benham wrote:
> > > On Wed, 2009-03-25 at 09:44 +0000, Richard Shann wrote:
> > > > On Tue, 2009-03-24 at 15:00 +0000, Richard Shann wrote:
> > > > > I don't know what exactly you would be storing as MIDI information, it
> > > > > would be a good idea to bounce the possible fields and their names
> > > > > back
> > > > > and forth a bit. 
> > > > Also we will need to coordinate changes, as I am currently working
> > > > through adding the keysig directives and timesig directives. I could do
> > > > adding the MIDI fields to the DenemoDirective structure (and then the
> > > > code for them in view.c, imp/exportxml.c lilydirectives.c), while
> > > > Jeremiah could add the actions to take in exportmidi.c
> > > 
> > > Ok. This sounds good. I will need you to point me to an example because
> > > I am very behind on this directive stuff.
> > > 
> > > Jeremiah
> > > 
> > > 
> > > > Richard
> > > > 
> > > > 
> > > > 
> > > > 
> > > > _______________________________________________
> > > > Denemo-devel mailing list
> > > > address@hidden
> > > > http://lists.gnu.org/mailman/listinfo/denemo-devel
> > > 
> > 
> 





reply via email to

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