-
-
Save zeffii/7869946 to your computer and use it in GitHub Desktop.
This file contains 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
// basic FM synthesis using sinosc | |
// modulator to carrier | |
SawOsc m => SinOsc c => ADSR kickEnv =>dac; | |
2 => c.sync; | |
// carrier frequency | |
20 => c.freq; | |
// modulator frequency | |
2.9 => m.freq; | |
// index of modulation | |
-130 => m.gain; | |
// phase modulation is FM synthesis (sync is 2) | |
kickEnv.set( 0.089::ms, 231::ms, 0.00, 0::ms ); | |
// time-loop | |
while( true ) { | |
kickEnv.keyOn(); | |
-pi => m.phase; | |
-pi => c.phase; | |
1::second => now; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment