imitone community

Building a universal, human-friendly music interface. ...But first we have to fix the bugs!

You are not logged in.

Announcement

Having trouble with imitone? Hit send on any Error Reports it creates, or use the in-app "send feedback" button.

#1 2015-02-15 09:47:17

Handmusician
Power Tester
From: North France
Registered: 2015-01-27

Glovepie (script with midi in/out : voice app, control games...)

With Glovepie it's possible to create scripts using input/output devices (mouse keyboard wii mote kinect... included midi devices). Why not using it with imitone ? Many interesting possibilities i think !

To download it (needs dx9 or higher) :
http://glovepie.org/GlovePIE045Free.zip

The manual :
http://glovepie.org/w/index.php?title=P … tion_v0.43

Last edited by Handmusician (2015-02-19 11:58:34)

Offline

#2 2015-02-19 04:27:35

Handmusician
Power Tester
From: North France
Registered: 2015-01-27

Re: Glovepie (script with midi in/out : voice app, control games...)

I wrote this script for microtonal ear training and microtonal voice pitch training (need imitone pitch bend on). 1/100 semitone accuracy !
You can copy paste it on glovepie script screen.

/*

1) Set pitchbend on in imitone

2) Set parameters :  grey lines beginning with rem from a) to g)

4 modes :
- 1 note without pitchbend : set 0 to d) and e)

- 1 note with pitchbend : set 1 to d) and 0 to e)

- 2 to 20 notes without pitchbend : set 0 to d) 1 to e) 2~20 to f)

- 2 to 20 notes with pitchbend : set 1 to d) and e) 2~20 to f)


3) To start program clic run wait a few seconds and say "go".

4) Useful keys :

Hold CTRL to replay computer note(s) from 1 to 20 (stop replaying when you release ctrl)

Press ALT to replay yours (just the last one)

Press SPACE to valid (compare when all notes given, say "go" to play news multinotes).

Press S to play or not midi from your voice

Press T to show or not exact pitches from cpu and you (tricky mode)

Press I to change instrument (from 1 to 128 the number you enter is shown, press DEL to delete it and write another one), press I again to valid.


*/



if ((said("go") && var.joue==0) || (var.joue==2 && (var.min>var.alea || var.alea>var.max))) then

   if var.joue==0 then

      midi.indevname = "imitone"

      rem a) set the midi synthesizer player here (set the name of your midi out device with midi.outdevname or harder with midi.deviceout (in that case remove // set the number corresponding to your device and remove midi.outdevname)
      //midi.deviceout=1
      midi.outdevname="CoolSoft VirtualMIDISynth"

      rem b) default instrument choice (1 to 128 usually by default or if you choose a general midi bank)
      if var.chg==0 then midi.instrument=30

      rem c) your voice range (0 minimum 127 maximum)
      var.min=48
      var.max=74

      rem d) if you want the computer to use pitchbend set 1
      var.pitchbendon=0

      rem e) if you want multinotes set 1
      var.multi=0

      rem f) if you want multinotes set here the number of notes
      var.nb=3

      if var.pitchbendon==1 then

      rem g) accuracy comparison used between computer's pitchbend and yours 0=very cool to 100=perfect
      var.precis=95


      var.precis=(100-var.precis)/200
      else
      var.alea2=.5
      var.precis=.5
      endif

      if var.multi==1 then
      var.compt=0
      var.compt2=0
      endif

   endif

var.joue=2
var.alea=Int((var.max-var.min+1)*Random)+var.min
if var.pitchbendon==1 then var.alea2=(Random()+2)/4

endif

if (var.joue==2 && var.min<=var.alea<=var.max) || (Ctrl==true && var.joue==1) then

if ctrl==true && var.multi==1 then
if var.compt==var.nb then
var.compt=0
beep(440)
endif

