The amfm path is the most complicated path of all. Here is the function used to generate it:
![]()
Never mind if you don't follow the math here. What's significant about this is that it takes the John Chowning's ``classic'' function for frequency modulation:
![]()
and applies the amplitude modulation function to it:
![]()
There are 3 variables you need to set: am, fc, fm. Here's how you can do it:
20 40 amfm(am=0.1, fc=0.2, fm=0.3) periods(10) 1000 -1000 amfm(am=0.01, fc=0.02, fm=0.03) range(5000,-5000)
Of course, you can also give the number of periods and the range to this path, as shown above.
Here is a datafile that uses the amfm paths, followed by a plot of the paths.
output(sound.wav) # name of the output soundfile
duration(5) # duration of the transformation
initial(1) # play the initial state for these many seconds
final(1) # play the final state for these many seconds
10 50 amfm(am=0.1,fc=0.2, fm=0.3) # duration in samples
-500 500 sin # amplitude
40 80 amfm(am=0.01,fc=0.02,fm=0.03) # duration in samples
10000 -10000 tri # amplitude
30 60 amfm(am=0.9, fm=0.8, fc=0.7) # duration in samples
-10000 10000 # amplitude
20 40 amfm(am=0.6, fm=0.5, fc=0.4) # duration in samples
1000 -1000 sin # amplitude

The values for am, fm, and fc can by any floating-point number. Values greater than 1 tend to ``noisy'' very fast.