[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] How to use timingOffset from the Quant class ? Can i tweak it while running a Task ?
On Sunday, December 29, 2013 10:12:06 AM HKT, henrique matias wrote:
So for instance if i want to have a fixed milliseconds delay to my Task
in
order to drive an external clock ( with midi messages ), and lets say
that
delay is 47 ms. So i would wish -47ms delay.
I would have to work out how many beats in the current tempo would result
in 47ms delay, and then if i change the tempo i would have to change the
timingOffset again proportionaly...
or is there another way of offseting using seconds ?
It sounds here like you want to schedule the task normally but have its
events sound slightly later. This is not what timingOffset does.
timingOffset makes events sound LATER and schedules EARLIER -- so that the
events should sound ***as if there were no offset***. So this is not what
you want for a fixed delay.
If this seems like nonsense, take a look at this for a concrete use case:
http://doc.sccode.org/Tutorials/A-Practical-Guide/PG_06g_Data_Sharing.html#Communicating%20values%20between%20separate%20event%20patterns
Note also, again, that timingOffset's delay behavior is part of the Event
prototype. If your Task is not using events, then timingOffset will not
automatically delay anything.
If your task is using Events, you can set \lag in the event. This is a
number of seconds to delay the sounding time. Otherwise, you can implement
your own delay inside the task:
SystemClock.sched(delay, { the sounding thing... })
hjh
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/