New user - a few quick queries..

mojogigolo1

2011-07-13 17:37:41

Hi,

i bought a novation launchpad a while back, and recently got hubi so i could get it to work in a custom way. Ive never done anything like this, and while i think i got the project nearly done, there are a couple of quick queries:

1 - the launchpad has 64 main LED buttons. I wanted to use it as a sequencer, so ive got it so that each button turns a cc on a small amount, when hit again, goes up to max, then when hit again, goes back to zero, rules roughly like:

g0=g0+45
if g0>127 then g0=0.

BUT - not knowing about local/global variables, i set up all 64 buttons with 'g0' as the variable . SO - if all LEDS are off (at 0), then i hit the first once, i will get state 2 (note on), then if i hit the next button, that button jumps straight to state 3 (cc=90 ), full accent level. SO - this just makes controlling it a bit slower and more fiddly. I guess then that i need to replace this/ these G0's with a local variable. If i replace them all with one (please suggest which one, im lost), will that keep track of the 3 states of every one of the 64 buttons, so that even if the first button is at 2/3 on, when i hit the next button, that wont jump straight to 3/3 (full accent?). DO i need to assign a DIFFERNET local variable to each of the 64 buttons? (please god no).

2 -Um, also - note that the above g0+45 gives me THREE button states. If i went through ALL of the 64 buttons, and changed it to G0=10 (or whatever), i could get many more intermediate CC/volume levels output. SO - is there a way to set that '45' varibale somewhere (global?), so if i want to alter the amount of levels present, i can just tweak one variable (or better yet, link this to a controller), and all buttons will advance by that specified number? how do i code this?

3 - getting timers to sync with midi hosts - is this possible without brain surgery level stuff?

4 - re the local/global variables. im reading here that the G (and H) variables are global, whereas the aa, bb ones are local. DO any of the other letter combinations have intrinsic qualities of any sort? i cant find much of a pattern as i read the manual and these forums (again, this is all brand new to me).

5 - i have set key combinations that blank the cc values on a row by row basis. I was about to start coding a command to blank all 64 CCs - is there any way i can do this bar having the midi output as b0 01 00 b0 02 00 b0 03 00 etc..? t

I think thats all at the moment - thans heaps for reading, and i would appreciate even the most basic of help - this project has obsessed me, and im still trying to get up a working knowledge of the basics - thanks.

mojogigolo1

2011-07-19 16:18:06

any thoughts? even if you can answer a single dot point, that may help me start cleaning up this project ive been honing for weeks now..? thanks.

mojogigolo1

2011-07-20 19:06:19

ok, just one question i would love to get answered -

how do i set a local variable per note on the launchpad? i thought that the gx and hx were global variables, but seemingly the rest of them act no differently?

id thought a local variable would be one you could use again and again, and it would be translated discreetly per translator?

any help?

thanks.

synthmusic

2011-07-20 19:09:34

Local variables go away at the end of every trigger process. So if you use a local variable and send 45, it won't have any value the next time the button is pushed, and you won't know what's next.

It would seem god has chosen to smite you... From what I can tell, you would need a separate global variable per key using the below process, because the LP can not hold state itself. It always sends velocity 127 so you need to track everything in Bome's. Globals are in the range starting with g-n actually, so g0-gz, h0-hz, ..., n0-nz, are all valid globals. If each key had it's own global, your states would save per key. Not fun to do, but it works. I can't think of a slicker way that's not complicated at this point.

as to size, use another global for that. So use a translator that sets nz = 45

now the trigger for an incoming key might read:
g0=g0+nz
if g0>127 then g0=0.

mojogigolo1

2011-07-21 17:49:16

synthmusic - thanks heaps for your input, i been waiting for someone knowledgeable to help for days now...

a few moments after writing that last entry, i stumbled across the same insight - the local variables dont HOLD the value you give them. Likewise, i came to the same conclusion.

Oh well, there must be 64 (or close to it) global variables, so ill stop complaining and just set them up one at a time...

Big thanks again - appreciate the help :D