[linux-audio-dev] XAP: Pitch control

Nathaniel Virgo nathaniel.virgo at ntlworld.com
Tue Dec 10 19:43:01 UTC 2002


On Tuesday 10 December 2002 8:39 pm, David Olofson wrote:
> > > More ideas, anyone?
> >
> >      4. Raw frequency in Hz.
>
> How would that make anything easier?

I'm not saying it necessarily would, I was just suggesting an alternative 
that hadn't been mentioned at the time I started typing.

> > 	It's only with ET scales that an exp() function is used to convert
> > from the scale into the frequency,
>
> Wrong. Linear pitch, as used by synths, is <some value>/octave, and
> that's all there is to it.

Sure, but if I want to convert it into Hz I have to do 
Constant*2^(Linear Pitch/<some value>), and if I want to go the other way I 
have to do a log2.  What I meant was that in some ways linear pitch is nicer 
for ET because the intervals are nice and constant at 1/12 or 1 or whatever, 
whereas for other types of scale it's the frequency ratios that are important.

> >  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.
>
> Yes. So let's have 1.0/note for continous pitch (corresponds to MIDI
> pitch + pitch bend, sort of; this is *before* you apply scales),
> 1.0/octave for linear pitch (absolute relation to Hz), and then...
> we'll have to convert continuos to linear at some point. That's the
> disadvantage; you *have* to actually convert. (Well, unless you're
> thinking in terms of one tone/octave.)

Well, I can see a problem with 1.0/note when working with non-12-tone scales 
(if I understand this correctly), which is that the sizes of the intervals 
can be quite variable, and continuous pitch sweeps will sound odd, because 
the pitch bend will have less effect where the notes are closer together. 

I can't really say I can think of a better way though.  Personally I'd leave 
scales out of the API and let the host deal with it, sticking to 1.0/octave 
throughout, but I can see the advantages of this as well.

> Pros with scale converter plugins:
> 	* They are just plugins, and can do *anything*.
> 	* Any host can host them - no need for explicit scale support.
> 	* New scale converters can be used directly with any host.
>
> Can someone suggest alternaties and advantages with those?
>



More information about the Linux-audio-dev mailing list