Csound Csound-dev Csound-tekno Search About

[Csnd] vco2init...

Date2021-11-15 13:05
FromRory Walsh
Subject[Csnd] vco2init...
I'm trying to use a custom waveform with the vco2 opcode, but I'm not getting the results I expect. Consider the following code.

gitable ftgen 1, 0, 16, 2, 0, -1, 0.1, -.5, .5, 1, 0, .5, -1, 0.1, -.5, .5, 1, 0
gi_nextfree vco2init -gitable, gitable+1, 1.01, 16, 2^16, gitable
gitable_bl = -gitable

instr 1
    kEnv madsr .1, .3, .7, .1
    kfn    vco2ft p4, gitable_bl
    asig   oscilikt p5*kEnv, p4, kfn
    ;asig vco2 p5*kEnv, p4, 14
    outs asig, asig
endin

Aliasing starts to appear around C7 on a keyboard. If I swap out the vco2ft and use a vco2 instead I get a similar result, but at a certain point it blows up:

  number of samples out of range:     1532     1532
  rtevent:   T  8.059 TT  8.059 M:38303999843885432520258064841565329771946742494741221801962820961020800752298138120353004414942616191341590740741052340150746300284022174263790044053759

The example in the manual seems to work fine. So what am I doing wrong, is my initial table too small? 
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

Date2021-11-15 14:24
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] vco2init...
I see this in the manual:

isrcft should point to a function table containing the waveform to be used for generating the table array. The table size is recommended to be at least imaxsiz points. 

You have a 16-pt table but your max size is 2^16

The manual example works fine.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 15 Nov 2021, at 13:05, Rory Walsh  wrote:
> 
> WARNINGThis 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.
> I'm trying to use a custom waveform with the vco2 opcode, but I'm not getting the results I expect. Consider the following code.
> 
> gitable ftgen 1, 0, 16, 2, 0, -1, 0.1, -.5, .5, 1, 0, .5, -1, 0.1, -.5, .5, 1, 0 
> gi_nextfree vco2init -gitable, gitable+1, 1.01, 16, 2^16, gitable
> gitable_bl = -gitable
> 
> instr 1
>     kEnv madsr .1, .3, .7, .1
>     kfn    vco2ft p4, gitable_bl
>     asig   oscilikt p5*kEnv, p4, kfn
>     ;asig vco2 p5*kEnv, p4, 14
>     outs asig, asig
> endin
> 
> Aliasing starts to appear around C7 on a keyboard. If I swap out the vco2ft and use a vco2 instead I get a similar result, but at a certain point it blows up:
> 
>   number of samples out of range:     1532     1532
>   rtevent:   T  8.059 TT  8.059 M:38303999843885432520258064841565329771946742494741221801962820961020800752298138120353004414942616191341590740741052340150746300284022174263790044053759
> 
> The example in the manual seems to work fine. So what am I doing wrong, is my initial table too small? 
> 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

Date2021-11-15 14:24
FromRory Walsh
SubjectRe: [Csnd] [EXTERNAL] [Csnd] vco2init...
Thanks Victor, I'll try that when I get a chance. I had a feeling I missed an important part of the puzzle.. 

On Mon, 15 Nov 2021 at 14:24, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I see this in the manual:

isrcft should point to a function table containing the waveform to be used for generating the table array. The table size is recommended to be at least imaxsiz points.

You have a 16-pt table but your max size is 2^16

The manual example works fine.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 15 Nov 2021, at 13:05, Rory Walsh <rorywalsh@ear.ie> wrote:
>
> WARNINGThis 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.
> I'm trying to use a custom waveform with the vco2 opcode, but I'm not getting the results I expect. Consider the following code.
>
> gitable ftgen 1, 0, 16, 2, 0, -1, 0.1, -.5, .5, 1, 0, .5, -1, 0.1, -.5, .5, 1, 0
> gi_nextfree vco2init -gitable, gitable+1, 1.01, 16, 2^16, gitable
> gitable_bl = -gitable
>
> instr 1
>     kEnv madsr .1, .3, .7, .1
>     kfn    vco2ft p4, gitable_bl
>     asig   oscilikt p5*kEnv, p4, kfn
>     ;asig vco2 p5*kEnv, p4, 14
>     outs asig, asig
> endin
>
> Aliasing starts to appear around C7 on a keyboard. If I swap out the vco2ft and use a vco2 instead I get a similar result, but at a certain point it blows up:
>
>   number of samples out of range:     1532     1532
>   rtevent:   T  8.059 TT  8.059 M:38303999843885432520258064841565329771946742494741221801962820961020800752298138120353004414942616191341590740741052340150746300284022174263790044053759
>
> The example in the manual seems to work fine. So what am I doing wrong, is my initial table too small?
> 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