| Victor && Michael,
thank you both for the clarifications. That's all the info I was looking
for.
I also found that I needed to pass the file names for .orc and .sco in
my csound command. I guess they're needed for exportForPerfomance() to
know how to name the files it writes.
I was using InputMessage() to populate my score with some notes
beforehand (before calling Play() on the performance thread), but now I
thought that I can also extract the score with csound.getScore(), add my
notes with addScoreLine() or addNote() and then call exportForPerformance().
Realtime events are executed immediately if p2 == 0 and after n seconds
with p2 = n, regardless of the 't' statement - which makes sense if it
is a preprocessor thing.
Thanks again,
- c.
victor wrote:
> I think BPM is a preprocessor thing, so realtime events would not
> be affected by it.
>
> After exportForPerformance(), you should be able to set
> a thread and Play().
>
> The main difference is that perform() does it in the main thread and
> the other spawns a performance thread.
>
> Victor
>
> ----- Original Message ----- From: "Cesare Marilungo"
>
> To:
> Sent: Sunday, January 20, 2008 7:26 PM
> Subject: [Csnd] csound api (from python) - can I mix realtime events
> with a .csd generated on the fly?
>
>
>> I'm a bit confused.
>>
>> I can build a string with my xml csd, pass it to csnd.setOrchestra
>> and then use exportForPerformance() and perform().
>>
>> Or I can use Compile(filename), use CsoundPerformanceThread() and
>> Play() it. With this solution I can also pass events in realtime with
>> InputMessage (called on the performanceThread pointer).
>>
>> But what if I want to do both?
>>
>> Also, is it normal that when I pass events with InputMessage the
>> event is always generated at the time specified in the i statement -
>> ignoring the bpm setting specified with a t statement in my score file?
>>
>> Thanks in advance,
>>
>> -c.
>>
>> --
>> www.cesaremarilungo.com
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> "unsubscribe csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body
> "unsubscribe csound"
>
>
--
www.cesaremarilungo.com
|