if var.compt==0 then var.exactpitchcpu=var.1
if var.compt==1 then var.exactpitchcpu=var.2
if var.compt==2 then var.exactpitchcpu=var.3
if var.compt==3 then var.exactpitchcpu=var.4
if var.compt==4 then var.exactpitchcpu=var.5
if var.compt==5 then var.exactpitchcpu=var.6
if var.compt==6 then var.exactpitchcpu=var.7
if var.compt==7 then var.exactpitchcpu=var.8
if var.compt==8 then var.exactpitchcpu=var.9
if var.compt==9 then var.exactpitchcpu=var.10
if var.compt==10 then var.exactpitchcpu=var.11
if var.compt==11 then var.exactpitchcpu=var.12
if var.compt==12 then var.exactpitchcpu=var.13
if var.compt==13 then var.exactpitchcpu=var.14
if var.compt==14 then var.exactpitchcpu=var.15
if var.compt==15 then var.exactpitchcpu=var.16
if var.compt==16 then var.exactpitchcpu=var.17
if var.compt==17 then var.exactpitchcpu=var.18
if var.compt==18 then var.exactpitchcpu=var.19
if var.compt==19 then var.exactpitchcpu=var.20
var.compt++
else
if(ctrl==false) var.exactpitchcpu=(round((var.alea+4*(var.alea2-.5))*100))/100
endif

if var.multi==1 && ctrl==false && var.joue==2 then
if var.compt==0 then var.1=var.exactpitchcpu
if var.compt==1 then var.2=var.exactpitchcpu
if var.compt==2 then var.3=var.exactpitchcpu
if var.compt==3 then var.4=var.exactpitchcpu
if var.compt==4 then var.5=var.exactpitchcpu
if var.compt==5 then var.6=var.exactpitchcpu
if var.compt==6 then var.7=var.exactpitchcpu
if var.compt==7 then var.8=var.exactpitchcpu
if var.compt==8 then var.9=var.exactpitchcpu
if var.compt==9 then var.10=var.exactpitchcpu
if var.compt==10 then var.11=var.exactpitchcpu
if var.compt==11 then var.12=var.exactpitchcpu
if var.compt==12 then var.13=var.exactpitchcpu
if var.compt==13 then var.14=var.exactpitchcpu
if var.compt==14 then var.15=var.exactpitchcpu
if var.compt==15 then var.16=var.exactpitchcpu
if var.compt==16 then var.17=var.exactpitchcpu
if var.compt==17 then var.18=var.exactpitchcpu
if var.compt==18 then var.19=var.exactpitchcpu
if var.compt==19 then var.20=var.exactpitchcpu
var.alea=-1
var.compt++
endif
var.note=int(var.exactpitchcpu)
var.pitchb=Frac(var.exactpitchcpu)/4+.5

midi.FirstNote=var.note
midi.pitchwheel=var.pitchb
wait 1000ms

if(ctrl==false || var.multi==1) midi.FirstNote=-1

if var.joue==2 && (var.multi==0 || var.compt==var.nb) then var.joue=1
endif

if released(ctrl) then
if(var.multi==1) var.compt=var.nb
midi.FirstNote=-1
endif

if pressed(key.S) then
var.mute=1-var.mute
midi.FirstNote=-1
endif

if pressed(key.T) then
var.tricky=1-var.tricky
debug=""
endif

if pressed(key.I) then
var.instruch=1-var.instruch
var.chg=1

if var.instruch==0 then
debug="OK !"
midi.instrument=var.instru
else
debug=""
endif

var.instru=0
var.tricky=0
wait 2000ms
endif

if var.instruch==1 then
var.p=-1
if pressed(key.Delete) then
var.instru=0
debug=""
endif

if pressed(NumPad0) then var.p=0
if pressed(NumPad1) then var.p=1
if pressed(NumPad2) then var.p=2
if pressed(NumPad3) then var.p=3
if pressed(NumPad4) then var.p=4
if pressed(NumPad5) then var.p=5
if pressed(NumPad6) then var.p=6
if pressed(NumPad7) then var.p=7
if pressed(NumPad8) then var.p=8
if pressed(NumPad9) then var.p=9
if var.p!=-1 then
if 0<var.instru<100 then var.instru=var.instru*10
var.instru+=var.p
debug=var.instru

endif
endif


if var.joue==1 && alt==false && ctrl==false then

var.tche = midi.FirstNote

var.tche2=midi.PitchWheel

if var.mute==0 then
midi.FirstNote=var.tche
midi.pitchwheel=var.tche2
endif

endif

if var.multi==1 && var.joue==1 && var.tricky==0 && var.instruch==0 then debug = "Note "+(var.compt2+1)+" press SPACE to valid"

if var.tricky==1 && var.joue==1 then

var.show="Accuracy="+var.precis+"  CPU="

