Csound Csound-dev Csound-tekno Search About

[Csnd] partikkel and pulsar synthesis

Date2023-09-08 14:03
FromPhilipp Neumann
Subject[Csnd] partikkel and pulsar synthesis
Hello everybody!

I try to implement a pulsar synthesizer with the ‚partikkel‘ opcode - what amazing possibilities this opcode offers!

I’m asking myself how to implement these processes, maybe someone can help me:

- i want to interpolate between different tables for the ienv_att and ienv_dec parameters. e.g. i have prepeared a attack window like a square-wave but i want to gradually go to my gauassian-window. so i want free control over the attack and decay window and not use a fixed one.
- gradually change the relation between pulsaret and silence. how long can you hear the pulsaret and how long is the interval for silence. so i guess i have to work with different tables for gain masking. but in which way is it convenient and how can realize this at k-rate?

Greetings,
Philipp

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

Date2023-09-08 14:18
FromST Music
SubjectRe: [Csnd] partikkel and pulsar synthesis
Hi Philipp. 

You might perhaps try using ftmorf. I haven't tried it but in theory it should work, as it will with osc that use tables.

Best,
Scott

On Fri, Sept 8, 2023, 9:03 a.m. Philipp Neumann <kontakt@philippneumann.eu> wrote:
Hello everybody!

I try to implement a pulsar synthesizer with the ‚partikkel‘ opcode - what amazing possibilities this opcode offers!

I’m asking myself how to implement these processes, maybe someone can help me:

- i want to interpolate between different tables for the ienv_att and ienv_dec parameters. e.g. i have prepeared a attack window like a square-wave but i want to gradually go to my gauassian-window. so i want free control over the attack and decay window and not use a fixed one.
- gradually change the relation between pulsaret and silence. how long can you hear the pulsaret and how long is the interval for silence. so i guess i have to work with different tables for gain masking. but in which way is it convenient and how can realize this at k-rate?

Greetings,
Philipp

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

Date2023-09-08 18:21
From"Jeanette C."
SubjectRe: [Csnd] partikkel and pulsar synthesis
Hi Philipp,
or you can try one of the hvs opcodes, depending on your needs.

Best wishes,

Jeanette

-- 
  * Website: http://juliencoder.de - for summer is a state of sound
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * Audiobombs: https://www.audiobombs.com/users/jeanette_c
  * GitHub: https://github.com/jeanette-c

I'm so curious, what do you think of me <3
(Britney Spears)

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

Date2023-09-08 21:09
FromOeyvind Brandtsegg
SubjectRe: [Csnd] partikkel and pulsar synthesis
Hello Philipp

Yes, for pulsars, it is convenient to have the gain masking feature of partikkel. I use table to write to the gain mask table when I want to change the masking in a specific manner. You can also use ftmorf as suggested in order to morph between one full masking pattern and another. It is completely safe to write to the masking tables at k-rate, as the table values are only read once a new grain is created. For very specific masking control, you can also use partikkelget and partikkelset opcodes, where you get or set the current masking index (the currently used index for a specific masking table for a specific instance of partikkel). For example, if you have some complex masking patterns running and you need to reset or sync them at some point.

The interpolation between attack and decay envelopes is already built into the opcode. Not so that you can change the envelope table, but you can stretch and compress the relative time between attack and decay, and also set the sustain time for the grain envelope. In this way, you can change the envelope pretty freely at k-rate. If you want it to be a smooth fade-in/out, set the ad_ratio to 0.5 (equal time for attach and decay) and the sustain time to 0. Then if you gradually increase the sustain time, you get more and more of a "square" envelope. If you want fast attach and slow decay, set ad_ration to a low number, like 0.1 or below.
I usually use sigmoid shapes for the attack and decay envelopes, but exponential shapes should also work fine for low grain rates. The reason for the sigmoid shape is that it gives less artifacts (sidebands) at high grain rates, where the ring modulation effects of granulation start to become more pronounced. 

To change the ratio between the pulsaret and the silence between each burst, there are two variants. In the simplest case (a single pulsaret burst), you would simply change the grain duration as a fraction of 1/grainrate. For more complex pulsaret bursts, you can do it with gain masking, possibly combined with grainrate FM if you need to make non-integer relationships between burst rate and pulsaret rate. That quickly becomes nontrivial...but anything is possible with patience ;-)

