-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmidi.lua
55 lines (38 loc) · 966 Bytes
/
midi.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
function MidiSearch(Name)
local MidiDevicesList = hs.midi.devices()
for i = 1, #MidiDevicesList do
--print(MidiDevicesList[i])
if MidiDevicesList[i] == Name then
--print(MidiDevicesList[i] .. ' Numéro ' .. i)
return i
end
end
end
function CompON(MidiPort)
MidiPort:sendCommand("controlChange", {
["controllerNumber"] = 4,
["controllerValue"] = 00000000000000,
["channel"] = 0,
})
end
function CompOFF(MidiPort)
MidiPort:sendCommand("controlChange", {
["controllerNumber"] = 4,
["controllerValue"] = 11111111111111,
["channel"] = 0,
})
end
function VinyleON(MidiPort)
MidiPort:sendCommand("controlChange", {
["controllerNumber"] = 2,
["controllerValue"] = 00000000000000,
["channel"] = 0,
})
end
function VinyleOFF(MidiPort)
MidiPort:sendCommand("controlChange", {
["controllerNumber"] = 2,
["controllerValue"] = 11111111111111,
["channel"] = 0,
})
end