[Fluxus] scala.scm, rev. 1

Kassen signal.automatique at gmail.com
Wed Dec 21 06:55:42 PST 2011


On 21/12/2011, Joel Matthys <joel at matthysmusic.com> wrote:

> I hear that the piano tuning classes at Hogwarts are full every
> semester.
>

I heard that if you just repeat "it's just the pythagorean comma, I'm
not going crazy" to yourself you can get out of the madhouse again
within a year.

> Well, sort of. In the case of the regular equal-tempered scale, that is
> correct, (scala-note ) can calculate frequencies of fractional keynums.
> That's because equal-temperament is a logarithmic scale with consistent
> properties over its whole range.
>
> But in the case of scala files, the frequency ratio from from one note
> to the next varies, so fractional keynums are a bit of a tricky point.
> It's on the to-do list yet.
>

I imagine that if you draw a "best fit" curve through the known points
you could come close. That would also be quite expensive, not to
mention very hard.
Of course the question remains how of how much sense that would make
in practice for many tuning.

My original fix for floats crashing (note ) was quite brutal;
(inexact->exact (floor my_value))
Then I added a type-check to make sure it doesn't get passed strings
or vectors, etc.
That's crude, but I find it quite defensible as a strategy.



> I hadn't thought cpu usage to be a big factor since these are used at
> control rate in practice. But yes, that would save cpu cycles. So when
> the user does (set-scale ) it fills a table of integer keynum->freq
> values, and calculates notes outside the table on demand? Makes sense to
> me.
>

Maybe I'm exagerating there, it's true that modern CPU's and GPU's are
fast, but our system is for realtime usage of both video and audio
which is expensive and it's likely to be used by artists on a budget
so I like to try to save. Of course it's generally good practice to
first make things correct, then make them fast so we are right on
track.

Yours,
Kas.



More information about the Fluxus mailing list