[linux-audio-dev] XAP: Pitch control

David Olofson david at olofson.net
Mon Dec 9 15:43:00 UTC 2002


On Monday 09 December 2002 18.44, Steve Harris wrote:
> On Mon, Dec 09, 2002 at 05:37:53PM +0100, David Olofson wrote:
> > On Monday 09 December 2002 17.05, Steve Harris wrote:
> > > I really dont like the idea of having two forms of pitch data,
> > > and I dont like the idea of implicity putting pitch converters
> > > in the graph.
> >
> > Well, it can be done with one form only, that will only make life
> > harder on those who don't want to truly understand non-12tET
> > scales.
>
> No it wont. Code that doesn't want to deal with scales doesn't have
> to. Code that wants to deal with notes can just make a call to ge
> it converted.

You want "simple" event processors to pay the price? Well, maybe 
that's ok, bit I'd prefer if they could just say "I want note_pitch!" 
and then assume that 1.0 will always be one note, whatever scale is 
used.

What I'm saying is simply that if *everything* in a standard, 12tET 
net uses 12.0/octave, it doesn't matter whether you say you're taking 
or sending note_pitch or linear_pitch - because they look exactly the 
same. That way, *no one* pays the price for non-12tET - until you 
actually want something to play using a different scale.

When you want that, you just insert a scale converter, and from then 
on, everything is expressed as linear_pitch, based on the scale 
selected for that converter. Normally, you'd just place it on a 
Channel of a synth, but if you're into modular, you place it wherever 
you want to start dealing with linear_pitch rather than note_pitch.


> > > Its messy and unnessary.
> >
> > It may be messy if done wrong, but I strongly doubt anyone on the
> > VST list would agree that it is unnecsessary. They convinced me,
> > at least.
>
> But the VST people were allready lumbered with note scale, that
> puts them in a different situation.

You're probably right. The main thing they wanted to convince me of 
was that you need *both* note pitch and linear pitch - but OTOH, that 
was thinking in the terms of the rather primitive MIDI based, 
effectively one-way event system of current VST.

Our plugins will be able to *tell* the host and/or the user what they 
expect by hinting their controls, so it's much less of a problem. You 
*could* even get both, I guess... (Have a switch on the scale 
converter to enable passthrough of the original events to some other 
control index. You *can* have multiple controls with the same "type 
hint", so that's not a problem.)


> > > The overhead from making the small number of processors that
> > > require it get the host to do the conversions is probably no
> > > higher than having converter plugins and its so much cleaner.
> >
> > It's not cleaner in any way, since for this to be useful, the
> > plugin has to figure out what scale it should ask about.
>
> Not really. Unless the plugin explicity wants to use a different
> scale to the session one it can just ask for the default. Its
> pretty uncommon for people to mix scales in one session.

I don't think that's true. At least in "real" music, it's really 
rather common to mix slightly "alien" scales with 12tET. Many 
singers, violinists and other "continous pitch" people *deliberately* 
tweak notes to make them fit better - although one might perhaps 
think of that as something different from scales; not sure.


> Infact the nearest example to this I can think of is with clashing
> subsections of a microtonal scale, but that is still one scale.
> Though I'm sure, someone, somewhere has really done it.

Some people do all sorts of weird stuff. Considering that Steinberg 
and others seem to think this really matters, I don't think we should 
ignore it. Why implement something that is inferor to the *current* 
version of VST, when we already know that people are complaining, and 
that Steinberg most probably will improve these matters in VST 3.0?

AFAIK, there are even musicians that don't have much use of current 
standard synths and applications, simply because they're too 
restrictive, and/or way too cumbersome to deal with, when it comes to 
scales and pitch control.


> > Again, there is no such thing as a single, global scale. If you
> > assume that, you may as well ignore anything about non-12tET
> > altogether.
>
> Huh! I'm not talking about global to the world, just global to that
> particular graph.

Well, that's what I meant, actually. One graph would usually 
correspond to one song.


> Granted there will be people who want to run half
> thier track in 12 and half in 7, but thats hardly a common case,
> and we dont prevent it.

We don't? Well, lets hope that all Multichannel synths will do the 
right thing when someone wants to play different scales on *the same 
instance*.

The way I see it, this could all be rather trivial - but I seem to be 
missing something...


> > Well, yeah - presets. Just like with any other plugins. A scale
> > converter is an *effect*, and deserves to be treated as such by
> > the API.
>
> Its not an effect, its a conversion. It should be lossless. If its
> an effect then the algorithm is wrong.

I disagree. And I think lossy vs lossless is entirely besides the 
point. Effects *cannot* be lossless? If you're referring to loss of 
accuracy in the processing, well then conversions cannot be lossless 
either.

(Besides, I actually meant plugins, event processors or whatever, 
rather than "effects". Dunno where I got that from...)

Either way, scale conversions are lossless? When you're dealing with 
*continous* pitch, you'll need either an exact formula, or you'll 
have to use an approximation of some kind. We're not talking about 
plain LUTs. (Pitch bend needs more than that, and continous pitch is 
basically "pitch bend done right".)


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