Csound Csound-dev Csound-tekno Search About

[Csnd] ksmps and phase modulation

Date2020-01-02 23:03
FromChristian Bacher <000005d2745f1ec0-dmarc-request@LISTSERV.HEANET.IE>
Subject[Csnd] ksmps and phase modulation
i have encountered some issues when experimenting with a pm synth and 
could reduce the problem to the

example in the floss manuals:



-o dac


sr = 48000
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1  ; feedback PM
kCarFreq = 200
aFeedbackAmountEnv linseg 0, 2, 0.2, 0.1, 0.3, 0.8, 0.2, 1.5, 0
aAmpEnv expseg .001, 0.001, 1, 0.3, 0.5, 8.5, .001
aPhase phasor kCarFreq
aCarrier init 0 ; init for feedback
aCarrier tablei aPhase+(aCarrier*aFeedbackAmountEnv), 1, 1, 0, 1
outs aCarrier*aAmpEnv, aCarrier*aAmpEnv
endin



f 1 0 1024 10 1     ;Sine wave for table 1
i 1 0 9


; written by Alex Hofmann (Mar. 2011)


i am wondering why it sounds imho good and reasonable with ksmps = 1 but 
different and questionable at ksmps = 32.

maybe someone could explain? ( i have tried here a small modification 
and made the env a-rate but it didnt help)

i have compiled and installed the newest version from the dev branch for 
checking on ubuntu.

thx, christian

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

Date2020-01-03 00:40
FromJosh Moore
SubjectRe: [Csnd] ksmps and phase modulation
You need ksmps of 1 for sample accuracy... 

On Thu, Jan 2, 2020, 3:03 PM Christian Bacher <000005d2745f1ec0-dmarc-request@listserv.heanet.ie> wrote:
i have encountered some issues when experimenting with a pm synth and
could reduce the problem to the

example in the floss manuals:

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
sr = 48000
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1  ; feedback PM
kCarFreq = 200
aFeedbackAmountEnv linseg 0, 2, 0.2, 0.1, 0.3, 0.8, 0.2, 1.5, 0
aAmpEnv expseg .001, 0.001, 1, 0.3, 0.5, 8.5, .001
aPhase phasor kCarFreq
aCarrier init 0 ; init for feedback
aCarrier tablei aPhase+(aCarrier*aFeedbackAmountEnv), 1, 1, 0, 1
outs aCarrier*aAmpEnv, aCarrier*aAmpEnv
endin

</CsInstruments>
<CsScore>
f 1 0 1024 10 1     ;Sine wave for table 1
i 1 0 9
</CsScore>
</CsoundSynthesizer>
; written by Alex Hofmann (Mar. 2011)


i am wondering why it sounds imho good and reasonable with ksmps = 1 but
different and questionable at ksmps = 32.

maybe someone could explain? ( i have tried here a small modification
and made the env a-rate but it didnt help)

i have compiled and installed the newest version from the dev branch for
checking on ubuntu.

thx, christian

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

Date2020-01-03 09:33
FromVictor Lazzarini
SubjectRe: [Csnd] ksmps and phase modulation
Not in this example. It should not be affected by ksmps as it only uses audio signals.

If there is a difference then there's some issue.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 3 Jan 2020, at 00:41, Josh Moore <kh405.7h30ry@gmail.com> wrote:

You need ksmps of 1 for sample accuracy... 

On Thu, Jan 2, 2020, 3:03 PM Christian Bacher <000005d2745f1ec0-dmarc-request@listserv.heanet.ie> wrote:
i have encountered some issues when experimenting with a pm synth and
could reduce the problem to the

example in the floss manuals:

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
sr = 48000
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1  ; feedback PM
kCarFreq = 200
aFeedbackAmountEnv linseg 0, 2, 0.2, 0.1, 0.3, 0.8, 0.2, 1.5, 0
aAmpEnv expseg .001, 0.001, 1, 0.3, 0.5, 8.5, .001
aPhase phasor kCarFreq
aCarrier init 0 ; init for feedback
aCarrier tablei aPhase+(aCarrier*aFeedbackAmountEnv), 1, 1, 0, 1
outs aCarrier*aAmpEnv, aCarrier*aAmpEnv
endin

