unimidi 0.1.14 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE CHANGED
@@ -1,13 +1,13 @@
1
- Copyright 2010-2011 Ari Russo
2
-
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
-
7
- http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- Unless required by applicable law or agreed to in writing, software
10
- distributed under the License is distributed on an "AS IS" BASIS,
11
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- See the License for the specific language governing permissions and
1
+ Copyright 2010-2011 Ari Russo
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
13
  limitations under the License.
@@ -1,63 +1,82 @@
1
- = UniMIDI
2
-
3
- == Summary
4
-
5
- Platform independent realtime MIDI input and output for Ruby.
6
-
7
- == Features
8
-
9
- * Supports Linux, JRuby, OSX, Windows and Cygwin
10
- * Both input and output to and from multiple devices concurrently
11
- * Agnostically handle different MIDI and SysEx Message types
12
-
13
- == Requirements
14
-
15
- Ruby 1.9.2 or JRuby 1.6.1 are strongly recommended
16
-
17
- One of the following libraries is required based on what platform is being used. It should install automatically when you install the unimidi gem
18
-
19
- Platform
20
-
21
- * JRuby: {midi-jruby}[http://github.com/arirusso/midi-jruby]
22
- * Linux: {alsa-rawmidi}[http://github.com/arirusso/alsa-rawmidi]
23
- * OSX: {ffi-coremidi}[http://github.com/arirusso/ffi-coremidi]
24
- * Windows/Cygwin: {midi-winmm}[http://github.com/arirusso/midi-winmm]
25
-
26
- == Install
27
-
28
- gem install unimidi
29
-
30
- No compilation required
31
-
32
- == Examples
33
-
34
- * {input}[http://github.com/arirusso/unimidi/blob/master/examples/input.rb]
35
- * {output}[http://github.com/arirusso/unimidi/blob/master/examples/output.rb]
36
-
37
- {more}[http://github.com/arirusso/unimidi/blob/master/examples]
38
-
39
- == Tests
40
-
41
- * please see {test/config.rb}[http://github.com/arirusso/unimidi/blob/master/test/config.rb] before running tests
42
-
43
- == Documentation
44
-
45
- * {rdoc}[http://rdoc.info/gems/unimidi]
46
-
47
- == If you are using JRuby
48
-
49
- A couple of notes
50
-
51
- * You must be in 1.9 mode. This is normally accomplished by passing --1.9 to JRuby at the command line. For testing in 1.9 mode, use
52
- jruby --1.9 -S rake test
53
- * javax.sound has some documented issues with SysEx messages in some versions OSX Snow Leopard which do affect this library.
54
-
55
- == Author
56
-
57
- {Ari Russo}[http://github.com/arirusso] <ari.russo at gmail.com>
58
-
59
- == License
60
-
61
- Apache 2.0, See the file LICENSE
62
-
63
- Copyright (c) 2010-2011 Ari Russo
1
+ = UniMIDI
2
+
3
+ == Summary
4
+
5
+ Platform independent realtime MIDI input and output for Ruby.
6
+
7
+ == Features
8
+
9
+ * Supports Linux, JRuby, OSX, Windows and Cygwin
10
+ * No compilation required
11
+ * Both input and output to and from multiple devices concurrently
12
+ * Agnostically handle different MIDI and SysEx Message types
13
+ * (OSX Only) Internally patch to other programs using IAC and {MIDI Patch Bay}[http://www.apple.com/downloads/macosx/audio/midipatchbay.html]
14
+
15
+ == Requirements
16
+
17
+ Ruby 1.9.2 or JRuby 1.6.1 are strongly recommended
18
+
19
+ One of the following libraries is required based on what platform you're using. It should install automatically with the unimidi gem. In some uncommon cases, they will all install
20
+
21
+ Platform
22
+
23
+ * JRuby: {midi-jruby}[http://github.com/arirusso/midi-jruby]
24
+ * Linux: {alsa-rawmidi}[http://github.com/arirusso/alsa-rawmidi]
25
+ * OSX: {ffi-coremidi}[http://github.com/arirusso/ffi-coremidi]
26
+ * Windows/Cygwin: {midi-winmm}[http://github.com/arirusso/midi-winmm]
27
+
28
+ == Install
29
+
30
+ gem install unimidi
31
+
32
+ == Usage
33
+
34
+ Here's a {blog post}[http://tx81z.blogspot.com/2011/06/unimidi-platform-independent-realtime.html] with a quick tutorial to {get started}[http://tx81z.blogspot.com/2011/06/unimidi-platform-independent-realtime.html].
35
+
36
+ Here's another {blog post}[http://tx81z.blogspot.com/2011/06/high-level-midi-io-with-ruby.html] that {explains how to do high-level messaging}[http://tx81z.blogspot.com/2011/06/high-level-midi-io-with-ruby.html]
37
+
38
+ In addition, some examples are included with the library
39
+
40
+ * {selecting a device}[http://github.com/arirusso/unimidi/blob/master/examples/select_a_device.rb]
41
+ * {input}[http://github.com/arirusso/unimidi/blob/master/examples/input.rb]
42
+ * {output}[http://github.com/arirusso/unimidi/blob/master/examples/output.rb]
43
+
44
+ {more examples}[http://github.com/arirusso/unimidi/blob/master/examples]
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
+
48
+ == Tests
49
+
50
+ There are a set of generic tests which assume that an output is connected to an input. If you wish to run these tests, first edit {test/config.rb}[http://github.com/arirusso/unimidi/blob/master/test/config.rb] to configure it to your setup.
51
+
52
+ The tests can be run using
53
+
54
+ rake test
55
+
56
+ See below for additional notes on testing with JRuby
57
+
58
+ == Documentation
59
+
60
+ * {rdoc}[http://rdoc.info/gems/unimidi]
61
+
62
+ == Platform Specific Notes
63
+
64
+ ==== JRuby
65
+
66
+ * You must be in 1.9 mode. This is normally accomplished by passing --1.9 to JRuby at the command line. For testing in 1.9 mode, use
67
+ jruby --1.9 -S rake test
68
+ * javax.sound has some documented issues with SysEx messages in some versions OSX Snow Leopard which do affect this library.
69
+
70
+ ==== Linux
71
+
72
+ * libasound and libasound-dev packages are required
73
+
74
+ == Author
75
+
76
+ {Ari Russo}[http://github.com/arirusso] <ari.russo at gmail.com>
77
+
78
+ == License
79
+
80
+ Apache 2.0, See the file LICENSE
81
+
82
+ Copyright (c) 2010-2011 Ari Russo
@@ -1,10 +1,10 @@
1
- #!/usr/bin/env ruby
2
- $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
3
-
4
- require 'unimidi'
5
-
6
- opts = ARGV.length > 1 ? ARGV.slice(1, ARGV.length-1) : {}
7
-
8
- raise "No command specified" if ARGV.first.nil?
9
-
1
+ #!/usr/bin/env ruby
2
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
3
+
4
+ require 'unimidi'
5
+
6
+ opts = ARGV.length > 1 ? ARGV.slice(1, ARGV.length-1) : {}
7
+
8
+ raise "No command specified" if ARGV.first.nil?
9
+
10
10
  UniMIDI.command(ARGV.first.to_sym, opts)
@@ -1,31 +1,31 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # A realtime MIDI interface for Ruby
4
- # (c)2010-2011 Ari Russo and licensed under the Apache 2.0 License
5
- #
6
-
7
- module UniMIDI
8
-
9
- VERSION = "0.1.14"
10
-
11
- end
12
-
13
- require 'forwardable'
14
-
15
- require 'unimidi/congruous_api_adapter'
16
- require 'unimidi/platform'
17
- require 'unimidi/type_conversion'
18
-
19
- module UniMIDI
20
- extend(Platform.instance.interface)
21
- include(Platform.instance.interface)
22
-
23
- def self.command(command, options = {})
24
- if [:l, :list, :list_devices].include?(command)
25
- require 'pp'
26
- pp Device::all
27
- else
28
- raise "Command #{command.to_s} not found"
29
- end
30
- end
31
- end
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # A realtime MIDI interface for Ruby
4
+ # (c)2010-2011 Ari Russo and licensed under the Apache 2.0 License
5
+ #
6
+
7
+ module UniMIDI
8
+
9
+ VERSION = "0.2.0"
10
+
11
+ end
12
+
13
+ require 'forwardable'
14
+
15
+ require 'unimidi/congruous_api_adapter'
16
+ require 'unimidi/platform'
17
+ require 'unimidi/type_conversion'
18
+
19
+ module UniMIDI
20
+ extend(Platform.instance.interface)
21
+ include(Platform.instance.interface)
22
+
23
+ def self.command(command, options = {})
24
+ if [:l, :list, :list_devices].include?(command)
25
+ require 'pp'
26
+ pp Device::all
27
+ else
28
+ raise "Command #{command.to_s} not found"
29
+ end
30
+ end
31
+ end
@@ -1,26 +1,26 @@
1
- #!/usr/bin/env ruby
2
- #
3
-
4
- require 'alsa-rawmidi'
5
-
6
- module UniMIDI
7
-
8
- module AlsaRawMIDIAdapter
9
-
10
- class Input < CongruousApiInput
11
- defer_to AlsaRawMIDI::Input
12
- end
13
-
14
- class Output < CongruousApiOutput
15
- defer_to AlsaRawMIDI::Output
16
- end
17
-
18
- class Device < CongruousApiDevice
19
- defer_to AlsaRawMIDI::Device
20
- input_class Input
21
- output_class Output
22
- end
23
-
24
- end
25
-
1
+ #!/usr/bin/env ruby
2
+ #
3
+
4
+ require 'alsa-rawmidi'
5
+
6
+ module UniMIDI
7
+
8
+ module AlsaRawMIDIAdapter
9
+
10
+ class Input < CongruousApiInput
11
+ defer_to AlsaRawMIDI::Input
12
+ end
13
+
14
+ class Output < CongruousApiOutput
15
+ defer_to AlsaRawMIDI::Output
16
+ end
17
+
18
+ class Device < CongruousApiDevice
19
+ defer_to AlsaRawMIDI::Device
20
+ input_class Input
21
+ output_class Output
22
+ end
23
+
24
+ end
25
+
26
26
  end
@@ -1,26 +1,26 @@
1
- #!/usr/bin/env ruby
2
- #
3
-
4
- require 'coremidi'
5
-
6
- module UniMIDI
7
-
8
- module CoreMIDIAdapter
9
-
10
- class Input < CongruousApiInput
11
- defer_to CoreMIDI::Input
12
- end
13
-
14
- class Output < CongruousApiOutput
15
- defer_to CoreMIDI::Output
16
- end
17
-
18
- class Device < CongruousApiDevice
19
- defer_to CoreMIDI::Entity
20
- input_class Input
21
- output_class Output
22
- end
23
-
24
- end
25
-
1
+ #!/usr/bin/env ruby
2
+ #
3
+
4
+ require 'coremidi'
5
+
6
+ module UniMIDI
7
+
8
+ module CoreMIDIAdapter
9
+
10
+ class Input < CongruousApiInput
11
+ defer_to CoreMIDI::Input
12
+ end
13
+
14
+ class Output < CongruousApiOutput
15
+ defer_to CoreMIDI::Output
16
+ end
17
+
18
+ class Device < CongruousApiDevice
19
+ defer_to CoreMIDI::Entity
20
+ input_class Input
21
+ output_class Output
22
+ end
23
+
24
+ end
25
+
26
26
  end
@@ -1,26 +1,26 @@
1
- #!/usr/bin/env ruby
2
- #
3
-
4
- require 'midi-jruby'
5
-
6
- module UniMIDI
7
-
8
- module MIDIJRubyAdapter
9
-
10
- class Input < CongruousApiInput
11
- defer_to MIDIJRuby::Input
12
- end
13
-
14
- class Output < CongruousApiOutput
15
- defer_to MIDIJRuby::Output
16
- end
17
-
18
- class Device < CongruousApiDevice
19
- defer_to MIDIJRuby::Device
20
- input_class Input
21
- output_class Output
22
- end
23
-
24
- end
25
-
1
+ #!/usr/bin/env ruby
2
+ #
3
+
4
+ require 'midi-jruby'
5
+
6
+ module UniMIDI
7
+
8
+ module MIDIJRubyAdapter
9
+
10
+ class Input < CongruousApiInput
11
+ defer_to MIDIJRuby::Input
12
+ end
13
+
14
+ class Output < CongruousApiOutput
15
+ defer_to MIDIJRuby::Output
16
+ end
17
+
18
+ class Device < CongruousApiDevice
19
+ defer_to MIDIJRuby::Device
20
+ input_class Input
21
+ output_class Output
22
+ end
23
+
24
+ end
25
+
26
26
  end
@@ -1,26 +1,26 @@
1
- #!/usr/bin/env ruby
2
- #
3
-
4
- require 'midi-winmm'
5
-
6
- module UniMIDI
7
-
8
- module MIDIWinMMAdapter
9
-
10
- class Input < CongruousApiInput
11
- defer_to MIDIWinMM::Input
12
- end
13
-
14
- class Output < CongruousApiOutput
15
- defer_to MIDIWinMM::Output
16
- end
17
-
18
- class Device < CongruousApiDevice
19
- defer_to MIDIWinMM::Device
20
- input_class Input
21
- output_class Output
22
- end
23
-
24
- end
25
-
1
+ #!/usr/bin/env ruby
2
+ #
3
+
4
+ require 'midi-winmm'
5
+
6
+ module UniMIDI
7
+
8
+ module MIDIWinMMAdapter
9
+
10
+ class Input < CongruousApiInput
11
+ defer_to MIDIWinMM::Input
12
+ end
13
+
14
+ class Output < CongruousApiOutput
15
+ defer_to MIDIWinMM::Output
16
+ end
17
+
18
+ class Device < CongruousApiDevice
19
+ defer_to MIDIWinMM::Device
20
+ input_class Input
21
+ output_class Output
22
+ end
23
+
24
+ end
25
+
26
26
  end