denemo-devel
[Top][All Lists]
Advanced

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

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


From: Richard Shann
Subject: [Denemo-devel] Enharmonic Selection of MIDI in is broken.
Date: Sat, 30 Jan 2010 09:55:08 +0000

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. 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







reply via email to

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