if var.multi==1 then
if(var.compt2==0) var.show+=var.1
if(var.compt2==1) var.show+=var.2
if(var.compt2==2) var.show+=var.3
if(var.compt2==3) var.show+=var.4
if(var.compt2==4) var.show+=var.5
if(var.compt2==5) var.show+=var.6
if(var.compt2==6) var.show+=var.7
if(var.compt2==7) var.show+=var.8
if(var.compt2==8) var.show+=var.9
if(var.compt2==9) var.show+=var.10
if(var.compt2==10) var.show+=var.11
if(var.compt2==11) var.show+=var.12
if(var.compt2==12) var.show+=var.13
if(var.compt2==13) var.show+=var.14
if(var.compt2==14) var.show+=var.15
if(var.compt2==15) var.show+=var.16
if(var.compt2==16) var.show+=var.17
if(var.compt2==17) var.show+=var.18
if(var.compt2==18) var.show+=var.19
if(var.compt2==19) var.show+=var.20
else
var.show+=var.exactpitchcpu
endif
var.show+=("  YOU="+var.exactpitchim)
debug = var.show
endif

if var.joue==1 && var.tche!=-1 then

   var.exactpitchim=(round((var.tche+(var.tche2-.5)*4)*100))/100

   if var.multi==1 then
if var.compt2==0 then var.j1=var.exactpitchim
if var.compt2==1 then var.j2=var.exactpitchim
if var.compt2==2 then var.j3=var.exactpitchim
if var.compt2==3 then var.j4=var.exactpitchim
if var.compt2==4 then var.j5=var.exactpitchim
if var.compt2==5 then var.j6=var.exactpitchim
if var.compt2==6 then var.j7=var.exactpitchim
if var.compt2==7 then var.j8=var.exactpitchim
if var.compt2==8 then var.j9=var.exactpitchim
if var.compt2==9 then var.j10=var.exactpitchim
if var.compt2==10 then var.j11=var.exactpitchim
if var.compt2==11 then var.j12=var.exactpitchim
if var.compt2==12 then var.j13=var.exactpitchim
if var.compt2==13 then var.j14=var.exactpitchim
if var.compt2==14 then var.j15=var.exactpitchim
if var.compt2==15 then var.j16=var.exactpitchim
if var.compt2==16 then var.j17=var.exactpitchim
if var.compt2==17 then var.j18=var.exactpitchim
if var.compt2==18 then var.j19=var.exactpitchim
if var.compt2==19 then var.j20=var.exactpitchim
endif
endif




