On Tuesday 10 December 2002 13.00, Steve Harris wrote:
[...pseudocode and stuff...]
I know which I prefer. There are other solutions to
the sclaing
problem, but AFAICT they all involve actualy using 1.0/octave
really and just scaling it up and down every time you want to use
it. Pointless.
Yes. I don't like the fact that you can't map 1.0/note to 1.0/octave
without a scale converter (althoug a very trivial one), but the only
alternative is to define (1/12)/note for note pitch, regardless of
scale.
It's a
matter of "packing" the 1.0/note note_pitch into something
that's physically equivalent to 1.0/octave when dealing with
12tET, just so you don't have to use scale converters at all for
12tET.
Except that its a factor if 12, not a factor of 1. Factors of 1 are
really easy to deal with ;)
Well, I can't deny that! :-)
Right. Nor
does 12.0 / octave. One looks nice in syths and
various event processors, and the other looks nice in note/scale
oriented things. Both result in note_pitch and linear_pitch being
the same value for the same actual pitch in 12tET, so you *only*
need to mess with scale converters when you actually want
non-12tET.
12/octrave does /not/ look nice in synths, you need to remove the
factor of 12 to convert the pitch into a frequency.
Of course. I never said anything else.
What I'm trying to say is that (1/12)/note certainly doesn't look
nice in note oriented code, considering that there's *not*
nescessarilly 12 notes per octave:
arpeggiator
{
offset = offsets[fmod(time() * speed, steps)];
out = in + offset * (1/12);
}
...and to avoid both that *and* have 1.0/octave for linear pitch, we
have to do actual conversions whenever connecting these two different
kinds of controls.
The only sensible way of doing that is by using some form of conerter
plugins, IMHO. I definitely do not want to force host callbacks into
this.
//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 ---