FM(carrier=100, ratio=0.50, index=5, mul=1, add=0)
A simple frequency modulation generator.
Implements frequency modulation synthesis based on Chowning's algorithm.
Parent class : PyoObject
Parameters:
carrier : float or PyoObject, optional Carrier frequency in cycles per second. Defaults to 100. ratio : float or PyoObject, optional A factor that, when multiplied by the `carrier` parameter, gives the modulator frequency. Defaults to 0.5. index : float or PyoObject, optional The modulation index. This value multiplied by the modulator frequency gives the modulator amplitude. Defaults to 5.
Methods:
setCarrier(x) : Replace the `carrier` attribute. setRatio(x) : Replace the `ratio` attribute. setIndex(x) : Replace the `index` attribute.
Attributes:
carrier : float or PyoObject, Carrier frequency in cycles per second. ratio : float or PyoObject, Modulator/Carrier ratio. index : float or PyoObject, Modulation index.
Examples:
>>> s = Server().boot() >>> s.start() >>> ind = LinTable([(0,20), (200,5), (1000,2), (8191,1)]) >>> m = Metro(4).play() >>> tr = TrigEnv(m, table=ind, dur=4) >>> f = FM(carrier=[250.5,250], ratio=.2499, index=tr, mul=.5).out()
Methods details:
FM.setCarrier(x): Replace the `carrier` attribute. Parameters: x : float or PyoObject new `carrier` attribute. FM.setRatio(x): Replace the `ratio` attribute. Parameters: x : float or PyoObject new `ratio` attribute. FM.setIndex(x): Replace the `index` attribute. Parameters: x : float or PyoObject new `index` attribute.