Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
30 Documentation
COPYRIGHT
VISTA
NEW! LANGUAGES
GLOVEPIE SCRIPTS COMMANDS AND OTHER STATEMENTS FUNCTIONS OPERATORS GLOVEPIE GUI OVERVIEW OUTPUT DEVICE CHANNEL BOX CATEGORY BOX THE ITEM LIST THE FORMAT BOX LIMIT OUTPUT TO RANGE INPUT SOURCE MORE BUTTON APPLY BUTTON DELETE BUTTON HOW TO USE THE GUI WITH OTHER FEATURES GLOVEPIE OSC (OPEN SOUND CONTROL) USING THE SENDOSC AND BROADCASTOSC FUNCTIONS USING THE OSC OBJECTS RECEIVING OSC MESSAGES 3D VISUALISATION CAMERA POSITION BACKGROUND COLOUR STEREOSCOPIC 3D CAMERA LENS MOUSE
MOUSE.DIRECTINPUTX AND MOUSE.DIRECTINPUTY NEW! FAKEMOUSE.DIRECTINPUTX AND REALMOUSE.DIRECTINPUTX MOUSE.DIRECTINPUT D THE SCROLL WHEEL MOUSE.CURSORPOSX AND MOUSE.CURSORPOSY MOUSE.CURSORPOS MOUSE.X AND MOUSE.Y MOUSE.SCREENFRACTION MOUSE.VIRTUALDESKTOPX AND MOUSE.VIRTUALDESKTOPY MOUSE.DESKTOPFRACTION MOUSE BUTTONS MOUSE.DOUBLECLICKTIME MOUSE.ISDRAGGING MOUSE.COUNT MOUSE.CURSORVISIBLE MOUSE.CURSOR MOUSE.PERMANENTCURSOR SWALLOWING THE MOUSE MOUSE.PRESENT FAKE CURSORS CURSOR .VISIBLE NEW! CURSOR .ROLL NEW! CURSOR .COLOUR NEW! CURSOR .WHITECOLOUR NEW! CURSOR .CAPTION NEW! CURSOR .PERMANENTCURSOR ! " NEW! CURSOR .IMAGE CURSOR .SHIFT AND CURSOR .CTRL NEW! TOUCHPAD
KEYBOARD SPECIAL KEYBOARD FIELDS MULTIPLE KEYBOARDS KEYS THAT CAN#T BE USED KEYS THAT SORT OF WORK UNICODE CHARACTERS NUMBER KEYS TOP ROW NUMBER ROW $WERTY ROW NEXT ROW NEXT ROW SPACE BAR ROW CURSOR PAD NUMERIC KEY PAD STUPID BLOODY F"LOCK FUNCTION KEYS MULTIMEDIA KEYS
NEW! ACER LAPTOP EURO AND DOLLAR KEYS OTHER KEYS LEFT% RIGHT OR DON#T CARE PPJOY
JOYSTICK FORCE FEEDBACK BUTTONS AXES POV HATS JOYSTICK INFORMATION MULTIPLE JOYSTICKS THE &ANY' OBJECT% FOR ANY KIND OF GAMEPAD THE JOYSTICKS AND DPADS THE TRIGGER BUTTONS SELECT AND START BUTTONS THE MAIN BUTTONS THE BUTTONS BASED ON WHICH FINGER YOU PRESS THEM WITH VIBRATION WIIMOTE (NINTENDO WII REMOTE) BLUETOOTH USING THE WIIMOTE IN GLOVEPIE BUTTONS MOTION SENSING ROTATIONS SENSOR BAR LEDS FORCE FEEDBACK SPEAKER NUNCHUCK% CLASSIC CONTROLLER% GUITAR% AND BALANCE BOARD NUNCHUK CLASSIC CONTROLLER NEW! GUITAR HERO 3 CONTROLLER NEW! WII FIT BALANCE BOARD LOW LEVEL STUFF MULTIPLE WIIMOTES P( GLOVE BUTTONS FINGERS LOCATION ROTATION
MIDI MIDI PORTS MIDI CHANNELS PLAYING NOTES PLAYING PERCUSSION READING NOTES SETTING THE INSTRUMENT PITCH WHEEL CONTROLS AND CHANGE CONTROL MESSAGES RPN (REGISTERED PARAMETER NUMBERS) NRPN (NON REGISTERED PARAMETER NUMBERS) SYSEX (SYSTEM EXCLUSIVE) SPEECH MAKING GLOVEPIE TALK SPEECH RECOGNITION PUSH"TO"TALK OTHER MICROPHONE STUFF NEW! VIRTUAL REALITY HMDS NEW! VR) * +,** TRIMERSION NEW! TRACKIR NEW! TRACKIR EMULATION NEW! READING TRACKIR LIKE A GAME RAW TRACKIR CAMERA INPUT NEW! NOVINT FALCON
NEW! PLAYSTATION 3 SIXAXIS INSTALLATION USING SIXAXIS IN GLOVEPIE BLUETOOTH SOMETIMES IT STOPS WORKING NEW! PLAYSTATION 3 BDREMOTE
SCREEN NEW! ORIENTATION NEW! SCROLLING THE ENTIRE SCREEN SI+E POSITION PLUG . PLAY MONITOR STUFF SCREENSAVER STUFF GLOVEPIE STUFF OTHER STUFF WINDOW
INTERSENSE TRACKERS
Copyright
Vista
NEW! Languages
GlovePIE Scripts
Commands and other Statements
Comments Comments are text which does nothing. They only help the human who is trying to read your script usually you!. The computer ignores them. Comments can have the "ollowing syntax# // This is a comment /* This is a multi-line comment It goes over multiple lines like this */ This is a BASIC style comment REM This is also a BASIC style comment % This is a MATLAB style comment Assignment statements The most common $ind o" statement in GlovePIE is the assignment statement. It has one o" the "ollowing "orward syntaxes# LValue = expression [ ; ]
LValue := expression [ ; ] or the "ollowing %ac$wards syntax# expression => LValue [ ; ] These statements all set the &'alue to the value o" the expression. I" it is inside an I( statement then it will always set the value. I" it is not inside an I( statement then it will )*&+ set the &'alue when the expression changes. This means you can set a varia%le, such as a $ey, several times# Ctrl - var.a Ctrl - var.% .hich has a similar e""ect to# Ctrl - var.a or var.% The expressions can %e any complicated mathematics that you want, or /ust another value. New! athematical assignment statements
I" you want to add something to a value, you have always %een a%le to say# &'alue - &'alue 0 expression 1ut now you can write the same thing a shorter way, li$e in C and 2ava# &'alue 0- expression
1oth ways change &'alue %y adding expression onto it. There are also other ways to increase a value, see the 3Increment statements4 section %elow. +ou can also do su%traction, multiplication, or division %y using 5-, 6- or 7I! statements 8ometimes you will want to only do a set o" commands when some condition is true. +ou can do that with I( statements. I" statements can have one o" the "ollowing syntaxes# if condition then statement [ ; ] if ( condition ) [then] statement [ ; ] if condition [then] [begin] [ { ] statement [ ; ] statement [ ; ] [ } ] [end [if]] [ ; ] if condition [then] [begin] [ { ] statement [ ; ] statement [ ; ] [ } ] [end] else [begin] [ { ] statement [ ; ] statement [ ; ] [ } ] [end [if]] [ ; ] if condition [then] [begin] [ { ] statement [ ; ] statement [ ; ] [ } ] [end] (else if|elseif) condition! [then] [begin] [ { ] statement [ ; ] statement [ ; ] [ } ] [end] (else if|elseif) condition" [then] [begin] [ { ] statement [ ; ] statement [ ; ] [ } ] [end] else [begin] [ { ] statement [ ; ] statement [ ; ] [ } ] [end [if]] [ ; ]
W"ILE loops .hile loops are *)T very use"ul in PIE %ecause PIE is not a linear language. 9 PIE script continuously loops through the entire script, even while I( statements are running in the %ac$ground. I" you thin$ you need a while loop then you are pro%a%ly loo$ing at the pro%lem the wrong way.
*evertheless, PIE does support while loops in the unli$ely event that you do need them. The entire while loop will %e executed in one go. +ou can:t use it to wait "or some condition triggered elsewhere yet!. The syntax is one o" the "ollowing# while condition do statement [ ; ] while ( condition ) [do] statement [ ; ] while condition [do] [begin] [ { ] statement [ ; ] statement [ ; ] [ } ] [end [while]] [ ; ] I" you ma$e a mista$e and create an in"inite loop, then it will give up a"ter a "i"th o" a second and spea$ ;in"inite loop;.
!#$ loops (or loops aren:t as use"ul in PIE as they are in other languages, %ecause PIE is not a linear language. 9 PIE script continuously loops through the entire script, even while I( statements are running in the %ac$ground. I" you thin$ you need a "or loop then you may %e loo$ing at the pro%lem the wrong way. The entire "or loop will %e executed in one go. +ou can:t use it to wait "or some condition triggered elsewhere yet!. The syntax is one o" the "ollowing# for varia#le (=|:=) InitialValue (to|downto) $inalValue [step amount] do statement [ ; ] for varia#le (=|:=) InitialValue (to|downto) $inalValue [step amount] [do] [begin] [ { ] statement [ ; ] statement [ ; ] [ } ] [end [for]] for ( initiali%ation ; condition ; increment ) [do] statement [ ; ] for ( initiali%ation ; condition ; increment ) [do] [begin] [ { ] statement [ ; ] statement [ ; ] [ } ] [end [for]] I" you ma$e a mista$e and create an in"inite loop, then it will give up a"ter a "i"th o" a second and spea$ ;in"inite loop;. Wait comman% .ait commands are "or use in macros. Everything inside an I( statement is considered a macro. 9 wait command will pause only the macro it is inside o", while the rest o" the script will $eep going in the %ac$ground. I" you have nested i" statements inside each other, then it will only pause the innermost i" statement. 8o don<t
use it inside an i" statement which is already inside an i" statement itsel". The syntax is either# wait duration [ ; ] wait& duration ' [ ; ] +ou should normally speci"y the units "or the duration. 'alid units are# milliseconds ms!, seconds s!, minutes, hours, days. eg. wait =00 ms wait = second wait >00 milliseconds!? Increment statements +ou can add one to something using one o" these syntaxes# var.x00 00var.x Inc var.x! These are commands, not "unctions li$e in C. 8o you can<t set something else to e@ual var.x00. +ou can su%tract one "rom something li$e this# var.x55 55var.x Dec var.x! S"$ an% S"L statements +ou can shi"t a value<s %its to the le"t or right with the 8AB and 8A& commands# eg. shr var.x, = Say comman% +ou can use the 8ay command to ma$e GlovePIE spea$# 8ay 3hello world4 or 8ay 3hello world4!
O/012 C3445678
Functions
NEW! Pi(el colour !unctions 8creenPixel x, y!# colour o" screen pixel at x, y! as an integer, in hexadecimal it loo$s li$e 0xBBGG11. This is the opposite o" the way the windows D&&s do it, %ut it is the way the internet and DirectC do it. To display it# De%ug - 30x40 IntToAex 8creenPixel 0, 0!, D! +ou can also treat it li$e a vector#
Evar.r, var.g, var.%F - 8creenPixel 0, 0! de%ug - var.r0<, G0var.g0<, G0var.% That will set var.r, var.g, and var.% to the values %etween 0 and = corresponding to the amount o" red, green, and %lue in the colour. The 0, 0! coordinates could %e any pixel coordinates. )rigonometry !unctions 9ll angles are measured in degrees %y de"ault. The "ollowing trigonometry "unctions are implemented# 8tandard trig "unctions# sin, cos, tan, sec, cosec, cotan Ayper%olic trig "unctions# 8inA, CosA, TanA, 8ecA, CosecA, CotA Inverse trig "unctions# a8in, aCos, aTan, a8ec, aCosec, aCotan Inverse Ayper%olic trig "unctions# a8inA, aCosA, aTanA, a8ecA, aCosecA, aCotanA HD inverse tan "unction# atanH $oun%ing !unctions These "unctions preserve the units o" their parameters. ceil# Bounds towards in"inity "loor# Bounds towards negative in"inity trunc, int# Bounds towards Iero round# Bounds towards nearest integer. .> rounds to nearest even num%er 1an$ers: Bounding! "rac# Beturns signed "ractional component. eg (rac 5=.3H! - 50.3H BoundTo x, digits!# I" digits is negative, rounds to that many decimal places using 1an$er:s Bounding I" digits is positive, rounds to that power o" ten using 1an$er:s Bounding. 8impleBoundTo x E, digitsF!# 8ame as BoundTo except 0.> always rounds up. Jn"ortunately 5=.> rounds up to =. digits de"aults to 5H meaning H decimal places!. Sign !unctions 8ign# returns the sign o" a num%er. = i" it is positive, 0 i" it is Iero, 5= i" it is negative 9%s# returns the modulus or a%solute value. Bemoves the sign o" a num%er. Preserves units. E(ponential an% S*uare $oot !unctions Baising things to the power o" something# s@r x!# caculates xKH s@rt x!# calculates the s@uare root o" x. xK =7H! power x,y!# calculates xKy intPower x,y!# calculates xKy where x and y are integers the result is not an integer i" y is negative! exp x!# calculates eKx. e is H.L=MHM. The derivative o" eKx is eKx. &dexp s,p!# calculates s 6 HKp! Poly x, a0, Ea=, EaH, Ea3, EaN, Ea>, EaDFFFFFF!# returns a0 0 a=6x 0 aH6 xKH! 0 a36 xK3! 0 aN6 xKN! 0 ... &ogarithms undoing raising something to some power!#
&og=0 x!# returns the num%er you have to raise =0 to the power o", in order to get x. eg. &og=0 =000! - 3 &ogH x!# returns the num%er you have to raise H to the power o", in order to get x. eg. &ogH H>D! - M &og* *, x!# returns the num%er you have to raise * to the power o", in order to get x. eg. &og* =0, =000! 3 &n x!# returns the num%er you have to raise e H.L=MHM! to the power o", in order to get x &nCP= x!# the same as a%ove, %ut "or x0= instead o" x Comparison +unctions IsOero x!# returns true i" x is Iero IsIn"inite x!# returns true i" x is in"inite Is*a* x!# returns true i" x is not a num%er 8ame'alue a, % E, epsilonF!# returns true i" a and % are the same, or di""er %y no more than epsilon In8et x,a,%,c,d,e,",g,...!# returns true i" x matches one o" the values "ollowing it. max a,%!# returns the maximum o" two values. Preserves units. min a,%!# returns the minimum o" two values. Preserves units. $ange +unctions EnsureBange x, a, %!# Beturns the closest value to x which is within the range Ea, %F. Preserves units. InBange x, a, %!# Beturns true i" x is within the range Ea, %F. PapBange x, a, %, c, d!# Beturns value x converted "rom the range Ea, %F to the range Ec, dF. 'alues outside the original range will map to the appropriate values outside the new range. EnsurePapBange x, a, %, c, d!# The same as PapBange except values outside the range are mapped to the closest values inside the range. NEW! DeadOone x, a!# Beturns value x %etween 5= and =, %ut with a deadIone around Iero, so that values within the range E5a, aF o" the Iero point %ecome 0, and other values %etween 5= and = are scaled to compensate. +ou should only use this "unction "or values roughly %etween 5= and =, li$e /oystic$ values. $an%om +unctions Bandom# Beturns a random "ractional num%er %etween 0 and =. Bandom n!# Beturns a random whole num%er %etween 0 and n5=. BandomBange a,%!# Beturns a random whole num%er %etween a and %. BandG mean, 8tandDev!# Beturns a random num%er "rom gaussian distri%ution around mean. Preserves units. #r%inal +unctions odd n!# Beturns true i" n is odd pred n!# Beturns n5= succ n!# Beturns n0= ,ate-)ime +unctions NEW! Time8tamp or GetTime8tamp# 9 precise timestamp measured in seconds, "rom an ar%itrary starting point. Puch more accurate than the other time "unctions which are measured in days!. *ow# Current time and date in days since Decem%er 30, =MQQ! Time# Current time in "ractions o" a day! Date# Current date in days since Decem%er 30, =MQQ! Tomorrow# Tomorrow:s date in days since Decem%er 30, =MQQ! +esterday# +esterday:s date in days since Decem%er 30, =MQQ! Current+ear# Current year o" the Gregorian calendar in years!.
Date)" x!# Beturns the date part o" the date and time in x in days since Decem%er 30, =MQQ! Time)" x!# Beturns the time part o" the date and time in x in "ractions o" a day! Dayo"themonth x!, dayo"thewee$ x!, dayo"theyear x!, dayo"wee$ x!, Days%etween x, y!, Daysinamonth x, y!, daysinayear x!, daysinmonth x!, daysinyear x!, Day8pan x, y!, Aour)"TheDay x!, Aour)"ThePonth x!, Aour)"The.ee$ x!, Aour)"The+ear x!, Aours1etween x, y!, Aour8pan x, y!, IncDay x, EyF!
)emporal +unctions
NEW! ,elta&(' Aow much x has changed since the previous GlovePIE "rame. It will %e negative i" x has decreased. Smooth&(. /E(tra!rames. /,ea%0an%,istance11' 8mooths out the value o" x %y averaging with the previous Extra(rames "rames. I" it hasn<t changed %y more than Dead%andDistance it doesn<t count as changed at all. 1y de"ault Dead%andDistance is 0. NEW! 2alman&(. noise3. noise4' 8mooths using a Ralman "ilter, in theory. It has a tendency to diverge i" you get the noise values wrong. Don<t as$ me what the correct noise values are. Presse%&('. Clic5e%&('. SingleClic5e%&('. ,ou0leClic5e%&(' Beturns true or "alse. "el%,own&(. in)ime'
Beturns true i" x has %een held down "or at least PinTime. 2eep,own&(. in)ime'
Reeps the result %eing true a"ter x has stopped %eing true, until PinTime is up.
Operators
59: 5 ;<=8 : 5 567 : 5 :=/ : . 5.: 5": 5 4>6=8 : ": 63/ : 5?: 5@: 5 />418 :
5 4=</>;<>17 :A : 5 B2388 : 5.: 5 73/ : 5C: 5 7>D>717 :A : 7>D32 5 7>D : 63/ 5 437 : 5E: 5 32 : 1>/012 5 32 : F 61>/012 5 632 : 5F: 5 ?32 : :=/ 63/ :3/0. 5G: 5 @@ : 5 GG : :! :!! 5 80< : 5 HH : 5 802 : 5 II : F:F 5E 5E 3J : 5 E 3J : 5!: 5 !! : 5 !! : 5 HI : 5 >86#/ : 5 >8 63/ : 5 K! : 5 !K! : 5 K!! : 5I:
GlovePIE G6I
Overview Output Device Channel Box Category Box
3780it Controls 9::;3 <80it Controls =7::>? <80it Controls >=::34< Coarse Controls 9::;3 !ine Controls 9::;3 #ther Controls Percussion Notes #ctaves 9::7 Notes #ctaves ?::39 Note Velocity o9::o7 an% Note Velocity o?::o39 Note Pressure o9::o7 an% Note Pressure o?::o39
The Item List The Format Box Limit Output To Range Input Source
Input ,evice Num0er
ore! Button
aths $ight "an% Si%e o+ !unction aths E(pression
"pply Button Delete Button #ow to use the $%I with other &eatures
;, Visualisation
Camera )osition Bac*ground colour Stereoscopic +D Camera Lens
ouse
ouse,DirectInput- and
R=6 56A
ouse,DirectInput.
ouse:Wheel,own
ouse,Cursor)os- and
F5L1 C=28328.
ouse,Cursor)os.
!a5e Cursors
43=81 43=81
Cursor3,visi'le /012 Cursor3,Roll /012 Cursor3,Colour /012 Cursor3,1hiteColour /012 Cursor3,Caption /012 Cursor3,)ermanentCursor 5 63 /012 Cursor3,Image Cursor3,Shi&t and Cursor3,Ctrl
NEW! )ouchpa%
2ey0oar%
Special 7ey'oard Fields ultiple 7ey'oards
L1A:3527L1A:3527M
y ,ocuments
MA D3B=416/8
essenger
M18816N12
Top Row
E8B5;1 FM% F % F3% FP% F(% F-% FQ% F,% F)% FM*% FMM% FM % FM3% FMP% FM(% FM-% FMQ% FM,% FM)% F *% F M% F % F 3% F P P2>6/SB2116SA8R1RP5=81B215LSB23<<L3BL P5=81P5=81M17>5P5=81 P5=81M17>5P5=81 SA8R1 R B215 LB215LN=4L3BLB215LP5=81SA8R1RP2>6/SB2116B215LC/2<9P5=81SA8R1RA</9P2>6/SB2116
/um'er Row
C3683<1% O61% TO3% T0211% F3=2% F>D1% S>?% S1D16% E>N0/% N>61% +123% M>6=8% ER=5<8%
B5BL8<580% B5BL8;5B1
9werty Row
T5:% $% W% E% R% T% Y% U% I% O% P% L1J/B25BL1/% R>N0/B25BL1/% B5BL8<580
/ext Row
C5;8L3BL% A% S% D% F% G% H% J% K% L% S14>B3<36% A;38/23;01% E6/12
/ext Row
L1J/S0>J/% +% X% C% V% B% N% M% C3445% D3/% S<580% R>N0/S0>J/
Cursor )ad
E67K1A.E67 H341% E67% P5N1U;% P5N1D3O6% I6812/% D1<1/1 U;% D3O6% L1J/% R>N0/
ultimedia 7eys
MAD3B=416/8M18816N12 MAP>B/=218MAM=8>BM=/1 P<5AP5=81M17>5S/3;V3<=41U;V3<=41D3O6P21DT25BLN1?/T25BLM17>5S1<1B/ M5><W1:H341M18816N12C5<B=<5/32L3NOJJS<11; MAP>B/=218MAM=8>B%L3NOJJ P<5AP5=81% M17>5S/3;P21DT25BLN1?/T25BL MAM=8>BOJJ>B1H341
PPAoy
Aoystic5
Force Feed'ac* Buttons "xes )O4 #ats ;oystic* In&ormation ultiple ;oystic*s
P? Glove
Buttons Fingers
$aw !inger Een%s Aoint Angles In%e( !ingertip Position !inger Gestures
81/
!inger Velocity an% Acceleration Values that have nothing to %o with !inger Een%s
Location
!iltering
81/
Rotation
,irections o+ Parts o+ the "an%
IMPORTANTS
atri(
6sing )rigonometry to Convert )hem to Angles &IsnFt as har% as you might thin5'
P( 71N2118.
I,I
IDI )orts IDI Channels )laying notes
Stri5ing notes with a particular velocity Applying Pressure to a note Playing notes 0y num0er
)laying )ercussion Reading /otes Setting the instrument )itch 1heel Controls and Change Control messages R)/ <Registered )arameter /um'ers= /R)/ </on Registered )arameter /um'ers= Sys0x <System 0xclusive=
Speech
a*ing $love)I0 tal* Speech Recognition
Amount o+ Con+i%ence $e*uire%
)ush6to6tal*
Other
icrophone Stu&&
NEW! )rac5I$
/012 Trac*IR emulation
Y5O;>/B023<<?AT. 23<<
Concept 4 $owing
achine
Screen
/012 Orientation /012 Scrolling the entire screen SiBe )osition )lug C )lay onitor Stu&&
Win%ow
InterSense trac5ers