[linux-audio-dev] XAP: Pitch control

David Olofson david at olofson.net
Mon Dec 9 11:26:00 UTC 2002


On Monday 09 December 2002 16.30, Steve Harris wrote:
> On Mon, Dec 09, 2002 at 02:59:10PM +0000, Steve Harris wrote:
> > I dont see how a plugin can usfully process and note information
> > without any explicit knowledge of the scale (execpt for some
> > trivial cases, eg. octave shift, 5ths), but those can be handled
> > in linear pitch too.
>
> Just to make it clear, I would have the host provide a pitch->note
> number and note number->pitch mapping functions (for the "current
> scale").

	1. There is no "current scale". You may have different
	   scales for different instruments. (As a matter of
	   fact, you *do* most of the time IRL - except when
	   working exclusively with synths.)

	2. I don't like one or more function for every other
	   event! There's a reason why I designed a totally
	   inlined event system. :-)

	3. Who would use that, when you can just have control
	   inputs for note_pitch only or linear_pitch only?


> The note number would have no semantics.

Agreed.


> That way things like oscillators, modualtors etc. still get to run
> efficiently, and somewhat unusal cases like odd scaled arpegiators
> have a slight overhead, but there is only one pitch format.

Hmmm... On second thought, why support plugins with *both* note and 
linear pitch inputs? It could just be a hint on the pitch control, 
saying whether it expects note numbers or linear pitch values. 
They're basically both contious pitch controls, but the note_pitch 
version may be non-linear (non-ET scales), and will usually have a 
different scale, such as 12.0 per octave.

Anyway, still the same thing: *plugins* should be used for 
conversions between the two; not host callbacks.


Oh, and here's a good reason to actually use 12.0/octave for linear 
pitch: You won't need any scale conversions at all, as long as you 
use 12tET. :-) (That's why I decided to use that in Audiality in the 
first place.)


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