Radiobutton Question [SOLVED]

Discuss problems and solutions.
Post Reply
jbgeluid
Regular
Posts:60
Joined:16 Jan 2012 14:03
Radiobutton Question [SOLVED]

Post by jbgeluid » 04 Oct 2012 23:59

hello,

Ive been trying for a few days now to get the folowing script working, no succes yet:
I have a radiobutton with 8 switches, I use it for container-switching and to send different notes per switch. This all works fine.

I am looking for a script for a "sustaining" note 50, value 0 when my radio-button is at the first switch (0), and a "sustaining" note 50 value 127 for all other switches. (so Always note 50,value 127 when on buton 1,2,3,4,5,6,7 , not "switching" but on hold all the time) Whatever I try, I end up with a random toggeling note 50.


Anybody?
Last edited by jbgeluid on 05 Oct 2012 20:33, edited 1 time in total.
Cubase 11, Windows 10/
Intel I7 4930K @3.4Ghz/
multiple RME hammerfall cards
Controllers: Ipad2/16gb, Lemur, BCR2000
http://www.jbgeluid.nl

jbgeluid
Regular
Posts:60
Joined:16 Jan 2012 14:03

Radiobutton Question solved

Post by jbgeluid » 05 Oct 2012 20:32

found it...

scripts for a radiobutton called "Switches", make it send different notes per switch AND send an extra note, but only a 0 value at the first switch
the solution was;

radiobutton, 8 switches.
objectarget midi 0
target: none

action:
flip:
midi 0
midi 0
note on, 50 - 50
scale 0-127
chan 1
scrip1;def
on expression:x, _/- (message send when value goes from 0 to positive)

Code: Select all

decl ind=firstof(Switches.x);
if (Switches.x[0]==1) noteout (0, 42, 127, 1);
if (Switches.x[1]==1) noteout (0, 42, 127, 1);
if (Switches.x[2]==1) noteout (0, 44, 127, 1);
if (Switches.x[3]==1) noteout (0, 45, 127, 1);
if (Switches.x[4]==1) noteout (0, 43, 127, 1);
if (Switches.x[5]==1) noteout (0, 76, 127, 1);
if (Switches.x[6]==1) noteout (0, 80, 127, 1);
if (Switches.x[7]==1) noteout (0, 81, 127, 1);
script2,name def2
on expression x, X (message...when value reaches or leaves 0)

Code: Select all

if (Switches.x[0]<=1) flip = noteout (0, 50, 0, 1); 
if (Switches.x[0]>=1) flip = noteout (0, 50, 127, 1);
if (Switches.x[2]<=1) flip = noteout (0, 50, 127, 1);
if (Switches.x[4]<=1) flip = noteout (0, 50, 127, 1);
if (Switches.x[5]<=1) flip = noteout (0, 50, 127, 1);
if (Switches.x[6]<=1) flip = noteout (0, 50, 127, 1);
if (Switches.x[7]<=1) flip = noteout (0, 50, 127, 1);
Cubase 11, Windows 10/
Intel I7 4930K @3.4Ghz/
multiple RME hammerfall cards
Controllers: Ipad2/16gb, Lemur, BCR2000
http://www.jbgeluid.nl

Phil999
Regular
Posts:932
Joined:11 Jan 2012 01:53

Re: Radiobutton Question [SOLVED]

Post by Phil999 » 05 Oct 2012 23:00

congratulations :)
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro

Post Reply