Csound Csound-dev Csound-tekno Search About

granular synthesis question

Date2016-09-30 23:04
From"C. R. Craig"
Subjectgranular synthesis question
Any advice on ways to output hundreds of channels? I’m trying to get a channel per cloud of grains so that I can do some post-processing. I’ve tried fout with a filename in my grain output code, but csound appears to close and reopen each file multiple times, leading to data loss. Based on the statement in the documentation for fout that it supports use with a filehandle, I tried opening the files at a higher level (in the cloud code) so that the files could be opened once and left open. Apparently fout does not actually support use with a filehandle.

I also tried scattering the clouds over 64 channels, but clouds collide in the channels, rendering it impossible to perform meaningful post-processing.

Csound 6.07 on Fedora.

Thanks,
Robert
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

Date2016-10-01 00:03
FromVictor Lazzarini
SubjectRe: granular synthesis question
just set nchnls to your choice and use -o to
write to a multichannel soundfile,
outch to output to a given channel.

Alternatively, use fout in many instances of one output instr, each instance to a different
file, then use a global array, or bus channels
or zak to send the audio to each instrument
instance.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 30 Sep 2016, at 23:04, C. R. Craig  wrote:
> 
> Any advice on ways to output hundreds of channels? I’m trying to get a channel per cloud of grains so that I can do some post-processing. I’ve tried fout with a filename in my grain output code, but csound appears to close and reopen each file multiple times, leading to data loss. Based on the statement in the documentation for fout that it supports use with a filehandle, I tried opening the files at a higher level (in the cloud code) so that the files could be opened once and left open. Apparently fout does not actually support use with a filehandle.
> 
> I also tried scattering the clouds over 64 channels, but clouds collide in the channels, rendering it impossible to perform meaningful post-processing.
> 
> Csound 6.07 on Fedora.
> 
> Thanks,
> Robert
> 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

Date2016-10-01 00:06
FromOeyvind Brandtsegg
SubjectRe: granular synthesis question

Just a quick 2 cents on this, do you really need to write the grains to files to do the post processing?  It will probably be quite hungry for both space (lot of empty space,  silence in the tracks) and CPU (splitting, processing,  combining).
Perhaps you could do the per grain postprocessing inline? E.g. sending each grain to a separate post process right away, running the separate processes in as many instruments or inst instances as necessary.


30. sep. 2016 15.04 skrev "C. R. Craig" <robert@craig-woods.net>:
Any advice on ways to output hundreds of channels? I’m trying to get a channel per cloud of grains so that I can do some post-processing. I’ve tried fout with a filename in my grain output code, but csound appears to close and reopen each file multiple times, leading to data loss. Based on the statement in the documentation for fout that it supports use with a filehandle, I tried opening the files at a higher level (in the cloud code) so that the files could be opened once and left open. Apparently fout does not actually support use with a filehandle.

I also tried scattering the clouds over 64 channels, but clouds collide in the channels, rendering it impossible to perform meaningful post-processing.

Csound 6.07 on Fedora.

Thanks,
Robert
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

Date2016-10-01 00:36
From"C. R. Craig"
SubjectRe: granular synthesis question
> On Sep 30, 2016, at 4:03 PM, Victor Lazzarini  wrote:
> 
> just set nchnls to your choice and use -o to
> write to a multichannel soundfile,
> outch to output to a given channel.

Already tried that. Although maybe I’m inventing limitations. How many channels are possible? 400?
> 
> Alternatively, use fout in many instances of one output instr, each instance to a different
> file, then use a global array, or bus channels
> or zak to send the audio to each instrument
> instance.

Tried the fout in many instances of one output instr (grain is the instrument). For some reason, output files were being closed and reopened, hence truncated (or whatever the word is for data loss before the last chunk).

Thanks,
Robert
> 
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
> 
>> On 30 Sep 2016, at 23:04, C. R. Craig  wrote:
>> 
>> Any advice on ways to output hundreds of channels? I’m trying to get a channel per cloud of grains so that I can do some post-processing. I’ve tried fout with a filename in my grain output code, but csound appears to close and reopen each file multiple times, leading to data loss. Based on the statement in the documentation for fout that it supports use with a filehandle, I tried opening the files at a higher level (in the cloud code) so that the files could be opened once and left open. Apparently fout does not actually support use with a filehandle.
>> 
>> I also tried scattering the clouds over 64 channels, but clouds collide in the channels, rendering it impossible to perform meaningful post-processing.
>> 
>> Csound 6.07 on Fedora.
>> 
>> Thanks,
>> Robert
>> 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

