patchmaster 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/patchmaster/connection.rb +6 -3
- data/lib/patchmaster/consts.rb +3 -1
- data/lib/patchmaster/dsl.rb +9 -2
- metadata +5 -5
@@ -9,7 +9,7 @@ module PM
|
|
9
9
|
class Connection
|
10
10
|
|
11
11
|
attr_accessor :input, :input_chan, :output, :output_chan,
|
12
|
-
:pc_prog, :zone, :xpose, :filter
|
12
|
+
:bank, :pc_prog, :zone, :xpose, :filter
|
13
13
|
|
14
14
|
# If input_chan is nil than all messages from input will be sent to
|
15
15
|
# output.
|
@@ -25,8 +25,11 @@ class Connection
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def start(start_bytes=nil)
|
28
|
-
|
29
|
-
|
28
|
+
bytes = []
|
29
|
+
bytes += start_bytes if start_bytes
|
30
|
+
bytes += [CC_BANK_SELECT + @output_chan, @bank] if @bank
|
31
|
+
bytes += [PROGRAM_CHANGE + @output_chan, @pc_prog] if @pc_prog
|
32
|
+
midi_out(bytes) unless bytes.empty?
|
30
33
|
@input.add_connection(self)
|
31
34
|
end
|
32
35
|
|
data/lib/patchmaster/consts.rb
CHANGED
@@ -8,7 +8,6 @@ module PM
|
|
8
8
|
eval <<EOS
|
9
9
|
#{note}f#{oct} = #{base - 1}
|
10
10
|
#{note}b#{oct} = #{base - 1}
|
11
|
-
#{note}#{oct} = #{base}
|
12
11
|
#{note}s#{oct} = #{base + 1}
|
13
12
|
EOS
|
14
13
|
}
|
@@ -91,6 +90,7 @@ EOS
|
|
91
90
|
# = 0 - 31 = continuous, LSB
|
92
91
|
# = 32 - 63 = continuous, MSB
|
93
92
|
# = 64 - 97 = switches
|
93
|
+
CC_BANK_SELECT = 0
|
94
94
|
CC_MOD_WHEEL = 1
|
95
95
|
CC_BREATH_CONTROLLER = 2
|
96
96
|
CC_FOOT_CONTROLLER = 4
|
@@ -120,6 +120,7 @@ EOS
|
|
120
120
|
CC_GEN_PURPOSE_6 = 51
|
121
121
|
CC_GEN_PURPOSE_7 = 52
|
122
122
|
CC_GEN_PURPOSE_8 = 53
|
123
|
+
CC_EXT_EFFECTS_DEPTH = 91
|
123
124
|
CC_TREMELO_DEPTH = 92
|
124
125
|
CC_CHORUS_DEPTH = 93
|
125
126
|
CC_DETUNE_DEPTH = 94
|
@@ -135,6 +136,7 @@ EOS
|
|
135
136
|
# Channel mode message values
|
136
137
|
#++
|
137
138
|
# Val 0 == off, 0x7f == on
|
139
|
+
CM_RESET_ALL_CONTROLLERS = 0x79
|
138
140
|
CM_LOCAL_CONTROL = 0x7A
|
139
141
|
CM_ALL_NOTES_OFF = 0x7B # Val must be 0
|
140
142
|
CM_OMNI_MODE_OFF = 0x7C # Val must be 0
|
data/lib/patchmaster/dsl.rb
CHANGED
@@ -98,8 +98,15 @@ class DSL
|
|
98
98
|
alias_method :conn, :connection
|
99
99
|
alias_method :c, :connection
|
100
100
|
|
101
|
-
|
102
|
-
|
101
|
+
# If only +bank_or_prog+ is specified, then it's a program change. If
|
102
|
+
# both, then it's bank number.
|
103
|
+
def prog_chg(bank_or_prog, prog=nil)
|
104
|
+
if prog
|
105
|
+
@conn.bank = bank_or_prog
|
106
|
+
@conn.pc_prog = prog
|
107
|
+
else
|
108
|
+
@conn.pc_prog = bank_or_prog
|
109
|
+
end
|
103
110
|
end
|
104
111
|
alias_method :pc, :prog_chg
|
105
112
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: patchmaster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: midi-eye
|
16
|
-
requirement: &
|
16
|
+
requirement: &2156046340 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2156046340
|
25
25
|
description: ! 'PatchMaster is realtime MIDI performance software that alloweds a
|
26
26
|
musician
|
27
27
|
|
@@ -60,7 +60,7 @@ files:
|
|
60
60
|
- lib/patchmaster/trigger.rb
|
61
61
|
- lib/patchmaster.rb
|
62
62
|
- test/test_helper.rb
|
63
|
-
homepage:
|
63
|
+
homepage: http://www.patchmaster.org/
|
64
64
|
licenses:
|
65
65
|
- Ruby
|
66
66
|
post_install_message:
|