[linux-audio-dev] XAP: Pitch control

David Olofson david at olofson.net
Wed Dec 11 14:11:00 UTC 2002


On Wednesday 11 December 2002 18.26, Steve Harris wrote:
> On Wed, Dec 11, 2002 at 04:35:16 +0100, David Olofson wrote:
> > > Maybe. My objection to converters is more that they imply two
> > > parallel representations of frequency (in the broad sense of
> > > the word), which seems like a mistake.
> >
> > They are not parallel. One actually *is* frequency, while the
> > other expresses pitch in relation to a scale.
> >
> > It's like comparing inline code with calls through function
> > pointers, basically.
>
> I dont see how, its more like having a string and int
> representation of the same thing.

No, not unless the string representation is supposed to translate in 
a number of different ways, depending on what character table you use.

In code, for linear_pitch:

	actual_pitch = linear_pitch;


whereas for note_pitch (simplified; no interpolation):

	actual_pitch = scale[note_pitch];


There is only one valid relation between actual pitch and linear 
pitch, while the relation between actual pitch and *note* pitch is 
user defined.


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