On Monday 09 December 2002 11:40 pm, David Olofson wrote:
I would be happy to see a clean solution for this, but
so far, these
are the only alternatives we have managed come up with:
1. 1.0/note for note_pitch, 1.0/octave for linear_pitch.
Converter plugins required everywhere, even for 12tET.
Even 12tET-only hosts have to handle this.
2. 1.0/octave for linear_pitch, no note_pitch (?).
Host calls required for conversions. Plugins have to
find out what scales senders are using, or who is
sending what. How does this work if multiple senders
send to the same Channel?
3. 1.0/note for note_pitch, 12.0/octave for linear_pitch,
No conversion needed for 12tET. Converter plugins can
be used when other scales are desired. There cannot
be 12tET-only hosts, since scales are not a host side
matter.
More ideas, anyone?
4. Raw frequency in Hz.
It's only with ET scales that an exp() function is used to convert from the
scale into the frequency, so why have this built into the API? In just
intonation and all other types of scale that I'm aware of, the important
thing is the ratio between frequencies, so a perfect fifth is generated by
multiplying by 3/2, for example. If you want to transpose by one 12tET
semitone, just multiply by the twelfth root of two (about 1.0595).
Although of course for modulating by lfos etc the exponential will still need
to be performed somewhere, so my preference is actually 2. I think that
insisting on an exta factor of 12 would be a bad, bad, bad, bad mistake. Not
only would it lead to extra work in a great deal of cases, but you are bound
to get people casting it to an int, which would destroy the whole purpose of
having it continuous in the first place. If the factor of 12 is there in
some places but not others, that's an unnecessary complication which will
lead to a loss of generality since the two different types of signal can no
longer be interchanged.