# \[Csnd\] FM PM demo

**URL:** <https://forum.csound.com/t/csnd-fm-pm-demo/2555>\
**Category:** The Csound Mailinglist\
**Created:** [September 25, 2026, 8:00pm UTC](https://forum.csound.com/t/csnd-fm-pm-demo/2555 "2026-09-25T20:00:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill\_Alves](https://forum.csound.com/letter_avatar_proxy/v4/letter/b/e47c2d/32.png) [@Bill\_Alves](https://forum.csound.com/u/Bill_Alves)\
**Post date:** [September 25, 2026, 8:00pm UTC](https://forum.csound.com/t/csnd-fm-pm-demo/2555/1 "2026-09-25T20:00:10Z")

</div>

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

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 = cpspch(p5)  
imfreq = icfreq_p7  
iamp = ampdb(p4)  
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 = cpspch(p5)  
imfreq = icfreq_p7  
idev = p6 \* imfreq  
iamp = ampdb(p4)  
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

f1 0 131072 10 1 i1 0 5 90 8.00 5 1 i2 5 5 90 8.00 10 1

Csound mailing list [Csound@listserv.heanet.ie](mailto:Csound@listserv.heanet.ie) [https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND](https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND) Send bugs reports to [https://github.com/csound/csound/issues](https://github.com/csound/csound/issues) Discussions of bugs and features can be posted here

---

<div class="post-metadata">

**Author:** ![Jeanette\_C2](https://forum.csound.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@Jeanette\_C2](https://forum.csound.com/u/Jeanette_C2)\
**Post date:** [September 25, 2026, 8:18pm UTC](https://forum.csound.com/t/csnd-fm-pm-demo/2555/2 "2026-09-25T20:18:55Z")

</div>

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:

---

<div class="post-metadata">

**Author:** ![Victor\_Lazzarini1](https://forum.csound.com/letter_avatar_proxy/v4/letter/v/3d9bf3/32.png) [@Victor\_Lazzarini1](https://forum.csound.com/u/Victor_Lazzarini1)\
**Post date:** [September 25, 2026, 9:30pm UTC](https://forum.csound.com/t/csnd-fm-pm-demo/2555/3 "2026-09-25T21:30:41Z")

</div>

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](https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND)  
> > Send bugs reports to  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Issues · csound/csound · GitHub](https://github.com/csound/csound/issues)  
> > Discussions of bugs and features can be posted here
> 
> --  
> \* PeerTube: [Jeanette C. - MakerTube](https://makertube.net/@jeanette_c)  
> \* GitHub: [jeanette-c · GitHub](https://github.com/jeanette-c)  
> \* Youtube: [https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g](https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g)
> 
> Csound mailing list  
> Csound@listserv.heanet.ie  
> [LISTSERV 16.5 - CSOUND List at LISTSERV.HEANET.IE](https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND)  
> Send bugs reports to  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Issues · csound/csound · GitHub](https://github.com/csound/csound/issues)  
> 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

> **[LISTSERV 16.5 - CSOUND List at LISTSERV.HEANET.IE](https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND)**

Send bugs reports to  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Issues · csound/csound · GitHub](https://github.com/csound/csound/issues)  
Discussions of bugs and features can be posted here

---

<div class="post-metadata">

**Author:** ![Bill\_Alves](https://forum.csound.com/letter_avatar_proxy/v4/letter/b/e47c2d/32.png) [@Bill\_Alves](https://forum.csound.com/u/Bill_Alves)\
**Post date:** [September 27, 2026, 6:04pm UTC](https://forum.csound.com/t/csnd-fm-pm-demo/2555/4 "2026-09-27T18:04:29Z")

</div>

Thank you Victor and Jeanette. I appreciate the explanation of the different results from indexes of modulation including phase response. I’m still curious about the “beating” or LFO modulation effect in PM, which after some experiments, seems to occur at a frequency of index of modulation/2.5. Including a 2pi factor would change that frequency but still not explain to me why it’s there or why its frequency would be proportional to the index. Thanks again.

Bill

> 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
> > > 
> > > 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 = cpspch(p5)  
> > > imfreq = icfreq_p7  
> > > iamp = ampdb(p4)  
> > > 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 = cpspch(p5)  
> > > imfreq = icfreq_p7  
> > > idev = p6 \* imfreq  
> > > iamp = ampdb(p4)  
> > > 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
> > > 
> > > f1 0 131072 10 1 i1 0 5 90 8.00 5 1 i2 5 5 90 8.00 10 1
> > > 
> > > Csound mailing list  
> > > [Csound@listserv.heanet.ie](mailto:Csound@listserv.heanet.ie)  
> > > [LISTSERV 16.5 - CSOUND List at LISTSERV.HEANET.IE](https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND)  
> > > Send bugs reports to  
> > > [Issues · csound/csound · GitHub](https://github.com/csound/csound/issues)  
> > > Discussions of bugs and features can be posted here
> > 
> > –
> > 
> > - PeerTube: [https://makertube.net/@jeanette\_c](https://makertube.net/@jeanette_c)
> > - GitHub: [https://github.com/jeanette-c](https://github.com/jeanette-c)
> > - Youtube: [https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g](https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g)
> > 
> > Csound mailing list  
> > [Csound@listserv.heanet.ie](mailto:Csound@listserv.heanet.ie)  
> > [LISTSERV 16.5 - CSOUND List at LISTSERV.HEANET.IE](https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND)  
> > Send bugs reports to  
> > [Issues · csound/csound · GitHub](https://github.com/csound/csound/issues)  
> > 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 addressee(s) 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)\<[mailto: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)\<[mailto: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](mailto:Csound@listserv.heanet.ie)  
> [LISTSERV 16.5 - CSOUND List at LISTSERV.HEANET.IE](https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND)  
> Send bugs reports to  
> [Issues · csound/csound · GitHub](https://github.com/csound/csound/issues)  
> Discussions of bugs and features can be posted here

Bill Alves  
Miller Professor of the Humanities  
The Claremont Colleges  
Harvey Mudd College  
301 Platt Blvd. Claremont CA 91711  
[http://pages.hmc.edu/alves/](http://pages.hmc.edu/alves/)

> **[Home](https://www.billalves.com/)**

Csound mailing list [Csound@listserv.heanet.ie](mailto:Csound@listserv.heanet.ie) [https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND](https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND) Send bugs reports to [https://github.com/csound/csound/issues](https://github.com/csound/csound/issues) Discussions of bugs and features can be posted here

---

<div class="post-metadata">

**Author:** ![Jeanette\_C2](https://forum.csound.com/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@Jeanette\_C2](https://forum.csound.com/u/Jeanette_C2)\
**Post date:** [September 27, 2026, 6:15pm UTC](https://forum.csound.com/t/csnd-fm-pm-demo/2555/5 "2026-09-27T18:15:51Z")

</div>

Hello Bill,  
if you can pinpoint the peaks of that effect, you might look at it with a wave viewer or spetral analyser. Perhaps that would shed more light on it. Besides, I'm sure I also heard it in the FM example as well, it just needed a higher index.

Beyond these simple measures, I'm afraid, because that might mean the original maths behind FM. 🙂

Best wishes,

Jeanette

Bill Alves, Sep 27 2026:

---

<div class="post-metadata">

**Author:** ![Victor\_Lazzarini1](https://forum.csound.com/letter_avatar_proxy/v4/letter/v/3d9bf3/32.png) [@Victor\_Lazzarini1](https://forum.csound.com/u/Victor_Lazzarini1)\
**Post date:** [September 27, 2026, 6:33pm UTC](https://forum.csound.com/t/csnd-fm-pm-demo/2555/6 "2026-09-27T18:33:17Z")

</div>

Does the beating go away if you keep the index steady? If so it’s probably the destructive/constructive interaction of folded negative side bands as you change the index of modulation over time (the wobble seen in the Bessel coefs). At c:m = 1, side bands above 1 will have negative freq and if they are in the side phase they will fold over in opposite phase on top of the positive ones. The strength of the sideband is given by the Bessel coef associated with it. Since the combination goes sideband -k with sideband k-1, the amplitudes are given by different coefs which have different values for a given index. Vary the index and the amplitudes with vary up and down. Also note that negative odd-order Bessel coefs have inverted signs, another complication to the whole thing.  
Why in PM and not in FM? Different sideband phases. PM with sines should give you a full sine spectrum. FM with sines will give you a combination of sines and cosines.

In that case, the rate at which the index changes over time will cause different perceived modulation freqs.

This is all guessing because I did not try the code myself. It could be something else totally.

best

Prof. Victor Lazzarini  
Maynooth University  
Ireland

---

<div class="post-metadata">

**Author:** ![Bill\_Alves](https://forum.csound.com/letter_avatar_proxy/v4/letter/b/e47c2d/32.png) [@Bill\_Alves](https://forum.csound.com/u/Bill_Alves)\
**Post date:** [September 27, 2026, 10:24pm UTC](https://forum.csound.com/t/csnd-fm-pm-demo/2555/7 "2026-09-27T22:24:31Z")

</div>

Thanks Victor. The beating does disappear when the index is held steady, so I guess you’re right. I wonder why the effect doesn’t show up on the DX7, at least that I remember. By the way, I have looked at the result in a wave editor but can’t detect any obvious changes visually. Thank you for that insight!

Bill

> Does the beating go away if you keep the index steady? If so it’s probably the destructive/constructive interaction of folded negative side bands as you change the index of modulation over time (the wobble seen in the Bessel coefs). At c:m = 1, side bands above 1 will have negative freq and if they are in the side phase they will fold over in opposite phase on top of the positive ones. The strength of the sideband is given by the Bessel coef associated with it. Since the combination goes sideband -k with sideband k-1, the amplitudes are given by different coefs which have different values for a given index. Vary the index and the amplitudes with vary up and down. Also note that negative odd-order Bessel coefs have inverted signs, another complication to the whole thing.  
> Why in PM and not in FM? Different sideband phases. PM with sines should give you a full sine spectrum. FM with sines will give you a combination of sines and cosines.
> 
> In that case, the rate at which the index changes over time will cause different perceived modulation freqs.
> 
> This is all guessing because I did not try the code myself. It could be something else totally.
> 
> best
> 
> Prof. Victor Lazzarini  
> Maynooth University  
> Ireland
> 
> > # _Warning_This email originated from outside of Maynooth University’s Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> > 
> > Thank you Victor and Jeanette. I appreciate the explanation of the different results from indexes of modulation including phase response. I’m still curious about the “beating” or LFO modulation effect in PM, which after some experiments, seems to occur at a frequency of index of modulation/2.5. Including a 2pi factor would change that frequency but still not explain to me why it’s there or why its frequency would be proportional to the index. Thanks again.
> > 
> > Bill
> > 
> > > 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
> > > > > 
> > > > > 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 = cpspch(p5)  
> > > > > imfreq = icfreq_p7  
> > > > > iamp = ampdb(p4)  
> > > > > 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 = cpspch(p5)  
> > > > > imfreq = icfreq_p7  
> > > > > idev = p6 \* imfreq  
> > > > > iamp = ampdb(p4)  
> > > > > 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
> > > > > 
> > > > > f1 0 131072 10 1 i1 0 5 90 8.00 5 1 i2 5 5 90 8.00 10 1
> > > > > 
> > > > > Csound mailing list  
> > > > > [Csound@listserv.heanet.ie](mailto:Csound@listserv.heanet.ie)  
> > > > > [https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND](https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND)  
> > > > > Send bugs reports to  
> > > > > [https://github.com/csound/csound/issues](https://github.com/csound/csound/issues)  
> > > > > Discussions of bugs and features can be posted here
> > > > 
> > > > –
> > > > 
> > > > - PeerTube: [https://makertube.net/@jeanette\_c](https://makertube.net/@jeanette_c)
> > > > - GitHub: [https://github.com/jeanette-c](https://github.com/jeanette-c)
> > > > - Youtube: [https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g](https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g)
> > > > 
> > > > Csound mailing list  
> > > > [Csound@listserv.heanet.ie](mailto:Csound@listserv.heanet.ie)  
> > > > [https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND](https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND)  
> > > > Send bugs reports to  
> > > > [https://github.com/csound/csound/issues](https://github.com/csound/csound/issues)  
> > > > 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 addressee(s) 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)\<[mailto: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)\<[mailto: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](mailto:Csound@listserv.heanet.ie)  
> > > [https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND](https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND)  
> > > Send bugs reports to  
> > > [https://github.com/csound/csound/issues](https://github.com/csound/csound/issues)  
> > > Discussions of bugs and features can be posted here
> > 
> > Bill Alves  
> > Miller Professor of the Humanities  
> > The Claremont Colleges  
> > Harvey Mudd College  
> > 301 Platt Blvd. Claremont CA 91711  
> > [http://pages.hmc.edu/alves/](http://pages.hmc.edu/alves/)  
> > [http://www.billalves.com/](http://www.billalves.com/)
> > 
> > Csound mailing list [Csound@listserv.heanet.ie](mailto:Csound@listserv.heanet.ie) [https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND](https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND) Send bugs reports to [https://github.com/csound/csound/issues](https://github.com/csound/csound/issues) 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 addressee(s) 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](mailto:Csound@listserv.heanet.ie) [https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND](https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND) Send bugs reports to [https://github.com/csound/csound/issues](https://github.com/csound/csound/issues) Discussions of bugs and features can be posted here

Bill Alves  
Miller Professor of the Humanities  
The Claremont Colleges  
Harvey Mudd College  
301 Platt Blvd. Claremont CA 91711  
[http://pages.hmc.edu/alves/](http://pages.hmc.edu/alves/)

> **[Home](https://www.billalves.com/)**

Csound mailing list [Csound@listserv.heanet.ie](mailto:Csound@listserv.heanet.ie) [https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND](https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND) Send bugs reports to [https://github.com/csound/csound/issues](https://github.com/csound/csound/issues) Discussions of bugs and features can be posted here
