Csound Csound-dev Csound-tekno Search About

[Csnd] Having legato issue, not tying from fractional p1s with overlapping dur

Date2022-04-26 03:05
FromIain Duncan
Subject[Csnd] Having legato issue, not tying from fractional p1s with overlapping dur
Hi folks, it seems I've forgotten something critical about legato works and can't figure it out. In the code below, my first transition is legato, and my second is not, but I thought that if I used fractional p1s to allocate specific voices and had overlapping durations it would be. Hoping someone can tell me what I'm doing wrong. I would like it to simply be tied on overlapping durations, but I guess I'm missing a step here.

thanks! 
iain

In brief:

i 2.1   0 -1 48 "frq1"
; transition here is legato, as expected from neg p3 above
i 2.1   1 1.1 53 "frq1"
; transition here is not legato what have I forgotten??? :-(
; I thought the use of numbered instances plus overlapping durs would make it so
i 2.1   2 1 48 "frq1"

Full code:
<CsoundSynthesizer>
<CsOptions>
</CsOptions>
; ==============================================
<CsInstruments>
sr = 44100
ksmps = 16
nchnls = 2
0dbfs = 1.1

; VCO housekeeping, from vco2 example
itmp    ftgen 1, 0, 16384, 7, 0, 2048, 1, 4096, 1, 4096, -1, 4096, -1, 2048, 0
ift     vco2init -1, 10000, 0, 0, 0, 1
itmp    ftgen 2, 0, 16384, 7, 1, 4095, 1, 1, -1, 4095, -1, 1, 0, 8192, 0
ift     vco2init -2, ift, 1.02, 4096, 4096, 2

; always on oscillator bank that reads frq from
; named channel passed in p4 (ie frq1, frq2)
instr 1
  ihold
  S_frq_chan strget p4
  kfrq chnget S_frq_chan
  aosc1 vco2 .1, kfrq * 1.00, 2, 0.5
  aosc2 vco2 .1, kfrq * 1.002, 2, 0.51
  aosc3 vco2 .1, kfrq * 0.997, 2, 0.49
  asig = aosc1 + aosc2 + aosc3
  outs asig, asig
endin

; legato pitch control instr
; gets target pitch from midi note num in p4
; writes pitch ksignal to named channel from p5
instr 2
  S_frq_chan strget p5
  ifrq mtof p4
  tigoto tied_init
    iglide init 0.5       ; glide time in sec
    ifrqstart init ifrq
    kfrq init ifrq
    igoto continue
  tied_init:
    ifrqstart = i(kfrq)  
  continue:
    kfrq linseg ifrqstart, iglide, ifrq;
    chnset kfrq, S_frq_chan
endin

</CsInstruments>

; ==============================================
<CsScore>
f0 3600

; turn on the oscillators
i 1.1 0 1 "frq1"  
i 1.2 0 1 "frq2"  
i 1.3 0 1 "frq3"

; pitch control instrument calls
i 2.1   0 -1 48 "frq1"
i 2.2   0 -1 52 "frq2"
i 2.3   0 -1 55 "frq3"
; transition here is legato, as expected from neg p3 above
i 2.1   1 1.1 53 "frq1"
i 2.2   1 1.1 57 "frq2"
i 2.3   1 1.1 60 "frq3"
; transition here is not legato what have I forgotten??? :-(
; I thought the use of numbered instances plus overlapping durs would make it so
i 2.1   2 1 48 "frq1"
i 2.2   2 1 52 "frq2"
i 2.3   2 1 55 "frq3"


</CsScore>
</CsoundSynthesizer>

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

Date2022-04-26 03:14
FromSteven Yi
SubjectRe: [Csnd] Having legato issue, not tying from fractional p1s with overlapping dur
I think it's that your middle notes aren't tied to the third notes
since they do not have negative p3's. The negative p3's are what gets
it to be tied, and using the fractions is what allows for specifying
which instances tie to others.

On Mon, Apr 25, 2022 at 10:05 PM Iain Duncan  wrote:
>
> Hi folks, it seems I've forgotten something critical about legato works and can't figure it out. In the code below, my first transition is legato, and my second is not, but I thought that if I used fractional p1s to allocate specific voices and had overlapping durations it would be. Hoping someone can tell me what I'm doing wrong. I would like it to simply be tied on overlapping durations, but I guess I'm missing a step here.
>
> thanks!
> iain
>
> In brief:
>
> i 2.1   0 -1 48 "frq1"
> ; transition here is legato, as expected from neg p3 above
> i 2.1   1 1.1 53 "frq1"
> ; transition here is not legato what have I forgotten??? :-(
> ; I thought the use of numbered instances plus overlapping durs would make it so
> i 2.1   2 1 48 "frq1"
>
> Full code:
> 
> 
> 
> ; ==============================================
> 
> sr = 44100
> ksmps = 16
> nchnls = 2
> 0dbfs = 1.1
>
> ; VCO housekeeping, from vco2 example
> itmp    ftgen 1, 0, 16384, 7, 0, 2048, 1, 4096, 1, 4096, -1, 4096, -1, 2048, 0
> ift     vco2init -1, 10000, 0, 0, 0, 1
> itmp    ftgen 2, 0, 16384, 7, 1, 4095, 1, 1, -1, 4095, -1, 1, 0, 8192, 0
> ift     vco2init -2, ift, 1.02, 4096, 4096, 2
>
> ; always on oscillator bank that reads frq from
> ; named channel passed in p4 (ie frq1, frq2)
> instr 1
>   ihold
>   S_frq_chan strget p4
>   kfrq chnget S_frq_chan
>   aosc1 vco2 .1, kfrq * 1.00, 2, 0.5
>   aosc2 vco2 .1, kfrq * 1.002, 2, 0.51
>   aosc3 vco2 .1, kfrq * 0.997, 2, 0.49
>   asig = aosc1 + aosc2 + aosc3
>   outs asig, asig
> endin
>
> ; legato pitch control instr
> ; gets target pitch from midi note num in p4
> ; writes pitch ksignal to named channel from p5
> instr 2
>   S_frq_chan strget p5
>   ifrq mtof p4
>   tigoto tied_init
>     iglide init 0.5       ; glide time in sec
>     ifrqstart init ifrq
>     kfrq init ifrq
>     igoto continue
>   tied_init:
>     ifrqstart = i(kfrq)
>   continue:
>     kfrq linseg ifrqstart, iglide, ifrq;
>     chnset kfrq, S_frq_chan
> endin
>
> 
>
> ; ==============================================
> 
> f0 3600
>
> ; turn on the oscillators
> i 1.1 0 1 "frq1"
> i 1.2 0 1 "frq2"
> i 1.3 0 1 "frq3"
>
> ; pitch control instrument calls
> i 2.1   0 -1 48 "frq1"
> i 2.2   0 -1 52 "frq2"
> i 2.3   0 -1 55 "frq3"
> ; transition here is legato, as expected from neg p3 above
> i 2.1   1 1.1 53 "frq1"
> i 2.2   1 1.1 57 "frq2"
> i 2.3   1 1.1 60 "frq3"
> ; transition here is not legato what have I forgotten??? :-(
> ; I thought the use of numbered instances plus overlapping durs would make it so
> i 2.1   2 1 48 "frq1"
> i 2.2   2 1 52 "frq2"
> i 2.3   2 1 55 "frq3"
>
>
> 
> 
>
> 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

Date2022-04-26 03:28
FromIain Duncan
SubjectRe: [Csnd] Having legato issue, not tying from fractional p1s with overlapping dur
Thanks Steven. But here's what has me confused... if I use negative p3s, then a shorter note does not become detached, because all negative p3s play forever. Maybe I'm out of luck "for historical reasons", but wouldn't it make sense that if we use a specific voice allocator with fractional p1s, overlapping durations would automatically be legato?  The below doesn't work either, because the negative p3s force a hold. 

I'm guessing this is going to be one of those things where backwards compatibility rears its head, but doesn't that seem like the way specific voice allocation ought to work? (That going from 1.1 to 1.1 should be legato if times overlap, and not if not.) Is there a way to simulate that without having to resort to separate instruments for each oscillator?

thanks
iain

Here's my revised example..
; pitch control instrument calls
i 2.1   0 -1 48 "frq1"
; transition here is legato, as expected from neg p3 above
i 2.1   1 -0.5 53 "frq1"
; transition here is also legato, even though the duration of 0.5 should not be an overlap.
i 2.1   2 -1 48 "frq1"

On Mon, Apr 25, 2022 at 7:14 PM Steven Yi <stevenyi@gmail.com> wrote:
I think it's that your middle notes aren't tied to the third notes
since they do not have negative p3's. The negative p3's are what gets
it to be tied, and using the fractions is what allows for specifying
which instances tie to others.

On Mon, Apr 25, 2022 at 10:05 PM Iain Duncan <iainduncanlists@gmail.com> wrote:
>
> Hi folks, it seems I've forgotten something critical about legato works and can't figure it out. In the code below, my first transition is legato, and my second is not, but I thought that if I used fractional p1s to allocate specific voices and had overlapping durations it would be. Hoping someone can tell me what I'm doing wrong. I would like it to simply be tied on overlapping durations, but I guess I'm missing a step here.
>
> thanks!
> iain
>
> In brief:
>
> i 2.1   0 -1 48 "frq1"
> ; transition here is legato, as expected from neg p3 above
> i 2.1   1 1.1 53 "frq1"
> ; transition here is not legato what have I forgotten??? :-(
> ; I thought the use of numbered instances plus overlapping durs would make it so
> i 2.1   2 1 48 "frq1"
>
> Full code:
> <CsoundSynthesizer>
> <CsOptions>
> </CsOptions>
> ; ==============================================
> <CsInstruments>
> sr = 44100
> ksmps = 16
> nchnls = 2
> 0dbfs = 1.1
>
> ; VCO housekeeping, from vco2 example
> itmp    ftgen 1, 0, 16384, 7, 0, 2048, 1, 4096, 1, 4096, -1, 4096, -1, 2048, 0
> ift     vco2init -1, 10000, 0, 0, 0, 1
> itmp    ftgen 2, 0, 16384, 7, 1, 4095, 1, 1, -1, 4095, -1, 1, 0, 8192, 0
> ift     vco2init -2, ift, 1.02, 4096, 4096, 2
>
> ; always on oscillator bank that reads frq from
> ; named channel passed in p4 (ie frq1, frq2)
> instr 1
>   ihold
>   S_frq_chan strget p4
>   kfrq chnget S_frq_chan
>   aosc1 vco2 .1, kfrq * 1.00, 2, 0.5
>   aosc2 vco2 .1, kfrq * 1.002, 2, 0.51
>   aosc3 vco2 .1, kfrq * 0.997, 2, 0.49
>   asig = aosc1 + aosc2 + aosc3
>   outs asig, asig
> endin
>
> ; legato pitch control instr
> ; gets target pitch from midi note num in p4
> ; writes pitch ksignal to named channel from p5
> instr 2
>   S_frq_chan strget p5
>   ifrq mtof p4
>   tigoto tied_init
>     iglide init 0.5       ; glide time in sec
>     ifrqstart init ifrq
>     kfrq init ifrq
>     igoto continue
>   tied_init:
>     ifrqstart = i(kfrq)
>   continue:
>     kfrq linseg ifrqstart, iglide, ifrq;
>     chnset kfrq, S_frq_chan
> endin
>
> </CsInstruments>
>
> ; ==============================================
> <CsScore>
> f0 3600
>
> ; turn on the oscillators
> i 1.1 0 1 "frq1"
> i 1.2 0 1 "frq2"
> i 1.3 0 1 "frq3"
>
> ; pitch control instrument calls
> i 2.1   0 -1 48 "frq1"
> i 2.2   0 -1 52 "frq2"
> i 2.3   0 -1 55 "frq3"
> ; transition here is legato, as expected from neg p3 above
> i 2.1   1 1.1 53 "frq1"
> i 2.2   1 1.1 57 "frq2"
> i 2.3   1 1.1 60 "frq3"
> ; transition here is not legato what have I forgotten??? :-(
> ; I thought the use of numbered instances plus overlapping durs would make it so
> i 2.1   2 1 48 "frq1"
> i 2.2   2 1 52 "frq2"
> i 2.3   2 1 55 "frq3"
>
>
> </CsScore>
> </CsoundSynthesizer>
>
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

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

Date2022-04-26 05:54
FromForrest Curo
SubjectRe: [Csnd] Having legato issue, not tying from fractional p1s with overlapping dur
The duration of -0.5 is not 0.5; it's simply indefinite. No matter what number you put after the '-', the note lasts until a turnoff comes along, or another note replaces it.

On Mon, Apr 25, 2022 at 7:28 PM Iain Duncan <iainduncanlists@gmail.com> wrote:
Thanks Steven. But here's what has me confused... if I use negative p3s, then a shorter note does not become detached, because all negative p3s play forever. Maybe I'm out of luck "for historical reasons", but wouldn't it make sense that if we use a specific voice allocator with fractional p1s, overlapping durations would automatically be legato?  The below doesn't work either, because the negative p3s force a hold. 

I'm guessing this is going to be one of those things where backwards compatibility rears its head, but doesn't that seem like the way specific voice allocation ought to work? (That going from 1.1 to 1.1 should be legato if times overlap, and not if not.) Is there a way to simulate that without having to resort to separate instruments for each oscillator?

thanks
iain

Here's my revised example..
; pitch control instrument calls
i 2.1   0 -1 48 "frq1"
; transition here is legato, as expected from neg p3 above
i 2.1   1 -0.5 53 "frq1"
; transition here is also legato, even though the duration of 0.5 should not be an overlap.
i 2.1   2 -1 48 "frq1"

On Mon, Apr 25, 2022 at 7:14 PM Steven Yi <stevenyi@gmail.com> wrote:
I think it's that your middle notes aren't tied to the third notes
since they do not have negative p3's. The negative p3's are what gets
it to be tied, and using the fractions is what allows for specifying
which instances tie to others.

On Mon, Apr 25, 2022 at 10:05 PM Iain Duncan <iainduncanlists@gmail.com> wrote:
>
> Hi folks, it seems I've forgotten something critical about legato works and can't figure it out. In the code below, my first transition is legato, and my second is not, but I thought that if I used fractional p1s to allocate specific voices and had overlapping durations it would be. Hoping someone can tell me what I'm doing wrong. I would like it to simply be tied on overlapping durations, but I guess I'm missing a step here.
>
> thanks!
> iain
>
> In brief:
>
> i 2.1   0 -1 48 "frq1"
> ; transition here is legato, as expected from neg p3 above
> i 2.1   1 1.1 53 "frq1"
> ; transition here is not legato what have I forgotten??? :-(
> ; I thought the use of numbered instances plus overlapping durs would make it so
> i 2.1   2 1 48 "frq1"
>
> Full code:
> <CsoundSynthesizer>
> <CsOptions>
> </CsOptions>
> ; ==============================================
> <CsInstruments>
> sr = 44100
> ksmps = 16
> nchnls = 2
> 0dbfs = 1.1
>
> ; VCO housekeeping, from vco2 example
> itmp    ftgen 1, 0, 16384, 7, 0, 2048, 1, 4096, 1, 4096, -1, 4096, -1, 2048, 0
> ift     vco2init -1, 10000, 0, 0, 0, 1
> itmp    ftgen 2, 0, 16384, 7, 1, 4095, 1, 1, -1, 4095, -1, 1, 0, 8192, 0
> ift     vco2init -2, ift, 1.02, 4096, 4096, 2
>
> ; always on oscillator bank that reads frq from
> ; named channel passed in p4 (ie frq1, frq2)
> instr 1
>   ihold
>   S_frq_chan strget p4
>   kfrq chnget S_frq_chan
>   aosc1 vco2 .1, kfrq * 1.00, 2, 0.5
>   aosc2 vco2 .1, kfrq * 1.002, 2, 0.51
>   aosc3 vco2 .1, kfrq * 0.997, 2, 0.49
>   asig = aosc1 + aosc2 + aosc3
>   outs asig, asig
> endin
>
> ; legato pitch control instr
> ; gets target pitch from midi note num in p4
> ; writes pitch ksignal to named channel from p5
> instr 2
>   S_frq_chan strget p5
>   ifrq mtof p4
>   tigoto tied_init
>     iglide init 0.5       ; glide time in sec
>     ifrqstart init ifrq
>     kfrq init ifrq
>     igoto continue
>   tied_init:
>     ifrqstart = i(kfrq)
>   continue:
>     kfrq linseg ifrqstart, iglide, ifrq;
>     chnset kfrq, S_frq_chan
> endin
>
> </CsInstruments>
>
> ; ==============================================
> <CsScore>
> f0 3600
>
> ; turn on the oscillators
> i 1.1 0 1 "frq1"
> i 1.2 0 1 "frq2"
> i 1.3 0 1 "frq3"
>
> ; pitch control instrument calls
> i 2.1   0 -1 48 "frq1"
> i 2.2   0 -1 52 "frq2"
> i 2.3   0 -1 55 "frq3"
> ; transition here is legato, as expected from neg p3 above
> i 2.1   1 1.1 53 "frq1"
> i 2.2   1 1.1 57 "frq2"
> i 2.3   1 1.1 60 "frq3"
> ; transition here is not legato what have I forgotten??? :-(
> ; I thought the use of numbered instances plus overlapping durs would make it so
> i 2.1   2 1 48 "frq1"
> i 2.2   2 1 52 "frq2"
> i 2.3   2 1 55 "frq3"
>
>
> </CsScore>
> </CsoundSynthesizer>
>
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

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

Date2022-04-26 06:40
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] Re: [Csnd] Having legato issue, not tying from fractional p1s with overlapping dur
I would have thought a negative p1 stops a corresponding negative p3 note.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 26 Apr 2022, at 03:30, Iain Duncan <iainduncanlists@gmail.com> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

Thanks Steven. But here's what has me confused... if I use negative p3s, then a shorter note does not become detached, because all negative p3s play forever. Maybe I'm out of luck "for historical reasons", but wouldn't it make sense that if we use a specific voice allocator with fractional p1s, overlapping durations would automatically be legato?  The below doesn't work either, because the negative p3s force a hold. 

I'm guessing this is going to be one of those things where backwards compatibility rears its head, but doesn't that seem like the way specific voice allocation ought to work? (That going from 1.1 to 1.1 should be legato if times overlap, and not if not.) Is there a way to simulate that without having to resort to separate instruments for each oscillator?

thanks
iain

Here's my revised example..
; pitch control instrument calls
i 2.1   0 -1 48 "frq1"
; transition here is legato, as expected from neg p3 above
i 2.1   1 -0.5 53 "frq1"
; transition here is also legato, even though the duration of 0.5 should not be an overlap.
i 2.1   2 -1 48 "frq1"

On Mon, Apr 25, 2022 at 7:14 PM Steven Yi <stevenyi@gmail.com> wrote:
I think it's that your middle notes aren't tied to the third notes
since they do not have negative p3's. The negative p3's are what gets
it to be tied, and using the fractions is what allows for specifying
which instances tie to others.

On Mon, Apr 25, 2022 at 10:05 PM Iain Duncan <iainduncanlists@gmail.com> wrote:
>
> Hi folks, it seems I've forgotten something critical about legato works and can't figure it out. In the code below, my first transition is legato, and my second is not, but I thought that if I used fractional p1s to allocate specific voices and had overlapping durations it would be. Hoping someone can tell me what I'm doing wrong. I would like it to simply be tied on overlapping durations, but I guess I'm missing a step here.
>
> thanks!
> iain
>
> In brief:
>
> i 2.1   0 -1 48 "frq1"
> ; transition here is legato, as expected from neg p3 above
> i 2.1   1 1.1 53 "frq1"
> ; transition here is not legato what have I forgotten??? :-(
> ; I thought the use of numbered instances plus overlapping durs would make it so
> i 2.1   2 1 48 "frq1"
>
> Full code:
> <CsoundSynthesizer>
> <CsOptions>
> </CsOptions>
> ; ==============================================
> <CsInstruments>
> sr = 44100
> ksmps = 16
> nchnls = 2
> 0dbfs = 1.1
>
> ; VCO housekeeping, from vco2 example
> itmp    ftgen 1, 0, 16384, 7, 0, 2048, 1, 4096, 1, 4096, -1, 4096, -1, 2048, 0
> ift     vco2init -1, 10000, 0, 0, 0, 1
> itmp    ftgen 2, 0, 16384, 7, 1, 4095, 1, 1, -1, 4095, -1, 1, 0, 8192, 0
> ift     vco2init -2, ift, 1.02, 4096, 4096, 2
>
> ; always on oscillator bank that reads frq from
> ; named channel passed in p4 (ie frq1, frq2)
> instr 1
>   ihold
>   S_frq_chan strget p4
>   kfrq chnget S_frq_chan
>   aosc1 vco2 .1, kfrq * 1.00, 2, 0.5
>   aosc2 vco2 .1, kfrq * 1.002, 2, 0.51
>   aosc3 vco2 .1, kfrq * 0.997, 2, 0.49
>   asig = aosc1 + aosc2 + aosc3
>   outs asig, asig
> endin
>
> ; legato pitch control instr
> ; gets target pitch from midi note num in p4
> ; writes pitch ksignal to named channel from p5
> instr 2
>   S_frq_chan strget p5
>   ifrq mtof p4
>   tigoto tied_init
>     iglide init 0.5       ; glide time in sec
>     ifrqstart init ifrq
>     kfrq init ifrq
>     igoto continue
>   tied_init:
>     ifrqstart = i(kfrq)
>   continue:
>     kfrq linseg ifrqstart, iglide, ifrq;
>     chnset kfrq, S_frq_chan
> endin
>
> </CsInstruments>
>
> ; ==============================================
> <CsScore>
> f0 3600
>
> ; turn on the oscillators
> i 1.1 0 1 "frq1"
> i 1.2 0 1 "frq2"
> i 1.3 0 1 "frq3"
>
> ; pitch control instrument calls
> i 2.1   0 -1 48 "frq1"
> i 2.2   0 -1 52 "frq2"
> i 2.3   0 -1 55 "frq3"
> ; transition here is legato, as expected from neg p3 above
> i 2.1   1 1.1 53 "frq1"
> i 2.2   1 1.1 57 "frq2"
> i 2.3   1 1.1 60 "frq3"
> ; transition here is not legato what have I forgotten??? :-(
> ; I thought the use of numbered instances plus overlapping durs would make it so
> i 2.1   2 1 48 "frq1"
> i 2.2   2 1 52 "frq2"
> i 2.3   2 1 55 "frq3"
>
>
> </CsScore>
> </CsoundSynthesizer>
>
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

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

Date2022-04-26 09:18
FromSteven Yi
SubjectRe: [Csnd] Having legato issue, not tying from fractional p1s with overlapping dur
Attachmentsglide.csd  
I'd try a different design:

1. use held notes (negative p3) for all durations
2. make glide time = abs(p3)
3. use linseg(ifrqstart, iglidetime, ifrq, 1, ifrq) so that the final
value will hold
4. initialize ifrqstart always to the value from the channel using
chnget:i() to read at init time so that it will always start off from
the last written value in the channel

That said, I just put together an example but found it doesn't work
with Csound 6.17 due a bug that was introduced that has to do with
strings and chnset. (Came across it the other day when testing an
older project that used to work; came across the bug again now here.)

I've attached an example I was writing that should have worked. Would
probably work if you ignored generating the channel name using
sprintf. Will raise the issue on csound-dev to diagnose further.

On Mon, Apr 25, 2022 at 10:28 PM Iain Duncan  wrote:
>
> Thanks Steven. But here's what has me confused... if I use negative p3s, then a shorter note does not become detached, because all negative p3s play forever. Maybe I'm out of luck "for historical reasons", but wouldn't it make sense that if we use a specific voice allocator with fractional p1s, overlapping durations would automatically be legato?  The below doesn't work either, because the negative p3s force a hold.
>
> I'm guessing this is going to be one of those things where backwards compatibility rears its head, but doesn't that seem like the way specific voice allocation ought to work? (That going from 1.1 to 1.1 should be legato if times overlap, and not if not.) Is there a way to simulate that without having to resort to separate instruments for each oscillator?
>
> thanks
> iain
>
> Here's my revised example..
> ; pitch control instrument calls
> i 2.1   0 -1 48 "frq1"
> ; transition here is legato, as expected from neg p3 above
> i 2.1   1 -0.5 53 "frq1"
> ; transition here is also legato, even though the duration of 0.5 should not be an overlap.
> i 2.1   2 -1 48 "frq1"
>
> On Mon, Apr 25, 2022 at 7:14 PM Steven Yi  wrote:
>>
>> I think it's that your middle notes aren't tied to the third notes
>> since they do not have negative p3's. The negative p3's are what gets
>> it to be tied, and using the fractions is what allows for specifying
>> which instances tie to others.
>>
>> On Mon, Apr 25, 2022 at 10:05 PM Iain Duncan  wrote:
>> >
>> > Hi folks, it seems I've forgotten something critical about legato works and can't figure it out. In the code below, my first transition is legato, and my second is not, but I thought that if I used fractional p1s to allocate specific voices and had overlapping durations it would be. Hoping someone can tell me what I'm doing wrong. I would like it to simply be tied on overlapping durations, but I guess I'm missing a step here.
>> >
>> > thanks!
>> > iain
>> >
>> > In brief:
>> >
>> > i 2.1   0 -1 48 "frq1"
>> > ; transition here is legato, as expected from neg p3 above
>> > i 2.1   1 1.1 53 "frq1"
>> > ; transition here is not legato what have I forgotten??? :-(
>> > ; I thought the use of numbered instances plus overlapping durs would make it so
>> > i 2.1   2 1 48 "frq1"
>> >
>> > Full code:
>> > 
>> > 
>> > 
>> > ; ==============================================
>> > 
>> > sr = 44100
>> > ksmps = 16
>> > nchnls = 2
>> > 0dbfs = 1.1
>> >
>> > ; VCO housekeeping, from vco2 example
>> > itmp    ftgen 1, 0, 16384, 7, 0, 2048, 1, 4096, 1, 4096, -1, 4096, -1, 2048, 0
>> > ift     vco2init -1, 10000, 0, 0, 0, 1
>> > itmp    ftgen 2, 0, 16384, 7, 1, 4095, 1, 1, -1, 4095, -1, 1, 0, 8192, 0
>> > ift     vco2init -2, ift, 1.02, 4096, 4096, 2
>> >
>> > ; always on oscillator bank that reads frq from
>> > ; named channel passed in p4 (ie frq1, frq2)
>> > instr 1
>> >   ihold
>> >   S_frq_chan strget p4
>> >   kfrq chnget S_frq_chan
>> >   aosc1 vco2 .1, kfrq * 1.00, 2, 0.5
>> >   aosc2 vco2 .1, kfrq * 1.002, 2, 0.51
>> >   aosc3 vco2 .1, kfrq * 0.997, 2, 0.49
>> >   asig = aosc1 + aosc2 + aosc3
>> >   outs asig, asig
>> > endin
>> >
>> > ; legato pitch control instr
>> > ; gets target pitch from midi note num in p4
>> > ; writes pitch ksignal to named channel from p5
>> > instr 2
>> >   S_frq_chan strget p5
>> >   ifrq mtof p4
>> >   tigoto tied_init
>> >     iglide init 0.5       ; glide time in sec
>> >     ifrqstart init ifrq
>> >     kfrq init ifrq
>> >     igoto continue
>> >   tied_init:
>> >     ifrqstart = i(kfrq)
>> >   continue:
>> >     kfrq linseg ifrqstart, iglide, ifrq;
>> >     chnset kfrq, S_frq_chan
>> > endin
>> >
>> > 
>> >
>> > ; ==============================================
>> > 
>> > f0 3600
>> >
>> > ; turn on the oscillators
>> > i 1.1 0 1 "frq1"
>> > i 1.2 0 1 "frq2"
>> > i 1.3 0 1 "frq3"
>> >
>> > ; pitch control instrument calls
>> > i 2.1   0 -1 48 "frq1"
>> > i 2.2   0 -1 52 "frq2"
>> > i 2.3   0 -1 55 "frq3"
>> > ; transition here is legato, as expected from neg p3 above
>> > i 2.1   1 1.1 53 "frq1"
>> > i 2.2   1 1.1 57 "frq2"
>> > i 2.3   1 1.1 60 "frq3"
>> > ; transition here is not legato what have I forgotten??? :-(
>> > ; I thought the use of numbered instances plus overlapping durs would make it so
>> > i 2.1   2 1 48 "frq1"
>> > i 2.2   2 1 52 "frq2"
>> > i 2.3   2 1 55 "frq3"
>> >
>> >
>> > 
>> > 
>> >
>> > 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

Date2022-04-26 14:16
FromForrest Curo
SubjectRe: [Csnd] Having legato issue, not tying from fractional p1s with overlapping dur
Anyway, yes, I see that a negative p1 is another way to turn off an instrument with an negative p3. The point is, it will not turn off on its own.

On Tue, Apr 26, 2022 at 1:18 AM Steven Yi <stevenyi@gmail.com> wrote:
I'd try a different design:

1. use held notes (negative p3) for all durations
2. make glide time = abs(p3)
3. use linseg(ifrqstart, iglidetime, ifrq, 1, ifrq) so that the final
value will hold
4. initialize ifrqstart always to the value from the channel using
chnget:i() to read at init time so that it will always start off from
the last written value in the channel

That said, I just put together an example but found it doesn't work
with Csound 6.17 due a bug that was introduced that has to do with
strings and chnset. (Came across it the other day when testing an
older project that used to work; came across the bug again now here.)

I've attached an example I was writing that should have worked. Would
probably work if you ignored generating the channel name using
sprintf. Will raise the issue on csound-dev to diagnose further.

On Mon, Apr 25, 2022 at 10:28 PM Iain Duncan <iainduncanlists@gmail.com> wrote:
>
> Thanks Steven. But here's what has me confused... if I use negative p3s, then a shorter note does not become detached, because all negative p3s play forever. Maybe I'm out of luck "for historical reasons", but wouldn't it make sense that if we use a specific voice allocator with fractional p1s, overlapping durations would automatically be legato?  The below doesn't work either, because the negative p3s force a hold.
>
> I'm guessing this is going to be one of those things where backwards compatibility rears its head, but doesn't that seem like the way specific voice allocation ought to work? (That going from 1.1 to 1.1 should be legato if times overlap, and not if not.) Is there a way to simulate that without having to resort to separate instruments for each oscillator?
>
> thanks
> iain
>
> Here's my revised example..
> ; pitch control instrument calls
> i 2.1   0 -1 48 "frq1"
> ; transition here is legato, as expected from neg p3 above
> i 2.1   1 -0.5 53 "frq1"
> ; transition here is also legato, even though the duration of 0.5 should not be an overlap.
> i 2.1   2 -1 48 "frq1"
>
> On Mon, Apr 25, 2022 at 7:14 PM Steven Yi <stevenyi@gmail.com> wrote:
>>
>> I think it's that your middle notes aren't tied to the third notes
>> since they do not have negative p3's. The negative p3's are what gets
>> it to be tied, and using the fractions is what allows for specifying
>> which instances tie to others.
>>
>> On Mon, Apr 25, 2022 at 10:05 PM Iain Duncan <iainduncanlists@gmail.com> wrote:
>> >
>> > Hi folks, it seems I've forgotten something critical about legato works and can't figure it out. In the code below, my first transition is legato, and my second is not, but I thought that if I used fractional p1s to allocate specific voices and had overlapping durations it would be. Hoping someone can tell me what I'm doing wrong. I would like it to simply be tied on overlapping durations, but I guess I'm missing a step here.
>> >
>> > thanks!
>> > iain
>> >
>> > In brief:
>> >
>> > i 2.1   0 -1 48 "frq1"
>> > ; transition here is legato, as expected from neg p3 above
>> > i 2.1   1 1.1 53 "frq1"
>> > ; transition here is not legato what have I forgotten??? :-(
>> > ; I thought the use of numbered instances plus overlapping durs would make it so
>> > i 2.1   2 1 48 "frq1"
>> >
>> > Full code:
>> > <CsoundSynthesizer>
>> > <CsOptions>
>> > </CsOptions>
>> > ; ==============================================
>> > <CsInstruments>
>> > sr = 44100
>> > ksmps = 16
>> > nchnls = 2
>> > 0dbfs = 1.1
>> >
>> > ; VCO housekeeping, from vco2 example
>> > itmp    ftgen 1, 0, 16384, 7, 0, 2048, 1, 4096, 1, 4096, -1, 4096, -1, 2048, 0
>> > ift     vco2init -1, 10000, 0, 0, 0, 1
>> > itmp    ftgen 2, 0, 16384, 7, 1, 4095, 1, 1, -1, 4095, -1, 1, 0, 8192, 0
>> > ift     vco2init -2, ift, 1.02, 4096, 4096, 2
>> >
>> > ; always on oscillator bank that reads frq from
>> > ; named channel passed in p4 (ie frq1, frq2)
>> > instr 1
>> >   ihold
>> >   S_frq_chan strget p4
>> >   kfrq chnget S_frq_chan
>> >   aosc1 vco2 .1, kfrq * 1.00, 2, 0.5
>> >   aosc2 vco2 .1, kfrq * 1.002, 2, 0.51
>> >   aosc3 vco2 .1, kfrq * 0.997, 2, 0.49
>> >   asig = aosc1 + aosc2 + aosc3
>> >   outs asig, asig
>> > endin
>> >
>> > ; legato pitch control instr
>> > ; gets target pitch from midi note num in p4
>> > ; writes pitch ksignal to named channel from p5
>> > instr 2
>> >   S_frq_chan strget p5
>> >   ifrq mtof p4
>> >   tigoto tied_init
>> >     iglide init 0.5       ; glide time in sec
>> >     ifrqstart init ifrq
>> >     kfrq init ifrq
>> >     igoto continue
>> >   tied_init:
>> >     ifrqstart = i(kfrq)
>> >   continue:
>> >     kfrq linseg ifrqstart, iglide, ifrq;
>> >     chnset kfrq, S_frq_chan
>> > endin
>> >
>> > </CsInstruments>
>> >
>> > ; ==============================================
>> > <CsScore>
>> > f0 3600
>> >
>> > ; turn on the oscillators
>> > i 1.1 0 1 "frq1"
>> > i 1.2 0 1 "frq2"
>> > i 1.3 0 1 "frq3"
>> >
>> > ; pitch control instrument calls
>> > i 2.1   0 -1 48 "frq1"
>> > i 2.2   0 -1 52 "frq2"
>> > i 2.3   0 -1 55 "frq3"
>> > ; transition here is legato, as expected from neg p3 above
>> > i 2.1   1 1.1 53 "frq1"
>> > i 2.2   1 1.1 57 "frq2"
>> > i 2.3   1 1.1 60 "frq3"
>> > ; transition here is not legato what have I forgotten??? :-(
>> > ; I thought the use of numbered instances plus overlapping durs would make it so
>> > i 2.1   2 1 48 "frq1"
>> > i 2.2   2 1 52 "frq2"
>> > i 2.3   2 1 55 "frq3"
>> >
>> >
>> > </CsScore>
>> > </CsoundSynthesizer>
>> >
>> > Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
>>
>> 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

Date2022-04-26 15:06
FromIain Duncan
SubjectRe: [Csnd] Having legato issue, not tying from fractional p1s with overlapping dur
Thanks Steven, I will try that out later. I have 6.16 installed still so should be able to run it.

I understand about the negatives being forever, I just find it very inconsistent. I moved my thoughts on that to the dev list.

iain

On Tue, Apr 26, 2022 at 6:16 AM Forrest Curo <treegestalt@gmail.com> wrote:
Anyway, yes, I see that a negative p1 is another way to turn off an instrument with an negative p3. The point is, it will not turn off on its own.

On Tue, Apr 26, 2022 at 1:18 AM Steven Yi <stevenyi@gmail.com> wrote:
I'd try a different design:

1. use held notes (negative p3) for all durations
2. make glide time = abs(p3)
3. use linseg(ifrqstart, iglidetime, ifrq, 1, ifrq) so that the final
value will hold
4. initialize ifrqstart always to the value from the channel using
chnget:i() to read at init time so that it will always start off from
the last written value in the channel

That said, I just put together an example but found it doesn't work
with Csound 6.17 due a bug that was introduced that has to do with
strings and chnset. (Came across it the other day when testing an
older project that used to work; came across the bug again now here.)

I've attached an example I was writing that should have worked. Would
probably work if you ignored generating the channel name using
sprintf. Will raise the issue on csound-dev to diagnose further.

On Mon, Apr 25, 2022 at 10:28 PM Iain Duncan <iainduncanlists@gmail.com> wrote:
>
> Thanks Steven. But here's what has me confused... if I use negative p3s, then a shorter note does not become detached, because all negative p3s play forever. Maybe I'm out of luck "for historical reasons", but wouldn't it make sense that if we use a specific voice allocator with fractional p1s, overlapping durations would automatically be legato?  The below doesn't work either, because the negative p3s force a hold.
>
> I'm guessing this is going to be one of those things where backwards compatibility rears its head, but doesn't that seem like the way specific voice allocation ought to work? (That going from 1.1 to 1.1 should be legato if times overlap, and not if not.) Is there a way to simulate that without having to resort to separate instruments for each oscillator?
>
> thanks
> iain
>
> Here's my revised example..
> ; pitch control instrument calls
> i 2.1   0 -1 48 "frq1"
> ; transition here is legato, as expected from neg p3 above
> i 2.1   1 -0.5 53 "frq1"
> ; transition here is also legato, even though the duration of 0.5 should not be an overlap.
> i 2.1   2 -1 48 "frq1"
>
> On Mon, Apr 25, 2022 at 7:14 PM Steven Yi <stevenyi@gmail.com> wrote:
>>
>> I think it's that your middle notes aren't tied to the third notes
>> since they do not have negative p3's. The negative p3's are what gets
>> it to be tied, and using the fractions is what allows for specifying
>> which instances tie to others.
>>
>> On Mon, Apr 25, 2022 at 10:05 PM Iain Duncan <iainduncanlists@gmail.com> wrote:
>> >
>> > Hi folks, it seems I've forgotten something critical about legato works and can't figure it out. In the code below, my first transition is legato, and my second is not, but I thought that if I used fractional p1s to allocate specific voices and had overlapping durations it would be. Hoping someone can tell me what I'm doing wrong. I would like it to simply be tied on overlapping durations, but I guess I'm missing a step here.
>> >
>> > thanks!
>> > iain
>> >
>> > In brief:
>> >
>> > i 2.1   0 -1 48 "frq1"
>> > ; transition here is legato, as expected from neg p3 above
>> > i 2.1   1 1.1 53 "frq1"
>> > ; transition here is not legato what have I forgotten??? :-(
>> > ; I thought the use of numbered instances plus overlapping durs would make it so
>> > i 2.1   2 1 48 "frq1"
>> >
>> > Full code:
>> > <CsoundSynthesizer>
>> > <CsOptions>
>> > </CsOptions>
>> > ; ==============================================
>> > <CsInstruments>
>> > sr = 44100
>> > ksmps = 16
>> > nchnls = 2
>> > 0dbfs = 1.1
>> >
>> > ; VCO housekeeping, from vco2 example
>> > itmp    ftgen 1, 0, 16384, 7, 0, 2048, 1, 4096, 1, 4096, -1, 4096, -1, 2048, 0
>> > ift     vco2init -1, 10000, 0, 0, 0, 1
>> > itmp    ftgen 2, 0, 16384, 7, 1, 4095, 1, 1, -1, 4095, -1, 1, 0, 8192, 0
>> > ift     vco2init -2, ift, 1.02, 4096, 4096, 2
>> >
>> > ; always on oscillator bank that reads frq from
>> > ; named channel passed in p4 (ie frq1, frq2)
>> > instr 1
>> >   ihold
>> >   S_frq_chan strget p4
>> >   kfrq chnget S_frq_chan
>> >   aosc1 vco2 .1, kfrq * 1.00, 2, 0.5
>> >   aosc2 vco2 .1, kfrq * 1.002, 2, 0.51
>> >   aosc3 vco2 .1, kfrq * 0.997, 2, 0.49
>> >   asig = aosc1 + aosc2 + aosc3
>> >   outs asig, asig
>> > endin
>> >
>> > ; legato pitch control instr
>> > ; gets target pitch from midi note num in p4
>> > ; writes pitch ksignal to named channel from p5
>> > instr 2
>> >   S_frq_chan strget p5
>> >   ifrq mtof p4
>> >   tigoto tied_init
>> >     iglide init 0.5       ; glide time in sec
>> >     ifrqstart init ifrq
>> >     kfrq init ifrq
>> >     igoto continue
>> >   tied_init:
>> >     ifrqstart = i(kfrq)
>> >   continue:
>> >     kfrq linseg ifrqstart, iglide, ifrq;
>> >     chnset kfrq, S_frq_chan
>> > endin
>> >
>> > </CsInstruments>
>> >
>> > ; ==============================================
>> > <CsScore>
>> > f0 3600
>> >
>> > ; turn on the oscillators
>> > i 1.1 0 1 "frq1"
>> > i 1.2 0 1 "frq2"
>> > i 1.3 0 1 "frq3"
>> >
>> > ; pitch control instrument calls
>> > i 2.1   0 -1 48 "frq1"
>> > i 2.2   0 -1 52 "frq2"
>> > i 2.3   0 -1 55 "frq3"
>> > ; transition here is legato, as expected from neg p3 above
>> > i 2.1   1 1.1 53 "frq1"
>> > i 2.2   1 1.1 57 "frq2"
>> > i 2.3   1 1.1 60 "frq3"
>> > ; transition here is not legato what have I forgotten??? :-(
>> > ; I thought the use of numbered instances plus overlapping durs would make it so
>> > i 2.1   2 1 48 "frq1"
>> > i 2.2   2 1 52 "frq2"
>> > i 2.3   2 1 55 "frq3"
>> >
>> >
>> > </CsScore>
>> > </CsoundSynthesizer>
>> >
>> > Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
>>
>> 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