Timeline Array
Can we use timeline arrays and a get_last on the array yet?
It compiles but it looks like it doesn’t work.
Only thing I found was a reference in TN657:
Is 9 years later the future yet?
It compiles but it looks like it doesn’t work.
Only thing I found was a reference in TN657:
TN657 wrote:Arrays of timeline ID's are not yet supported (08/09/2004), but we are considering adding support for them in the future.
Is 9 years later the future yet?
0
Comments
This is my work around:
DEFINE_CONSTANT long tlVolUp[] = {201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216} long tlVolUp_KP1 = 201 long tlVolUp_KP2 = 202 long tlVolUp_KP3 = 203 long tlVolUp_KP4 = 204 long tlVolUp_KP5 = 205 long tlVolUp_KP6 = 206 long tlVolUp_KP7 = 207 long tlVolUp_KP8 = 208 long tlVolUp_KP9 = 209 long tlVolUp_KP10 = 210 long tlVolUp_KP11 = 211 long tlVolUp_KP12 = 212 long tlVolUp_KP13 = 213 long tlVolUp_KP14 = 214 long tlVolUp_KP15 = 215 long tlVolUp_KP16 = 216 DEFINE_EVENT button_event[metreauKeypads,nMET6NRotationChannels] { push: { stack_var integer volButton stack_var integer index volButton = get_last(nMET6NRotationChannels) index = get_last(metreauKeypads) if (volButton == 1) { if (timeline_active(tlVolUp[index])) { timeline_kill(tlVolUp[index]) } timeline_create(tlVolUp[index],tmMET6NVolume,length_array(tmMET6NVolume),timeline_relative,timeline_repeat) } else { if (timeline_active(tlVolDown[index])) { timeline_kill(tlVolDown[index]) } timeline_create(tlVolDown[index],tmMET6NVolume,length_array(tmMET6NVolume),timeline_relative,timeline_repeat) } release: { stack_var integer index index = get_last(metreauKeypads) if (timeline_active(tlVolUp[index])) timeline_kill(tlVolUp[index]) if (timeline_active(tlVolDown[index])) timeline_kill(tlVolDown[index]) } } timeline_event[tlVolUp_KP1] timeline_event[tlVolUp_KP2] timeline_event[tlVolUp_KP3] timeline_event[tlVolUp_KP4] timeline_event[tlVolUp_KP5] timeline_event[tlVolUp_KP6] timeline_event[tlVolUp_KP7] timeline_event[tlVolup_KP8] timeline_event[tlVolUp_KP9] timeline_event[tlVolUp_KP10] timeline_event[tlVolUp_KP11] timeline_event[tlVolUp_KP12] timeline_event[tlVolUp_KP13] timeline_event[tlVolUp_KP14] timeline_event[tlVolUp_KP15] timeline_event[tlVolUp_KP16] { stack_var integer index stack_var integer nOutput index = timeline.id - 200 nOutput = metAudioOutputMap[index] if (audSwitcher[nOutput].input) { if (audioAdjustVolume(nOutput, 2)) { send_level metreauKeypads[index], 1, ((audSwitcher[nOutput].volume * 2) + 35) } } }I'm having a lot of problems with this where I have multiple devices and I need to wait / time some events for them.
The only way around seems to be copypaste techniques such as the proposed method above.
While you can't do a timeline array you can do a timeline stack. You can get most things done this way. Not as friendly or elegant but it works.