Csound Csound-dev Csound-tekno Search About

Problem with schedkwhen

Date2006-03-21 08:24
FromPhil
SubjectProblem with schedkwhen
AttachmentsNone  

Date2006-03-21 08:51
FromOeyvind Brandtsegg
SubjectRe: Problem with schedkwhen
hi Phil,

just a few things off the top of my head:

1.
do you send audio out of instr 35 directly via outs,
or do you use yet another instr as a mixer/audio out ?
in that case, is the mixer instr on for the whole duration of the performance ?

2.
do you use any enveloping in instr 35 ?
you might try removing all amp envelopes,
this will indeed give you clicks and artifacts, but on the good side you will hear any and all events played on the instrument. Put the envelopes back in when you're done debugging.

Oeyvind




> From: Phil [phil@urbanoia.net]
> Sent: 2006-03-21 09:24:07 CET
> To: csound@lists.bath.ac.uk
> Subject: [Csnd] Problem with schedkwhen
> 
> Hi,
> 
> I've got a CSound script which uses the schedkwhen opcode, but
> periodically fails in a rather strange way.
> 
> The setup involves using continuous controller change messages to
> trigger the playing of a sound event. The program sending the
> continuous controller messages sends a square wave signal, and csound
> detects edges and uses these to play another instrument,using
> schedkwhen. The instrument which uses schedkwhen to play the other
> instrument has is set up to be played for a long duration. I've tried
> various schedkwhen commands, and they all fail. some exmaples are:
> 
> schedkwhen kTrig, 0, -1, 35, 0, 0.5, kpitch
> schedkwhen kTrig, 0, 4, 35, 0, 2, kpitch
> schedkwhen kTrig, 0.01, 4, 35, 0, 2, kpitch
> 
> (oh why won't my machine go ping?)
> 
> This works fine most of the time, however at times, what happens is
> that the event will still trigger, but amplitude will be zero. Here's
> an example of the output when normal:
> 
> new alloc for instr 35:
>   rtevent:         T  0.327 TT  0.327 M:    833.1   2000.0
> new alloc for instr 35:
>   rtevent:         T  0.740 TT  0.740 M:    832.0   2000.0
>   rtevent:         T  1.148 TT  1.148 M:    307.1   2000.0
>   rtevent:         T  1.561 TT  1.561 M:     41.1   2000.0
>   rtevent:         T  1.928 TT  1.928 M:      0.8   2000.0
>   rtevent:         T  2.341 TT  2.341 M:    471.3   2000.0
> 
> and when the problem occurs:
> 
>  rtevent:         T 29.184 TT 29.184 M:      0.0      0.0
>  rtevent:         T 29.914 TT 29.914 M:      0.0      0.0
>  rtevent:         T 30.644 TT 30.644 M:      0.0      0.0
> ... and so on
> 
> So, as I understand it, it's still scheduling the score event via
> schedkwhen, but the amplitude of the event is zero (last collumn).
> Once this happens, it won't start playing the sounds until you restart
> csound.
> 
> One idea that i've had is that there's not enough processing time for
> the instrument, seems as it's played for a short duration (0.3
> seconds). I've tried optimising (via removing anything else that
> CSound is doing) but this hasn't made any difference.
> 
> Has anyone else come across this problem, or can suggest any solutions
> / workarounds? This is getting quite frustrating...
> 
> Thanks,
> Phil
> --
> Send bugs reports to this list.
> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk
> 

Date2006-03-21 10:53
FromIstvan Varga
SubjectRe: Problem with schedkwhen
AttachmentsNone  

Date2006-03-23 07:21
FromPhil
SubjectRe: Problem with schedkwhen
AttachmentsNone