denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] Enharmonic Selection of MIDI in is broken.


From: Richard Shann
Subject: Re: [Denemo-devel] Enharmonic Selection of MIDI in is broken.
Date: Sat, 30 Jan 2010 10:05:19 +0000

On Sat, 2010-01-30 at 09:55 +0000, Richard Shann wrote:
> I omitted to cc: the list with the email below, it just went to
> Jeremiah:
> 
> Looking at the code it seems that you need to make a new version of
> notepitch * determine_note(gdouble pitch, temperament *t, gint*
> which_octave, double *deviation) in pitchentry.c that takes a MIDI key
> number and then you can use the whole mechanism that is in there to get
> the spread of sharps and flats that is stored in the "temperament"
> structure.

the temperament structure defaults to Eb-G#, but you could make calls to
sharpen or flatten the set at startup to match the key signature.
The rules for doing this would best be something like this
        for a key with a few sharps (up to 4 say) use the set going 2 sharper
        for a still sharper key use the set going 1 sharper, and still sharper
just use the keysignature set.

and then similarly for flat keys (it has to be assymettric, an arbitrary
choice, since there are five accidentals, which is an odd number, so I
have chose two flat and three sharp accidentals for C major keysignature
- perhaps this is even a reasoned choice as it is good for A minor?)

The point about the rule is that if the keysig is very sharp then the
piece is more likely to stray flatwards and vv.

But let's get the basics working again first. At the moment I cannot
work! Last night I played in the first movement of a sonata and looked
up to find all my Eb's were D#'s!

Richard




>  This spread is controlled by the Input->Shift Accidentals
> xxxwise etc. This would replace enharmonic notenum2enharmonic (gint
> input, gint key) which just gives a few fixed sets. The determine_note()
> allows you to input c-double-sharp when you press d for instance.
> 
> the omitted email is below:
> 
> On Fri, 2010-01-29 at 11:55 -0600, Jeremiah Benham wrote:
> > Using a mod wheel to change enharmonic. whould be a very easy thing
> > to  
> > add. I borrowed code some ifrom mportmidi that chooses sharp or
> > flats  
> > depending on the keysignature. 
> Although it might be good to take this as a hint, it is not much use.
> You have to be able to change the set of sharps and flats. The minimum
> is what I did, which is fine for tonal music. You can at any stage shift
> the set flatwards or sharpwards with the buttons. Essentially you are
> saying what key the music has strayed to, without of course introducing
> a new keysignature.
> 
> > This is what I wired into the  
> > midiinput. Basically if the key has flats it prefers flats. If  
> > keysignature had sharps the prefernce will be for sharps. If none is  
> > set than I believe it just uses sharps. A mod wheel up can choose  
> > enharmonically spelled flats while a mod wheel up chooses  
> > enharmonically sharp notes.
> As I say this would be hopeless, instead of playing in continuously
> until the range of sharps and flats is about to be exceeded you would
> have to stop for every Eb or every G# (to take the commonest case).
> Usually you can play an entire piece with just one setting. The more
> modern the piece the more likely you may have to go from
> 
> Eb.....G#
> 
> to
> Ab.....D#
> 
> to
> 
> Db....A#
> 
> as the key gets flatter and vv.
> 
> >  This is only if the note does not exist in  
> > the keysignature. Does this sound correct?
> > 
> > I would have to do some studying to find a way to "doc" or embed the  
> > pop up window.
> This is such a big problem - you decide what sort of top level widget
> you want to put the dialog into. 
> 
> >  This GUI will be needed for the folks who don't have a  
> > mod or pitch wheel like a midi enhanced piano. Anyway this GUI is  
> > confusing to me. I thought it was only for transposing input on the
> > fly.
> 
> Not at all, there is nothing for transposing on the fly. It is for
> determining which set of note names to use for the notes.
> 
> 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]