unimidi 0.1.3-java → 0.1.4-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ Platform independent realtime MIDI input and output for Ruby.
6
6
 
7
7
  == Features
8
8
 
9
- * Currently Linux, JRuby, Windows and Cygwin are supported. OSX is {in progress}[http://github.com/arirusso/ffi-coremidi]
9
+ * Supports Linux, JRuby, OSX, Windows and Cygwin
10
10
  * Both input and output to and from multiple devices concurrently
11
11
  * Agnostically handle different MIDI and SysEx Message types
12
12
 
@@ -16,7 +16,8 @@ Platform
16
16
 
17
17
  * JRuby: {midi-jruby}[http://github.com/arirusso/midi-jruby]
18
18
  * Linux: {alsa-rawmidi}[http://github.com/arirusso/alsa-rawmidi]
19
- * Windows/Cygwin: {midi-winmm}[http://github.com/arirusso/midi-winmm]
19
+ * OSX: {ffi-coremidi}[http://github.com/arirusso/ffi-coremidi]
20
+ * Windows/Cygwin: {midi-winmm}[http://github.com/arirusso/midi-winmm]
20
21
 
21
22
  A couple of notes about JRuby only:
22
23
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  module UniMIDI
8
8
 
9
- VERSION = "0.1.3"
9
+ VERSION = "0.1.4"
10
10
 
11
11
  end
12
12
 
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
- # (c)2010-2011 Ari Russo and licensed under the Apache 2.0 License
4
- #
5
3
 
6
4
  require 'alsa-rawmidi'
7
5
 
@@ -12,20 +10,20 @@ module UniMIDI
12
10
  class Input
13
11
  include CongruousApiAdapter::Device
14
12
  include CongruousApiAdapter::Input
15
- defer_to AlsaRawMIDI::Input
13
+ DeferToClass = AlsaRawMIDI::Input
16
14
  end
17
15
 
18
16
  class Output
19
17
  include CongruousApiAdapter::Device
20
18
  include CongruousApiAdapter::Output
21
- defer_to AlsaRawMIDI::Output
19
+ DeferToClass = AlsaRawMIDI::Output
22
20
  end
23
21
 
24
22
  class Device
25
23
  extend CongruousApiAdapter::Device::ClassMethods
26
- defer_to AlsaRawMIDI::Device
27
- input_class Input
28
- output_class Output
24
+ DeferToClass = AlsaRawMIDI::Device
25
+ InputClass = Input
26
+ OutputClass = Output
29
27
  end
30
28
 
31
29
  end
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+
4
+ require 'coremidi'
5
+
6
+ module UniMIDI
7
+
8
+ module CoreMIDIAdapter
9
+
10
+ class Input
11
+ include CongruousApiAdapter::Device
12
+ include CongruousApiAdapter::Input
13
+ DeferToClass = CoreMIDI::Input
14
+ end
15
+
16
+ class Output
17
+ include CongruousApiAdapter::Device
18
+ include CongruousApiAdapter::Output
19
+ DeferToClass = CoreMIDI::Output
20
+ end
21
+
22
+ class Device
23
+ extend CongruousApiAdapter::Device::ClassMethods
24
+ DeferToClass = CoreMIDI::Device
25
+ InputClass = Input
26
+ OutputClass = Output
27
+ end
28
+
29
+ end
30
+
31
+ end
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
- # (c)2010-2011 Ari Russo and licensed under the Apache 2.0 License
4
- #
5
3
 
6
4
  require 'midi-jruby'
7
5
 
@@ -12,20 +10,20 @@ module UniMIDI
12
10
  class Input
13
11
  include CongruousApiAdapter::Device
14
12
  include CongruousApiAdapter::Input
15
- defer_to MIDIJRuby::Input
13
+ DeferToClass = MIDIJRuby::Input
16
14
  end
17
15
 
18
16
  class Output
19
17
  include CongruousApiAdapter::Device
20
18
  include CongruousApiAdapter::Output
21
- defer_to MIDIJRuby::Output
19
+ DeferToClass = MIDIJRuby::Output
22
20
  end
23
21
 
24
22
  class Device
25
23
  extend CongruousApiAdapter::Device::ClassMethods
26
- defer_to MIDIJRuby::Device
27
- input_class Input
28
- output_class Output
24
+ DeferToClass = MIDIJRuby::Device
25
+ InputClass = Input
26
+ OutputClass = Output
29
27
  end
30
28
 
31
29
  end
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
- # (c)2010-2011 Ari Russo and licensed under the Apache 2.0 License
4
- #
5
3
 
6
4
  require 'midi-winmm'
7
5
 
@@ -12,20 +10,20 @@ module UniMIDI
12
10
  class Input
13
11
  include CongruousApiAdapter::Device
14
12
  include CongruousApiAdapter::Input
15
- defer_to MIDIWinMM::Input
13
+ DeferToClass = MIDIWinMM::Input
16
14
  end
17
15
 
18
16
  class Output
19
17
  include CongruousApiAdapter::Device
20
18
  include CongruousApiAdapter::Output
21
- defer_to MIDIWinMM::Output
19
+ DeferToClass = MIDIWinMM::Output
22
20
  end
23
21
 
24
22
  class Device
25
23
  extend CongruousApiAdapter::Device::ClassMethods
26
- defer_to MIDIWinMM::Device
27
- input_class Input
28
- output_class Output
24
+ DeferToClass = MIDIWinMM::Device
25
+ InputClass = Input
26
+ OutputClass = Output
29
27
  end
30
28
 
31
29
  end
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
- # (c)2010-2011 Ari Russo and licensed under the Apache 2.0 License
4
- #
5
3
 
6
4
  module UniMIDI
7
5
 
@@ -42,7 +40,7 @@ module UniMIDI
42
40
 
43
41
  module ClassMethods
44
42
 
45
- def first
43
+ def first
46
44
  new(device_class.first)
47
45
  end
48
46
 
@@ -60,29 +58,17 @@ module UniMIDI
60
58
  :output => device_class.all_by_type[:output].map { |d| get_output_class.new(d) }
61
59
  }
62
60
  end
63
-
64
- def defer_to(klass)
65
- const_set("DeferToClass", klass)
66
- end
67
-
61
+
68
62
  def get_input_class
69
- const_get("InputClass")
63
+ self::InputClass
70
64
  end
71
-
65
+
72
66
  def get_output_class
73
- const_get("OutputClass")
67
+ self::OutputClass
74
68
  end
75
69
 
76
- def input_class(klass)
77
- const_set("InputClass", klass)
78
- end
79
-
80
- def output_class(klass)
81
- const_set("OutputClass", klass)
82
- end
83
-
84
70
  def device_class
85
- const_get("DeferToClass")
71
+ self::DeferToClass
86
72
  end
87
73
 
88
74
  end
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
- # (c)2010-2011 Ari Russo and licensed under the Apache 2.0 License
4
- #
5
3
 
6
4
  require 'singleton'
7
5
 
@@ -15,16 +13,18 @@ module UniMIDI
15
13
 
16
14
  def initialize
17
15
  lib = case RUBY_PLATFORM
18
- when /java/ then 'midi-jruby'
19
- when /linux/ then 'alsa-rawmidi'
20
- when /mingw/ then 'midi-winmm' #cygwin
21
- when /win/ then 'midi-winmm'
16
+ when /darwin/ then "ffi-coremidi"
17
+ when /java/ then "midi-jruby"
18
+ when /linux/ then "alsa-rawmidi"
19
+ when /mingw/ then "midi-winmm"
20
+ when /win/ then "midi-winmm"
22
21
  end
23
22
  require("unimidi/adapter/#{lib}")
24
23
  @interface = case RUBY_PLATFORM
24
+ when /darwin/ then CoreMIDIAdapter
25
25
  when /java/ then MIDIJRubyAdapter
26
26
  when /linux/ then AlsaRawMIDIAdapter
27
- when /mingw/ then MIDIWinMMAdapter #cygwin
27
+ when /mingw/ then MIDIWinMMAdapter
28
28
  when /win/ then MIDIWinMMAdapter
29
29
  end
30
30
  end
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unimidi
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 3
9
- version: 0.1.3
4
+ prerelease:
5
+ version: 0.1.4
10
6
  platform: java
11
7
  authors:
12
8
  - Ari Russo
@@ -14,18 +10,17 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2011-05-04 00:00:00 -04:00
13
+ date: 2011-05-07 00:00:00 -04:00
18
14
  default_executable:
19
15
  dependencies:
20
16
  - !ruby/object:Gem::Dependency
21
17
  name: midi-jruby
22
18
  prerelease: false
23
19
  requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
24
21
  requirements:
25
22
  - - ">="
26
23
  - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
24
  version: "0"
30
25
  type: :runtime
31
26
  version_requirements: *id001
@@ -42,9 +37,10 @@ files:
42
37
  - lib/unimidi.rb
43
38
  - lib/unimidi/congruous_api_adapter.rb
44
39
  - lib/unimidi/platform.rb
45
- - lib/unimidi/adapter/midi-winmm.rb
46
40
  - lib/unimidi/adapter/alsa-rawmidi.rb
41
+ - lib/unimidi/adapter/ffi-coremidi.rb
47
42
  - lib/unimidi/adapter/midi-jruby.rb
43
+ - lib/unimidi/adapter/midi-winmm.rb
48
44
  - LICENSE
49
45
  - README.rdoc
50
46
  has_rdoc: true
@@ -57,25 +53,21 @@ rdoc_options: []
57
53
  require_paths:
58
54
  - lib
59
55
  required_ruby_version: !ruby/object:Gem::Requirement
56
+ none: false
60
57
  requirements:
61
58
  - - ">="
62
59
  - !ruby/object:Gem::Version
63
- segments:
64
- - 0
65
60
  version: "0"
66
61
  required_rubygems_version: !ruby/object:Gem::Requirement
62
+ none: false
67
63
  requirements:
68
64
  - - ">="
69
65
  - !ruby/object:Gem::Version
70
- segments:
71
- - 1
72
- - 3
73
- - 6
74
66
  version: 1.3.6
75
67
  requirements: []
76
68
 
77
69
  rubyforge_project: unimidi
78
- rubygems_version: 1.3.6
70
+ rubygems_version: 1.5.1
79
71
  signing_key:
80
72
  specification_version: 3
81
73
  summary: Realtime MIDI input and output for Ruby.