Csound Csound-dev Csound-tekno Search About

[Csnd] FM/PM Synthesis - Feedback Param (reface DX)

Date2017-12-19 03:53
FromSteven Yi
Subject[Csnd] FM/PM Synthesis - Feedback Param (reface DX)
Hi All,

I've been trying to figure out how Feedback is implemented in the
Yamaha reface DX operator.  The parameter can be set 0 -> +127 to
morph from sine to sawtooth, and 0 -> -127 to morph from sine to
square.  I'm using phase modulation here and using regular
single-sample feedback with adding works to modify the results to
approach a sawtooth. However, I've been reading and looking for
information on how use feedback to get a waveform to move towards a
square wave and haven't managed to figure this one out yet.

Does anyone know how this is done?

Thanks!
steven

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

Date2017-12-19 09:18
From"Jeanette C."
SubjectRe: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
Dec 19 2017, Steven Yi has written:
...
> Does anyone know how this is done?
...
Hi Steven,
just an idea: you can work with two sawtooths. I believe if you
phaseshift one by 180 degrees and give it negative amplitutde, then
you'll get something quite similar to a square wave. Not sure about the
shift value, you can try.

Best wishes,

Jeanette

--------
* website: http://juliencoder.de - for summer is a state of sound
* SoundCloud: https://soundcloud.com/jeanette_c

I used to think
I had the answers to everything
But now I know
... :) <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

Date2017-12-19 15:46
FromSteven Yi
SubjectRe: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
Hi Jeanette,

Thanks for chiming in. I've used something similar when implementing
BLIT-based oscillators, but right now something in the back of mind
keeps telling me that it might be some other means at play.  (Feels
like I need think through the lens of phase distortion to figure this
one out, but it's just a hunch.)  I'll keep at this today and will
keep your thoughts in mind, thanks!

steven

On Tue, Dec 19, 2017 at 4:18 AM, Jeanette C.  wrote:
> Dec 19 2017, Steven Yi has written:
> ...
>>
>> Does anyone know how this is done?
>
> ...
> Hi Steven,
> just an idea: you can work with two sawtooths. I believe if you
> phaseshift one by 180 degrees and give it negative amplitutde, then
> you'll get something quite similar to a square wave. Not sure about the
> shift value, you can try.
>
> Best wishes,
>
> Jeanette
>
> --------
> * website: http://juliencoder.de - for summer is a state of sound
> * SoundCloud: https://soundcloud.com/jeanette_c
>
> I used to think
> I had the answers to everything
> But now I know
> ... :) <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

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

Date2017-12-19 17:26
FromSteven Yi
SubjectRe: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
Attachmentspm.csd  
Ah, I think I got it! (or, at least, something that sounds good to my ear. :) )

I've attached a CSD that demonstrates the two methods.  The CSD has
two instruments, PMFBSaw and PMFBSquare.  Both instruments adjust the
feedback amount of the previous phase (the project uses ksmps=1, so
a-sigs are single-sample and feedback is single-sample) to produce a
simple sweep for demonstrations purposes.  The first simply adds the
previous phase value (acar) to move towards a sawtooth sound. This can
be seen here:

  acar = tablei(aphs+(acar*kfb), 1, 1, 0, 1)

The second does virtually the same thing with one additional
calculation: it multiplies the feedback phase by itself. This can be
seen here:

  acar = tablei(aphs+(acar*acar*kfb), 1, 1, 0, 1)

For the moment, I'm reasonably happy with the sound of this, but I'm
not sure yet of a few things. Some comments:

1. Is this the method used in the reface DX?  I don't really know
since I do not own one nor have access to good audio examples to
analyze. I'm mostly using my ear as a guide and using a bit of
guesswork.
2. I've been listening and using the Sonic Lab video on Youtube
(https://www.youtube.com/watch?v=Xt-tmIMCxTk) as a guide. Around
5minutes in, where there's a brief discussion of feedback and the
demonstrator moves it all the way up to gets towards a sine and all
the way down to get towards a square.
3. The square wave-like sound generated in the CSD is not so useful as
a modulator, but sounds good for a carrier.  (This is an observation
from a Blue PM Synth I'm working on.)
4. One has to deal with aliasing as usual for FM/PM.

I'll probably move on with other aspects of my Blue instrument design
for now as this is in good enough shape, but I'd love to hear any
feedback (badum dum!) if anyone experiments with it and maybe finds a
different method for feedback to get to a square wave.

Thanks!
steven




On Tue, Dec 19, 2017 at 10:46 AM, Steven Yi  wrote:
> Hi Jeanette,
>
> Thanks for chiming in. I've used something similar when implementing
> BLIT-based oscillators, but right now something in the back of mind
> keeps telling me that it might be some other means at play.  (Feels
> like I need think through the lens of phase distortion to figure this
> one out, but it's just a hunch.)  I'll keep at this today and will
> keep your thoughts in mind, thanks!
>
> steven
>
> On Tue, Dec 19, 2017 at 4:18 AM, Jeanette C.  wrote:
>> Dec 19 2017, Steven Yi has written:
>> ...
>>>
>>> Does anyone know how this is done?
>>
>> ...
>> Hi Steven,
>> just an idea: you can work with two sawtooths. I believe if you
>> phaseshift one by 180 degrees and give it negative amplitutde, then
>> you'll get something quite similar to a square wave. Not sure about the
>> shift value, you can try.
>>
>> Best wishes,
>>
>> Jeanette
>>
>> --------
>> * website: http://juliencoder.de - for summer is a state of sound
>> * SoundCloud: https://soundcloud.com/jeanette_c
>>
>> I used to think
>> I had the answers to everything
>> But now I know
>> ... :) <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

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

Date2017-12-19 22:35
FromIain McCurdy
SubjectRe: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)

Good detective work Steven!

If you morph one of the acars in the square wave version between itself and 1 you can morph from square to sawtooth.  




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 19 December 2017 17:26
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Ah, I think I got it! (or, at least, something that sounds good to my ear. :) )

I've attached a CSD that demonstrates the two methods.  The CSD has
two instruments, PMFBSaw and PMFBSquare.  Both instruments adjust the
feedback amount of the previous phase (the project uses ksmps=1, so
a-sigs are single-sample and feedback is single-sample) to produce a
simple sweep for demonstrations purposes.  The first simply adds the
previous phase value (acar) to move towards a sawtooth sound. This can
be seen here:

  acar = tablei(aphs+(acar*kfb), 1, 1, 0, 1)

The second does virtually the same thing with one additional
calculation: it multiplies the feedback phase by itself. This can be
seen here:

  acar = tablei(aphs+(acar*acar*kfb), 1, 1, 0, 1)

For the moment, I'm reasonably happy with the sound of this, but I'm
not sure yet of a few things. Some comments:

1. Is this the method used in the reface DX?  I don't really know
since I do not own one nor have access to good audio examples to
analyze. I'm mostly using my ear as a guide and using a bit of
guesswork.
2. I've been listening and using the Sonic Lab video on Youtube
(https://www.youtube.com/watch?v=Xt-tmIMCxTk) as a guide. Around


5minutes in, where there's a brief discussion of feedback and the
demonstrator moves it all the way up to gets towards a sine and all
the way down to get towards a square.
3. The square wave-like sound generated in the CSD is not so useful as
a modulator, but sounds good for a carrier.  (This is an observation
from a Blue PM Synth I'm working on.)
4. One has to deal with aliasing as usual for FM/PM.

I'll probably move on with other aspects of my Blue instrument design
for now as this is in good enough shape, but I'd love to hear any
feedback (badum dum!) if anyone experiments with it and maybe finds a
different method for feedback to get to a square wave.

Thanks!
steven




On Tue, Dec 19, 2017 at 10:46 AM, Steven Yi <stevenyi@gmail.com> wrote:
> Hi Jeanette,
>
> Thanks for chiming in. I've used something similar when implementing
> BLIT-based oscillators, but right now something in the back of mind
> keeps telling me that it might be some other means at play.  (Feels
> like I need think through the lens of phase distortion to figure this
> one out, but it's just a hunch.)  I'll keep at this today and will
> keep your thoughts in mind, thanks!
>
> steven
>
> On Tue, Dec 19, 2017 at 4:18 AM, Jeanette C. <julien@mail.upb.de> wrote:
>> Dec 19 2017, Steven Yi has written:
>> ...
>>>
>>> Does anyone know how this is done?
>>
>> ...
>> Hi Steven,
>> just an idea: you can work with two sawtooths. I believe if you
>> phaseshift one by 180 degrees and give it negative amplitutde, then
>> you'll get something quite similar to a square wave. Not sure about the
>> shift value, you can try.
>>
>> Best wishes,
>>
>> Jeanette
>>
>> --------
>> * website: http://juliencoder.de - for summer is a state of sound


>> * SoundCloud: https://soundcloud.com/jeanette_c
>>
>> I used to think
>> I had the answers to everything
>> But now I know
>> ... :) <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

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

Date2017-12-19 22:35
From"Jeanette C."
SubjectRe: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
Dec 19 2017, Steven Yi has written:

> Ah, I think I got it! (or, at least, something that sounds good to my ear. :) )
...
> 2. I've been listening and using the Sonic Lab video on Youtube
> (https://www.youtube.com/watch?v=Xt-tmIMCxTk) as a guide. Around
> 5minutes in, where there's a brief discussion of feedback and the
> demonstrator moves it all the way up to gets towards a sine and all
> the way down to get towards a square.
Sounds good to me. I did increase the modulation/feedback depth, since
you were rather tame. :)
...
If you find/work out a good formula for feeback limitation to avoid
aliasing, would be inclined to share it? I know that at the Nyquest
frequency depth should be 0, but haven't really grasped how the
modulation should decrease (linear, exponential,... with which extra
factor...).

Best wishes and thanks for sharing your instruments,

Jeanette

--------
* website: http://juliencoder.de - for summer is a state of sound
* SoundCloud: https://soundcloud.com/jeanette_c

For whatever reason,
I feel like I've been wanting you all my life <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

Date2017-12-20 00:26
FromSteven Yi
SubjectRe: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
Thanks Jeanette, I'm digging around into Dexed's source code [1] and
looking through literature to see if there's any standard keytracking
or other approach used to address aliasing.  I'll certainly share
whatever I find.

Cheers!
steven

[1] - https://github.com/asb2m10/dexed


On Tue, Dec 19, 2017 at 5:35 PM, Jeanette C.  wrote:
> Dec 19 2017, Steven Yi has written:
>
>> Ah, I think I got it! (or, at least, something that sounds good to my ear.
>> :) )
>
> ...
>>
>> 2. I've been listening and using the Sonic Lab video on Youtube
>> (https://www.youtube.com/watch?v=Xt-tmIMCxTk) as a guide. Around
>> 5minutes in, where there's a brief discussion of feedback and the
>> demonstrator moves it all the way up to gets towards a sine and all
>> the way down to get towards a square.
>
> Sounds good to me. I did increase the modulation/feedback depth, since
> you were rather tame. :)
> ...
> If you find/work out a good formula for feeback limitation to avoid
> aliasing, would be inclined to share it? I know that at the Nyquest
> frequency depth should be 0, but haven't really grasped how the
> modulation should decrease (linear, exponential,... with which extra
> factor...).
>
> Best wishes and thanks for sharing your instruments,
>
> Jeanette
>
> --------
> * website: http://juliencoder.de - for summer is a state of sound
> * SoundCloud: https://soundcloud.com/jeanette_c
>
> For whatever reason,
> I feel like I've been wanting you all my life <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

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

Date2017-12-20 00:31
FromSteven Yi
SubjectRe: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
Hi Iain,

Thanks! And thanks for sharing that bit about saw->square transition.  Could you perhaps explain what you used for morphing?  I tried a simple ntrpol(acar, 1, kmorph) kind of code and it somewhat worked, but neither linseg nor expseg values for kmorph seemed to make nice transitions.  

Cheers!
steven



On Tue, Dec 19, 2017 at 5:35 PM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

Good detective work Steven!

If you morph one of the acars in the square wave version between itself and 1 you can morph from square to sawtooth.  




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 19 December 2017 17:26
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Ah, I think I got it! (or, at least, something that sounds good to my ear. :) )

I've attached a CSD that demonstrates the two methods.  The CSD has
two instruments, PMFBSaw and PMFBSquare.  Both instruments adjust the
feedback amount of the previous phase (the project uses ksmps=1, so
a-sigs are single-sample and feedback is single-sample) to produce a
simple sweep for demonstrations purposes.  The first simply adds the
previous phase value (acar) to move towards a sawtooth sound. This can
be seen here:

  acar = tablei(aphs+(acar*kfb), 1, 1, 0, 1)

The second does virtually the same thing with one additional
calculation: it multiplies the feedback phase by itself. This can be
seen here:

  acar = tablei(aphs+(acar*acar*kfb), 1, 1, 0, 1)

For the moment, I'm reasonably happy with the sound of this, but I'm
not sure yet of a few things. Some comments:

1. Is this the method used in the reface DX?  I don't really know
since I do not own one nor have access to good audio examples to
analyze. I'm mostly using my ear as a guide and using a bit of
guesswork.
2. I've been listening and using the Sonic Lab video on Youtube
(https://www.youtube.com/watch?v=Xt-tmIMCxTk) as a guide. Around
We take a look at the FM Synthesis focussed Reface DX, one of the new Yamaha ReFace range. its a 4 operator FM synth with 8 voice polyphony, twin effects and a phrase ...


5minutes in, where there's a brief discussion of feedback and the
demonstrator moves it all the way up to gets towards a sine and all
the way down to get towards a square.
3. The square wave-like sound generated in the CSD is not so useful as
a modulator, but sounds good for a carrier.  (This is an observation
from a Blue PM Synth I'm working on.)
4. One has to deal with aliasing as usual for FM/PM.

I'll probably move on with other aspects of my Blue instrument design
for now as this is in good enough shape, but I'd love to hear any
feedback (badum dum!) if anyone experiments with it and maybe finds a
different method for feedback to get to a square wave.

Thanks!
steven




On Tue, Dec 19, 2017 at 10:46 AM, Steven Yi <stevenyi@gmail.com> wrote:
> Hi Jeanette,
>
> Thanks for chiming in. I've used something similar when implementing
> BLIT-based oscillators, but right now something in the back of mind
> keeps telling me that it might be some other means at play.  (Feels
> like I need think through the lens of phase distortion to figure this
> one out, but it's just a hunch.)  I'll keep at this today and will
> keep your thoughts in mind, thanks!
>
> steven
>
> On Tue, Dec 19, 2017 at 4:18 AM, Jeanette C. <julien@mail.upb.de> wrote:
>> Dec 19 2017, Steven Yi has written:
>> ...
>>>
>>> Does anyone know how this is done?
>>
>> ...
>> Hi Steven,
>> just an idea: you can work with two sawtooths. I believe if you
>> phaseshift one by 180 degrees and give it negative amplitutde, then
>> you'll get something quite similar to a square wave. Not sure about the
>> shift value, you can try.
>>
>> Best wishes,
>>
>> Jeanette
>>
>> --------
>> * website: http://juliencoder.de - for summer is a state of sound
Juliencoder.de: A website of music made with Linux, some homeless Linux Audio software and more


>> * SoundCloud: https://soundcloud.com/jeanette_c
>>
>> I used to think
>> I had the answers to everything
>> But now I know
>> ... :) <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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


>> 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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


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

Date2017-12-20 07:37
FromIain McCurdy
SubjectRe: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)

The most marked changes seem to be perceived as the transition begins from either end so cosseg might give the best results...




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 20 December 2017 00:31
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Hi Iain,

Thanks! And thanks for sharing that bit about saw->square transition.  Could you perhaps explain what you used for morphing?  I tried a simple ntrpol(acar, 1, kmorph) kind of code and it somewhat worked, but neither linseg nor expseg values for kmorph seemed to make nice transitions.  

Cheers!
steven



On Tue, Dec 19, 2017 at 5:35 PM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

Good detective work Steven!

If you morph one of the acars in the square wave version between itself and 1 you can morph from square to sawtooth.  




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 19 December 2017 17:26
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Ah, I think I got it! (or, at least, something that sounds good to my ear. :) )

I've attached a CSD that demonstrates the two methods.  The CSD has
two instruments, PMFBSaw and PMFBSquare.  Both instruments adjust the
feedback amount of the previous phase (the project uses ksmps=1, so
a-sigs are single-sample and feedback is single-sample) to produce a
simple sweep for demonstrations purposes.  The first simply adds the
previous phase value (acar) to move towards a sawtooth sound. This can
be seen here:

  acar = tablei(aphs+(acar*kfb), 1, 1, 0, 1)

The second does virtually the same thing with one additional
calculation: it multiplies the feedback phase by itself. This can be
seen here:

  acar = tablei(aphs+(acar*acar*kfb), 1, 1, 0, 1)

For the moment, I'm reasonably happy with the sound of this, but I'm
not sure yet of a few things. Some comments:

1. Is this the method used in the reface DX?  I don't really know
since I do not own one nor have access to good audio examples to
analyze. I'm mostly using my ear as a guide and using a bit of
guesswork.
2. I've been listening and using the Sonic Lab video on Youtube
(https://www.youtube.com/watch?v=Xt-tmIMCxTk) as a guide. Around
We take a look at the FM Synthesis focussed Reface DX, one of the new Yamaha ReFace range. its a 4 operator FM synth with 8 voice polyphony, twin effects and a phrase ...


5minutes in, where there's a brief discussion of feedback and the
demonstrator moves it all the way up to gets towards a sine and all
the way down to get towards a square.
3. The square wave-like sound generated in the CSD is not so useful as
a modulator, but sounds good for a carrier.  (This is an observation
from a Blue PM Synth I'm working on.)
4. One has to deal with aliasing as usual for FM/PM.

I'll probably move on with other aspects of my Blue instrument design
for now as this is in good enough shape, but I'd love to hear any
feedback (badum dum!) if anyone experiments with it and maybe finds a
different method for feedback to get to a square wave.

Thanks!
steven




On Tue, Dec 19, 2017 at 10:46 AM, Steven Yi <stevenyi@gmail.com> wrote:
> Hi Jeanette,
>
> Thanks for chiming in. I've used something similar when implementing
> BLIT-based oscillators, but right now something in the back of mind
> keeps telling me that it might be some other means at play.  (Feels
> like I need think through the lens of phase distortion to figure this
> one out, but it's just a hunch.)  I'll keep at this today and will
> keep your thoughts in mind, thanks!
>
> steven
>
> On Tue, Dec 19, 2017 at 4:18 AM, Jeanette C. <julien@mail.upb.de> wrote:
>> Dec 19 2017, Steven Yi has written:
>> ...
>>>
>>> Does anyone know how this is done?
>>
>> ...
>> Hi Steven,
>> just an idea: you can work with two sawtooths. I believe if you
>> phaseshift one by 180 degrees and give it negative amplitutde, then
>> you'll get something quite similar to a square wave. Not sure about the
>> shift value, you can try.
>>
>> Best wishes,
>>
>> Jeanette
>>
>> --------
>> * website: http://juliencoder.de - for summer is a state of sound
Juliencoder.de: A website of music made with Linux, some homeless Linux Audio software and more


>> * SoundCloud: https://soundcloud.com/jeanette_c
>>
>> I used to think
>> I had the answers to everything
>> But now I know
>> ... :) <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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


>> 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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


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

Date2017-12-20 17:08
FromSteven Yi
SubjectRe: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
Attachmentspm.csd  
Thanks Iain for the intution!  I fiddled a bit and found that a cosine mapping (half-cosine, from PI->2PI, mapped into 0-1 range) was still a bit too much of a transition. So I somewhat distorted the phase of that mapping by multiplying it by itself (in the attached file, it is in line 64, the line with comment "adjust curve") and it sounded pretty good.  This instrument would benefit a lot by using a pre-calculated cosine table and tablei, something I'll look at later.

I've attached a new version of pm.csd that has a third instrument, PMFBSquareSaw.  The file shows some experiments I did with modulating the kfb feedback amount in addition to the waveshape.  That was sort of nice as it gets a sort of sine->square->saw->square->sine sound.   (If you want to jump ahead to just that sound, you can use 'csound -odac pm.csd -+skip_seconds=17')



On Wed, Dec 20, 2017 at 2:37 AM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

The most marked changes seem to be perceived as the transition begins from either end so cosseg might give the best results...




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 20 December 2017 00:31

To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Hi Iain,

Thanks! And thanks for sharing that bit about saw->square transition.  Could you perhaps explain what you used for morphing?  I tried a simple ntrpol(acar, 1, kmorph) kind of code and it somewhat worked, but neither linseg nor expseg values for kmorph seemed to make nice transitions.  

Cheers!
steven



On Tue, Dec 19, 2017 at 5:35 PM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

Good detective work Steven!

If you morph one of the acars in the square wave version between itself and 1 you can morph from square to sawtooth.  




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 19 December 2017 17:26
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Ah, I think I got it! (or, at least, something that sounds good to my ear. :) )

I've attached a CSD that demonstrates the two methods.  The CSD has
two instruments, PMFBSaw and PMFBSquare.  Both instruments adjust the
feedback amount of the previous phase (the project uses ksmps=1, so
a-sigs are single-sample and feedback is single-sample) to produce a
simple sweep for demonstrations purposes.  The first simply adds the
previous phase value (acar) to move towards a sawtooth sound. This can
be seen here:

  acar = tablei(aphs+(acar*kfb), 1, 1, 0, 1)

The second does virtually the same thing with one additional
calculation: it multiplies the feedback phase by itself. This can be
seen here:

  acar = tablei(aphs+(acar*acar*kfb), 1, 1, 0, 1)

For the moment, I'm reasonably happy with the sound of this, but I'm
not sure yet of a few things. Some comments:

1. Is this the method used in the reface DX?  I don't really know
since I do not own one nor have access to good audio examples to
analyze. I'm mostly using my ear as a guide and using a bit of
guesswork.
2. I've been listening and using the Sonic Lab video on Youtube
(https://www.youtube.com/watch?v=Xt-tmIMCxTk) as a guide. Around
We take a look at the FM Synthesis focussed Reface DX, one of the new Yamaha ReFace range. its a 4 operator FM synth with 8 voice polyphony, twin effects and a phrase ...


5minutes in, where there's a brief discussion of feedback and the
demonstrator moves it all the way up to gets towards a sine and all
the way down to get towards a square.
3. The square wave-like sound generated in the CSD is not so useful as
a modulator, but sounds good for a carrier.  (This is an observation
from a Blue PM Synth I'm working on.)
4. One has to deal with aliasing as usual for FM/PM.

I'll probably move on with other aspects of my Blue instrument design
for now as this is in good enough shape, but I'd love to hear any
feedback (badum dum!) if anyone experiments with it and maybe finds a
different method for feedback to get to a square wave.

Thanks!
steven




On Tue, Dec 19, 2017 at 10:46 AM, Steven Yi <stevenyi@gmail.com> wrote:
> Hi Jeanette,
>
> Thanks for chiming in. I've used something similar when implementing
> BLIT-based oscillators, but right now something in the back of mind
> keeps telling me that it might be some other means at play.  (Feels
> like I need think through the lens of phase distortion to figure this
> one out, but it's just a hunch.)  I'll keep at this today and will
> keep your thoughts in mind, thanks!
>
> steven
>
> On Tue, Dec 19, 2017 at 4:18 AM, Jeanette C. <julien@mail.upb.de> wrote:
>> Dec 19 2017, Steven Yi has written:
>> ...
>>>
>>> Does anyone know how this is done?
>>
>> ...
>> Hi Steven,
>> just an idea: you can work with two sawtooths. I believe if you
>> phaseshift one by 180 degrees and give it negative amplitutde, then
>> you'll get something quite similar to a square wave. Not sure about the
>> shift value, you can try.
>>
>> Best wishes,
>>
>> Jeanette
>>
>> --------
>> * website: http://juliencoder.de - for summer is a state of sound
Juliencoder.de: A website of music made with Linux, some homeless Linux Audio software and more


>> * SoundCloud: https://soundcloud.com/jeanette_c
>>
>> I used to think
>> I had the answers to everything
>> But now I know
>> ... :) <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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


>> 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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


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

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

Date2017-12-20 20:12
FromSteven Yi
SubjectRe: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
BTW: I did a bit of a write up about this on my blog:


Many thanks again to Iain and Jeanette for the insights and feedback!  


On Wed, Dec 20, 2017 at 12:08 PM, Steven Yi <stevenyi@gmail.com> wrote:
Thanks Iain for the intution!  I fiddled a bit and found that a cosine mapping (half-cosine, from PI->2PI, mapped into 0-1 range) was still a bit too much of a transition. So I somewhat distorted the phase of that mapping by multiplying it by itself (in the attached file, it is in line 64, the line with comment "adjust curve") and it sounded pretty good.  This instrument would benefit a lot by using a pre-calculated cosine table and tablei, something I'll look at later.

I've attached a new version of pm.csd that has a third instrument, PMFBSquareSaw.  The file shows some experiments I did with modulating the kfb feedback amount in addition to the waveshape.  That was sort of nice as it gets a sort of sine->square->saw->square->sine sound.   (If you want to jump ahead to just that sound, you can use 'csound -odac pm.csd -+skip_seconds=17')



On Wed, Dec 20, 2017 at 2:37 AM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

The most marked changes seem to be perceived as the transition begins from either end so cosseg might give the best results...




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 20 December 2017 00:31

To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Hi Iain,

Thanks! And thanks for sharing that bit about saw->square transition.  Could you perhaps explain what you used for morphing?  I tried a simple ntrpol(acar, 1, kmorph) kind of code and it somewhat worked, but neither linseg nor expseg values for kmorph seemed to make nice transitions.  

Cheers!
steven



On Tue, Dec 19, 2017 at 5:35 PM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

Good detective work Steven!

If you morph one of the acars in the square wave version between itself and 1 you can morph from square to sawtooth.  




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 19 December 2017 17:26
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Ah, I think I got it! (or, at least, something that sounds good to my ear. :) )

I've attached a CSD that demonstrates the two methods.  The CSD has
two instruments, PMFBSaw and PMFBSquare.  Both instruments adjust the
feedback amount of the previous phase (the project uses ksmps=1, so
a-sigs are single-sample and feedback is single-sample) to produce a
simple sweep for demonstrations purposes.  The first simply adds the
previous phase value (acar) to move towards a sawtooth sound. This can
be seen here:

  acar = tablei(aphs+(acar*kfb), 1, 1, 0, 1)

The second does virtually the same thing with one additional
calculation: it multiplies the feedback phase by itself. This can be
seen here:

  acar = tablei(aphs+(acar*acar*kfb), 1, 1, 0, 1)

For the moment, I'm reasonably happy with the sound of this, but I'm
not sure yet of a few things. Some comments:

1. Is this the method used in the reface DX?  I don't really know
since I do not own one nor have access to good audio examples to
analyze. I'm mostly using my ear as a guide and using a bit of
guesswork.
2. I've been listening and using the Sonic Lab video on Youtube
(https://www.youtube.com/watch?v=Xt-tmIMCxTk) as a guide. Around
We take a look at the FM Synthesis focussed Reface DX, one of the new Yamaha ReFace range. its a 4 operator FM synth with 8 voice polyphony, twin effects and a phrase ...


5minutes in, where there's a brief discussion of feedback and the
demonstrator moves it all the way up to gets towards a sine and all
the way down to get towards a square.
3. The square wave-like sound generated in the CSD is not so useful as
a modulator, but sounds good for a carrier.  (This is an observation
from a Blue PM Synth I'm working on.)
4. One has to deal with aliasing as usual for FM/PM.

I'll probably move on with other aspects of my Blue instrument design
for now as this is in good enough shape, but I'd love to hear any
feedback (badum dum!) if anyone experiments with it and maybe finds a
different method for feedback to get to a square wave.

Thanks!
steven




On Tue, Dec 19, 2017 at 10:46 AM, Steven Yi <stevenyi@gmail.com> wrote:
> Hi Jeanette,
>
> Thanks for chiming in. I've used something similar when implementing
> BLIT-based oscillators, but right now something in the back of mind
> keeps telling me that it might be some other means at play.  (Feels
> like I need think through the lens of phase distortion to figure this
> one out, but it's just a hunch.)  I'll keep at this today and will
> keep your thoughts in mind, thanks!
>
> steven
>
> On Tue, Dec 19, 2017 at 4:18 AM, Jeanette C. <julien@mail.upb.de> wrote:
>> Dec 19 2017, Steven Yi has written:
>> ...
>>>
>>> Does anyone know how this is done?
>>
>> ...
>> Hi Steven,
>> just an idea: you can work with two sawtooths. I believe if you
>> phaseshift one by 180 degrees and give it negative amplitutde, then
>> you'll get something quite similar to a square wave. Not sure about the
>> shift value, you can try.
>>
>> Best wishes,
>>
>> Jeanette
>>
>> --------
>> * website: http://juliencoder.de - for summer is a state of sound
Juliencoder.de: A website of music made with Linux, some homeless Linux Audio software and more


>> * SoundCloud: https://soundcloud.com/jeanette_c
>>
>> I used to think
>> I had the answers to everything
>> But now I know
>> ... :) <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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


>> 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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


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


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

Date2017-12-20 20:35
FromIain McCurdy
SubjectRe: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)

Nice to read about the happy ending!


I sometime use these kinds of distorted cosine fragments as mappings for human-sounding glissandi.




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 20 December 2017 20:12
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
BTW: I did a bit of a write up about this on my blog:

http://kunstmusik.com/2017/12/20/reface-dx-style-fm-feedback-saw-square/



Many thanks again to Iain and Jeanette for the insights and feedback!  


On Wed, Dec 20, 2017 at 12:08 PM, Steven Yi <stevenyi@gmail.com> wrote:
Thanks Iain for the intution!  I fiddled a bit and found that a cosine mapping (half-cosine, from PI->2PI, mapped into 0-1 range) was still a bit too much of a transition. So I somewhat distorted the phase of that mapping by multiplying it by itself (in the attached file, it is in line 64, the line with comment "adjust curve") and it sounded pretty good.  This instrument would benefit a lot by using a pre-calculated cosine table and tablei, something I'll look at later.

I've attached a new version of pm.csd that has a third instrument, PMFBSquareSaw.  The file shows some experiments I did with modulating the kfb feedback amount in addition to the waveshape.  That was sort of nice as it gets a sort of sine->square->saw->square->sine sound.   (If you want to jump ahead to just that sound, you can use 'csound -odac pm.csd -+skip_seconds=17')



On Wed, Dec 20, 2017 at 2:37 AM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

The most marked changes seem to be perceived as the transition begins from either end so cosseg might give the best results...




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 20 December 2017 00:31

To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Hi Iain,

Thanks! And thanks for sharing that bit about saw->square transition.  Could you perhaps explain what you used for morphing?  I tried a simple ntrpol(acar, 1, kmorph) kind of code and it somewhat worked, but neither linseg nor expseg values for kmorph seemed to make nice transitions.  

Cheers!
steven



On Tue, Dec 19, 2017 at 5:35 PM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

Good detective work Steven!

If you morph one of the acars in the square wave version between itself and 1 you can morph from square to sawtooth.  




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 19 December 2017 17:26
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Ah, I think I got it! (or, at least, something that sounds good to my ear. :) )

I've attached a CSD that demonstrates the two methods.  The CSD has
two instruments, PMFBSaw and PMFBSquare.  Both instruments adjust the
feedback amount of the previous phase (the project uses ksmps=1, so
a-sigs are single-sample and feedback is single-sample) to produce a
simple sweep for demonstrations purposes.  The first simply adds the
previous phase value (acar) to move towards a sawtooth sound. This can
be seen here:

  acar = tablei(aphs+(acar*kfb), 1, 1, 0, 1)

The second does virtually the same thing with one additional
calculation: it multiplies the feedback phase by itself. This can be
seen here:

  acar = tablei(aphs+(acar*acar*kfb), 1, 1, 0, 1)

For the moment, I'm reasonably happy with the sound of this, but I'm
not sure yet of a few things. Some comments:

1. Is this the method used in the reface DX?  I don't really know
since I do not own one nor have access to good audio examples to
analyze. I'm mostly using my ear as a guide and using a bit of
guesswork.
2. I've been listening and using the Sonic Lab video on Youtube
(https://www.youtube.com/watch?v=Xt-tmIMCxTk) as a guide. Around
We take a look at the FM Synthesis focussed Reface DX, one of the new Yamaha ReFace range. its a 4 operator FM synth with 8 voice polyphony, twin effects and a phrase ...


5minutes in, where there's a brief discussion of feedback and the
demonstrator moves it all the way up to gets towards a sine and all
the way down to get towards a square.
3. The square wave-like sound generated in the CSD is not so useful as
a modulator, but sounds good for a carrier.  (This is an observation
from a Blue PM Synth I'm working on.)
4. One has to deal with aliasing as usual for FM/PM.

I'll probably move on with other aspects of my Blue instrument design
for now as this is in good enough shape, but I'd love to hear any
feedback (badum dum!) if anyone experiments with it and maybe finds a
different method for feedback to get to a square wave.

Thanks!
steven




On Tue, Dec 19, 2017 at 10:46 AM, Steven Yi <stevenyi@gmail.com> wrote:
> Hi Jeanette,
>
> Thanks for chiming in. I've used something similar when implementing
> BLIT-based oscillators, but right now something in the back of mind
> keeps telling me that it might be some other means at play.  (Feels
> like I need think through the lens of phase distortion to figure this
> one out, but it's just a hunch.)  I'll keep at this today and will
> keep your thoughts in mind, thanks!
>
> steven
>
> On Tue, Dec 19, 2017 at 4:18 AM, Jeanette C. <julien@mail.upb.de> wrote:
>> Dec 19 2017, Steven Yi has written:
>> ...
>>>
>>> Does anyone know how this is done?
>>
>> ...
>> Hi Steven,
>> just an idea: you can work with two sawtooths. I believe if you
>> phaseshift one by 180 degrees and give it negative amplitutde, then
>> you'll get something quite similar to a square wave. Not sure about the
>> shift value, you can try.
>>
>> Best wishes,
>>
>> Jeanette
>>
>> --------
>> * website: http://juliencoder.de - for summer is a state of sound
Juliencoder.de: A website of music made with Linux, some homeless Linux Audio software and more


>> * SoundCloud: https://soundcloud.com/jeanette_c
>>
>> I used to think
>> I had the answers to everything
>> But now I know
>> ... :) <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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


>> 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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


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


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

Date2017-12-20 22:52
FromAnton Kholomiov
SubjectRe: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
AttachmentsPm.hs  
Hi, Steven!

i've just recoded your example in Haskell, just in case anyone interested, I attach the source.
It's interesting how in functional dressing all three algorithms were implemented with single function
that is parametrized with another function that combines feedback with carier signal





2017-12-20 23:35 GMT+03:00 Iain McCurdy <i_mccurdy@hotmail.com>:

Nice to read about the happy ending!


I sometime use these kinds of distorted cosine fragments as mappings for human-sounding glissandi.




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 20 December 2017 20:12
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
BTW: I did a bit of a write up about this on my blog:

http://kunstmusik.com/2017/12/20/reface-dx-style-fm-feedback-saw-square/
I have long avoided FM (Frequency Modulation) synthesis in my own musical practice as I never felt connected with the results I was able to get myself. However, I recently had the great pleasure to…



Many thanks again to Iain and Jeanette for the insights and feedback!  


On Wed, Dec 20, 2017 at 12:08 PM, Steven Yi <stevenyi@gmail.com> wrote:
Thanks Iain for the intution!  I fiddled a bit and found that a cosine mapping (half-cosine, from PI->2PI, mapped into 0-1 range) was still a bit too much of a transition. So I somewhat distorted the phase of that mapping by multiplying it by itself (in the attached file, it is in line 64, the line with comment "adjust curve") and it sounded pretty good.  This instrument would benefit a lot by using a pre-calculated cosine table and tablei, something I'll look at later.

I've attached a new version of pm.csd that has a third instrument, PMFBSquareSaw.  The file shows some experiments I did with modulating the kfb feedback amount in addition to the waveshape.  That was sort of nice as it gets a sort of sine->square->saw->square->sine sound.   (If you want to jump ahead to just that sound, you can use 'csound -odac pm.csd -+skip_seconds=17')



On Wed, Dec 20, 2017 at 2:37 AM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

The most marked changes seem to be perceived as the transition begins from either end so cosseg might give the best results...




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 20 December 2017 00:31

To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Hi Iain,

Thanks! And thanks for sharing that bit about saw->square transition.  Could you perhaps explain what you used for morphing?  I tried a simple ntrpol(acar, 1, kmorph) kind of code and it somewhat worked, but neither linseg nor expseg values for kmorph seemed to make nice transitions.  

Cheers!
steven



On Tue, Dec 19, 2017 at 5:35 PM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

Good detective work Steven!

If you morph one of the acars in the square wave version between itself and 1 you can morph from square to sawtooth.  




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 19 December 2017 17:26
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Ah, I think I got it! (or, at least, something that sounds good to my ear. :) )

I've attached a CSD that demonstrates the two methods.  The CSD has
two instruments, PMFBSaw and PMFBSquare.  Both instruments adjust the
feedback amount of the previous phase (the project uses ksmps=1, so
a-sigs are single-sample and feedback is single-sample) to produce a
simple sweep for demonstrations purposes.  The first simply adds the
previous phase value (acar) to move towards a sawtooth sound. This can
be seen here:

  acar = tablei(aphs+(acar*kfb), 1, 1, 0, 1)

The second does virtually the same thing with one additional
calculation: it multiplies the feedback phase by itself. This can be
seen here:

  acar = tablei(aphs+(acar*acar*kfb), 1, 1, 0, 1)

For the moment, I'm reasonably happy with the sound of this, but I'm
not sure yet of a few things. Some comments:

1. Is this the method used in the reface DX?  I don't really know
since I do not own one nor have access to good audio examples to
analyze. I'm mostly using my ear as a guide and using a bit of
guesswork.
2. I've been listening and using the Sonic Lab video on Youtube
(https://www.youtube.com/watch?v=Xt-tmIMCxTk) as a guide. Around
We take a look at the FM Synthesis focussed Reface DX, one of the new Yamaha ReFace range. its a 4 operator FM synth with 8 voice polyphony, twin effects and a phrase ...


5minutes in, where there's a brief discussion of feedback and the
demonstrator moves it all the way up to gets towards a sine and all
the way down to get towards a square.
3. The square wave-like sound generated in the CSD is not so useful as
a modulator, but sounds good for a carrier.  (This is an observation
from a Blue PM Synth I'm working on.)
4. One has to deal with aliasing as usual for FM/PM.

I'll probably move on with other aspects of my Blue instrument design
for now as this is in good enough shape, but I'd love to hear any
feedback (badum dum!) if anyone experiments with it and maybe finds a
different method for feedback to get to a square wave.

Thanks!
steven




On Tue, Dec 19, 2017 at 10:46 AM, Steven Yi <stevenyi@gmail.com> wrote:
> Hi Jeanette,
>
> Thanks for chiming in. I've used something similar when implementing
> BLIT-based oscillators, but right now something in the back of mind
> keeps telling me that it might be some other means at play.  (Feels
> like I need think through the lens of phase distortion to figure this
> one out, but it's just a hunch.)  I'll keep at this today and will
> keep your thoughts in mind, thanks!
>
> steven
>
> On Tue, Dec 19, 2017 at 4:18 AM, Jeanette C. <julien@mail.upb.de> wrote:
>> Dec 19 2017, Steven Yi has written:
>> ...
>>>
>>> Does anyone know how this is done?
>>
>> ...
>> Hi Steven,
>> just an idea: you can work with two sawtooths. I believe if you
>> phaseshift one by 180 degrees and give it negative amplitutde, then
>> you'll get something quite similar to a square wave. Not sure about the
>> shift value, you can try.
>>
>> Best wishes,
>>
>> Jeanette
>>
>> --------
>> * website: http://juliencoder.de - for summer is a state of sound
Juliencoder.de: A website of music made with Linux, some homeless Linux Audio software and more


>> * SoundCloud: https://soundcloud.com/jeanette_c
>>
>> I used to think
>> I had the answers to everything
>> But now I know
>> ... :) <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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


>> 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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


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


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

Date2017-12-20 22:54
FromAnton Kholomiov
SubjectRe: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
It's quite an interesting sound, but I wonder how does one can construct the E-piano with it?

2017-12-21 1:52 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
Hi, Steven!

i've just recoded your example in Haskell, just in case anyone interested, I attach the source.
It's interesting how in functional dressing all three algorithms were implemented with single function
that is parametrized with another function that combines feedback with carier signal





2017-12-20 23:35 GMT+03:00 Iain McCurdy <i_mccurdy@hotmail.com>:

Nice to read about the happy ending!


I sometime use these kinds of distorted cosine fragments as mappings for human-sounding glissandi.




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 20 December 2017 20:12
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
BTW: I did a bit of a write up about this on my blog:

http://kunstmusik.com/2017/12/20/reface-dx-style-fm-feedback-saw-square/
I have long avoided FM (Frequency Modulation) synthesis in my own musical practice as I never felt connected with the results I was able to get myself. However, I recently had the great pleasure to…



Many thanks again to Iain and Jeanette for the insights and feedback!  


On Wed, Dec 20, 2017 at 12:08 PM, Steven Yi <stevenyi@gmail.com> wrote:
Thanks Iain for the intution!  I fiddled a bit and found that a cosine mapping (half-cosine, from PI->2PI, mapped into 0-1 range) was still a bit too much of a transition. So I somewhat distorted the phase of that mapping by multiplying it by itself (in the attached file, it is in line 64, the line with comment "adjust curve") and it sounded pretty good.  This instrument would benefit a lot by using a pre-calculated cosine table and tablei, something I'll look at later.

I've attached a new version of pm.csd that has a third instrument, PMFBSquareSaw.  The file shows some experiments I did with modulating the kfb feedback amount in addition to the waveshape.  That was sort of nice as it gets a sort of sine->square->saw->square->sine sound.   (If you want to jump ahead to just that sound, you can use 'csound -odac pm.csd -+skip_seconds=17')



On Wed, Dec 20, 2017 at 2:37 AM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

The most marked changes seem to be perceived as the transition begins from either end so cosseg might give the best results...




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 20 December 2017 00:31

To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Hi Iain,

Thanks! And thanks for sharing that bit about saw->square transition.  Could you perhaps explain what you used for morphing?  I tried a simple ntrpol(acar, 1, kmorph) kind of code and it somewhat worked, but neither linseg nor expseg values for kmorph seemed to make nice transitions.  

Cheers!
steven



On Tue, Dec 19, 2017 at 5:35 PM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

Good detective work Steven!

If you morph one of the acars in the square wave version between itself and 1 you can morph from square to sawtooth.  




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 19 December 2017 17:26
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Ah, I think I got it! (or, at least, something that sounds good to my ear. :) )

I've attached a CSD that demonstrates the two methods.  The CSD has
two instruments, PMFBSaw and PMFBSquare.  Both instruments adjust the
feedback amount of the previous phase (the project uses ksmps=1, so
a-sigs are single-sample and feedback is single-sample) to produce a
simple sweep for demonstrations purposes.  The first simply adds the
previous phase value (acar) to move towards a sawtooth sound. This can
be seen here:

  acar = tablei(aphs+(acar*kfb), 1, 1, 0, 1)

The second does virtually the same thing with one additional
calculation: it multiplies the feedback phase by itself. This can be
seen here:

  acar = tablei(aphs+(acar*acar*kfb), 1, 1, 0, 1)

For the moment, I'm reasonably happy with the sound of this, but I'm
not sure yet of a few things. Some comments:

1. Is this the method used in the reface DX?  I don't really know
since I do not own one nor have access to good audio examples to
analyze. I'm mostly using my ear as a guide and using a bit of
guesswork.
2. I've been listening and using the Sonic Lab video on Youtube
(https://www.youtube.com/watch?v=Xt-tmIMCxTk) as a guide. Around
We take a look at the FM Synthesis focussed Reface DX, one of the new Yamaha ReFace range. its a 4 operator FM synth with 8 voice polyphony, twin effects and a phrase ...


5minutes in, where there's a brief discussion of feedback and the
demonstrator moves it all the way up to gets towards a sine and all
the way down to get towards a square.
3. The square wave-like sound generated in the CSD is not so useful as
a modulator, but sounds good for a carrier.  (This is an observation
from a Blue PM Synth I'm working on.)
4. One has to deal with aliasing as usual for FM/PM.

I'll probably move on with other aspects of my Blue instrument design
for now as this is in good enough shape, but I'd love to hear any
feedback (badum dum!) if anyone experiments with it and maybe finds a
different method for feedback to get to a square wave.

Thanks!
steven




On Tue, Dec 19, 2017 at 10:46 AM, Steven Yi <stevenyi@gmail.com> wrote:
> Hi Jeanette,
>
> Thanks for chiming in. I've used something similar when implementing
> BLIT-based oscillators, but right now something in the back of mind
> keeps telling me that it might be some other means at play.  (Feels
> like I need think through the lens of phase distortion to figure this
> one out, but it's just a hunch.)  I'll keep at this today and will
> keep your thoughts in mind, thanks!
>
> steven
>
> On Tue, Dec 19, 2017 at 4:18 AM, Jeanette C. <julien@mail.upb.de> wrote:
>> Dec 19 2017, Steven Yi has written:
>> ...
>>>
>>> Does anyone know how this is done?
>>
>> ...
>> Hi Steven,
>> just an idea: you can work with two sawtooths. I believe if you
>> phaseshift one by 180 degrees and give it negative amplitutde, then
>> you'll get something quite similar to a square wave. Not sure about the
>> shift value, you can try.
>>
>> Best wishes,
>>
>> Jeanette
>>
>> --------
>> * website: http://juliencoder.de - for summer is a state of sound
Juliencoder.de: A website of music made with Linux, some homeless Linux Audio software and more


>> * SoundCloud: https://soundcloud.com/jeanette_c
>>
>> I used to think
>> I had the answers to everything
>> But now I know
>> ... :) <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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


>> 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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


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


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

Date2017-12-20 22:58
FromAnton Kholomiov
SubjectRe: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
Actually misplacing the feedback can have quite painful effect.. I guess  it's better to rescale it so the 1 becomes 0.3 or
it can hurt. i've applied amplitude envelope by mistake to it and it was quite urghmm

2017-12-21 1:54 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
It's quite an interesting sound, but I wonder how does one can construct the E-piano with it?

2017-12-21 1:52 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
Hi, Steven!

i've just recoded your example in Haskell, just in case anyone interested, I attach the source.
It's interesting how in functional dressing all three algorithms were implemented with single function
that is parametrized with another function that combines feedback with carier signal





2017-12-20 23:35 GMT+03:00 Iain McCurdy <i_mccurdy@hotmail.com>:

Nice to read about the happy ending!


I sometime use these kinds of distorted cosine fragments as mappings for human-sounding glissandi.




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 20 December 2017 20:12
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
BTW: I did a bit of a write up about this on my blog:

http://kunstmusik.com/2017/12/20/reface-dx-style-fm-feedback-saw-square/
I have long avoided FM (Frequency Modulation) synthesis in my own musical practice as I never felt connected with the results I was able to get myself. However, I recently had the great pleasure to…



Many thanks again to Iain and Jeanette for the insights and feedback!  


On Wed, Dec 20, 2017 at 12:08 PM, Steven Yi <stevenyi@gmail.com> wrote:
Thanks Iain for the intution!  I fiddled a bit and found that a cosine mapping (half-cosine, from PI->2PI, mapped into 0-1 range) was still a bit too much of a transition. So I somewhat distorted the phase of that mapping by multiplying it by itself (in the attached file, it is in line 64, the line with comment "adjust curve") and it sounded pretty good.  This instrument would benefit a lot by using a pre-calculated cosine table and tablei, something I'll look at later.

I've attached a new version of pm.csd that has a third instrument, PMFBSquareSaw.  The file shows some experiments I did with modulating the kfb feedback amount in addition to the waveshape.  That was sort of nice as it gets a sort of sine->square->saw->square->sine sound.   (If you want to jump ahead to just that sound, you can use 'csound -odac pm.csd -+skip_seconds=17')



On Wed, Dec 20, 2017 at 2:37 AM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

The most marked changes seem to be perceived as the transition begins from either end so cosseg might give the best results...




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 20 December 2017 00:31

To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Hi Iain,

Thanks! And thanks for sharing that bit about saw->square transition.  Could you perhaps explain what you used for morphing?  I tried a simple ntrpol(acar, 1, kmorph) kind of code and it somewhat worked, but neither linseg nor expseg values for kmorph seemed to make nice transitions.  

Cheers!
steven



On Tue, Dec 19, 2017 at 5:35 PM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

Good detective work Steven!

If you morph one of the acars in the square wave version between itself and 1 you can morph from square to sawtooth.  




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 19 December 2017 17:26
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Ah, I think I got it! (or, at least, something that sounds good to my ear. :) )

I've attached a CSD that demonstrates the two methods.  The CSD has
two instruments, PMFBSaw and PMFBSquare.  Both instruments adjust the
feedback amount of the previous phase (the project uses ksmps=1, so
a-sigs are single-sample and feedback is single-sample) to produce a
simple sweep for demonstrations purposes.  The first simply adds the
previous phase value (acar) to move towards a sawtooth sound. This can
be seen here:

  acar = tablei(aphs+(acar*kfb), 1, 1, 0, 1)

The second does virtually the same thing with one additional
calculation: it multiplies the feedback phase by itself. This can be
seen here:

  acar = tablei(aphs+(acar*acar*kfb), 1, 1, 0, 1)

For the moment, I'm reasonably happy with the sound of this, but I'm
not sure yet of a few things. Some comments:

1. Is this the method used in the reface DX?  I don't really know
since I do not own one nor have access to good audio examples to
analyze. I'm mostly using my ear as a guide and using a bit of
guesswork.
2. I've been listening and using the Sonic Lab video on Youtube
(https://www.youtube.com/watch?v=Xt-tmIMCxTk) as a guide. Around
We take a look at the FM Synthesis focussed Reface DX, one of the new Yamaha ReFace range. its a 4 operator FM synth with 8 voice polyphony, twin effects and a phrase ...


5minutes in, where there's a brief discussion of feedback and the
demonstrator moves it all the way up to gets towards a sine and all
the way down to get towards a square.
3. The square wave-like sound generated in the CSD is not so useful as
a modulator, but sounds good for a carrier.  (This is an observation
from a Blue PM Synth I'm working on.)
4. One has to deal with aliasing as usual for FM/PM.

I'll probably move on with other aspects of my Blue instrument design
for now as this is in good enough shape, but I'd love to hear any
feedback (badum dum!) if anyone experiments with it and maybe finds a
different method for feedback to get to a square wave.

Thanks!
steven




On Tue, Dec 19, 2017 at 10:46 AM, Steven Yi <stevenyi@gmail.com> wrote:
> Hi Jeanette,
>
> Thanks for chiming in. I've used something similar when implementing
> BLIT-based oscillators, but right now something in the back of mind
> keeps telling me that it might be some other means at play.  (Feels
> like I need think through the lens of phase distortion to figure this
> one out, but it's just a hunch.)  I'll keep at this today and will
> keep your thoughts in mind, thanks!
>
> steven
>
> On Tue, Dec 19, 2017 at 4:18 AM, Jeanette C. <julien@mail.upb.de> wrote:
>> Dec 19 2017, Steven Yi has written:
>> ...
>>>
>>> Does anyone know how this is done?
>>
>> ...
>> Hi Steven,
>> just an idea: you can work with two sawtooths. I believe if you
>> phaseshift one by 180 degrees and give it negative amplitutde, then
>> you'll get something quite similar to a square wave. Not sure about the
>> shift value, you can try.
>>
>> Best wishes,
>>
>> Jeanette
>>
>> --------
>> * website: http://juliencoder.de - for summer is a state of sound
Juliencoder.de: A website of music made with Linux, some homeless Linux Audio software and more


>> * SoundCloud: https://soundcloud.com/jeanette_c
>>
>> I used to think
>> I had the answers to everything
>> But now I know
>> ... :) <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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


>> 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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


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


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

Date2017-12-21 15:36
FromSteven Yi
SubjectRe: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
Interesting, I've been using rspline recently for glissandi in a piece I'm working on; I'll have to experiment with cosine-related curves now. :)  Thanks!

On Wed, Dec 20, 2017 at 3:35 PM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

Nice to read about the happy ending!


I sometime use these kinds of distorted cosine fragments as mappings for human-sounding glissandi.




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 20 December 2017 20:12
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
BTW: I did a bit of a write up about this on my blog:

http://kunstmusik.com/2017/12/20/reface-dx-style-fm-feedback-saw-square/
I have long avoided FM (Frequency Modulation) synthesis in my own musical practice as I never felt connected with the results I was able to get myself. However, I recently had the great pleasure to…



Many thanks again to Iain and Jeanette for the insights and feedback!  


On Wed, Dec 20, 2017 at 12:08 PM, Steven Yi <stevenyi@gmail.com> wrote:
Thanks Iain for the intution!  I fiddled a bit and found that a cosine mapping (half-cosine, from PI->2PI, mapped into 0-1 range) was still a bit too much of a transition. So I somewhat distorted the phase of that mapping by multiplying it by itself (in the attached file, it is in line 64, the line with comment "adjust curve") and it sounded pretty good.  This instrument would benefit a lot by using a pre-calculated cosine table and tablei, something I'll look at later.

I've attached a new version of pm.csd that has a third instrument, PMFBSquareSaw.  The file shows some experiments I did with modulating the kfb feedback amount in addition to the waveshape.  That was sort of nice as it gets a sort of sine->square->saw->square->sine sound.   (If you want to jump ahead to just that sound, you can use 'csound -odac pm.csd -+skip_seconds=17')



On Wed, Dec 20, 2017 at 2:37 AM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

The most marked changes seem to be perceived as the transition begins from either end so cosseg might give the best results...




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 20 December 2017 00:31

To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Hi Iain,

Thanks! And thanks for sharing that bit about saw->square transition.  Could you perhaps explain what you used for morphing?  I tried a simple ntrpol(acar, 1, kmorph) kind of code and it somewhat worked, but neither linseg nor expseg values for kmorph seemed to make nice transitions.  

Cheers!
steven



On Tue, Dec 19, 2017 at 5:35 PM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

Good detective work Steven!

If you morph one of the acars in the square wave version between itself and 1 you can morph from square to sawtooth.  




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 19 December 2017 17:26
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Ah, I think I got it! (or, at least, something that sounds good to my ear. :) )

I've attached a CSD that demonstrates the two methods.  The CSD has
two instruments, PMFBSaw and PMFBSquare.  Both instruments adjust the
feedback amount of the previous phase (the project uses ksmps=1, so
a-sigs are single-sample and feedback is single-sample) to produce a
simple sweep for demonstrations purposes.  The first simply adds the
previous phase value (acar) to move towards a sawtooth sound. This can
be seen here:

  acar = tablei(aphs+(acar*kfb), 1, 1, 0, 1)

The second does virtually the same thing with one additional
calculation: it multiplies the feedback phase by itself. This can be
seen here:

  acar = tablei(aphs+(acar*acar*kfb), 1, 1, 0, 1)

For the moment, I'm reasonably happy with the sound of this, but I'm
not sure yet of a few things. Some comments:

1. Is this the method used in the reface DX?  I don't really know
since I do not own one nor have access to good audio examples to
analyze. I'm mostly using my ear as a guide and using a bit of
guesswork.
2. I've been listening and using the Sonic Lab video on Youtube
(https://www.youtube.com/watch?v=Xt-tmIMCxTk) as a guide. Around
We take a look at the FM Synthesis focussed Reface DX, one of the new Yamaha ReFace range. its a 4 operator FM synth with 8 voice polyphony, twin effects and a phrase ...


5minutes in, where there's a brief discussion of feedback and the
demonstrator moves it all the way up to gets towards a sine and all
the way down to get towards a square.
3. The square wave-like sound generated in the CSD is not so useful as
a modulator, but sounds good for a carrier.  (This is an observation
from a Blue PM Synth I'm working on.)
4. One has to deal with aliasing as usual for FM/PM.

I'll probably move on with other aspects of my Blue instrument design
for now as this is in good enough shape, but I'd love to hear any
feedback (badum dum!) if anyone experiments with it and maybe finds a
different method for feedback to get to a square wave.

Thanks!
steven




On Tue, Dec 19, 2017 at 10:46 AM, Steven Yi <stevenyi@gmail.com> wrote:
> Hi Jeanette,
>
> Thanks for chiming in. I've used something similar when implementing
> BLIT-based oscillators, but right now something in the back of mind
> keeps telling me that it might be some other means at play.  (Feels
> like I need think through the lens of phase distortion to figure this
> one out, but it's just a hunch.)  I'll keep at this today and will
> keep your thoughts in mind, thanks!
>
> steven
>
> On Tue, Dec 19, 2017 at 4:18 AM, Jeanette C. <julien@mail.upb.de> wrote:
>> Dec 19 2017, Steven Yi has written:
>> ...
>>>
>>> Does anyone know how this is done?
>>
>> ...
>> Hi Steven,
>> just an idea: you can work with two sawtooths. I believe if you
>> phaseshift one by 180 degrees and give it negative amplitutde, then
>> you'll get something quite similar to a square wave. Not sure about the
>> shift value, you can try.
>>
>> Best wishes,
>>
>> Jeanette
>>
>> --------
>> * website: http://juliencoder.de - for summer is a state of sound
Juliencoder.de: A website of music made with Linux, some homeless Linux Audio software and more


>> * SoundCloud: https://soundcloud.com/jeanette_c
>>
>> I used to think
>> I had the answers to everything
>> But now I know
>> ... :) <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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


>> 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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


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


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

Date2017-12-21 23:46
FromSteven Yi
SubjectRe: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
Attachmentsep.csd  
Hi Anton,

Thanks for sharing that Haskell version! I'm still a little behind in studying through the DelGlitch.hs (I was going through it and csound-expression's documentation/source last week, and had planned to write Csound ORC versions of the seq functions from Csound.Air.Envelope to think through it a bit, but then got a bit obsessed with the FM stuff).  Pm.hs, as you say, has a nice functional feel. I do similar things in my system Pink, but I think it's also familiar from looking at Faust code too.  When we get Csound 7 started, opcodes as values and passing in any data type for p-fields should allow this kind of coding in native Csound ORC code too. :)

For FM style Electric Piano, I think absolutely. The operator and level configuration shouldn't be too bad, but it'd take a bit more time to get the velocity mapping and envelopes worked out. I would say, if you want to try to do it with 4-operator, reface DX style setup, you might try following along this Youtube video:


It's using algorithm 8 on the reface DX which gives two, two-operator stacks. The first stack uses a high C:M ratio to get that tine sound, while the second stack is used for more of the body of piano tone. The author of the video adjusts parts through the video that should make it easy to follow along and in the end gets a pretty good FM EP sound, IMO.  

If you want to use a classic DX7 EP sound, you could always study up from the original patch.  If you check out the Web Audio version of Dexed:


load in the rom1a.syx bank, then go to "E. Piano 1" patch, you'll find it using Algorithm 5, which has 3 two-operator stacks.  The first pair takes the same approach of a high C:M ratio to get that tine sound (1:14), then uses 1:1 for the other two stacks. The basic idea of the patch for reface DX follows along what's in the DX7 version, I think.  

As a quick proof of concept, I've attached a CSD file that has a very basic EP patch using 3 foscili instances. This matches the Alg 5 for the DX7 (of course, without the feedback param for operator 6). But even just using the 1:14 CM ratio and using the slightly detuned 1:1 CM operators, it gets an okay FM EP sound.  (This patch doesn't do any velocity handling though, so it sounds like the player is smashing the keyboard even if it's at a quiet volume; not so nice but good enough for a proof-of-concept! ;) ) You could replace the 5-6 operator pair (the last foscili) with PM to have feedback, then move on from there.

I'm creating an instrument now in Blue based on the reface DX that has PM for all of the operators and has the 12 algorithms done already.  I'm working on all of the mappings now for index, amplitude, velocity, and other curves, using formulas from Chowning and Bristow's "FM Theory and Applications" and whatever else I can find. I'll post that as soon as its ready and perhaps might be something useful.  Otherwise, if you haven't already, I'd very much recommend checking out Russell Pinkston's DX7 emulation instruments and reading through his chapter in the first Csound Book.  

Cheers!
steven


On Wed, Dec 20, 2017 at 5:58 PM, Anton Kholomiov <anton.kholomiov@gmail.com> wrote:
Actually misplacing the feedback can have quite painful effect.. I guess  it's better to rescale it so the 1 becomes 0.3 or
it can hurt. i've applied amplitude envelope by mistake to it and it was quite urghmm

2017-12-21 1:54 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
It's quite an interesting sound, but I wonder how does one can construct the E-piano with it?

2017-12-21 1:52 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
Hi, Steven!

i've just recoded your example in Haskell, just in case anyone interested, I attach the source.
It's interesting how in functional dressing all three algorithms were implemented with single function
that is parametrized with another function that combines feedback with carier signal





2017-12-20 23:35 GMT+03:00 Iain McCurdy <i_mccurdy@hotmail.com>:

Nice to read about the happy ending!


I sometime use these kinds of distorted cosine fragments as mappings for human-sounding glissandi.




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 20 December 2017 20:12
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
BTW: I did a bit of a write up about this on my blog:

http://kunstmusik.com/2017/12/20/reface-dx-style-fm-feedback-saw-square/
I have long avoided FM (Frequency Modulation) synthesis in my own musical practice as I never felt connected with the results I was able to get myself. However, I recently had the great pleasure to…



Many thanks again to Iain and Jeanette for the insights and feedback!  


On Wed, Dec 20, 2017 at 12:08 PM, Steven Yi <stevenyi@gmail.com> wrote:
Thanks Iain for the intution!  I fiddled a bit and found that a cosine mapping (half-cosine, from PI->2PI, mapped into 0-1 range) was still a bit too much of a transition. So I somewhat distorted the phase of that mapping by multiplying it by itself (in the attached file, it is in line 64, the line with comment "adjust curve") and it sounded pretty good.  This instrument would benefit a lot by using a pre-calculated cosine table and tablei, something I'll look at later.

I've attached a new version of pm.csd that has a third instrument, PMFBSquareSaw.  The file shows some experiments I did with modulating the kfb feedback amount in addition to the waveshape.  That was sort of nice as it gets a sort of sine->square->saw->square->sine sound.   (If you want to jump ahead to just that sound, you can use 'csound -odac pm.csd -+skip_seconds=17')



On Wed, Dec 20, 2017 at 2:37 AM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

The most marked changes seem to be perceived as the transition begins from either end so cosseg might give the best results...




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 20 December 2017 00:31

To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Hi Iain,

Thanks! And thanks for sharing that bit about saw->square transition.  Could you perhaps explain what you used for morphing?  I tried a simple ntrpol(acar, 1, kmorph) kind of code and it somewhat worked, but neither linseg nor expseg values for kmorph seemed to make nice transitions.  

Cheers!
steven



On Tue, Dec 19, 2017 at 5:35 PM, Iain McCurdy <i_mccurdy@hotmail.com> wrote:

Good detective work Steven!

If you morph one of the acars in the square wave version between itself and 1 you can morph from square to sawtooth.  




From: A discussion list for users of Csound <CSOUND@LISTSERV.HEANET.IE> on behalf of Steven Yi <stevenyi@GMAIL.COM>
Sent: 19 December 2017 17:26
To: CSOUND@LISTSERV.HEANET.IE
Subject: Re: [Csnd] FM/PM Synthesis - Feedback Param (reface DX)
 
Ah, I think I got it! (or, at least, something that sounds good to my ear. :) )

I've attached a CSD that demonstrates the two methods.  The CSD has
two instruments, PMFBSaw and PMFBSquare.  Both instruments adjust the
feedback amount of the previous phase (the project uses ksmps=1, so
a-sigs are single-sample and feedback is single-sample) to produce a
simple sweep for demonstrations purposes.  The first simply adds the
previous phase value (acar) to move towards a sawtooth sound. This can
be seen here:

  acar = tablei(aphs+(acar*kfb), 1, 1, 0, 1)

The second does virtually the same thing with one additional
calculation: it multiplies the feedback phase by itself. This can be
seen here:

  acar = tablei(aphs+(acar*acar*kfb), 1, 1, 0, 1)

For the moment, I'm reasonably happy with the sound of this, but I'm
not sure yet of a few things. Some comments:

1. Is this the method used in the reface DX?  I don't really know
since I do not own one nor have access to good audio examples to
analyze. I'm mostly using my ear as a guide and using a bit of
guesswork.
2. I've been listening and using the Sonic Lab video on Youtube
(https://www.youtube.com/watch?v=Xt-tmIMCxTk) as a guide. Around
We take a look at the FM Synthesis focussed Reface DX, one of the new Yamaha ReFace range. its a 4 operator FM synth with 8 voice polyphony, twin effects and a phrase ...


5minutes in, where there's a brief discussion of feedback and the
demonstrator moves it all the way up to gets towards a sine and all
the way down to get towards a square.
3. The square wave-like sound generated in the CSD is not so useful as
a modulator, but sounds good for a carrier.  (This is an observation
from a Blue PM Synth I'm working on.)
4. One has to deal with aliasing as usual for FM/PM.

I'll probably move on with other aspects of my Blue instrument design
for now as this is in good enough shape, but I'd love to hear any
feedback (badum dum!) if anyone experiments with it and maybe finds a
different method for feedback to get to a square wave.

Thanks!
steven




On Tue, Dec 19, 2017 at 10:46 AM, Steven Yi <stevenyi@gmail.com> wrote:
> Hi Jeanette,
>
> Thanks for chiming in. I've used something similar when implementing
> BLIT-based oscillators, but right now something in the back of mind
> keeps telling me that it might be some other means at play.  (Feels
> like I need think through the lens of phase distortion to figure this
> one out, but it's just a hunch.)  I'll keep at this today and will
> keep your thoughts in mind, thanks!
>
> steven
>
> On Tue, Dec 19, 2017 at 4:18 AM, Jeanette C. <julien@mail.upb.de> wrote:
>> Dec 19 2017, Steven Yi has written:
>> ...
>>>
>>> Does anyone know how this is done?
>>
>> ...
>> Hi Steven,
>> just an idea: you can work with two sawtooths. I believe if you
>> phaseshift one by 180 degrees and give it negative amplitutde, then
>> you'll get something quite similar to a square wave. Not sure about the
>> shift value, you can try.
>>
>> Best wishes,
>>
>> Jeanette
>>
>> --------
>> * website: http://juliencoder.de - for summer is a state of sound
Juliencoder.de: A website of music made with Linux, some homeless Linux Audio software and more


>> * SoundCloud: https://soundcloud.com/jeanette_c
>>
>> I used to think
>> I had the answers to everything
>> But now I know
>> ... :) <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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


>> 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
csound - Main repository for Csound ... Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the ...


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


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