Claviamat's switch mode not working

Discuss problems and solutions.
Post Reply
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Claviamat's switch mode not working

Post by Softcore »

I have implemented Claviamat in a template of mine but its been quite some time since I tried to switch on the "switch" mode. What this does is it keeps the notes triggered held until you press it again. Unfortunately not only my template but also the original Claviamat versions' "switch mode" do not work anymore (Im suspecting they ceazed working right after Lemur 4 I just handt noticed).
Particularly of all the columns of keys (key, key2, key3 etc etc) ONLY the first one works correctly under "switch mode"....

I tried to look into the template to fix the issue but frankly after an hour or so, Im still not able to "decrypt" the scripts involved - frankly I even cant understand how the pads are kept held so to speak.

Any directions or has anyone stumbled upon the issue and fixed it?

Here is the original template:

http://liine.net/en/community/user-library/view/25/
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Claviamat's switch mode not working

Post by Softcore »

Ok I think I found it....



I THINK you need to change the switchmode() script from this

Code: Select all

if (Hold.x==1)
{

decl i;
for (i=0; i<4; i++)
{
hld[i] = !key.x[i];
hld[i+5] = !key2.x[i+5];
hld[i+10] = !key3.x[i+10];
hld[i+15] = !key4.x[i+15];
hld[i+20] = !key5.x[i+20];
hld[i+25] = !key6.x[i+25];
hld[i+30] = !key7.x[i+30];
hld[i+35] = !key8.x[i+35];
hld[i+40] = !key9.x[i+40];
hld[i+45] = !key10.x[i+45];
hld[i+50] = !key11.x[i+50];
hld[i+55] = !key12.x[i+55];

key.x[i] = !hld[i];
key2.x[i+5] = !hld[i+5];
key3.x[i+10] = !hld[i+10];
key4.x[i+15] = !hld[i+15];
key5.x[i+20] = !hld[i+20];
key6.x[i+25] = !hld[i+25];
key7.x[i+30] = !hld[i+30];
key8.x[i+35] = !hld[i+35];
key9.x[i+40] = !hld[i+40];
key10.x[i+45] = !hld[i+45];
key11.x[i+50] = !hld[i+50];
key12.x[i+55] = !hld[i+55];
}
}
else return;

to this

Code: Select all

if (Hold.x==1)
{

decl i;
for (i=0; i<4; i++)
{
hld[i] = !key.x[i];
hld[i+5] = !key2.x[i];
hld[i+10] = !key3.x[i];
hld[i+15] = !key4.x[i];
hld[i+20] = !key5.x[i];
hld[i+25] = !key6.x[i];
hld[i+30] = !key7.x[i];
hld[i+35] = !key8.x[i];
hld[i+40] = !key9.x[i];
hld[i+45] = !key10.x[i];
hld[i+50] = !key11.x[i];
hld[i+55] = !key12.x[i];

key.x[i] = !hld[i];
key2.x[i] = !hld[i+5];
key3.x[i] = !hld[i+10];
key4.x[i] = !hld[i+15];
key5.x[i] = !hld[i+20];
key6.x[i] = !hld[i+25];
key7.x[i] = !hld[i+30];
key8.x[i] = !hld[i+35];
key9.x[i] = !hld[i+40];
key10.x[i] = !hld[i+45];
key11.x[i] = !hld[i+50];
key12.x[i] = !hld[i+55];
}
}
else return;

Can anyone confirm?
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Claviamat's switch mode not working

Post by Softcore »

What strikes me as weird though is the fact that it USED TO WORK....and this change is kinda big and uhmmmm...what the hell could the update have caused? I mean in the initial script something is definitely not right (for i, there are key vectors used which do not exist)....

What gives?
mat
Regular
Posts: 124
Joined: 08 Dec 2011 09:21
Location: Germany
Contact:

Re: Claviamat's switch mode not working

Post by mat »

Hey Softcore,

thanks for pointing me at that....
I have no idea what happend! Sure it worked. And sure it wasn´t that code, cause it makes absolut no sense as each key got only 5 values. A key i+5 can not work. :o
Well, I have found that same mistake in all 6 modules (3 ipad and 3 legacy) but I am so sure I never programmed it that way....it makes no sense... how can something like that happen? And why is "else return;" now also red in code... no more allowed?

@ Liine: were there any changes with Lemur 4 that can influence code (even on Legacy templates)?
...or should I control if I do strange night coding while being a sleepwalker?


However, I fixed it and load it up to the user library.


Thanks again....
mat
Lemur modules and sequencer: http://music-interface.com
Setup: Win7professional 32bit, Intel Core 2 Duo @ 2,66 GHz.,Tascam US-144MKII, Ableton Live 8.4,
Arturia Analog Lab., Max/Msp, Maxforlive, Lemur Legacy + Ipad, Akai MPK61, Doepfer Pocket Control
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Claviamat's switch mode not working

Post by Softcore »

Great, thanks for checking this out!
Post Reply