Commit c3df97d 1 parent 8bc0af8 commit c3df97d Copy full SHA for c3df97d
File tree 2 files changed +25
-20
lines changed
2 files changed +25
-20
lines changed Original file line number Diff line number Diff line change
1
+ package music
2
+
3
+ import (
4
+ "signls/midi"
5
+ )
6
+
7
+ type DeviceValue struct {
8
+ Device midi.Device
9
+ GridDevice * midi.Device
10
+ Enabled bool
11
+ }
12
+
13
+ func (d DeviceValue ) Get () int {
14
+ if d .Enabled {
15
+ return d .Device .ID
16
+ }
17
+ return d .GridDevice .ID
18
+ }
19
+
20
+ func (d DeviceValue ) Name () string {
21
+ if d .Enabled {
22
+ return d .Device .Name
23
+ }
24
+ return ""
25
+ }
Original file line number Diff line number Diff line change @@ -29,26 +29,6 @@ const (
29
29
30
30
var lastUsedChannel uint8 = defaultChannel
31
31
32
- type DeviceValue struct {
33
- Device midi.Device
34
- GridDevice * midi.Device
35
- Enabled bool
36
- }
37
-
38
- func (d DeviceValue ) Get () int {
39
- if d .Enabled {
40
- return d .Device .ID
41
- }
42
- return d .GridDevice .ID
43
- }
44
-
45
- func (d DeviceValue ) Name () string {
46
- if d .Enabled {
47
- return d .Device .Name
48
- }
49
- return ""
50
- }
51
-
52
32
// Note represents a midi note.
53
33
type Note struct {
54
34
midi midi.Midi
You can’t perform that action at this time.
0 commit comments