[linux-audio-dev] XAP: Pitch control

David Olofson david at olofson.net
Wed Dec 11 18:49:01 UTC 2002


On Wednesday 11 December 2002 23.56, David Gerard Matthews wrote:
[...]
> >The need for 1.0/note or similar arrise when you want to work with
> >something like 12t without deciding on the exact tuning, and also
> >when you want to write "simple" event processor plugins that think
> > it terms of notes rather than actual pitch.
>
> Not to sound rude or anything, but I've been following this thread
> and still
> have yet to be convinced of the necessity for an internal conept of
> "note".

That's not rude - I don't think anyone is *totally* sure about this...

Though, you might want to note (pun not intended) that I'm really 
talking about "continous pitch" - not note numbers, as in "integer, 
MIDI style". You could think of the relation as

	linear_pitch = f(note_pitch)

where f() is a function of your choice. You could write it as

	pitch = f(pitch)

but how long would it take before the first user wonders why you get 
1 tone/octave if you connect a sequencer directly to a synth? :-)


> Disclaimers: 1) Although schooled intensively in classical
> music theory (I have even taught it at the university level), I
> consider the whole conept of "notes" a little outdated; and (more
> importantly)

Although I (still) effectively use 12tET most of the time, I agree. 
Harmonies and melodies are just about *frequencies*, and notes, 
scales etc are just handy abstractions, built around one, single 
scale that happens to be really rather popular.

That said, continous note_pitch is not more bound to notes than 
linear_pitch is to octaves. Both are *continous*, and 1.0/note, 
1.0/octave or whatever are little more than units.


> 2) my coding skills are still pretty rudimentary.

...but if your math and music theory is strong, you can work with 
notes (rounding...), continous pitch or directly with linear pitch. 
If you're lazy, notes are easy, and work with traditional theory.

If you want to do the Right Thing (IMHO), you could consider coding 
uniersal harmonizers and other event and/or audio processors that 
think entirely in linear pitch. :-) (This is what the VST guys told 
me would be very, very hard, next to impossible, no one would ever 
want to do that, etc etc. Ok, ok! Have notes, then...)


> I can see the need for conversion from, say midi note numbers,

Yes, but MIDI is just a wire protocol, that some "driver plugin" 
would deal with. The actual MIDI note numbers should never get into 
events at any point.


> but
> I have to admit that I still don't really see the need for an API
> to know about "notes".

The need is there, because the API is supposed to support sequencers 
and event processors that are based on traditional (or other note 
oriented) music theory. Preferably, this should be possible without 
confusing users too much, which is why a separation of pitch "before 
scale converter" and "after scale conerter" is needed.

You *could* do only 1.0/octave - but how logical is that when you 
have a scale converter ahead of you? Should that scale converter 
assume you're feeding it 12tET ((1/12)/octave), 1.0/note, or what? 
The whole point with note_pitch is to answer that question once and 
for all: "It's 1.0/note before, and 1.0/octave after, period."


//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`---------------------------> http://olofson.net/audiality -'
.- M A I A -------------------------------------------------.
|    The Multimedia Application Integration Architecture    |
`----------------------------> http://www.linuxdj.com/maia -'
   --- http://olofson.net --- http://www.reologica.se ---



More information about the Linux-audio-dev mailing list