Search found 87 matches
- 27 Dec 2011 08:18
- Forum: General Discussion
- Topic: Midiout delay?
- Replies: 19
- Views: 6534
Re: Midiout delay?
@Macciza ??? I don't see a time() function, there is a time in-built variable, which I use in the example above. triggertime = time -1/120; ... if(triggertime > time ) return; ... triggertime+=60/BPM; The OnFrame is not used to calculate the timing, it's just there to trigger the event as I don't se...
- 26 Dec 2011 17:13
- Forum: General Discussion
- Topic: Ramp switches value
- Replies: 10
- Views: 2700
Re: Ramp switches value
Yep that's cool, I still have to implement it in my main template, dealing with Live as well.
Not sure what's going on with the jumping thing, normally it shouldn't, I'll check this later.
Not sure what's going on with the jumping thing, normally it shouldn't, I'll check this later.
- 26 Dec 2011 17:06
- Forum: General Discussion
- Topic: Midiout delay?
- Replies: 19
- Views: 6534
Re: Midiout delay?
And the time is indeed in seconds.
- 25 Dec 2011 19:04
- Forum: General Discussion
- Topic: Ramp switches value
- Replies: 10
- Views: 2700
Re: Ramp switches value
Yes, add an OnMidi script to the switches, set to controller, port_0, set the cc range and correct channel. Then we need to prevent to trigger our own cc. I think the code should be like this: decl n = MIDI_ARGS[0] - CC; if(n < 0 || n >= sizeof(x)) return; if(ramp_x[n] != 0) ramp_c--; ramp_x[n] = 0;...
- 25 Dec 2011 15:10
- Forum: General Discussion
- Topic: Ramp switches value
- Replies: 10
- Views: 2700
Re: Ramp switches value
You can give it a try: SwitchRamp.jzml.zip You can expand the switches to your will (no code to change), but for testing it's easier to have just a few. I assume that you use a range of CC so set the CC variable to the first CC you plan to use. Also the midi channel is set to 1, change it if needed....
- 25 Dec 2011 00:23
- Forum: General Discussion
- Topic: Ramp switches value
- Replies: 10
- Views: 2700
Re: Ramp switches value
You can use the OnFrame function like a for loop, just use some global variable.
Best is to use the array(vector) function to detect changes and then send the midi from the script.
I'll show you tomorrow how to handle that, as the array part can be a little tricky.
Best is to use the array(vector) function to detect changes and then send the midi from the script.
I'll show you tomorrow how to handle that, as the array part can be a little tricky.
- 24 Dec 2011 22:44
- Forum: Wishlist
- Topic: Missing me, this or something in scripts [use: getobject()]
- Replies: 8
- Views: 2076
Re: Missing me, this or something in scripts
Thanks, exactly what we were looking for and nice example btw.
Do you have by chance a list of all undocumented functions ?
Do you have by chance a list of all undocumented functions ?
- 24 Dec 2011 18:21
- Forum: General Discussion
- Topic: Midiout delay?
- Replies: 19
- Views: 6534
Re: Midiout delay?
Not sure I get this right, but when you hit the button you should set some variable to the current time as you probably want the first note right away. triggertime = time; Given that the function is called every 1/60 sec, to compensate, you could write: triggertime = time-1/120; Then, in the on fram...
- 24 Dec 2011 12:22
- Forum: Wishlist
- Topic: Timed midi output (delay)
- Replies: 0
- Views: 706
Timed midi output (delay)
I know that it's possible to use an OnFrame script with the time function to handle midi out timing but for the beginner to average scripter it's not such an easy task. There should be a midiout function that let's you specify when this event should be sent, the app taking care for the buffering and...
- 24 Dec 2011 09:23
- Forum: General Discussion
- Topic: Midiout delay?
- Replies: 19
- Views: 6534
Re: Midiout delay?
The idea is the same, if you have a tempo of 100 bpm this means that a beat is played every 0.6 sec (60/100) and as a 1/16 is a quarter of a beat your delay is then 0.15 sec. The other option is to sync to an external midi clock, in this case you need to watch incoming midi clock values. I made a sm...