Just glanced quickly at the code but two things may explain the difference,
1) in the PM case there's 2pi factor built into the index because the table reader has normalised phase and the PM formula expects it to be in radians. I don't see any scaling so the index might be off by that factor with regards to FM.
2) The PM and FM versions are also not identical, because they use the same mod/carrier phase so the waveforms and spectra are going to be different too even with the same parameters. FM has an integration done by the phasor that changes the phase of the equivalent PM expression. That would change the phase of the sidebands. One of the things you might see for instance is the absence of DC in PM versus FM typically in 1:1 modulation using sine wave oscillators. To make them nearly identical we need to account for that difference and use a different modulator phase eg cos instead of sin etc.
Hope that helps.
Prof. Victor Lazzarini
Maynooth University
Ireland
Hello Bill,
yes, that looks fine. I don't know why the indices differ so much, for the same effect. You will notice that "beating" with both, if you set the FM index to 20 it becomes more obvious in that example, too. Why exactly that happens, I don't know. I know that the same thing happens everytime I've heard it, never mind the soft- or hardware synth. Perhaps some phasing effect that slightly resolves itself when the modulation index is an integral or .5 of an integral?
That's as far as my limited knowledge/experience goes. 
Best wishes,
Jeanette
Bill Alves, Sep 25 2026:
Here’s a simple file I put together some time ago to demonstrate the difference between phase modulation and frequency modulation to my students. I’d like to know if I got it right, but also I’m puzzled by what seems to be a 2hz LFO kind of modulation when I listen to the PM example. I also note the significant difference between what is called index of modulation in both types. Thanks for your insights and any corrections!
Bill Alves
<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>
sr = 44100
kr = 44100
ksmps = 1
nchnls = 1
instr 1
;**** Phase modulation
; p4 = amplitude in db, p5 = carrier pitch
; p6 = index of modulation, p7= modulator/carrier ratio
icfreq = cpspchp5
imfreq = icfreq*p7
iamp = ampdbp4
kcenv linseg 0, 0.01, iamp, p3-.11, iamp, 0.1, 0
kndx line p6, p3, 0
amod oscil kndx,imfreq,1
aphase phasor icfreq
acar table aphase+amod, 1, 1, 0, 1 ; table parameters: position, normalized index,offset, wrap on
out acar*kcenv
endin
instr 2
;**** Frequency modulation
; p4 = amplitude in db, p5 = carrier pitch
; p6 = index of modulation, p7= modulator/carrier ratio
icfreq = cpspchp5
imfreq = icfreq*p7
idev = p6 * imfreq
iamp = ampdbp4
kcenv linseg 0, 0.01, iamp, p3-.11, iamp, 0.1, 0
kdev line idev, p3, 0
amod oscil kdev,imfreq,1
aphase phasor icfreq+amod
acar table aphase, 1, 1, 0, 1
out acar*kcenv
endin
</CsInstruments>
<CsScore>
f1 0 131072 10 1
i1 0 5 90 8.00 5 1
i2 5 5 90 8.00 10 1
</CsScore>
</CsoundSynthesizer>
Csound mailing list
Csound@listserv.heanet.ie
LISTSERV 16.5 - CSOUND List at LISTSERV.HEANET.IE
Send bugs reports to
Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here
--
* PeerTube: Jeanette C. - MakerTube
* GitHub: jeanette-c · GitHub
* Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
Csound mailing list
Csound@listserv.heanet.ie
LISTSERV 16.5 - CSOUND List at LISTSERV.HEANET.IE
Send bugs reports to
Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here
The information contained in this email may be confidential and privileged. It is intended only for the addressees stated above. If you are not an addressee any use, dissemination, distribution, publication or copying of the information contained in this email is strictly prohibited. If you have received this email in error, please immediately notify us by email at dataprotection@mu.ie<mailto:dataprotection@mu.ie> and delete this email from your system.
Please note that Maynooth University is subject to Freedom of Information and Data Protection laws. We may be required to disclose the content of emails under the FOI Act 2014, the Data Protection Act 2018 or GDPR.
Is don seolaí / do na seolaithe thuasluaite amháin an ríomhphost seo. D’fhéadfadh an t-eolas atá ann a bheith rúnda agus faoi phribhléid. Mura seolaí tú, tá cosc iomlán ar aon eolas atá sa ríomhphost seo a úsáid, a scaipeadh, a dháileadh, a fhoilsiú nó a chóipeáil. Má fuair tú an ríomhphost seo trí thimpiste, cuir sin in iúl dúinn láithreach trí ríomhphost a chur chuig dataprotection@mu.ie<mailto:dataprotection@mu.ie> agus scrios an ríomhphost seo ó do chóras.
Tabhair faoi deara go bhfuil Ollscoil Mhá Nuad faoi réir dhlíthe um Shaoráil Faisnéise agus um Chosaint Sonraí. D’fhéadfadh ceangal a bheith orainn ábhar ríomhphoist a nochtadh faoin Acht um Shaoráil Faisnéise 2014, faoin Acht um Chosaint Sonraí 2018 nó faoi GDPR.
Registered charity number 20037130
Csound mailing list
Csound@listserv.heanet.ie
Send bugs reports to
Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here