Generates the log of a modified Bessel function of the second kind, order 0, suitable for use in amplitude-modulated FM.
Syntax
f#timesize12xint
Initialization
size -- number of points in the table. Must be a power of 2 or a power-of-2 plus 1 (see f statement). The normal value is power-of-2 plus 1.
xint -- specifies the x interval [0 to +xint] over which the function is defined.
Note
This subroutine draws the natural log of a modified Bessel function of the second kind, order 0 (commonly written as I subscript 0), over the x-interval requested. The call should have rescaling inhibited.
The function is useful as an amplitude scaling factor in cycle-synchronous amplitude-modulated FM. (See Palamin & Palamin, J. Audio Eng. Soc., 36/9, Sept. 1988, pp.671-684.) The algorithm is interesting because it permits the normally symmetric FM spectrum to be made asymmetric around a frequency other than the carrier, and is thereby useful for formant positioning. By using a table lookup index of I(r - 1/r), where I is the FM modulation index and r is an exponential parameter affecting partial strengths, the Palamin algorithm becomes relatively efficient, requiring only oscil's, table lookups, and a single exp call.
Examples
Here is an example of the GEN12 generator. It uses the file gen12.csd.
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform-odac ;;;realtime audio out;-iadc ;;;uncomment -iadc if realtime audio input is needed too; For Non-realtime ouput leave only the line below:; -o gen12.wav -W ;;; for file output any platform</CsOptions><CsInstruments>;example from the Csound Book, page 87sr=44100ksmps=32nchnls=20dbfs=1instr1idur=p3iamp=p4icarfrq=p5imodfrq=p6aenvexpseg.01,idur*.1,iamp,idur*.8,iamp*.75,idur*.1,.01i1=p7*imodfrq;p7=modulation index starti2=p8*imodfrq;p8=modulation index endadevlinei1,idur,i2;modulation frequencyaindexlinep7,idur,p8;modulation indexarlinseg1,.1,p9,p3-.2,p10,.1,1; r value envelope: p9-p10 =exp. partial strength parameter start and endamp1=(aindex*(ar+(1/ar)))/2afmodosciliamp1,imodfrq,1;FM modulator (sine)atab=(aindex*(ar-(1/ar)))/2;index to tablealooktableiatab,37;table lookup to GEN12aamodosciliatab,adev,2;am modulator (cosine)aamod=(exp(alook+aamod))*aenvacarosciliaamod,afmod+icarfrq,1;AFM (carrier)asigbalanceacar,aenvoutsasig,asigendin</CsInstruments><CsScore>f108192101f20819291190f3701024-1240;Bessel function-defined from 0 to 40i102.280080016.12i1+..1900147814.2i1...110038029.52i1.10.100100113.25si101.120010016.12i1+.<<<<<<<i1+..<<<<<<i1+..<<<<<<i1+..<<<<<<i1+..<<<<<<i1+..<<<<<<i1+10.280080091.96si1011.25505116.12i119.0570040116.12i128.900147814.2i137.110038129.52i146.200102113.25i156.80080391.96e</CsScore></CsoundSynthesizer>
This is the diagram of the waveform of the GEN12 routines, as used in the example:
f 37 0 1024 -12 40 - Bessel function-defined from 0 to 40
Credits
Example is, with minor modifications, taken from The Csound Book (page 87).