Csound Csound-dev Csound-tekno Search About

[Csnd] ftgen for GEN01 during performance time

Date2020-02-25 17:38
FromRichard Knight
Subject[Csnd] ftgen for GEN01 during performance time

The manual says ftgen should only be used globally: are there any options for loading soundfiles to ftables during performance, ie in an instrument?
With short sounds ftgen does seem to work ok during performance, but with longer sounds it causes drop outs/buffer issue/similar.

There may be a few other things I could try, the first thing I attempted was to have a ftable created at init time with a fixed size, then write to that ftable later in an instrument, in one k-cycle (ie similar to the FileToPvsBuf udo in the pvsbufread example). However that still had the same issue.

Is that something that might be possible to do somehow?


Date2020-02-25 18:40
FromTarmo Johannes
SubjectRe: [Csnd] ftgen for GEN01 during performance time
AttachmentsNone  None  

Date2020-02-25 19:19
FromMichael Gogins
SubjectRe: [Csnd] ftgen for GEN01 during performance time
Use ftgenonce within the instr definition, or ftgen to a global variable with a unique name just above the instr definition. 

On Tue, Feb 25, 2020, 18:38 Richard Knight <richard@1bpm.net> wrote:

The manual says ftgen should only be used globally: are there any options for loading soundfiles to ftables during performance, ie in an instrument?
With short sounds ftgen does seem to work ok during performance, but with longer sounds it causes drop outs/buffer issue/similar.

There may be a few other things I could try, the first thing I attempted was to have a ftable created at init time with a fixed size, then write to that ftable later in an instrument, in one k-cycle (ie similar to the FileToPvsBuf udo in the pvsbufread example). However that still had the same issue.

Is that something that might be possible to do somehow?

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-02-26 00:54
FromRichard Knight
SubjectRe: [Csnd] ftgen for GEN01 during performance time

Thanks, this looked great, unfortunately, the same thing still happens though, which is strange as I would have thought the async aspect would have helped.

On Tue, 25 Feb 2020 20:40:34 +0200, Tarmo Johannes wrote:

Hi,

You coud try the --realtime flag for asynchronous table loading (I suppose):


--realtime
realtime priority mode is switched on which the following effects:

  1. all opcode audio file reading/writing is handled asynchronously by a separate thread.
  2. all init-pass operations are also performed asynchronously.
tarmo



Sent from Mailspring, the best free email app for work
On Feb 25 2020, at 7:38 pm, Richard Knight wrote:
The manual says ftgen should only be used globally: are there any options for loading soundfiles to ftables during performance, ie in an instrument?
With short sounds ftgen does seem to work ok during performance, but with longer sounds it causes drop outs/buffer issue/similar.

There may be a few other things I could try, the first thing I attempted was to have a ftable created at init time with a fixed size, then write to that ftable later in an instrument, in one k-cycle (ie similar to the FileToPvsBuf udo in the pvsbufread example). However that still had the same issue.

Is that something that might be possible to do somehow?
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
Sent from Mailspring 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-02-26 01:18
FromRichard Knight
SubjectRe: [Csnd] ftgen for GEN01 during performance time

Thanks, still getting the same issue though.
I've also tried ftsave / ftload which does reduce the drop out time a bit. Generating a (large) empty ftable in an instrument does the same, with the drop out time seeming to correspond to the table size.

For some background basically I would like to be able to load (fairly large) sound files to ftables during performance, and there are too many possible files to load globally/before performance.

On Tue, 25 Feb 2020 20:19:21 +0100, Michael Gogins wrote:

Use ftgenonce within the instr definition, or ftgen to a global variable with a unique name just above the instr definition. 

On Tue, Feb 25, 2020, 18:38 Richard Knight <richard@1bpm.net> wrote:

The manual says ftgen should only be used globally: are there any options for loading soundfiles to ftables during performance, ie in an instrument?
With short sounds ftgen does seem to work ok during performance, but with longer sounds it causes drop outs/buffer issue/similar.

There may be a few other things I could try, the first thing I attempted was to have a ftable created at init time with a fixed size, then write to that ftable later in an instrument, in one k-cycle (ie similar to the FileToPvsBuf udo in the pvsbufread example). However that still had the same issue.

Is that something that might be possible to do somehow?

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