Csound Csound-dev Csound-tekno Search About

Re: [Csnd] getting MANY audiofiles into Csound

Date2005-09-18 23:09
FromMichael Gogins
SubjectRe: [Csnd] getting MANY audiofiles into Csound
There's Swami on Linux, it edits SoundFonts, doesn't that mean it can create them?

Regards,
Mike

-----Original Message-----
From: David Akbari 
Sent: Sep 18, 2005 4:36 PM
To: csound@lists.bath.ac.uk
Subject: Re: [Csnd] getting MANY audiofiles into Csound


On Sep 18, 2005, at 12:16 PM, Michael Gogins wrote:

> You can also use the SoundFont opcodes. There are tools for creating 
> one's own SoundFonts. Doing it this way would enable your samples to 
> be used in Csound and also in other SoundFont enabled software.
>
> Regards,
> Mike
>

It's too bad the only software you can actually make SoundFonts with is 
only for PC... otherwise this is a good solution.

I usually find the following to be an efficient mechanism for 
implementing the playback of audio files





sr		=	44100
kr		=	441
ksmps	=	100
nchnls	=	2

gifn1	ftgen	1, 0, 131072, 1, "/loops/dl_break0.aif", 0, 4, 0

		instr	1

atabl		init	0

itabsz	tableng	1
andx		phasor	1 / (itabsz / sr)
andx		=	andx * itabsz

		vtaba		andx, 1, atabl
atabl		=	atabl * 32767

	outs	atabl, atabl

		endin


f0	8888




However, it would be nice if the tablera, tabra, vtaba, and vtabra 
could accept deferred size GEN tables. As if you try to make the ftgen 
use a deferred size (as of CVS Sept 18 2005) Csound5 returns the 
following error:

new alloc for instr 1:
INIT ERROR in instr 1: deferred-size ftable 1.000000 illegal here

The reason I say this is because the DISKIN opcodes uses a little less 
than 30% CPU whereas the above illustrated technique uses only 2-3% (on 
my system). This is consistent across optimized and un-optimized 
versions of Csound4 and 5 as well as versions compiled at both single 
and double precision.

For the purposes of this thread, I have also been experimenting with 
loading an array of S-type variables into a GEN23 but I was 
unsuccessful with that...

Maybe to implement getting MANY files into Csound you could load a .txt 
file into an array which contains a numerical index for each file that 
you would define in your ORC with the use of an strset opcode...

Are there any GEN routines at present that deal with S-type variables?? 
I can think of a whole mess of reasons you'd want an array of strings 
or symbols...


-David

-- 
Send bugs reports to this list.
To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk



-- 
Send bugs reports to this list.
To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk

Date2005-09-18 23:31
FromDavid Akbari
SubjectRe: [Csnd] getting MANY audiofiles into Csound
On Sep 18, 2005, at 6:09 PM, Michael Gogins wrote:

> There's Swami on Linux, it edits SoundFonts, doesn't that mean it can 
> create them?
>
> Regards,
> Mike

Of course, this is true.

Swami AFAIK is not currently supported on Windows, OSX, or BeOS. They 
can have GTK+ v1.2 or better but at present this utility does not work 
anywhere but in Linux or in some BSD's. This information comes directly 
from the current Swami CVS.

I have yet to find a _free_ cross platform SoundFont editor / creation 
utility that utilizes the full scope of what the file format has 
defined.

On Windows, obviously there is the AMAZING Vienna SoundFont editor. OSX 
is still left behind ...

Steven's suggestion of using Sonic Amigos PolyPhontics looked promising 
but unfortunately it is not free software ... I have also noticed that 
Propellerheads ReCycle can output as SoundFont 2 file format but this 
program does not seem to utilize the SoundFont specification's full 
scope of encapsulating banks of instruments and it is not free.


-David

>
> -----Original Message-----
> From: David Akbari 
> Sent: Sep 18, 2005 4:36 PM
> To: csound@lists.bath.ac.uk
> Subject: Re: [Csnd] getting MANY audiofiles into Csound
>
>
> On Sep 18, 2005, at 12:16 PM, Michael Gogins wrote:
>
>> You can also use the SoundFont opcodes. There are tools for creating
>> one's own SoundFonts. Doing it this way would enable your samples to
>> be used in Csound and also in other SoundFont enabled software.
>>
>> Regards,
>> Mike
>>
>
> It's too bad the only software you can actually make SoundFonts with is
> only for PC... otherwise this is a good solution.
>
> I usually find the following to be an efficient mechanism for
> implementing the playback of audio files
>
> 
> 
>
>
> sr		=	44100
> kr		=	441
> ksmps	=	100
> nchnls	=	2
>
> gifn1	ftgen	1, 0, 131072, 1, "/loops/dl_break0.aif", 0, 4, 0
>
> 		instr	1
>
> atabl		init	0
>
> itabsz	tableng	1
> andx		phasor	1 / (itabsz / sr)
> andx		=	andx * itabsz
>
> 		vtaba		andx, 1, atabl
> atabl		=	atabl * 32767
>
> 	outs	atabl, atabl
>
> 		endin
> 
> 
> f0	8888
> 
>
> 
>
> However, it would be nice if the tablera, tabra, vtaba, and vtabra
> could accept deferred size GEN tables. As if you try to make the ftgen
> use a deferred size (as of CVS Sept 18 2005) Csound5 returns the
> following error:
>
> new alloc for instr 1:
> INIT ERROR in instr 1: deferred-size ftable 1.000000 illegal here
>
> The reason I say this is because the DISKIN opcodes uses a little less
> than 30% CPU whereas the above illustrated technique uses only 2-3% (on
> my system). This is consistent across optimized and un-optimized
> versions of Csound4 and 5 as well as versions compiled at both single
> and double precision.
>
> For the purposes of this thread, I have also been experimenting with
> loading an array of S-type variables into a GEN23 but I was
> unsuccessful with that...
>
> Maybe to implement getting MANY files into Csound you could load a .txt
> file into an array which contains a numerical index for each file that
> you would define in your ORC with the use of an strset opcode...
>
> Are there any GEN routines at present that deal with S-type variables??
> I can think of a whole mess of reasons you'd want an array of strings
> or symbols...

-- 
Send bugs reports to this list.
To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk