Realtime Score Data

Hello, all.

I need to use Csound in realtime in application written in C and I have, after reading a lot in manuals and book, absolutely no idea how to do that.

Can anyone help?

Basically, what I need is have Csound instance aural response to strings of characters (score events) 30 times per second, and each in duration of 1/30 of a second, but compiling that sound under those 1/30 seconds (so I can do more stuff in application in the meantime).

Thoughts on the latter issue would be appreciated too.

Thanks in advance.

P.S.
Yes, "application" is a video game. :)

Just an Idea:: Dirty Window Quick Hack

I wanted to do that with my own application, but just havent made the time yet.
Untill i get arround to do it for real. Here is an idea.

2 Ways:
Way 1: Windows Programming
Have Multiple instance of Csound running. Try to have a timer termination of one, after the other has started. AKA Kill the previous instances of CSound while starting newer ones.

I have some .NET code for you if you want to toy with the idea.

Way2: Midi
There has to be a relation between the "P" columns in the .sco and looped events in the instr in the .orc.
So... Have an infinite loop in an instrument, that sets controls of its other instruments.

Basically: Run all music paterns but, keep some muted until a midi event triggers an audable volume of certain instruments.

Pipes, Events, OSC or MIDI

It does depend on your platform. On Linux I would use the -L option (I think it is) to send realtiem events on stdin, and then my C program could fork the Csound with a stream associated. Or I cousl use a commantline pine.
Or one could use MIDI events, or OSC events

On Windows or Mac I have no idea

==John ff