Sequencer Shenanigans (Help gratefully received) :)

Discuss problems and solutions.
Post Reply
Blaakk
Newbie
Posts: 13
Joined: 19 Jan 2014 19:39

Sequencer Shenanigans (Help gratefully received) :)

Post by Blaakk »

Hey people. I'd be very happy if someone could lend a hand. I've tried allsorts. :(

I'm trying to map an array of 4 items to a 16 item one, basically by substituting each pad (in each row) with a predetermined size 4 vector. Then with this new size 16 array, switch each StepSwitch' steps' state according to the array. For example, if I press the 1st[0] and 3rd[2] pads together, I want the resulting {1,0,1,0} to map to {1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0} on the StepSwitch sequencer.
Steppy.jpg
Steppy.jpg (56.69 KiB) Viewed 4612 times
Here's the template...
TriggerSeqHelp.jzml
(10.95 KiB) Downloaded 111 times
I'm probably being silly somewhere.....

Thanks.

[Edit]Apologies, didn't intend to post in the modules section.
Last edited by Blaakk on 21 Mar 2014 20:11, edited 1 time in total.
oldgearguy
Regular
Posts: 315
Joined: 02 Nov 2013 11:19

Re: Sequencer Shenanigans (Help needed)

Post by oldgearguy »

I changed your Row1.SetSeq() code to this and it seems to do what you want. It's slightly inelegant in that it resets all switches, but with only 4/16 to work with it does the job. You might be able to improve it by only setting the ones that changed, but this works.

Oh - I also changed the "On expression" condition (in SetSeq()) from x 'any' to x 'going up' so that the code is not called twice for every keypress and release and only for the keypress. (That 'any' case caused me headaches in the past, so I tend to look for that situation).

Code: Select all

decl i, j;

for (i=0; i < 4; i++) {
   for (j=0; j < 4; j++)
     StepSwitch.x[(i*4)+j] = x[i];
}

/*
decl totalSeq; 
decl Seq;
if(x[0]) Seq={1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0};
return;
if(x[1]) Seq={0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0};
return;

*/
Blaakk
Newbie
Posts: 13
Joined: 19 Jan 2014 19:39

Re: Sequencer Shenanigans (Help needed)

Post by Blaakk »

Thank you oldgearguy!

This helped me quite a bit. Aaaand it's good, I want it to reset any switches already on (at least for this 'circumstantial' ReTrig mode :D ). Basically, I'm acting on the thought of making a simple extension of Maschine's 'Note Repeat' button.

I've been playing and I had four rows, and I was trying to arrive at creating a similar scenario with any combination of pads, one from each column. So with the 2nd row, I've just amended your code as follows

Code: Select all

		if (j==3);
        else StepSwitch.x[(i*4)+j] = x[i];
To give {1,1,1,0}, then (j==2) for {1,1,0,1}, etc. But I know this is flawed when combining rows. So I've been trying to have each row send its active subarrays to a global script, then combine them, before passing them to StepSwitch.x. I can think of countless ways to do this, but struggling to translate any of them.

Since starting this reply, I've figured using columns would be more logical in this case. Would storing the initial 15 combinations {0,0,0,1},{0,0,1,0},etc, (other than {0,0,0,0}) as separate variables be better within each object, or globally? If globally, calling from these or from a 60-character length array? Does anyone know much about the 'on pad pressed' trigger?

I've just noticed the 'Storing Values' JazzMutant workshop, which should help me progress a bit further.

Thanks again. Very appreciated. I'm trying to shed my habit of being too determined to solve something unaided. I really should pause, and ask, sooner.
oldgearguy
Regular
Posts: 315
Joined: 02 Nov 2013 11:19

Re: Sequencer Shenanigans (Help needed)

Post by oldgearguy »

maybe I need more coffee this morning, but I'm having difficulty trying to picture what you want. Do you have multiple rows of 16 and then multiple rows of controller pads (4 in a row)? Or is it some other structure?
Blaakk
Newbie
Posts: 13
Joined: 19 Jan 2014 19:39

Re: Sequencer Shenanigans (Help needed)

Post by Blaakk »

No, I think I'm to blame, not the lack of coffee. :)

I tried to explain in words but thought it would be easier to show you. For this I quickly amended the original file from this thread....
TriggerSeqHelp2.jzml
(31.27 KiB) Downloaded 118 times
Yesterdays 'proper coding' attempt failed.

The switch above the 1st column of pads switches the column below it between 2 columns of 4 pads each. Column4.setSeq() shows my failed attempt at only replacing part of a vector (so other StepSwitch switches don't switch off until I release the pads).
Blaakk
Newbie
Posts: 13
Joined: 19 Jan 2014 19:39

Re: Sequencer Shenanigans (Help needed)

Post by Blaakk »

I managed to get it working (with two columns)....
TriggerSeqHelp3.jzml
(32.36 KiB) Downloaded 113 times
I'm overthinking myself into confusion with a lot of things. At one point, all the 1's and 0's had me trying to use bitwise operands to add vector indices 'n' ****, rather than remembering stuff like a+b={a¹+b¹, a²+b², etc}. Tut. Getting to grips with the differences between 'expressions' and 'attributes', and whether 'expression a' should be calling 'expression b' or vice versa, the syntax, and generally thinking I can run before I can walk is throwing me off.

If there's any advice you can give on the way I could be looking at things to improve the code's efficiency, then please do. But as far as what I had in mind, in terms of StepSwitch.x functionality, its sorted. :)

Thanks again!
oldgearguy
Regular
Posts: 315
Joined: 02 Nov 2013 11:19

Re: Sequencer Shenanigans (Help needed)

Post by oldgearguy »

here's a couple variations -- not sure if I'm actually capturing the functionality you want or not...

kept 4 separate columns of pads
TriggerSeqHelp4.jzml
kept 4 separate coulmns
(20.82 KiB) Downloaded 122 times
one big pad with more math
TriggerSeqHelp5.jzml
one big pad
(13.49 KiB) Downloaded 117 times
Blaakk
Newbie
Posts: 13
Joined: 19 Jan 2014 19:39

Re: Sequencer Shenanigans (Help needed)

Post by Blaakk »

Hey,

Thanks again for your time. You've been a huge help in me getting to grips with this stuff. And, nope. Close, but I wanted the pad's 'on expression' set at 'any' for more variations. My idea kinda stems from a drumkit exercise where you'd play a simple basic rock ostinato, yet shift the kick drum placements (and then the snare, and the hats) to cover all variations, like with my arrays. So basically I could key in exactly what sequence (of 16) I wanted without looking, but only if I could switch columns without hassle.

I've yet to study the 5th example properly but regarding the 4th.... am I right in thinking the 'id' and 'offset', or anything in a script title's parenthesis, is a declared variable which allows you to execute it manually, and use call it from anywhere else in the project? I attempted to factor in the {0,0,0,0} on release into your coding, but again failed. Think it was probably poor syntax.

In an attempt to descend from the peak of my confusion, I've been working on another, actually usable, template
SeqEvolved.jzml
(79.01 KiB) Downloaded 121 times
utilising the StepNote sequencer. I'm pretty amazed by this. Been seeking this level of control for a while. Dying to start making it look pretty, and make it more ergonomical, with canvassing. Will take a peek, but must focus on tightening for now. Getting it to work with the PC is trouble though... Daemon drops, inconsistent parameter values, and a crashing editor... But runs great on my old MacBook synced to Maschine's clock anyhoo.

So thanks again. I'll try and make use of the 4x4 grid still somehow, but maybe have the pads follow my fingers, in case they stray, or something.

So what do you use your Lemur for mostly? Are you new to it, or just new to the forum? What 'old gear' are you into?
oldgearguy
Regular
Posts: 315
Joined: 02 Nov 2013 11:19

Re: Sequencer Shenanigans (Help needed)

Post by oldgearguy »

Blaakk wrote:Hey,

Thanks again for your time. You've been a huge help in me getting to grips with this stuff. And, nope. Close, but I wanted the pad's 'on expression' set at 'any' for more variations. My idea kinda stems from a drumkit exercise where you'd play a simple basic rock ostinato, yet shift the kick drum placements (and then the snare, and the hats) to cover all variations, like with my arrays. So basically I could key in exactly what sequence (of 16) I wanted without looking, but only if I could switch columns without hassle.

I've yet to study the 5th example properly but regarding the 4th.... am I right in thinking the 'id' and 'offset', or anything in a script title's parenthesis, is a declared variable which allows you to execute it manually, and use call it from anywhere else in the project? I attempted to factor in the {0,0,0,0} on release into your coding, but again failed. Think it was probably poor syntax.

In an attempt to descend from the peak of my confusion, I've been working on another, actually usable, template
SeqEvolved.jzml
utilising the StepNote sequencer. I'm pretty amazed by this. Been seeking this level of control for a while. Dying to start making it look pretty, and make it more ergonomical, with canvassing. Will take a peek, but must focus on tightening for now. Getting it to work with the PC is trouble though... Daemon drops, inconsistent parameter values, and a crashing editor... But runs great on my old MacBook synced to Maschine's clock anyhoo.

So thanks again. I'll try and make use of the 4x4 grid still somehow, but maybe have the pads follow my fingers, in case they stray, or something.

So what do you use your Lemur for mostly? Are you new to it, or just new to the forum? What 'old gear' are you into?
Yes - stuff in parentheses are parameters passed into manual scripts. This allows you to have a generic script to handle things and pass in the values you need it to act on each time.

old gear... well, I used to have a huge (100+) collection of analog synths and drum machines, four 7' racks of effects, large mixer, tape machines, etc. I've cut that down considerably, but still have some choice pieces.

My first attempt at Lemur programming is creating an editor for the Yamaha TX-802 synth. I've been programming professionally for almost 30 years, so yet another platform isn't so bad to learn. My main use for Lemur is as a dedicated set of 'knobs and buttons' to edit a couple synths I have in rack form that could benefit form an editor and/or dedicated interface.
Blaakk
Newbie
Posts: 13
Joined: 19 Jan 2014 19:39

Re: Sequencer Shenanigans (Help gratefully received) :)

Post by Blaakk »

I have a Juno-2, and that's about it in terms of old tech gear. Just dug it out of storage to give it some new life. :D

I notice the TX-802 boasts 'microtonal scales'. Something I've been meaning to explore for a while now.
Post Reply