Page 1 of 1
Claviamat's switch mode not working
Posted: 20 Feb 2013 21:48
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/
Re: Claviamat's switch mode not working
Posted: 20 Feb 2013 21:58
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?
Re: Claviamat's switch mode not working
Posted: 20 Feb 2013 22:02
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?
Re: Claviamat's switch mode not working
Posted: 21 Feb 2013 18:51
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.
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
Re: Claviamat's switch mode not working
Posted: 22 Feb 2013 08:51
by Softcore
Great, thanks for checking this out!