</CsInstruments>
<CsScore>
f 1 0 1024 10 1     ;Sine wave for table 1
i 1 0 9
</CsScore>
</CsoundSynthesizer>
; written by Alex Hofmann (Mar. 2011)


i am wondering why it sounds imho good and reasonable with ksmps = 1 but
different and questionable at ksmps = 32.

maybe someone could explain? ( i have tried here a small modification
and made the env a-rate but it didnt help)

i have compiled and installed the newest version from the dev branch for
checking on ubuntu.

thx, christian

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

Date2020-01-03 09:33
FromRory Walsh
SubjectRe: [Csnd] ksmps and phase modulation
With ksmps set to 32, audio is processed in blocks of 32 samples. This gives a minimum feedback delay of 32 samples. Setting it to 1 means you can pass the last sample straight back into the processing chain. Rather than setting global kmsps to 1, you can put the PM stuff in a UDO. Victor presents a nice example in the latest Csound book. The code is in GitHub. 

On Fri 3 Jan 2020, 01:41 Josh Moore, <kh405.7h30ry@gmail.com> wrote:
You need ksmps of 1 for sample accuracy... 

On Thu, Jan 2, 2020, 3:03 PM Christian Bacher <000005d2745f1ec0-dmarc-request@listserv.heanet.ie> wrote:
i have encountered some issues when experimenting with a pm synth and
could reduce the problem to the

example in the floss manuals:

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
sr = 48000
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1  ; feedback PM
kCarFreq = 200
aFeedbackAmountEnv linseg 0, 2, 0.2, 0.1, 0.3, 0.8, 0.2, 1.5, 0
aAmpEnv expseg .001, 0.001, 1, 0.3, 0.5, 8.5, .001
aPhase phasor kCarFreq
aCarrier init 0 ; init for feedback
aCarrier tablei aPhase+(aCarrier*aFeedbackAmountEnv), 1, 1, 0, 1
outs aCarrier*aAmpEnv, aCarrier*aAmpEnv
endin

</CsInstruments>
<CsScore>
f 1 0 1024 10 1     ;Sine wave for table 1
i 1 0 9
</CsScore>
</CsoundSynthesizer>
; written by Alex Hofmann (Mar. 2011)


i am wondering why it sounds imho good and reasonable with ksmps = 1 but
different and questionable at ksmps = 32.

maybe someone could explain? ( i have tried here a small modification
and made the env a-rate but it didnt help)

i have compiled and installed the newest version from the dev branch for
checking on ubuntu.

thx, christian

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

Date2020-01-03 09:34
FromRory Walsh
SubjectRe: [Csnd] ksmps and phase modulation
Ok. What Victor said 🤣

On Fri 3 Jan 2020, 10:33 Rory Walsh, <rorywalsh@ear.ie> wrote:
With ksmps set to 32, audio is processed in blocks of 32 samples. This gives a minimum feedback delay of 32 samples. Setting it to 1 means you can pass the last sample straight back into the processing chain. Rather than setting global kmsps to 1, you can put the PM stuff in a UDO. Victor presents a nice example in the latest Csound book. The code is in GitHub. 

On Fri 3 Jan 2020, 01:41 Josh Moore, <kh405.7h30ry@gmail.com> wrote:
You need ksmps of 1 for sample accuracy... 

On Thu, Jan 2, 2020, 3:03 PM Christian Bacher <000005d2745f1ec0-dmarc-request@listserv.heanet.ie> wrote:
i have encountered some issues when experimenting with a pm synth and
could reduce the problem to the

example in the floss manuals:

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
sr = 48000
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1  ; feedback PM
kCarFreq = 200
aFeedbackAmountEnv linseg 0, 2, 0.2, 0.1, 0.3, 0.8, 0.2, 1.5, 0
aAmpEnv expseg .001, 0.001, 1, 0.3, 0.5, 8.5, .001
aPhase phasor kCarFreq
aCarrier init 0 ; init for feedback
aCarrier tablei aPhase+(aCarrier*aFeedbackAmountEnv), 1, 1, 0, 1
outs aCarrier*aAmpEnv, aCarrier*aAmpEnv
endin

