unimidi 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +6 -5
- data/lib/unimidi/congruous_api_adapter.rb +4 -3
- data/lib/unimidi.rb +1 -1
- metadata +10 -10
data/README.rdoc
CHANGED
@@ -31,9 +31,12 @@ Platform
|
|
31
31
|
|
32
32
|
== Usage
|
33
33
|
|
34
|
-
|
34
|
+
==== Blog Posts
|
35
35
|
|
36
|
-
|
36
|
+
* {general tutorial}[http://tx81z.blogspot.com/2011/06/unimidi-platform-independent-realtime.html]
|
37
|
+
* {selecting a device}[http://tx81z.blogspot.com/2011/10/selecting-midi-device-with-unimidi.html]
|
38
|
+
* {internally patching in OSX}[http://tx81z.blogspot.com/2011/06/osx-unimidi-and-midi-patch-bay.html]
|
39
|
+
* {with MicroMIDI DSL}[http://tx81z.blogspot.com/2011/08/micromidi-ruby-dsl-for-midi.html]
|
37
40
|
|
38
41
|
In addition, some examples are included with the library
|
39
42
|
|
@@ -41,9 +44,7 @@ In addition, some examples are included with the library
|
|
41
44
|
* {input}[http://github.com/arirusso/unimidi/blob/master/examples/input.rb]
|
42
45
|
* {output}[http://github.com/arirusso/unimidi/blob/master/examples/output.rb]
|
43
46
|
|
44
|
-
{more
|
45
|
-
|
46
|
-
Here's another {blog post}[http://tx81z.blogspot.com/2011/06/osx-unimidi-and-midi-patch-bay.html] about {using unimidi with MIDI Patch Bay on OSX}[http://tx81z.blogspot.com/2011/06/osx-unimidi-and-midi-patch-bay.html]
|
47
|
+
{more...}[http://github.com/arirusso/unimidi/blob/master/examples]
|
47
48
|
|
48
49
|
== Tests
|
49
50
|
|
@@ -21,7 +21,7 @@ module UniMIDI
|
|
21
21
|
# enable the device for use, can be passed a block to which the device will be passed back
|
22
22
|
def open(*a, &block)
|
23
23
|
@device.open(*a) unless enabled?
|
24
|
-
|
24
|
+
if block_given?
|
25
25
|
begin
|
26
26
|
yield(self)
|
27
27
|
ensure
|
@@ -50,12 +50,13 @@ module UniMIDI
|
|
50
50
|
|
51
51
|
module ClassMethods
|
52
52
|
|
53
|
+
# prints ids and names of each device to the console
|
53
54
|
def list
|
54
55
|
all.each { |device| puts(device.pretty_name) }
|
55
56
|
end
|
56
57
|
|
57
58
|
# streamlined console prompt that asks the user to select a device
|
58
|
-
def gets
|
59
|
+
def gets(&block)
|
59
60
|
device = nil
|
60
61
|
class_name = self.name.split("::").last.downcase
|
61
62
|
puts ""
|
@@ -69,7 +70,7 @@ module UniMIDI
|
|
69
70
|
device = all.find { |d| d.id == selection }
|
70
71
|
end
|
71
72
|
end
|
72
|
-
device.open
|
73
|
+
device.open(&block)
|
73
74
|
end
|
74
75
|
|
75
76
|
# returns the first device for this class
|
data/lib/unimidi.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unimidi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
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:
|
12
|
+
date: 2012-01-02 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: alsa-rawmidi
|
16
|
-
requirement: &
|
16
|
+
requirement: &70194102902300 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70194102902300
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: ffi-coremidi
|
27
|
-
requirement: &
|
27
|
+
requirement: &70194102901680 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70194102901680
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: midi-jruby
|
38
|
-
requirement: &
|
38
|
+
requirement: &70194102893800 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70194102893800
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: midi-winmm
|
49
|
-
requirement: &
|
49
|
+
requirement: &70194102893340 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70194102893340
|
58
58
|
description: Platform Independent, realtime MIDI input and output for Ruby
|
59
59
|
email:
|
60
60
|
- ari.russo@gmail.com
|