glovepie script question
Posted: Sat Jan 07, 2012 11:54 pm
i'm new to writing scripts in general, so i was hoping someone could tell me where i'm screwing this one up.
what i'm trying to do is use glovePIE to make a ps2 dualshock controller send midi notes. i've got it so that triangle (button1) and circle (button2) send c3 and c4 notes, respectively. i want them to shift to sending different notes when i hold down L1 (button7). the current script works fine until i hold down L1 and press triangle or circle, at which time it plays all assigned notes (or more sometimes) instead of just the one i want it to send.
for example, i press button1 and qsamo plays c3. when i hold button7 and press button1 c3 and c5 play at the same time, instead of just playing c5, which is what i'm trying to accomplish.
here is the script, written in glovePIE:
i've tinkered with this to the best of my noob abilities, looking at it it seems to make logical sense, but its not working the way i want it to. any advice would be greatly appreciated. 

what i'm trying to do is use glovePIE to make a ps2 dualshock controller send midi notes. i've got it so that triangle (button1) and circle (button2) send c3 and c4 notes, respectively. i want them to shift to sending different notes when i hold down L1 (button7). the current script works fine until i hold down L1 and press triangle or circle, at which time it plays all assigned notes (or more sometimes) instead of just the one i want it to send.
for example, i press button1 and qsamo plays c3. when i hold button7 and press button1 c3 and c5 play at the same time, instead of just playing c5, which is what i'm trying to accomplish.
here is the script, written in glovePIE:
Code: Select all
midi.DeviceOut = 2; // default midi device
midi.DefaultChannel = 1; //midi channel
midi.C3 = joystick1.Button1 //triangle
midi.C4 = joystick1.Button2 //circle
//try to shift one octave up
if joystick1.Button7 = true then
midi.C5 = joystick1.Button1;
midi.c6 = joystick1.button2;
midi.C3 = false;
midi.c4 = false;
end if
