Csound Csound-dev Csound-tekno Search About

[Csnd] help with ftgenonce & gen01?

Date2014-08-06 22:36
FromKevin Welsh
Subject[Csnd] help with ftgenonce & gen01?
Attachmentstestftgenonce.csd  
I'm trying to resend this because the first time I sent it before my
list membership was approved, so it was rejected from the list.
Hopefully this isn't considered spamming, and apologies if it is.

TL;DR: when loading a sound with ftgenonce, if the filename is a variable bad
things can happen when notes overlap.

Here's the long version: I'm trying to optimize a sample trigger / drum
machine style instrument for use in Blue.  It will be used to trigger many
many repeated samples (drums/etc).  To optimize this, I wanted to move away
from diskin/soundin and instead load the tables into memory and read them
with loscil.  Because I want the file to be selectable in blue, I'm using
ftgenonce and passing a blue variable as input into the gen 01 p5 field
(filename).

I noticed that when doing this if notes overlap I get the warning (and
seemingly increased segfaults):
WARNING: replacing previous ftable 9002
WARNING: ftable 9002 relocating due to size change
         currently active instruments may find this disturbing

So I trimmed the instrument down to the bare bones, and still have the same
problem.  I attached an example .csd that uses kickroll.wav.  You will see
that instr 1 uses a static filename and has no problems.  Instr 2 uses a
variable, and throws a warning in it's second note block (the fourth block
total) where the longer notes overlap.

Is this the expected behavior, or is this a bug?  I thought that because the
same variable value is being passed to ftgenonce, it shouldn't be overriding
the table.

Thanks for any help or suggestions!

Date2014-08-06 23:06
FromMichael Gogins
SubjectRe: [Csnd] help with ftgenonce & gen01?

Ftgenonce recreates the whole table every time any of its parameters change. This is by design.

Regards,
Mike

On Aug 6, 2014 5:36 PM, "Kevin Welsh" <tgrey1@gmail.com> wrote:
I'm trying to resend this because the first time I sent it before my
list membership was approved, so it was rejected from the list.
Hopefully this isn't considered spamming, and apologies if it is.

TL;DR: when loading a sound with ftgenonce, if the filename is a variable bad
things can happen when notes overlap.

Here's the long version: I'm trying to optimize a sample trigger / drum
machine style instrument for use in Blue.  It will be used to trigger many
many repeated samples (drums/etc).  To optimize this, I wanted to move away
from diskin/soundin and instead load the tables into memory and read them
with loscil.  Because I want the file to be selectable in blue, I'm using
ftgenonce and passing a blue variable as input into the gen 01 p5 field
(filename).

I noticed that when doing this if notes overlap I get the warning (and
seemingly increased segfaults):
WARNING: replacing previous ftable 9002
WARNING: ftable 9002 relocating due to size change
         currently active instruments may find this disturbing

So I trimmed the instrument down to the bare bones, and still have the same
problem.  I attached an example .csd that uses kickroll.wav.  You will see
that instr 1 uses a static filename and has no problems.  Instr 2 uses a
variable, and throws a warning in it's second note block (the fourth block
total) where the longer notes overlap.

Is this the expected behavior, or is this a bug?  I thought that because the
same variable value is being passed to ftgenonce, it shouldn't be overriding
the table.

Thanks for any help or suggestions!

Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




Date2014-08-06 23:10
FromKevin Welsh
SubjectRe: [Csnd] help with ftgenonce & gen01?
Right, but those parameters aren't changing... at least not as far as
I understand.  There's an attached .csd example that should
demonstrate this.  Am I missing something in that example that would
be considered a "changed parameter"?

Thanks!

On Wed, Aug 6, 2014 at 6:06 PM, Michael Gogins  wrote:
> Ftgenonce recreates the whole table every time any of its parameters change.
> This is by design.
>
> Regards,
> Mike
>
> On Aug 6, 2014 5:36 PM, "Kevin Welsh"  wrote:
>>
>> I'm trying to resend this because the first time I sent it before my
>> list membership was approved, so it was rejected from the list.
>> Hopefully this isn't considered spamming, and apologies if it is.
>>
>> TL;DR: when loading a sound with ftgenonce, if the filename is a variable
>> bad
>> things can happen when notes overlap.
>>
>> Here's the long version: I'm trying to optimize a sample trigger / drum
>> machine style instrument for use in Blue.  It will be used to trigger many
>> many repeated samples (drums/etc).  To optimize this, I wanted to move
>> away
>> from diskin/soundin and instead load the tables into memory and read them
>> with loscil.  Because I want the file to be selectable in blue, I'm using
>> ftgenonce and passing a blue variable as input into the gen 01 p5 field
>> (filename).
>>
>> I noticed that when doing this if notes overlap I get the warning (and
>> seemingly increased segfaults):
>> WARNING: replacing previous ftable 9002
>> WARNING: ftable 9002 relocating due to size change
>>          currently active instruments may find this disturbing
>>
>> So I trimmed the instrument down to the bare bones, and still have the
>> same
>> problem.  I attached an example .csd that uses kickroll.wav.  You will see
>> that instr 1 uses a static filename and has no problems.  Instr 2 uses a
>> variable, and throws a warning in it's second note block (the fourth block
>> total) where the longer notes overlap.
>>
>> Is this the expected behavior, or is this a bug?  I thought that because
>> the
>> same variable value is being passed to ftgenonce, it shouldn't be
>> overriding
>> the table.
>>
>> Thanks for any help or suggestions!
>>
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>>
>>
>