if alt==true && var.tche==-1 then
var.note=int(var.exactpitchim)
var.pitchb=Frac(var.exactpitchim)/4+.5
midi.FirstNote=var.note
midi.pitchwheel=var.pitchb
wait 1000ms
midi.FirstNote=-1
endif

   if var.joue==1 && pressed(space) then
   if var.multi==1 then
   var.compt2++
   var.exactpitchim=-1
   if var.compt2==var.nb then var.joue=3
   else
   var.joue=3
   endif
   endif

   if var.joue==3 then
   midi.firstnote=-1
   if var.multi==1 then

   var.calc=0
   var.comb=""
   var.false="False Notes = "

   if abs(var.1-var.j1)<=var.precis then var.calc++ else var.false+=(1+"  ")
   var.comb+=(1+"("+var.1+" "+var.j1+")  ")
   if abs(var.2-var.j2)<=var.precis && var.nb>=2 then var.calc++ else if(var.nb>=2) var.false+=(2+"  ")
   if(var.nb>=2) var.comb+=(2+"("+var.2+" "+var.j2+")  ")
   if abs(var.3-var.j3)<=var.precis && var.nb>=3 then var.calc++ else if(var.nb>=3) var.false+=(3+"  ")
   if(var.nb>=3) var.comb+=(3+"("+var.3+" "+var.j3+")  ")
   if abs(var.4-var.j4)<=var.precis && var.nb>=4 then var.calc++ else if(var.nb>=4) var.false+=(4+"  ")
   if(var.nb>=4) var.comb+=(4+"("+var.4+" "+var.j4+")  ")
   if abs(var.5-var.j5)<=var.precis && var.nb>=5 then var.calc++ else if(var.nb>=5) var.false+=(5+"  ")
   if(var.nb>=5) var.comb+=(5+"("+var.5+" "+var.j5+")  ")
   if abs(var.6-var.j6)<=var.precis && var.nb>=6 then var.calc++ else if(var.nb>=6) var.false+=(6+"  ")
   if(var.nb>=6) var.comb+=(6+"("+var.6+" "+var.j6+")  ")
   if abs(var.7-var.j7)<=var.precis && var.nb>=7 then var.calc++ else if(var.nb>=7) var.false+=(7+"  ")
   if(var.nb>=7) var.comb+=(7+"("+var.7+" "+var.j7+")  ")
   if abs(var.8-var.j8)<=var.precis && var.nb>=8 then var.calc++ else if(var.nb>=8) var.false+=(8+"  ")
   if(var.nb>=8) var.comb+=(8+"("+var.8+" "+var.j8+")  ")
   if abs(var.9-var.j9)<=var.precis && var.nb>=9 then var.calc++ else if(var.nb>=9) var.false+=(9+"  ")
   if(var.nb>=9) var.comb+=(9+"("+var.9+" "+var.j9+")  ")
   if abs(var.10-var.j10)<=var.precis && var.nb>=10 then var.calc++ else if(var.nb>=10) var.false+=(10+"  ")
   if(var.nb>=10) var.comb+=(10+"("+var.10+" "+var.j10+")  ")
   if abs(var.11-var.j11)<=var.precis && var.nb>=11 then var.calc++ else if(var.nb>=11) var.false+=(11+"  ")
   if(var.nb>=11) var.comb+=(11+"("+var.11+" "+var.j11+")  ")
   if abs(var.12-var.j12)<=var.precis && var.nb>=12 then var.calc++ else if(var.nb>=12) var.false+=(12+"  ")
   if(var.nb>=12) var.comb+=(12+"("+var.12+" "+var.j12+")  ")
   if abs(var.13-var.j13)<=var.precis && var.nb>=13 then var.calc++ else if(var.nb>=13) var.false+=(13+"  ")
   if(var.nb>=13) var.comb+=(13+"("+var.13+" "+var.j13+")  ")
   if abs(var.14-var.j14)<=var.precis && var.nb>=14 then var.calc++ else if(var.nb>=14) var.false+=(14+"  ")
   if(var.nb>=14) var.comb+=(14+"("+var.14+" "+var.j14+")  ")
   if abs(var.15-var.j15)<=var.precis && var.nb>=15 then var.calc++ else if(var.nb>=15) var.false+=(15+"  ")
   if(var.nb>=15) var.comb+=(15+"("+var.15+" "+var.j15+")  ")
   if abs(var.16-var.j16)<=var.precis && var.nb>=16 then var.calc++ else if(var.nb>=16) var.false+=(16+"  ")
   if(var.nb>=16) var.comb+=(16+"("+var.16+" "+var.j16+")  ")
   if abs(var.17-var.j17)<=var.precis && var.nb>=17 then var.calc++ else if(var.nb>=17) var.false+=(17+"  ")
   if(var.nb>=17) var.comb+=(17+"("+var.17+" "+var.j17+")  ")
   if abs(var.18-var.j18)<=var.precis && var.nb>=18 then var.calc++ else if(var.nb>=18) var.false+=(18+"  ")
   if(var.nb>=18) var.comb+=(18+"("+var.18+" "+var.j18+")  ")
   if abs(var.19-var.j19)<=var.precis && var.nb>=19 then var.calc++ else if(var.nb>=19) var.false+=(19+"  ")
   if(var.nb>=19) var.comb+=(19+"("+var.19+" "+var.j19+")  ")
   if abs(var.20-var.j20)<=var.precis && var.nb>=20 then var.calc++ else if(var.nb>=20) var.false+=20
   if(var.nb>=20) var.comb+=(20+"("+var.20+" "+var.j20+")  ")

   debug = "Accuracy= "+var.precis+" "+var.false+" N(CPU YOU)  "+var.comb

   var.bon="Vous avez trouvé "+var.calc+" notes sur "+var.nb
   say(var.bon)
   var.joue=0
   var.compt=0
   var.compt2=0
   else

   if abs(var.exactpitchcpu-var.exactpitchim)<=var.precis then
      say("Yes !")
      else
      say("oh no !")

   endif
   debug = "Accuracy= "+var.precis+"  CPU="+var.exactpitchcpu+" YOU="+var.exactpitchim
   wait 3000ms
   debug=""
   var.alea=-1
   var.joue=2
   endif

   endif

Last edited by Handmusician (2015-02-19 04:37:52)

Offline

#3 2015-04-03 09:45:33