</CsInstruments>
<CsScore>
f 1 0 1024 10 1     ;Sine wave for table 1
i 1 0 9
</CsScore>
</CsoundSynthesizer>
; written by Alex Hofmann (Mar. 2011)


i am wondering why it sounds imho good and reasonable with ksmps = 1 but
different and questionable at ksmps = 32.

maybe someone could explain? ( i have tried here a small modification
and made the env a-rate but it didnt help)

i have compiled and installed the newest version from the dev branch for
checking on ubuntu.

thx, christian

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

Date2020-01-03 09:47
FromRory Walsh
SubjectRe: [Csnd] ksmps and phase modulation
Sorry Victor, can you clarify. For single sample feedback you need to set ksmps to 1 right, but are you saying you don't need single sample feedback for this type of phase mod instrument? 

On Fri 3 Jan 2020, 10:34 Rory Walsh, <rorywalsh@ear.ie> wrote:
Ok. What Victor said 🤣

On Fri 3 Jan 2020, 10:33 Rory Walsh, <rorywalsh@ear.ie> wrote:
With ksmps set to 32, audio is processed in blocks of 32 samples. This gives a minimum feedback delay of 32 samples. Setting it to 1 means you can pass the last sample straight back into the processing chain. Rather than setting global kmsps to 1, you can put the PM stuff in a UDO. Victor presents a nice example in the latest Csound book. The code is in GitHub. 

On Fri 3 Jan 2020, 01:41 Josh Moore, <kh405.7h30ry@gmail.com> wrote:
You need ksmps of 1 for sample accuracy... 

On Thu, Jan 2, 2020, 3:03 PM Christian Bacher <000005d2745f1ec0-dmarc-request@listserv.heanet.ie> wrote:
i have encountered some issues when experimenting with a pm synth and
could reduce the problem to the

example in the floss manuals:

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
sr = 48000
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1  ; feedback PM
kCarFreq = 200
aFeedbackAmountEnv linseg 0, 2, 0.2, 0.1, 0.3, 0.8, 0.2, 1.5, 0
aAmpEnv expseg .001, 0.001, 1, 0.3, 0.5, 8.5, .001
aPhase phasor kCarFreq
aCarrier init 0 ; init for feedback
aCarrier tablei aPhase+(aCarrier*aFeedbackAmountEnv), 1, 1, 0, 1
outs aCarrier*aAmpEnv, aCarrier*aAmpEnv
endin

</CsInstruments>
<CsScore>
f 1 0 1024 10 1     ;Sine wave for table 1
i 1 0 9
</CsScore>
</CsoundSynthesizer>
; written by Alex Hofmann (Mar. 2011)


i am wondering why it sounds imho good and reasonable with ksmps = 1 but
different and questionable at ksmps = 32.

maybe someone could explain? ( i have tried here a small modification
and made the env a-rate but it didnt help)

i have compiled and installed the newest version from the dev branch for
checking on ubuntu.

thx, christian

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

Date2020-01-03 09:48
FromVictor Lazzarini
SubjectRe: [Csnd] ksmps and phase modulation
Actually, I am very wrong. I should not answer emails before breakfast. Did not
even see if it had feedback.

Josh and Rory are right. You need ksmps=1 for 1 sample feedback. Your feedback period is dependent on ksmps.

Sorry for the noise. I'll shut up now. :)

Prof. Victor Lazzarini
Maynooth University
Ireland

On 3 Jan 2020, at 09:34, Rory Walsh <rorywalsh@ear.ie> wrote:

Ok. What Victor said 🤣

On Fri 3 Jan 2020, 10:33 Rory Walsh, <rorywalsh@ear.ie> wrote:
With ksmps set to 32, audio is processed in blocks of 32 samples. This gives a minimum feedback delay of 32 samples. Setting it to 1 means you can pass the last sample straight back into the processing chain. Rather than setting global kmsps to 1, you can put the PM stuff in a UDO. Victor presents a nice example in the latest Csound book. The code is in GitHub. 

On Fri 3 Jan 2020, 01:41 Josh Moore, <kh405.7h30ry@gmail.com> wrote:
You need ksmps of 1 for sample accuracy... 

