Csound Csound-dev Csound-tekno Search About

[Csnd] naviergrain: fluid-driven granular synthesis for Csound

Date2026-09-13 15:20
FromHlöðver Sigurðsson
Subject[Csnd] naviergrain: fluid-driven granular synthesis for Csound

Hi all,

I've been working on naviergrain, a Csound 7 opcode and visual app that connects granular synthesis with a Navier–Stokes fluid simulation.

I was exploring if there was anything interesting if you made many enough grain particles and moved them like fluid in space. Also got inspired by the recent millennium problem solution announced by OpenAI which piqued my interest.

Each visible particle is a sounding grain. The app uses cosine carriers with Hann envelopes, with height setting frequency, horizontal position setting stereo pan, and speed affecting grain duration. The solver runs on a periodic 2D grid. An artistic mapping places the particles in 3D space.

You can try it in your browser. There's also a standalone osx binary, plus native plugin and a WASM build of the Csound plugin. The opcode can granulate sample tables too.

There's also GPU support (only mac atm) so in realtime the grain count can be pushed higher without buffer underruns.

Try the web app
Source, documentation and Csound examples
Downloads
Continuum Study 03, an offline audiovisual piece using higher grain counts

I welcome feedback, and may decide to change it inside out entirely if I notice more interesting sound mapping options.

Best,
Hlöðver Sigurðsson

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

Date2026-09-13 15:57
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] [EXTERNAL] [Csnd] naviergrain: fluid-driven granular synthesis for Csound
Sounds really interesting stuff. I will have a look.
========================================
Prof. Victor Lazzarini
Director
Maynooth University Arts and Humanities Institute

From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Hlöðver Sigurðsson <hlolli@GMAIL.COM>
Sent: Sunday 13 September 2026 15:20
To: CSOUND@LISTSERV.HEANET.IE <CSOUND@LISTSERV.HEANET.IE>
Subject: [EXTERNAL] [Csnd] naviergrain: fluid-driven granular synthesis for Csound
 

*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.

Hi all,

I've been working on naviergrain, a Csound 7 opcode and visual app that connects granular synthesis with a Navier–Stokes fluid simulation.

I was exploring if there was anything interesting if you made many enough grain particles and moved them like fluid in space. Also got inspired by the recent millennium problem solution announced by OpenAI which piqued my interest.

Each visible particle is a sounding grain. The app uses cosine carriers with Hann envelopes, with height setting frequency, horizontal position setting stereo pan, and speed affecting grain duration. The solver runs on a periodic 2D grid. An artistic mapping places the particles in 3D space.

You can try it in your browser. There's also a standalone osx binary, plus native plugin and a WASM build of the Csound plugin. The opcode can granulate sample tables too.

There's also GPU support (only mac atm) so in realtime the grain count can be pushed higher without buffer underruns.

Try the web app
Source, documentation and Csound examples
Downloads
Continuum Study 03, an offline audiovisual piece using higher grain counts

I welcome feedback, and may decide to change it inside out entirely if I notice more interesting sound mapping options.

Best,
Hlöðver Sigurðsson

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to 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 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  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

 


Date2026-09-14 08:32
FromLovre Bogdanić
SubjectRe: [Csnd] [EXTERNAL] [Csnd] naviergrain: fluid-driven granular synthesis for Csound
Really cool Hlöðver!! 

Best,
Lovre 

On Sun, Sep 13, 2026 at 4:57 PM Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:
Sounds really interesting stuff. I will have a look.
========================================
Prof. Victor Lazzarini
Director
Maynooth University Arts and Humanities Institute

From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Hlöðver Sigurðsson <hlolli@GMAIL.COM>
Sent: Sunday 13 September 2026 15:20
To: CSOUND@LISTSERV.HEANET.IE <CSOUND@LISTSERV.HEANET.IE>
Subject: [EXTERNAL] [Csnd] naviergrain: fluid-driven granular synthesis for Csound
 

*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.

Hi all,

I've been working on naviergrain, a Csound 7 opcode and visual app that connects granular synthesis with a Navier–Stokes fluid simulation.

I was exploring if there was anything interesting if you made many enough grain particles and moved them like fluid in space. Also got inspired by the recent millennium problem solution announced by OpenAI which piqued my interest.

