[chuck-users] Power operator in chuck
gewang at CS.Princeton.EDU
Wed Nov 30 00:59:15 EST 2005
> As note progressions (and pitch perceptions) are logarithmic, being
> able to access a decent power operator seems important. I want to start
> with a walk up an octave, divided into an arbitrary number of segments.
You may have found this already: std.mtof( float ) converts MIDI
pitch (note number) to frequency in Hz. Adjacent note numbers are a
semitone apart (so every 12 is an octave) and the function will also
take fractional values as well. std.ftom( float ) converts in the
other direction, from frequency to MIDI note number.
Here is a chart mapping some MIDI note numbers -> frequencies:
More information about the chuck-users