[Csnd] advance orchestra's internal clock? (time/times)
| Date | 2018-09-12 17:29 |
| From | cybilsopsin |
| Subject | [Csnd] advance orchestra's internal clock? (time/times) |
The timek and times opcodes output the absolute time, in seconds or in # of
k-cycles, since the beginning of the performance. Is there any way to make
this internal clock start from a time other than zero?
In other words, I would like to be able to tell csound to start performance
with the clock at, let's say +300 seconds, in stead of zero. Then, I would
want the output of the times opcode to (automatically, with out any
modification) be 300.5 when the performance has been running for half a
second.
the goal would be something like:
mysteryclockopcode 300
gktime times
if (gktime == 301) then
event_i "i", 2, 0, 1
endif
and the result would be instr 2 would then be triggered only 1 second into
the performance.
anyone know of what "mysteryclockopcode" could be in my hypothetical
example?
-----
***cybilopsin***
"We are all guilty of crime, the great crime of not living life to the full." - Henry Miller
--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |
| Date | 2018-09-12 19:36 |
| From | joachim heintz |
| Subject | Re: [Csnd] advance orchestra's internal clock? (time/times) |
i think the code is quite similar to what you have written. only that
you cannot mix a k-rate if-condition with an event_i. you must do event
instead, so the code could be something like:
instr Wait
kTime times
if kTime >= 300 then
event "i", 2, 0, 1
turnoff
endif
endin
not sure i got completely what you want to achieve, but this could be a
part of it.
joachim
On 12/09/18 18:29, cybilsopsin wrote:
> The timek and times opcodes output the absolute time, in seconds or in # of
> k-cycles, since the beginning of the performance. Is there any way to make
> this internal clock start from a time other than zero?
>
> In other words, I would like to be able to tell csound to start performance
> with the clock at, let's say +300 seconds, in stead of zero. Then, I would
> want the output of the times opcode to (automatically, with out any
> modification) be 300.5 when the performance has been running for half a
> second.
>
> the goal would be something like:
>
> mysteryclockopcode 300
> gktime times
> if (gktime == 301) then
> event_i "i", 2, 0, 1
> endif
>
> and the result would be instr 2 would then be triggered only 1 second into
> the performance.
>
> anyone know of what "mysteryclockopcode" could be in my hypothetical
> example?
>
>
>
> -----
> ***cybilopsin***
> "We are all guilty of crime, the great crime of not living life to the full." - Henry Miller
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
> https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |
| Date | 2018-09-12 21:54 |
| From | Steven Yi |
| Subject | Re: [Csnd] advance orchestra's internal clock? (time/times) |
| Attachments | time_test.csd |
You should be able to use the -+skip_seconds=float commandline flag to advance the time from where you start. Csound will drop score events and start the clock from the given time. This will not affect Orchestra code times though since that gets executed separately from score processing. The attached CSD demonstrates the effect. Try running it with "csound -+skip_seconds=0.25 time_test.csd" and look at the results from timeinstk() printed out starting later than 0. On Wed, Sep 12, 2018 at 12:29 PM cybilsopsin |
| Date | 2018-09-13 16:27 |
| From | cybilsopsin |
| Subject | Re: [Csnd] advance orchestra's internal clock? (time/times) |
Thank you Steven, that was exactly it. And Joachim pointed out something
important I had forgotten. Thanks for both examples.
Now when live-coding a long sequence-of-sequences-of-sequences, I can
schedule events from within the orchestra, and have a very elegant way to
skip around in the timeline yet be able to use absolute values in the
event-scheduling code.
-----
***cybilopsin***
"We are all guilty of crime, the great crime of not living life to the full." - Henry Miller
--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here |