Date2014-08-06 23:11
FromOeyvind Brandtsegg
SubjectRe: [Csnd] help with ftgenonce & gen01?
I haven't used ftgenonce so much, so a shot in the dark..., but
perhaps it would make sense to use a zero as the first argument,
letting Csound automatically assign a new table number for each instr
instance?

2014-08-07 0:06 GMT+02:00 Michael Gogins :
> Ftgenonce recreates the whole table every time any of its parameters change.
> This is by design.
>
> Regards,
> Mike
>
> On Aug 6, 2014 5:36 PM, "Kevin Welsh"  wrote:
>>
>> I'm trying to resend this because the first time I sent it before my
>> list membership was approved, so it was rejected from the list.
>> Hopefully this isn't considered spamming, and apologies if it is.
>>
>> TL;DR: when loading a sound with ftgenonce, if the filename is a variable
>> bad
>> things can happen when notes overlap.
>>
>> Here's the long version: I'm trying to optimize a sample trigger / drum
>> machine style instrument for use in Blue.  It will be used to trigger many
>> many repeated samples (drums/etc).  To optimize this, I wanted to move
>> away
>> from diskin/soundin and instead load the tables into memory and read them
>> with loscil.  Because I want the file to be selectable in blue, I'm using
>> ftgenonce and passing a blue variable as input into the gen 01 p5 field
>> (filename).
>>
>> I noticed that when doing this if notes overlap I get the warning (and
>> seemingly increased segfaults):
>> WARNING: replacing previous ftable 9002
>> WARNING: ftable 9002 relocating due to size change
>>          currently active instruments may find this disturbing
>>
>> So I trimmed the instrument down to the bare bones, and still have the
>> same
>> problem.  I attached an example .csd that uses kickroll.wav.  You will see
>> that instr 1 uses a static filename and has no problems.  Instr 2 uses a
>> variable, and throws a warning in it's second note block (the fourth block
>> total) where the longer notes overlap.
>>
>> Is this the expected behavior, or is this a bug?  I thought that because
>> the
>> same variable value is being passed to ftgenonce, it shouldn't be
>> overriding
>> the table.
>>
>> Thanks for any help or suggestions!
>>
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>>
>>
>



-- 

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://flyndresang.no/
http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://soundcloud.com/t-emp

Date2014-08-06 23:15
FromKevin Welsh
SubjectRe: [Csnd] help with ftgenonce & gen01?
Thanks for the suggestion!  I believe I tried that without success,
but I will definitely run a confirmation test later this evening and
report back.

Unfortunately, even if that's successful it wouldn't work for my
particular instrument design.  It's a multi-channel sampler, with
individual samples loaded into separate tables and selected via
pfield.

On Wed, Aug 6, 2014 at 6:11 PM, Oeyvind Brandtsegg
 wrote:
> I haven't used ftgenonce so much, so a shot in the dark..., but
> perhaps it would make sense to use a zero as the first argument,
> letting Csound automatically assign a new table number for each instr
> instance?
>
> 2014-08-07 0:06 GMT+02:00 Michael Gogins :
>> Ftgenonce recreates the whole table every time any of its parameters change.
>> This is by design.
>>
>> Regards,
>> Mike
>>
>> On Aug 6, 2014 5:36 PM, "Kevin Welsh"  wrote:
>>>
>>> I'm trying to resend this because the first time I sent it before my
>>> list membership was approved, so it was rejected from the list.
>>> Hopefully this isn't considered spamming, and apologies if it is.
>>>
>>> TL;DR: when loading a sound with ftgenonce, if the filename is a variable
>>> bad
>>> things can happen when notes overlap.
>>>
>>> Here's the long version: I'm trying to optimize a sample trigger / drum
>>> machine style instrument for use in Blue.  It will be used to trigger many
>>> many repeated samples (drums/etc).  To optimize this, I wanted to move
>>> away
>>> from diskin/soundin and instead load the tables into memory and read them
>>> with loscil.  Because I want the file to be selectable in blue, I'm using
>>> ftgenonce and passing a blue variable as input into the gen 01 p5 field
>>> (filename).
>>>
>>> I noticed that when doing this if notes overlap I get the warning (and
>>> seemingly increased segfaults):
>>> WARNING: replacing previous ftable 9002
>>> WARNING: ftable 9002 relocating due to size change
>>>          currently active instruments may find this disturbing
>>>
>>> So I trimmed the instrument down to the bare bones, and still have the
>>> same
>>> problem.  I attached an example .csd that uses kickroll.wav.  You will see
>>> that instr 1 uses a static filename and has no problems.  Instr 2 uses a
>>> variable, and throws a warning in it's second note block (the fourth block
>>> total) where the longer notes overlap.
>>>
>>> Is this the expected behavior, or is this a bug?  I thought that because
>>> the
>>> same variable value is being passed to ftgenonce, it shouldn't be
>>> overriding
>>> the table.
>>>
>>> Thanks for any help or suggestions!
>>>
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>>
>>
>
>
>
> --
>
> Oeyvind Brandtsegg
> Professor of Music Technology
> NTNU
> 7491 Trondheim
> Norway
> Cell: +47 92 203 205
>
> http://flyndresang.no/
> http://www.partikkelaudio.com/
> http://soundcloud.com/brandtsegg
> http://soundcloud.com/t-emp
>
>
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>
>