Csound Csound-dev Csound-tekno Search About

[Csnd] a useful API program for teaching audio...

Date2010-02-15 17:26
FromRory Walsh
Subject[Csnd] a useful API program for teaching audio...
AttachmentsRealtimeIOwrapper.c  
I teach a class each year on audio programming and I've always found
the jump from writing basic RAW soundfiles to realtime audio a big
leap for the students to take. Usually it involves the introduction of
an external audio lib which we don't often have time to cover. As
we've already be using the Csound API I thought it would be nice to
keep using it so I wrote a simple C program(see attached) that lets
one use Csound as a realtime audio IO wrapper so to speak. It
basically writes a simple csd file to disk which use the chani/chano
opcodes to send audio to the host and back again. The ksmps sized
buffers retrieved from Csound are accessible in the ProcessBlock()
function. Users need only modify this process function in order to
prototype different processing algorithms such as delay lines,
filters, distortion, etc. The ProcessBlock() method is designed to
resemble the typical processing functions one finds in most audio
processing libraries and plugin SDKs. At present a simple delay line
is implemented but this can obviously be changed by modifying the
ProcessBlock() function. It's fairly heavily commented. I haven't
handed it out to my students yet so please feel free to make
suggestions. It could easily be adapted for multichannel audio, at
present it's strictly mono.

Rory.

Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-02-15 18:42
Fromfrancibal
Subject[Csnd] Re: a useful API program for teaching audio...
Many thanks Mr. Rory,
i'm not expert in programming, but i am try to study somethings more every
day, and this is another useful resource for me.

And then, thank You,

ciao,
fran.

PS: just to note, i'm on windows (vista) and i'm using csound (vst) from Mr.
Gogins site, and here i have csound64.dll.5.2, renamed, as You said, to
csound64.lib.
And Your file is RealtimeIOwrapper.c, and not, like into comment
RealtimeIOcsound.c.
Sorry if this is noising, but hope useful for some others really newbie like
me.





RoryWalsh wrote:
> 
> I teach a class each year on audio programming and I've always found
> the jump from writing basic RAW soundfiles to realtime audio a big
> leap for the students to take. Usually it involves the introduction of
> an external audio lib which we don't often have time to cover. As
> we've already be using the Csound API I thought it would be nice to
> keep using it so I wrote a simple C program(see attached) that lets
> one use Csound as a realtime audio IO wrapper so to speak. It
> basically writes a simple csd file to disk which use the chani/chano
> opcodes to send audio to the host and back again. The ksmps sized
> buffers retrieved from Csound are accessible in the ProcessBlock()
> function. Users need only modify this process function in order to
> prototype different processing algorithms such as delay lines,
> filters, distortion, etc. The ProcessBlock() method is designed to
> resemble the typical processing functions one finds in most audio
> processing libraries and plugin SDKs. At present a simple delay line
> is implemented but this can obviously be changed by modifying the
> ProcessBlock() function. It's fairly heavily commented. I haven't
> handed it out to my students yet so please feel free to make
> suggestions. It could easily be adapted for multichannel audio, at
> present it's strictly mono.
> 
> Rory.
> 
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>  
>