Cabbage Logo
Back to Cabbage Site

Complex self Phase modulation question

hi all,
Question about self modulation in phase modulation.
Considering the following opcode based on a Csuond book among which @iainmccurdy is an author

opcode PMOpJMSelf,a,kkaj
kmp,kfr,apm,
ifn  xin  ;These are values for the LFO
setksmps 1
aph phasor kfr
a1 tablei aph+apm/(2*$M_PI),ifn,1,0,1
xout a1*kmp
endop

it is very easy to call it for self modulation with

amod init 0
amod PMOpJMSelf kAmp, kFactor, amod*kPM_factor, giSine

However, how can I call it to self modulate a second level of modulation like :

amod1 init 0
amod2 init 0
; first stage of PM
amod1 PMOpJMSelf kAmp1, kFactor1, amod1*kPM_factor1, giSine
/second stage : first signal enters a second modulation opcode which should also be self modulated
2 options : multiplication or addition
/
; case 1 : addition
amod2 PMOpJMSelf kAmp2, kFactor2, amod1 + amod2
kPM_factor2, giSine
; case 2 : multiplication
amod2 PMOpJMSelf kAmp2, kFactor2, amod1 * amod2
kPM_factor2, giSine

Both work but which one is the correct as a self PM?

thank you for help

Essentially there are two separate oscillators created, I wouldn’t describe it so much as a double layer. The first one modulates its own phase with its own output. The second one modulates its own phase by:
case 1 - a mix of itself and the first oscillator
case 2 - the result of ring modulation (multiplication) between the two oscillators audio outputs.
Both cases will produce complex, and possibly difficult to control, spectra.
Have you also looked into the cross-fm and cross-pm techniques? http://www.csounds.com/journal/issue12/crossfm.html