unimidi 0.0.8-java → 0.1.0-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # (c)2010-2011 Ari Russo and licensed under the Apache 2.0 License
4
+ #
5
+
1
6
  require 'alsa-rawmidi'
2
7
 
3
8
  module UniMIDI
@@ -1,3 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # (c)2010-2011 Ari Russo and licensed under the Apache 2.0 License
4
+ #
5
+
1
6
  require 'midi-jruby'
2
7
 
3
8
  module UniMIDI
@@ -1,3 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # (c)2010-2011 Ari Russo and licensed under the Apache 2.0 License
4
+ #
5
+
1
6
  require 'midi-winmm'
2
7
 
3
8
  module UniMIDI
@@ -1,3 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # (c)2010-2011 Ari Russo and licensed under the Apache 2.0 License
4
+ #
5
+
1
6
  module UniMIDI
2
7
 
3
8
  module CongruousApiAdapter
@@ -10,6 +15,7 @@ module UniMIDI
10
15
  @name = @device.name
11
16
  end
12
17
 
18
+ # enable the device for use, can be passed a block to which the device will be passed back
13
19
  def open(*a, &block)
14
20
  begin
15
21
  @device.open(*a)
@@ -19,6 +25,7 @@ module UniMIDI
19
25
  end
20
26
  end
21
27
 
28
+ # close the device
22
29
  def close(*a)
23
30
  @device.close(*a)
24
31
  end
@@ -130,6 +137,7 @@ module UniMIDI
130
137
 
131
138
  module ClassMethods
132
139
 
140
+ # returns all inputs
133
141
  def all
134
142
  device_class.all.map { |d| new(d) }
135
143
  end
@@ -145,16 +153,31 @@ module UniMIDI
145
153
  base.extend(ClassMethods)
146
154
  end
147
155
 
156
+ # sends a message to the output. the message can be:
157
+ #
158
+ # bytes eg output.puts(0x90, 0x40, 0x40)
159
+ # an array of bytes eg output.puts([0x90, 0x40, 0x40])
160
+ # or a string eg output.puts("904040")
161
+ #
148
162
  def puts(*a)
149
163
  @device.puts(*a)
150
164
  end
151
165
 
166
+ # sends a message to the output in a form of a string eg "904040". this method does not do
167
+ # type checking and therefore is more performant than puts
152
168
  def puts_bytestr(*a)
153
169
  @device.puts_bytestr(*a)
154
170
  end
171
+
172
+ # sends a message to the output in a form of bytes eg output.puts_bytes(0x90, 0x40, 0x40).
173
+ # this method does not do type checking and therefore is more performant than puts
174
+ def puts_bytes(*a)
175
+ @device.puts_bytes(*a)
176
+ end
155
177
 
156
178
  module ClassMethods
157
179
 
180
+ # returns all outputs
158
181
  def all
159
182
  device_class.all.map { |d| new(d) }
160
183
  end
@@ -1,3 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # (c)2010-2011 Ari Russo and licensed under the Apache 2.0 License
4
+ #
5
+
1
6
  require 'singleton'
2
7
 
3
8
  module UniMIDI
data/lib/unimidi.rb CHANGED
@@ -1,10 +1,12 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
3
  # A realtime MIDI interface for Ruby
4
+ # (c)2010-2011 Ari Russo and licensed under the Apache 2.0 License
4
5
  #
6
+
5
7
  module UniMIDI
6
8
 
7
- VERSION = "0.0.8"
9
+ VERSION = "0.1.0"
8
10
 
9
11
  end
10
12
 
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
+ - 1
7
8
  - 0
8
- - 8
9
- version: 0.0.8
9
+ version: 0.1.0
10
10
  platform: java
11
11
  authors:
12
12
  - Ari Russo