There are two code examples available with this paper https://lac.linuxaudio.org/2011/papers/39.pdf, and the code is here https://folk.ntnu.no/oyvinbra/LAC2011partikkel/ 
For the pulsarets, look at example 5_pulsars_simple.csd and 6_pulsars_masking.csd
The coding style in the csd examples is admittedly a little old fashioned and clunky. It would be possible to reduce the amount of code quite a bit, but they were kept verbose for the case of exposing all features.

Feel free to ask if anything is unclear. 
all best
Øyvind


fre. 8. sep. 2023 kl. 15:04 skrev Philipp Neumann <kontakt@philippneumann.eu>:
Hello everybody!

I try to implement a pulsar synthesizer with the ‚partikkel‘ opcode - what amazing possibilities this opcode offers!

I’m asking myself how to implement these processes, maybe someone can help me:

- i want to interpolate between different tables for the ienv_att and ienv_dec parameters. e.g. i have prepeared a attack window like a square-wave but i want to gradually go to my gauassian-window. so i want free control over the attack and decay window and not use a fixed one.
- gradually change the relation between pulsaret and silence. how long can you hear the pulsaret and how long is the interval for silence. so i guess i have to work with different tables for gain masking. but in which way is it convenient and how can realize this at k-rate?

Greetings,
Philipp

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

Date2023-09-11 05:47
FromPhilipp Neumann
SubjectRe: [Csnd] partikkel and pulsar synthesis
Thanks Scott and Øyvind!

I will investigate this more deeply and will share my results.

All the Best,
Philipp

> Am 08.09.2023 um 22:09 schrieb Oeyvind Brandtsegg :
> 
> Hello Philipp
> 
> Yes, for pulsars, it is convenient to have the gain masking feature of partikkel. I use table to write to the gain mask table when I want to change the masking in a specific manner. You can also use ftmorf as suggested in order to morph between one full masking pattern and another. It is completely safe to write to the masking tables at k-rate, as the table values are only read once a new grain is created. For very specific masking control, you can also use partikkelget and partikkelset opcodes, where you get or set the current masking index (the currently used index for a specific masking table for a specific instance of partikkel). For example, if you have some complex masking patterns running and you need to reset or sync them at some point.
> 
> The interpolation between attack and decay envelopes is already built into the opcode. Not so that you can change the envelope table, but you can stretch and compress the relative time between attack and decay, and also set the sustain time for the grain envelope. In this way, you can change the envelope pretty freely at k-rate. If you want it to be a smooth fade-in/out, set the ad_ratio to 0.5 (equal time for attach and decay) and the sustain time to 0. Then if you gradually increase the sustain time, you get more and more of a "square" envelope. If you want fast attach and slow decay, set ad_ration to a low number, like 0.1 or below.
> I usually use sigmoid shapes for the attack and decay envelopes, but exponential shapes should also work fine for low grain rates. The reason for the sigmoid shape is that it gives less artifacts (sidebands) at high grain rates, where the ring modulation effects of granulation start to become more pronounced. 
> 
> To change the ratio between the pulsaret and the silence between each burst, there are two variants. In the simplest case (a single pulsaret burst), you would simply change the grain duration as a fraction of 1/grainrate. For more complex pulsaret bursts, you can do it with gain masking, possibly combined with grainrate FM if you need to make non-integer relationships between burst rate and pulsaret rate. That quickly becomes nontrivial...but anything is possible with patience ;-)
> 
> There are two code examples available with this paper https://lac.linuxaudio.org/2011/papers/39.pdf, and the code is here https://folk.ntnu.no/oyvinbra/LAC2011partikkel/ For the pulsarets, look at example 5_pulsars_simple.csd and 6_pulsars_masking.csd
> The coding style in the csd examples is admittedly a little old fashioned and clunky. It would be possible to reduce the amount of code quite a bit, but they were kept verbose for the case of exposing all features.
> 
> Feel free to ask if anything is unclear. 
> all best
> Øyvind
> 
> 
> fre. 8. sep. 2023 kl. 15:04 skrev Philipp Neumann :
> Hello everybody!
> 
> I try to implement a pulsar synthesizer with the ‚partikkel‘ opcode - what amazing possibilities this opcode offers!
> 
> I’m asking myself how to implement these processes, maybe someone can help me:
> 
> - i want to interpolate between different tables for the ienv_att and ienv_dec parameters. e.g. i have prepeared a attack window like a square-wave but i want to gradually go to my gauassian-window. so i want free control over the attack and decay window and not use a fixed one.
> - gradually change the relation between pulsaret and silence. how long can you hear the pulsaret and how long is the interval for silence. so i guess i have to work with different tables for gain masking. but in which way is it convenient and how can realize this at k-rate?
> 
> Greetings,
> Philipp
> 
> 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

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

