Csound Csound-dev Csound-tekno Search About

[Csnd] syncronization

Date2011-09-06 10:25
Fromfrancesco
Subject[Csnd] syncronization
Hello All,
i have a csd that receive OSC messages that start some instruments.
What i would like to know:
is there a way i could put in time these events (syncronization?)?
For example: i receive the message circa every seconds, and i would like
that
event will start precisely every second.

Hoping to be enough clear,
thanks,
ciao,
francesco.


--
View this message in context: http://csound.1045644.n5.nabble.com/syncronization-tp4773778p4773778.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-09-06 11:24
Frompeiman khosravi
SubjectRe: [Csnd] syncronization
I suspect you could have a clock running inside your instrument that
only releases the received value on the next clock count - with a
sample-and-hold (samphold) and a phasor as control input (gate) you
could have a sample-accurate clock.

P

On 6 September 2011 10:25, francesco  wrote:
> Hello All,
> i have a csd that receive OSC messages that start some instruments.
> What i would like to know:
> is there a way i could put in time these events (syncronization?)?
> For example: i receive the message circa every seconds, and i would like
> that
> event will start precisely every second.
>
> Hoping to be enough clear,
> thanks,
> ciao,
> francesco.
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/syncronization-tp4773778p4773778.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-09-07 17:56
Fromfrancesco
Subject[Csnd] Re: syncronization
Thank You Mr. Peiman,
i solved in this roughly way:

; absolute time
ktime    times
: this is seconds of precision i want
iUnity    =        0.2

nxtmsg:
    ktrig        OSClisten    gihandle, "/trigger", "iffi", ktrigger_id,
ktrigger_x, ktrigger_y, kcursor_id

    if (ktrig == 0) kgoto ex
    if (ktrigger_id==11) then

    ; receiving time
    iricTime    times
    istart       =        iUnity - ((iricTime - i(ktime))%1)
    ; event start at the next iUnity step
    event      "i", 10, istart, $DUR

that seems to be right.

Please if someone see that i'm wrong tell me.

Thanks,
ciao,
francesco.


--
View this message in context: http://csound.1045644.n5.nabble.com/syncronization-tp4773778p4779294.html
Sent from the Csound - General mailing list archive at Nabble.com.


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"