glovepie script question

Post Reply
User avatar
szaszhareen
Posts: 527
Joined: Wed Nov 23, 2011 1:15 am
Location: deep beneath the earths crust

glovepie script question

Post by szaszhareen »

i'm new to writing scripts in general, so i was hoping someone could tell me where i'm screwing this one up. :mrgreen:

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
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. :D
User avatar
UNZ
Posts: 808
Joined: Mon Nov 21, 2011 9:42 pm
Contact:

Re: glovepie script question

Post by UNZ »

dunno what language this is in but maybe you ment to write

if joystick1.Button7 == true then
User avatar
szaszhareen
Posts: 527
Joined: Wed Nov 23, 2011 1:15 am
Location: deep beneath the earths crust

Re: glovepie script question

Post by szaszhareen »

glovepie appears to have its own syntax. == didnt change the outcome, although it still worked as it did before. thanks tho :)

the documentation is here: http://glovepie.org/w/index.php?title=P ... tion_v0.43
User avatar
szaszhareen
Posts: 527
Joined: Wed Nov 23, 2011 1:15 am
Location: deep beneath the earths crust

Re: glovepie script question

Post by szaszhareen »

this appears to be an issue with qsamo. i tried this script with a vst and it worked fine. now i've got to figure out how to change midi cc1 with the left analog stick.

this is something that may be obvious to people who have worked with programming knobs/sliders (x-posted from the seemingly defunct glovepie forums):

i'm trying to get my joystick to work as a "knob" or "wheel". i'm sending midi modwheel changes with my joystick to adjust a knob in a vst, and its working great, but i would like to change the way it works. here is the code i'm working with:

Code: Select all

//Left Analog Stick
midi.ModWheelCoarse = MapRange(Smooth(Joystick1.x), -1,1, 0,1)
midi.ModWheelCoarse = MapRange(Smooth(Joystick1.y), -1,1, 0,1)

i would like to make it so that if i pull the joystick straight down (y axis), the knob goes to 0, and as i rotate it clockwise, the knob rotates clockwise, and vice versa. i would also like the knob to stay in place if i release the joystick. any advice would be greatly appreciated. :)
retrigger
Posts: 19
Joined: Wed Jan 04, 2012 11:53 pm

Re: glovepie script question

Post by retrigger »

What OS are you using? I didnt manage to make glove pie work on my win7 64bit... If you did, please tell me!!


Raul
Post Reply