Csound Csound-dev Csound-tekno Search About

[Csnd] Clever automation of sample creation?

Date2013-07-24 15:12
FromAaron Krister Johnson
Subject[Csnd] Clever automation of sample creation?

Hi csounders,

I was wondering if there was a more clever way to automate the creation of mutiple samples (or more specifically, soundfonts) than manually scripting a bunch of .csd files, each having their own wav file output name and single score event that would represent a sample.

My idea is to avoid processor overhead for certain realtime physical modelling orchestras which are complex (e.g. an orchestra rich in instances of the 'mode' opcode) by creating a non-realtime multi-sample set or soundfont and using that in live situations.

It woukd be nice to automate the creation of such multi-samples, but short of creating, or scripting the batch creation of a .csd for each sample, I'm not sure there are other more direct ways within csound to do this....are there?

Best,
AKJ


Date2013-07-24 15:31
FromMichael Gogins
SubjectRe: [Csnd] Clever automation of sample creation?
Well, the FluidSynth opcodes (fluidengine etc.) allow loading multiple SoundFonts each of which can have multiple sample sets for a MIDI channel. 

There are no Csound opcodes to support this directly, but I think you could probably use LuaJIT/FFI with the Lua opcodes to call the Fluid APIs to load samples into a SoundFont in Fluidsynth. I don't see a way to avoid scripting, but you could do all the scripting right in Csound.

In other words by running LuaJIT in Csound you could call these functions:


Hope this helps,
Mike


===========================
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Wed, Jul 24, 2013 at 10:12 AM, Aaron Krister Johnson <aaron@akjmusic.com> wrote:

Hi csounders,

I was wondering if there was a more clever way to automate the creation of mutiple samples (or more specifically, soundfonts) than manually scripting a bunch of .csd files, each having their own wav file output name and single score event that would represent a sample.

My idea is to avoid processor overhead for certain realtime physical modelling orchestras which are complex (e.g. an orchestra rich in instances of the 'mode' opcode) by creating a non-realtime multi-sample set or soundfont and using that in live situations.

It woukd be nice to automate the creation of such multi-samples, but short of creating, or scripting the batch creation of a .csd for each sample, I'm not sure there are other more direct ways within csound to do this....are there?

Best,
AKJ



Date2013-07-26 14:13
FromSteven Yi
SubjectRe: [Csnd] Clever automation of sample creation?
Hi Aaron,

I'm not sure if this would save all that much time, but you could
create a single CSD that uses macros, then call csound with
--omacro:xxx=yyy and --smacro:xxx=yyy to replace values.  If you wrote
the sample just to outs, you could then automate the CSD calling and
replace the orc and score macros and the -o outputName_xxx.wav.

steven

On Wed, Jul 24, 2013 at 10:12 AM, Aaron Krister Johnson
 wrote:
> Hi csounders,
>
> I was wondering if there was a more clever way to automate the creation of
> mutiple samples (or more specifically, soundfonts) than manually scripting a
> bunch of .csd files, each having their own wav file output name and single
> score event that would represent a sample.
>
> My idea is to avoid processor overhead for certain realtime physical
> modelling orchestras which are complex (e.g. an orchestra rich in instances
> of the 'mode' opcode) by creating a non-realtime multi-sample set or
> soundfont and using that in live situations.
>
> It woukd be nice to automate the creation of such multi-samples, but short
> of creating, or scripting the batch creation of a .csd for each sample, I'm
> not sure there are other more direct ways within csound to do this....are
> there?
>
> Best,
> AKJ