Each visible particle is a sounding grain. The app uses cosine carriers with Hann envelopes, with height setting frequency, horizontal position setting stereo pan, and speed affecting grain duration. The solver runs on a periodic 2D grid. An artistic mapping places the particles in 3D space.

You can try it in your browser. There's also a standalone osx binary, plus native plugin and a WASM build of the Csound plugin. The opcode can granulate sample tables too.

There's also GPU support (only mac atm) so in realtime the grain count can be pushed higher without buffer underruns.

Try the web app
Source, documentation and Csound examples
Downloads
Continuum Study 03, an offline audiovisual piece using higher grain counts

I welcome feedback, and may decide to change it inside out entirely if I notice more interesting sound mapping options.

Best,
Hlöðver Sigurðsson

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to 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 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  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 https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2026-09-25 21:00
FromBill Alves
Subject[Csnd] FM PM demo
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 = 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

</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>



Date2026-09-25 21:18
From"Jeanette C." <000015cdd0ffa6cd-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] FM PM demo
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
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

--
  * PeerTube: https://makertube.net/@jeanette_c
  * GitHub: https://github.com/jeanette-c
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g

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

Date2026-09-25 22:30
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] FM PM demo
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

> On 25 Sep 2026, at 21:18, Jeanette C. <000015cdd0ffa6cd-dmarc-request@listserv.heanet.ie> wrote:
>
> 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
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>       https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>
> --
> * PeerTube: https://makertube.net/@jeanette_c
> * GitHub: https://github.com/jeanette-c
> * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>       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 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  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
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2026-09-27 19:04
FromBill Alves
SubjectRe: [Csnd] FM PM demo
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

On Sep 25, 2026, at 2:30 PM, Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> wrote:

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

On 25 Sep 2026, at 21:18, Jeanette C. <000015cdd0ffa6cd-dmarc-request@listserv.heanet.ie> wrote:

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 = 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

</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
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
     https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


--
* PeerTube: https://makertube.net/@jeanette_c
* GitHub: https://github.com/jeanette-c
* Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
     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
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
       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://www.billalves.com/





Date2026-09-27 19:15
From"Jeanette C." <000015cdd0ffa6cd-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] FM PM demo
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:

> 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
>
>> On Sep 25, 2026, at 2:30 PM, Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> wrote:
>>
>> 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
>>
>>> On 25 Sep 2026, at 21:18, Jeanette C. <000015cdd0ffa6cd-dmarc-request@listserv.heanet.ie> wrote:
>>>
>>> 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
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>      https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>>
>>>
>>> --
>>> * PeerTube: https://makertube.net/@jeanette_c
>>> * GitHub: https://github.com/jeanette-c
>>> * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>      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 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  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
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        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://www.billalves.com/
>
>
>
>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

--
  * PeerTube: https://makertube.net/@jeanette_c
  * GitHub: https://github.com/jeanette-c
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g

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

Date2026-09-27 19:33
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] FM PM demo
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

On 27 Sep 2026, at 19:05, Bill Alves <alves@g.hmc.edu> wrote:



*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

On Sep 25, 2026, at 2:30 PM, Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> wrote:

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

On 25 Sep 2026, at 21:18, Jeanette C. <000015cdd0ffa6cd-dmarc-request@listserv.heanet.ie> wrote:

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 = 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

</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
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
     https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


--
* PeerTube: https://makertube.net/@jeanette_c
* GitHub: https://github.com/jeanette-c
* Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
     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
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
       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://www.billalves.com/




Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to 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 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  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

 


Date2026-09-27 23:24
FromBill Alves
SubjectRe: [Csnd] FM PM demo
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

On Sep 27, 2026, at 11:33 AM, Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> wrote:

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

On 27 Sep 2026, at 19:05, Bill Alves <alves@g.hmc.edu> wrote:



*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

On Sep 25, 2026, at 2:30 PM, Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> wrote:

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

On 25 Sep 2026, at 21:18, Jeanette C. <000015cdd0ffa6cd-dmarc-request@listserv.heanet.ie> wrote:

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 = 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

</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
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
     https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


--
* PeerTube: https://makertube.net/@jeanette_c
* GitHub: https://github.com/jeanette-c
* Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
     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
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
       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://www.billalves.com/




Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to 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 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  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 https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to 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://www.billalves.com/