Handmusician
Power Tester
From: North France
Registered: 2015-01-27

Re: Glovepie (script with midi in/out : voice app, control games...)

I realized the script don't work because midi.indevname don't load imitone (the same with midi.outdevname), so i rewrote it :

/*

1) Set pitchbend on in imitone

2) Set parameters :  grey lines beginning with rem from a) to g)

4 modes :
- 1 note without pitchbend : set 0 to d) and e)

- 1 note with pitchbend : set 1 to d) and 0 to e)

- 2 to 20 notes without pitchbend : set 0 to d) 1 to e) 2~20 to f)

- 2 to 20 notes with pitchbend : set 1 to d) and e) 2~20 to f)


3) To start program clic run wait a few seconds and say "go".

4) Useful keys :

Hold CTRL to replay computer note(s) from 1 to 20 (stop replaying when you release ctrl)

Press ALT to replay yours (just the last one)

Press SPACE to valid (compare when all notes given, say "go" to play news multinotes).

Press S to play or not midi from your voice

Press T to show or not exact pitches from cpu and you (tricky mode)

Press I to change instrument (from 1 to 128 the number you enter is shown, press DEL to delete it and write another one), press I again to valid.


*/



if ((said("go") && var.joue==0) || (var.joue==2 && (var.min>var.alea || var.alea>var.max))) then

   if var.joue==0 then

      while(midi.indevname !="imitone") midi.devicein++

      rem a) set the midi synthesizer player here (set the name of your midi out device with midi.outdevname or harder with midi.deviceout (in that case remove // set the number corresponding to your device and remove midi.outdevname)
      //midi.deviceout=1
      while(midi.outdevname!="CoolSoft VirtualMIDISynth") midi.deviceout++

      rem b) default instrument choice (1 to 128 usually by default or if you choose a general midi bank)
      if var.chg==0 then midi.instrument=30

      rem c) your voice/instrument range (0 minimum 127 maximum)
      var.min=48
      var.max=74

      rem d) if you want the computer to use pitchbend set 1
      var.pitchbendon=0

      rem e) if you want multinotes set 1
      var.multi=0

      rem f) if you want multinotes set here the number of notes
      var.nb=3

      if var.pitchbendon==1 then

      rem g) accuracy comparison used between computer's pitchbend and yours 0=very cool to 100=perfect
      var.precis=95


      var.precis=(100-var.precis)/200
      else
      var.alea2=.5
      var.precis=.5
      endif

      if var.multi==1 then
      var.compt=0
      var.compt2=0
      endif

   endif

var.joue=2
var.alea=Int((var.max-var.min+1)*Random)+var.min
if var.pitchbendon==1 then var.alea2=(Random()+2)/4

endif

if (var.joue==2 && var.min<=var.alea<=var.max) || (Ctrl==true && var.joue==1) then

if ctrl==true && var.multi==1 then
if var.compt==var.nb then
var.compt=0
beep(440)
endif

if var.compt==0 then var.exactpitchcpu=var.1
if var.compt==1 then var.exactpitchcpu=var.2
if var.compt==2 then var.exactpitchcpu=var.3
if var.compt==3 then var.exactpitchcpu=var.4
if var.compt==4 then var.exactpitchcpu=var.5
if var.compt==5 then var.exactpitchcpu=var.6
if var.compt==6 then var.exactpitchcpu=var.7
if var.compt==7 then var.exactpitchcpu=var.8
if var.compt==8 then var.exactpitchcpu=var.9
if var.compt==9 then var.exactpitchcpu=var.10
if var.compt==10 then var.exactpitchcpu=var.11
if var.compt==11 then var.exactpitchcpu=var.12
if var.compt==12 then var.exactpitchcpu=var.13
if var.compt==13 then var.exactpitchcpu=var.14
if var.compt==14 then var.exactpitchcpu=var.15
if var.compt==15 then var.exactpitchcpu=var.16
if var.compt==16 then var.exactpitchcpu=var.17
if var.compt==17 then var.exactpitchcpu=var.18
if var.compt==18 then var.exactpitchcpu=var.19
if var.compt==19 then var.exactpitchcpu=var.20
var.compt++
else
if(ctrl==false) var.exactpitchcpu=(round((var.alea+4*(var.alea2-.5))*100))/100
endif

if var.multi==1 && ctrl==false && var.joue==2 then
if var.compt==0 then var.1=var.exactpitchcpu
if var.compt==1 then var.2=var.exactpitchcpu
if var.compt==2 then var.3=var.exactpitchcpu
if var.compt==3 then var.4=var.exactpitchcpu
if var.compt==4 then var.5=var.exactpitchcpu
if var.compt==5 then var.6=var.exactpitchcpu
if var.compt==6 then var.7=var.exactpitchcpu
if var.compt==7 then var.8=var.exactpitchcpu
if var.compt==8 then var.9=var.exactpitchcpu
if var.compt==9 then var.10=var.exactpitchcpu
if var.compt==10 then var.11=var.exactpitchcpu
if var.compt==11 then var.12=var.exactpitchcpu
if var.compt==12 then var.13=var.exactpitchcpu
if var.compt==13 then var.14=var.exactpitchcpu
if var.compt==14 then var.15=var.exactpitchcpu
if var.compt==15 then var.16=var.exactpitchcpu
if var.compt==16 then var.17=var.exactpitchcpu
if var.compt==17 then var.18=var.exactpitchcpu
if var.compt==18 then var.19=var.exactpitchcpu
if var.compt==19 then var.20=var.exactpitchcpu
var.alea=-1
var.compt++
endif
var.note=int(var.exactpitchcpu)
var.pitchb=Frac(var.exactpitchcpu)/4+.5

midi.FirstNote=var.note
midi.pitchwheel=var.pitchb
wait 1000ms

if(ctrl==false || var.multi==1) midi.FirstNote=-1

if var.joue==2 && (var.multi==0 || var.compt==var.nb) then var.joue=1
endif

if released(ctrl) then
if(var.multi==1) var.compt=var.nb
midi.FirstNote=-1
endif

if pressed(key.S) then
var.mute=1-var.mute
midi.FirstNote=-1
endif

if pressed(key.T) then
var.tricky=1-var.tricky
debug=""
endif

if pressed(key.I) then
var.instruch=1-var.instruch
var.chg=1

if var.instruch==0 then
debug="OK !"
midi.instrument=var.instru
else
debug=""
endif

var.instru=0
var.tricky=0
wait 2000ms
endif

if var.instruch==1 then
var.p=-1
if pressed(key.Delete) then
var.instru=0
debug=""
endif

if pressed(NumPad0) then var.p=0
if pressed(NumPad1) then var.p=1
if pressed(NumPad2) then var.p=2
if pressed(NumPad3) then var.p=3
if pressed(NumPad4) then var.p=4
if pressed(NumPad5) then var.p=5
if pressed(NumPad6) then var.p=6
if pressed(NumPad7) then var.p=7
if pressed(NumPad8) then var.p=8
if pressed(NumPad9) then var.p=9
if var.p!=-1 then
if 0<var.instru<100 then var.instru=var.instru*10
var.instru+=var.p
debug=var.instru

endif
endif


if var.joue==1 && alt==false && ctrl==false then

var.tche = midi.FirstNote

var.tche2=midi.PitchWheel

if var.mute==0 then
midi.FirstNote=var.tche
midi.pitchwheel=var.tche2
endif

endif

if var.multi==1 && var.joue==1 && var.tricky==0 && var.instruch==0 then debug = "Note "+(var.compt2+1)+" press SPACE to valid"

if var.tricky==1 && var.joue==1 then

var.show="Accuracy="+var.precis+"  CPU="

if var.multi==1 then
if(var.compt2==0) var.show+=var.1
if(var.compt2==1) var.show+=var.2
if(var.compt2==2) var.show+=var.3
if(var.compt2==3) var.show+=var.4
if(var.compt2==4) var.show+=var.5
if(var.compt2==5) var.show+=var.6
if(var.compt2==6) var.show+=var.7
if(var.compt2==7) var.show+=var.8
if(var.compt2==8) var.show+=var.9
if(var.compt2==9) var.show+=var.10
if(var.compt2==10) var.show+=var.11
if(var.compt2==11) var.show+=var.12
if(var.compt2==12) var.show+=var.13
if(var.compt2==13) var.show+=var.14
if(var.compt2==14) var.show+=var.15
if(var.compt2==15) var.show+=var.16
if(var.compt2==16) var.show+=var.17
if(var.compt2==17) var.show+=var.18
if(var.compt2==18) var.show+=var.19
if(var.compt2==19) var.show+=var.20
else
var.show+=var.exactpitchcpu
endif
var.show+=("  YOU="+var.exactpitchim)
debug = var.show
endif

if var.joue==1 && var.tche!=-1 then

   var.exactpitchim=(round((var.tche+(var.tche2-.5)*4)*100))/100

   if var.multi==1 then
if var.compt2==0 then var.j1=var.exactpitchim
if var.compt2==1 then var.j2=var.exactpitchim
if var.compt2==2 then var.j3=var.exactpitchim
if var.compt2==3 then var.j4=var.exactpitchim
if var.compt2==4 then var.j5=var.exactpitchim
if var.compt2==5 then var.j6=var.exactpitchim
if var.compt2==6 then var.j7=var.exactpitchim
if var.compt2==7 then var.j8=var.exactpitchim
if var.compt2==8 then var.j9=var.exactpitchim
if var.compt2==9 then var.j10=var.exactpitchim
if var.compt2==10 then var.j11=var.exactpitchim
if var.compt2==11 then var.j12=var.exactpitchim
if var.compt2==12 then var.j13=var.exactpitchim
if var.compt2==13 then var.j14=var.exactpitchim
if var.compt2==14 then var.j15=var.exactpitchim
if var.compt2==15 then var.j16=var.exactpitchim
if var.compt2==16 then var.j17=var.exactpitchim
if var.compt2==17 then var.j18=var.exactpitchim
if var.compt2==18 then var.j19=var.exactpitchim
if var.compt2==19 then var.j20=var.exactpitchim
endif
endif




if alt==true && var.tche==-1 then
var.note=int(var.exactpitchim)
var.pitchb=Frac(var.exactpitchim)/4+.5
midi.FirstNote=var.note
midi.pitchwheel=var.pitchb
wait 1000ms
midi.FirstNote=-1
endif

   if var.joue==1 && pressed(space) then
   if var.multi==1 then
   var.compt2++
   var.exactpitchim=-1
   if var.compt2==var.nb then var.joue=3
   else
   var.joue=3
   endif
   endif

   if var.joue==3 then
   midi.firstnote=-1
   if var.multi==1 then

   var.calc=0
   var.comb=""
   var.false="False Notes = "

   if abs(var.1-var.j1)<=var.precis then var.calc++ else var.false+=(1+"  ")
   var.comb+=(1+"("+var.1+" "+var.j1+")  ")
   if abs(var.2-var.j2)<=var.precis && var.nb>=2 then var.calc++ else if(var.nb>=2) var.false+=(2+"  ")
   if(var.nb>=2) var.comb+=(2+"("+var.2+" "+var.j2+")  ")
   if abs(var.3-var.j3)<=var.precis && var.nb>=3 then var.calc++ else if(var.nb>=3) var.false+=(3+"  ")
   if(var.nb>=3) var.comb+=(3+"("+var.3+" "+var.j3+")  ")
   if abs(var.4-var.j4)<=var.precis && var.nb>=4 then var.calc++ else if(var.nb>=4) var.false+=(4+"  ")
   if(var.nb>=4) var.comb+=(4+"("+var.4+" "+var.j4+")  ")
   if abs(var.5-var.j5)<=var.precis && var.nb>=5 then var.calc++ else if(var.nb>=5) var.false+=(5+"  ")
   if(var.nb>=5) var.comb+=(5+"("+var.5+" "+var.j5+")  ")
   if abs(var.6-var.j6)<=var.precis && var.nb>=6 then var.calc++ else if(var.nb>=6) var.false+=(6+"  ")
   if(var.nb>=6) var.comb+=(6+"("+var.6+" "+var.j6+")  ")
   if abs(var.7-var.j7)<=var.precis && var.nb>=7 then var.calc++ else if(var.nb>=7) var.false+=(7+"  ")
   if(var.nb>=7) var.comb+=(7+"("+var.7+" "+var.j7+")  ")
   if abs(var.8-var.j8)<=var.precis && var.nb>=8 then var.calc++ else if(var.nb>=8) var.false+=(8+"  ")
   if(var.nb>=8) var.comb+=(8+"("+var.8+" "+var.j8+")  ")
   if abs(var.9-var.j9)<=var.precis && var.nb>=9 then var.calc++ else if(var.nb>=9) var.false+=(9+"  ")
   if(var.nb>=9) var.comb+=(9+"("+var.9+" "+var.j9+")  ")
   if abs(var.10-var.j10)<=var.precis && var.nb>=10 then var.calc++ else if(var.nb>=10) var.false+=(10+"  ")
   if(var.nb>=10) var.comb+=(10+"("+var.10+" "+var.j10+")  ")
   if abs(var.11-var.j11)<=var.precis && var.nb>=11 then var.calc++ else if(var.nb>=11) var.false+=(11+"  ")
   if(var.nb>=11) var.comb+=(11+"("+var.11+" "+var.j11+")  ")
   if abs(var.12-var.j12)<=var.precis && var.nb>=12 then var.calc++ else if(var.nb>=12) var.false+=(12+"  ")
   if(var.nb>=12) var.comb+=(12+"("+var.12+" "+var.j12+")  ")
   if abs(var.13-var.j13)<=var.precis && var.nb>=13 then var.calc++ else if(var.nb>=13) var.false+=(13+"  ")
   if(var.nb>=13) var.comb+=(13+"("+var.13+" "+var.j13+")  ")
   if abs(var.14-var.j14)<=var.precis && var.nb>=14 then var.calc++ else if(var.nb>=14) var.false+=(14+"  ")
   if(var.nb>=14) var.comb+=(14+"("+var.14+" "+var.j14+")  ")
   if abs(var.15-var.j15)<=var.precis && var.nb>=15 then var.calc++ else if(var.nb>=15) var.false+=(15+"  ")
   if(var.nb>=15) var.comb+=(15+"("+var.15+" "+var.j15+")  ")
   if abs(var.16-var.j16)<=var.precis && var.nb>=16 then var.calc++ else if(var.nb>=16) var.false+=(16+"  ")
   if(var.nb>=16) var.comb+=(16+"("+var.16+" "+var.j16+")  ")
   if abs(var.17-var.j17)<=var.precis && var.nb>=17 then var.calc++ else if(var.nb>=17) var.false+=(17+"  ")
   if(var.nb>=17) var.comb+=(17+"("+var.17+" "+var.j17+")  ")
   if abs(var.18-var.j18)<=var.precis && var.nb>=18 then var.calc++ else if(var.nb>=18) var.false+=(18+"  ")
   if(var.nb>=18) var.comb+=(18+"("+var.18+" "+var.j18+")  ")
   if abs(var.19-var.j19)<=var.precis && var.nb>=19 then var.calc++ else if(var.nb>=19) var.false+=(19+"  ")
   if(var.nb>=19) var.comb+=(19+"("+var.19+" "+var.j19+")  ")
   if abs(var.20-var.j20)<=var.precis && var.nb>=20 then var.calc++ else if(var.nb>=20) var.false+=20
   if(var.nb>=20) var.comb+=(20+"("+var.20+" "+var.j20+")  ")

   debug = "Accuracy= "+var.precis+" "+var.false+" N(CPU YOU)  "+var.comb

   var.bon="Vous avez trouvé "+var.calc+" notes sur "+var.nb
   say(var.bon)
   var.joue=0
   var.compt=0
   var.compt2=0
   else

   if abs(var.exactpitchcpu-var.exactpitchim)<=var.precis then
      say("Yes !")
      else
      say("oh no !")

   endif
   debug = "Accuracy= "+var.precis+"  CPU="+var.exactpitchcpu+" YOU="+var.exactpitchim
   wait 3000ms
   debug=""
   var.alea=-1
   var.joue=2
   endif

   endif

Last edited by Handmusician (2015-04-03 09:46:39)

Offline

#4 2016-08-25 11:02:39

barrosini
Member
Registered: 2016-08-25

Re: Glovepie (script with midi in/out : voice app, control games...)

Hi!
I have 0 experience with glove pie. I have a Akai Mpd 32 and wanted to used it in videogames; i searched for info and found a script for keyboards, saw how to run it on glove pie and made the pads on the Akai to work in game. Now my question; the akai mpd 32 midi has knobs and i want the knobs to work ingame, too. Can someone add the needed language to the script i have to make it work?

I would really appreciate!

Offline

#5 2016-09-08 10:19:23

Handmusician
Power Tester
From: North France
Registered: 2015-01-27

Re: Glovepie (script with midi in/out : voice app, control games...)

Hi,
Send me a mail with your code, midi messages sent from knobs and actions (keys to simulate) to do, i'll take a look

Offline

Board footer

Powered by FluxBB