On Thu, Jan 2, 2020, 3:03 PM Christian Bacher <000005d2745f1ec0-dmarc-request@listserv.heanet.ie> wrote:
i have encountered some issues when experimenting with a pm synth and
could reduce the problem to the

example in the floss manuals:

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
sr = 48000
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1  ; feedback PM
kCarFreq = 200
aFeedbackAmountEnv linseg 0, 2, 0.2, 0.1, 0.3, 0.8, 0.2, 1.5, 0
aAmpEnv expseg .001, 0.001, 1, 0.3, 0.5, 8.5, .001
aPhase phasor kCarFreq
aCarrier init 0 ; init for feedback
aCarrier tablei aPhase+(aCarrier*aFeedbackAmountEnv), 1, 1, 0, 1
outs aCarrier*aAmpEnv, aCarrier*aAmpEnv
endin

</CsInstruments>
<CsScore>
f 1 0 1024 10 1     ;Sine wave for table 1
i 1 0 9
</CsScore>
</CsoundSynthesizer>
; written by Alex Hofmann (Mar. 2011)


i am wondering why it sounds imho good and reasonable with ksmps = 1 but
different and questionable at ksmps = 32.

maybe someone could explain? ( i have tried here a small modification
and made the env a-rate but it didnt help)

i have compiled and installed the newest version from the dev branch for
checking on ubuntu.

thx, christian

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

Date2020-01-03 09:51
FromRory Walsh
SubjectRe: [Csnd] ksmps and phase modulation
I'm going to hang this one on my fridge! 🤣🤣

On Fri 3 Jan 2020, 10:48 Victor Lazzarini, <Victor.Lazzarini@mu.ie> wrote:
Actually, I am very wrong. I should not answer emails before breakfast. Did not
even see if it had feedback.

Josh and Rory are right. You need ksmps=1 for 1 sample feedback. Your feedback period is dependent on ksmps.

Sorry for the noise. I'll shut up now. :)

Prof. Victor Lazzarini
Maynooth University
Ireland

On 3 Jan 2020, at 09:34, Rory Walsh <rorywalsh@ear.ie> wrote:

Ok. What Victor said 🤣

On Fri 3 Jan 2020, 10:33 Rory Walsh, <rorywalsh@ear.ie> wrote:
With ksmps set to 32, audio is processed in blocks of 32 samples. This gives a minimum feedback delay of 32 samples. Setting it to 1 means you can pass the last sample straight back into the processing chain. Rather than setting global kmsps to 1, you can put the PM stuff in a UDO. Victor presents a nice example in the latest Csound book. The code is in GitHub. 

On Fri 3 Jan 2020, 01:41 Josh Moore, <kh405.7h30ry@gmail.com> wrote:
You need ksmps of 1 for sample accuracy... 

On Thu, Jan 2, 2020, 3:03 PM Christian Bacher <000005d2745f1ec0-dmarc-request@listserv.heanet.ie> wrote:
i have encountered some issues when experimenting with a pm synth and
could reduce the problem to the

example in the floss manuals:

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
sr = 48000
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1  ; feedback PM
kCarFreq = 200
aFeedbackAmountEnv linseg 0, 2, 0.2, 0.1, 0.3, 0.8, 0.2, 1.5, 0
aAmpEnv expseg .001, 0.001, 1, 0.3, 0.5, 8.5, .001
aPhase phasor kCarFreq
aCarrier init 0 ; init for feedback
aCarrier tablei aPhase+(aCarrier*aFeedbackAmountEnv), 1, 1, 0, 1
outs aCarrier*aAmpEnv, aCarrier*aAmpEnv
endin

</CsInstruments>
<CsScore>
f 1 0 1024 10 1     ;Sine wave for table 1
i 1 0 9
</CsScore>
</CsoundSynthesizer>
; written by Alex Hofmann (Mar. 2011)


i am wondering why it sounds imho good and reasonable with ksmps = 1 but
different and questionable at ksmps = 32.

maybe someone could explain? ( i have tried here a small modification
and made the env a-rate but it didnt help)

i have compiled and installed the newest version from the dev branch for
checking on ubuntu.

thx, christian

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

Date2020-01-03 09:52
FromVictor Lazzarini
SubjectRe: [Csnd] ksmps and phase modulation
you need, I did not read the code properly. Only saw the a vars and FLOSS,  concluding it was all audio rate and that the code could not be wrong.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 3 Jan 2020, at 09:47, Rory Walsh <rorywalsh@ear.ie> wrote:

Sorry Victor, can you clarify. For single sample feedback you need to set ksmps to 1 right, but are you saying you don't need single sample feedback for this type of phase mod instrument? 

On Fri 3 Jan 2020, 10:34 Rory Walsh, <rorywalsh@ear.ie> wrote:
Ok. What Victor said 🤣

On Fri 3 Jan 2020, 10:33 Rory Walsh, <rorywalsh@ear.ie> wrote:
With ksmps set to 32, audio is processed in blocks of 32 samples. This gives a minimum feedback delay of 32 samples. Setting it to 1 means you can pass the last sample straight back into the processing chain. Rather than setting global kmsps to 1, you can put the PM stuff in a UDO. Victor presents a nice example in the latest Csound book. The code is in GitHub. 

On Fri 3 Jan 2020, 01:41 Josh Moore, <kh405.7h30ry@gmail.com> wrote:
You need ksmps of 1 for sample accuracy... 

On Thu, Jan 2, 2020, 3:03 PM Christian Bacher <000005d2745f1ec0-dmarc-request@listserv.heanet.ie> wrote:
i have encountered some issues when experimenting with a pm synth and
could reduce the problem to the

example in the floss manuals:

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
sr = 48000
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1  ; feedback PM
kCarFreq = 200
aFeedbackAmountEnv linseg 0, 2, 0.2, 0.1, 0.3, 0.8, 0.2, 1.5, 0
aAmpEnv expseg .001, 0.001, 1, 0.3, 0.5, 8.5, .001
aPhase phasor kCarFreq
aCarrier init 0 ; init for feedback
aCarrier tablei aPhase+(aCarrier*aFeedbackAmountEnv), 1, 1, 0, 1
outs aCarrier*aAmpEnv, aCarrier*aAmpEnv
endin

</CsInstruments>
<CsScore>
f 1 0 1024 10 1     ;Sine wave for table 1
i 1 0 9
</CsScore>
</CsoundSynthesizer>
; written by Alex Hofmann (Mar. 2011)


i am wondering why it sounds imho good and reasonable with ksmps = 1 but
different and questionable at ksmps = 32.

maybe someone could explain? ( i have tried here a small modification
and made the env a-rate but it didnt help)

i have compiled and installed the newest version from the dev branch for
checking on ubuntu.

thx, christian

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

Date2020-01-03 09:57
FromVictor Lazzarini
SubjectRe: [Csnd] ksmps and phase modulation
I'm sure it will be one of many...

Prof. Victor Lazzarini
Maynooth University
Ireland

On 3 Jan 2020, at 09:51, Rory Walsh <rorywalsh@ear.ie> wrote:

I'm going to hang this one on my fridge! 🤣🤣

On Fri 3 Jan 2020, 10:48 Victor Lazzarini, <Victor.Lazzarini@mu.ie> wrote:
Actually, I am very wrong. I should not answer emails before breakfast. Did not
even see if it had feedback.

Josh and Rory are right. You need ksmps=1 for 1 sample feedback. Your feedback period is dependent on ksmps.

Sorry for the noise. I'll shut up now. :)

Prof. Victor Lazzarini
Maynooth University
Ireland

On 3 Jan 2020, at 09:34, Rory Walsh <rorywalsh@ear.ie> wrote:

Ok. What Victor said 🤣

On Fri 3 Jan 2020, 10:33 Rory Walsh, <rorywalsh@ear.ie> wrote:
With ksmps set to 32, audio is processed in blocks of 32 samples. This gives a minimum feedback delay of 32 samples. Setting it to 1 means you can pass the last sample straight back into the processing chain. Rather than setting global kmsps to 1, you can put the PM stuff in a UDO. Victor presents a nice example in the latest Csound book. The code is in GitHub. 

On Fri 3 Jan 2020, 01:41 Josh Moore, <kh405.7h30ry@gmail.com> wrote:
You need ksmps of 1 for sample accuracy... 

On Thu, Jan 2, 2020, 3:03 PM Christian Bacher <000005d2745f1ec0-dmarc-request@listserv.heanet.ie> wrote:
i have encountered some issues when experimenting with a pm synth and
could reduce the problem to the

example in the floss manuals:

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
sr = 48000
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1  ; feedback PM
kCarFreq = 200
aFeedbackAmountEnv linseg 0, 2, 0.2, 0.1, 0.3, 0.8, 0.2, 1.5, 0
aAmpEnv expseg .001, 0.001, 1, 0.3, 0.5, 8.5, .001
aPhase phasor kCarFreq
aCarrier init 0 ; init for feedback
aCarrier tablei aPhase+(aCarrier*aFeedbackAmountEnv), 1, 1, 0, 1
outs aCarrier*aAmpEnv, aCarrier*aAmpEnv
endin

</CsInstruments>
<CsScore>
f 1 0 1024 10 1     ;Sine wave for table 1
i 1 0 9
</CsScore>
</CsoundSynthesizer>
; written by Alex Hofmann (Mar. 2011)


i am wondering why it sounds imho good and reasonable with ksmps = 1 but
different and questionable at ksmps = 32.

maybe someone could explain? ( i have tried here a small modification
and made the env a-rate but it didnt help)

i have compiled and installed the newest version from the dev branch for
checking on ubuntu.

thx, christian

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

Date2020-01-03 12:03
FromChristian Bacher <000005d2745f1ec0-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] ksmps and phase modulation

ok, i see, thank you very much, works now in a udo with ksmps = 1

i have not looked at that issue as in the examples i studied (harrington, floss etc)  ksmps was not set to 1. But it has a huge impact to do so.

On 1/3/20 10:48 AM, Victor Lazzarini wrote:
Actually, I am very wrong. I should not answer emails before breakfast. Did not
even see if it had feedback.

Josh and Rory are right. You need ksmps=1 for 1 sample feedback. Your feedback period is dependent on ksmps.

Sorry for the noise. I'll shut up now. :)

Prof. Victor Lazzarini
Maynooth University
Ireland

On 3 Jan 2020, at 09:34, Rory Walsh <rorywalsh@ear.ie> wrote:

Ok. What Victor said 🤣

On Fri 3 Jan 2020, 10:33 Rory Walsh, <rorywalsh@ear.ie> wrote:
With ksmps set to 32, audio is processed in blocks of 32 samples. This gives a minimum feedback delay of 32 samples. Setting it to 1 means you can pass the last sample straight back into the processing chain. Rather than setting global kmsps to 1, you can put the PM stuff in a UDO. Victor presents a nice example in the latest Csound book. The code is in GitHub. 

On Fri 3 Jan 2020, 01:41 Josh Moore, <kh405.7h30ry@gmail.com> wrote:
You need ksmps of 1 for sample accuracy... 

On Thu, Jan 2, 2020, 3:03 PM Christian Bacher <000005d2745f1ec0-dmarc-request@listserv.heanet.ie> wrote:
i have encountered some issues when experimenting with a pm synth and
could reduce the problem to the

example in the floss manuals:

<CsoundSynthesizer>
<CsOptions>
-o dac
</CsOptions>
<CsInstruments>
sr = 48000
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1  ; feedback PM
kCarFreq = 200
aFeedbackAmountEnv linseg 0, 2, 0.2, 0.1, 0.3, 0.8, 0.2, 1.5, 0
aAmpEnv expseg .001, 0.001, 1, 0.3, 0.5, 8.5, .001
aPhase phasor kCarFreq
aCarrier init 0 ; init for feedback
aCarrier tablei aPhase+(aCarrier*aFeedbackAmountEnv), 1, 1, 0, 1
outs aCarrier*aAmpEnv, aCarrier*aAmpEnv
endin

</CsInstruments>
<CsScore>
f 1 0 1024 10 1     ;Sine wave for table 1
i 1 0 9
</CsScore>
</CsoundSynthesizer>
; written by Alex Hofmann (Mar. 2011)


i am wondering why it sounds imho good and reasonable with ksmps = 1 but
different and questionable at ksmps = 32.

maybe someone could explain? ( i have tried here a small modification
and made the env a-rate but it didnt help)

i have compiled and installed the newest version from the dev branch for
checking on ubuntu.

thx, christian

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