midi-topaz 0.0.10 → 0.0.11

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.
@@ -3,6 +3,8 @@ module Topaz
3
3
 
4
4
  # send sync messages via MIDI
5
5
  class MIDISyncOutput
6
+
7
+ attr_reader :output
6
8
 
7
9
  def initialize(output, options = {})
8
10
  @output = output
data/lib/topaz/tempo.rb CHANGED
@@ -109,11 +109,24 @@ module Topaz
109
109
  alias_method :time_since_start, :time
110
110
 
111
111
  # add a destination
112
- # accepts MIDISyncOutput
112
+ # accepts UniMIDI::Output or array of
113
113
  def add_destination(dest)
114
- @destinations << dest
114
+ dest = [dest].flatten.compact
115
+ dest.each do |d|
116
+ @destinations << MIDISyncOutput.new(d)
117
+ end
118
+ end
119
+
120
+ # remove a destination
121
+ # accepts UniMIDI::Output or array of
122
+ def remove_destination(dest)
123
+ dest = [dest].flatten.compact
124
+ dest.each do |output|
125
+ @destinations.each do |sync_output|
126
+ @destinations.delete(sync_output) if sync_output.output == output
127
+ end
128
+ end
115
129
  end
116
- #alias_method :<<, :add_destination
117
130
 
118
131
  protected
119
132
 
data/lib/topaz.rb CHANGED
@@ -18,6 +18,6 @@ require 'topaz/tempo'
18
18
 
19
19
  module Topaz
20
20
 
21
- VERSION = "0.0.10"
21
+ VERSION = "0.0.11"
22
22
 
23
23
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: midi-topaz
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.10
5
+ version: 0.0.11
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ari Russo