Created
June 4, 2016 15:01
-
-
Save davemacdo/0efb6781bc0a5d993bf7c88251ac99a2 to your computer and use it in GitHub Desktop.
Calculate frequencies for even octave divisions in ChucK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SinOsc s => dac; // could be any unit generator | |
440.0 => float baseFreq; // starting frequency | |
5.0 => float divs; // number of even divisions of the octave | |
1 => int i; // number of steps above base | |
// Playtest | |
// baseFreq => s.freq; // play base freq | |
// 1::second => now; | |
i/divs => float exp; | |
Math.pow (2, exp) => float mult; | |
baseFreq * mult => s.freq; | |
// Playtest | |
// 1::second => now; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment