patchmaster 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/patchmaster/app/main.rb +6 -2
- data/lib/patchmaster/consts.rb +1 -0
- data/lib/patchmaster/dsl.rb +3 -3
- data/lib/patchmaster/patchmaster.rb +3 -2
- metadata +4 -4
data/lib/patchmaster/app/main.rb
CHANGED
@@ -105,8 +105,12 @@ class Main
|
|
105
105
|
end
|
106
106
|
end
|
107
107
|
|
108
|
-
def bind_message(name,
|
109
|
-
|
108
|
+
def bind_message(name, key_or_sym)
|
109
|
+
if FUNCTION_KEY_SYMBOLS.keys.include?(key_or_sym)
|
110
|
+
@message_bindings[FUNCTION_KEY_SYMBOLS[key_or_sym]] = name
|
111
|
+
else
|
112
|
+
@message_bindings[key_or_sym] = name
|
113
|
+
end
|
110
114
|
end
|
111
115
|
|
112
116
|
def config_curses
|
data/lib/patchmaster/consts.rb
CHANGED
data/lib/patchmaster/dsl.rb
CHANGED
@@ -47,12 +47,12 @@ class DSL
|
|
47
47
|
alias_method :out, :output
|
48
48
|
|
49
49
|
def message(name, bytes)
|
50
|
-
@pm.messages[name] = bytes
|
50
|
+
@pm.messages[name.downcase] = bytes
|
51
51
|
end
|
52
52
|
|
53
|
-
def message_key(name,
|
53
|
+
def message_key(name, key_or_sym)
|
54
54
|
if !@pm.no_gui # TODO get rid of double negative
|
55
|
-
PM::Main.instance.bind_message(name,
|
55
|
+
PM::Main.instance.bind_message(name, key_or_sym)
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
@@ -118,9 +118,10 @@ class PatchMaster < SimpleDelegator
|
|
118
118
|
@running
|
119
119
|
end
|
120
120
|
|
121
|
-
# Send the message with the given name to all outputs.
|
121
|
+
# Send the message with the given +name+ to all outputs. Names are matched
|
122
|
+
# case-insensitively.
|
122
123
|
def send_message(name)
|
123
|
-
msg = @messages[name]
|
124
|
+
msg = @messages[name.downcase]
|
124
125
|
if !msg
|
125
126
|
message("Message \"#{name}\" not found")
|
126
127
|
return
|
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.6
|
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-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: midi-eye
|
16
|
-
requirement: &
|
16
|
+
requirement: &2156045140 !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: *2156045140
|
25
25
|
description: ! 'PatchMaster is realtime MIDI performance software that alloweds a
|
26
26
|
musician
|
27
27
|
|