Date2016-10-01 00:44
From"C. R. Craig"
SubjectRe: granular synthesis question
Ah, if I knew what I wanted to do to the grains, it would be easy :-). I’ve got a lump of clay produced algorithmically that I want to sculpt into something prettier. So, I need to audition each cloud of grains individually and decide what needs to be done to make the result an actual piece of music . . .

As it stands right now, the output that I’m working with is simple stereo. All 400 clouds are in there, grains are positioned spatially already and so on. What I’d like to work with would be either a collection of (stereo) files, each one having one cloud, or one file with 800 channels (400 stereo). That way I could manipulate things like cloud position, amplitudes, delete the ones I don’t like, and so on.

I’m coming up with a hacky way of doing the 400 file idea using a script that consults a couple of files holding the algorithmic information and repeatedly launches csound with the appropriately-named output file and macros on the command line. It would be nicer if fout worked correctly (i.e., the way I want it to :-). I’ll see if I can get it to misbehave with a simpler csound file so I can file a bug.

Thanks,
Robert

On Sep 30, 2016, at 4:06 PM, Oeyvind Brandtsegg <obrandts@GMAIL.COM> wrote:

Just a quick 2 cents on this, do you really need to write the grains to files to do the post processing?  It will probably be quite hungry for both space (lot of empty space,  silence in the tracks) and CPU (splitting, processing,  combining).
Perhaps you could do the per grain postprocessing inline? E.g. sending each grain to a separate post process right away, running the separate processes in as many instruments or inst instances as necessary.


30. sep. 2016 15.04 skrev "C. R. Craig" <robert@craig-woods.net>:
Any advice on ways to output hundreds of channels? I’m trying to get a channel per cloud of grains so that I can do some post-processing. I’ve tried fout with a filename in my grain output code, but csound appears to close and reopen each file multiple times, leading to data loss. Based on the statement in the documentation for fout that it supports use with a filehandle, I tried opening the files at a higher level (in the cloud code) so that the files could be opened once and left open. Apparently fout does not actually support use with a filehandle.

I also tried scattering the clouds over 64 channels, but clouds collide in the channels, rendering it impossible to perform meaningful post-processing.

Csound 6.07 on Fedora.

Thanks,
Robert
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


Date2016-10-01 00:50
FromVictor Lazzarini
SubjectRe: granular synthesis question
Afaik there is no limit for nchnls.

With fout, I am suggesting separating it from
grain generation and placing it in an instr
of its own whose instances run throughout the performance. Then you just send audio
to them from your grain generators.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 1 Oct 2016, at 00:36, C. R. Craig  wrote:

>> On Sep 30, 2016, at 4:03 PM, Victor Lazzarini  wrote:
>> 
>> just set nchnls to your choice and use -o to
>> write to a multichannel soundfile,
>> outch to output to a given channel.
> 
> Already tried that. Although maybe I’m inventing limitations. How many channels are possible? 400?
>> 
>> Alternatively, use fout in many instances of one output instr, each instance to a different
>> file, then use a global array, or bus channels
>> or zak to send the audio to each instrument
>> instance.
> 
> Tried the fout in many instances of one output instr (grain is the instrument). For some reason, output files were being closed and reopened, hence truncated (or whatever the word is for data loss before the last chunk).
> 
> Thanks,
> Robert
>> 
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>> 
>>> On 30 Sep 2016, at 23:04, C. R. Craig  wrote:
>>> 
>>> Any advice on ways to output hundreds of channels? I’m trying to get a channel per cloud of grains so that I can do some post-processing. I’ve tried fout with a filename in my grain output code, but csound appears to close and reopen each file multiple times, leading to data loss. Based on the statement in the documentation for fout that it supports use with a filehandle, I tried opening the files at a higher level (in the cloud code) so that the files could be opened once and left open. Apparently fout does not actually support use with a filehandle.
>>> 
>>> I also tried scattering the clouds over 64 channels, but clouds collide in the channels, rendering it impossible to perform meaningful post-processing.
>>> 
>>> Csound 6.07 on Fedora.
>>> 
>>> Thanks,
>>> Robert
>>> 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