realtime audio IO host for process prototyping in C

Making the jump from writing basic RAW soundfiles to realtime audio is often a big leap for the newbies to take. Usually it involves the introduction of an external audio lib which often takes some time to get set up. As I use the Csound API for a lot of my projects I thought it would be nice to keep using it so I wrote a simple C program(see attached, rename the file extension from .txt to .c) 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. Therefore you should theoretically be able to grab you processing code and place it directly into a VST process replacing method. At present a simple delay line is implemented but this can obviously be changed by modifying the ProcessBlock() function. It could easily be adapted for multichannel audio, at present it's strictly mono.

Instruction on how to compile are included in the file. In case you miss them, in order to build on a Mac you must first install Csound then build your host like this:

gcc RealtimeIOwrapper.c -o realtime -I/Library/Frameworks/CsoundLib.framework/Versions/Current/headers -framework CsoundLib

You may need to modify your paths depending on where Csound was instaled. On windows do something like:

gcc RealtimeIOWrapper.c -o realtime -I"PATH_TO_CSOUND_FOLDER_CALLED_H”
-L"PATH_TO_CSOUND_LIBRARY" -lcsound32

More details about building on windows is included in the source code.

**************************UPDATE*************************************
In order to show that there are several ways of doing things with the Csound API I've modified the previous example so that it now uses csoundGetChannelPtr() instead of csoundChanIASet()/Get(). Note that the embedded Csound code has changed also and now makes use of the chnget/set opcodes.

AttachmentSize
RealtimeIOwrapper.txt7.47 KB
RealtimeIOwrapperGetChannel.txt7.67 KB
cheap generic viagra zpack generic viagra z pack buy viagra uk cialis uk Canadian pharmacy viagra Canadian pharmacy generic cialis ed pills avanafil z-pack z-pak z pak buy zithromax staxyn zpak ed drugs viagra online pharmacy uk viagra uk kamagra uk cialis online