deusofnull's code

Simple Frequency Modulation SynthDef

This is a very basic example, I know, but I found it was hard to find basic synthdefs when I was getting started. input args are mostly self explainatory: freq controls pitch of carrier and modulator wave modratio scales the freq of modulator wave carratio scalese the freq of carrier wave (useful for creating different ratios of FM - carrier:modulator - ex: 1:3, 3:5, 1:9, etc ) atk, delay, sustain, rel are enelope controls for a typical ADSR envelope modindex controls the intensity of the modulation, bigger values for modindex create more numerous sidebands amp is the amplitude (volume) on the line with, car ! 2) car ! 2 splits the signal in two in order to be stereo