Date2023-09-11 07:08
FromOeyvind Brandtsegg
SubjectRe: [Csnd] partikkel and pulsar synthesis
I just now saw that autocorrect had fixed up a sentence in my previous reply.  It said "I use table to write to the gain mask table".... should have read "I use tablew to write to the gain mask table". Sorry for any confusion.  Looking forward to hear your sounds. 
Øyvind

man. 11. sep. 2023, 06:47 skrev Philipp Neumann <kontakt@philippneumann.eu>:
Thanks Scott and Øyvind!

I will investigate this more deeply and will share my results.

All the Best,
Philipp

> Am 08.09.2023 um 22:09 schrieb Oeyvind Brandtsegg <obrandts@GMAIL.COM>:
>
> Hello Philipp
>
> Yes, for pulsars, it is convenient to have the gain masking feature of partikkel. I use table to write to the gain mask table when I want to change the masking in a specific manner. You can also use ftmorf as suggested in order to morph between one full masking pattern and another. It is completely safe to write to the masking tables at k-rate, as the table values are only read once a new grain is created. For very specific masking control, you can also use partikkelget and partikkelset opcodes, where you get or set the current masking index (the currently used index for a specific masking table for a specific instance of partikkel). For example, if you have some complex masking patterns running and you need to reset or sync them at some point.
>
> The interpolation between attack and decay envelopes is already built into the opcode. Not so that you can change the envelope table, but you can stretch and compress the relative time between attack and decay, and also set the sustain time for the grain envelope. In this way, you can change the envelope pretty freely at k-rate. If you want it to be a smooth fade-in/out, set the ad_ratio to 0.5 (equal time for attach and decay) and the sustain time to 0. Then if you gradually increase the sustain time, you get more and more of a "square" envelope. If you want fast attach and slow decay, set ad_ration to a low number, like 0.1 or below.
> I usually use sigmoid shapes for the attack and decay envelopes, but exponential shapes should also work fine for low grain rates. The reason for the sigmoid shape is that it gives less artifacts (sidebands) at high grain rates, where the ring modulation effects of granulation start to become more pronounced.
>
> To change the ratio between the pulsaret and the silence between each burst, there are two variants. In the simplest case (a single pulsaret burst), you would simply change the grain duration as a fraction of 1/grainrate. For more complex pulsaret bursts, you can do it with gain masking, possibly combined with grainrate FM if you need to make non-integer relationships between burst rate and pulsaret rate. That quickly becomes nontrivial...but anything is possible with patience ;-)
>
> There are two code examples available with this paper https://lac.linuxaudio.org/2011/papers/39.pdf, and the code is here https://folk.ntnu.no/oyvinbra/LAC2011partikkel/ For the pulsarets, look at example 5_pulsars_simple.csd and 6_pulsars_masking.csd
> The coding style in the csd examples is admittedly a little old fashioned and clunky. It would be possible to reduce the amount of code quite a bit, but they were kept verbose for the case of exposing all features.
>
> Feel free to ask if anything is unclear.
> all best
> Øyvind
>
>
> fre. 8. sep. 2023 kl. 15:04 skrev Philipp Neumann <kontakt@philippneumann.eu>:
> Hello everybody!
>
> I try to implement a pulsar synthesizer with the ‚partikkel‘ opcode - what amazing possibilities this opcode offers!
>
> I’m asking myself how to implement these processes, maybe someone can help me:
>
> - i want to interpolate between different tables for the ienv_att and ienv_dec parameters. e.g. i have prepeared a attack window like a square-wave but i want to gradually go to my gauassian-window. so i want free control over the attack and decay window and not use a fixed one.
> - gradually change the relation between pulsaret and silence. how long can you hear the pulsaret and how long is the interval for silence. so i guess i have to work with different tables for gain masking. but in which way is it convenient and how can realize this at k-rate?
>
> Greetings,
> Philipp
>
> 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

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