midi-topaz 0.0.6 → 0.0.7
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.
- data/lib/topaz/tempo.rb +12 -1
- data/lib/topaz.rb +1 -1
- metadata +1 -1
data/lib/topaz/tempo.rb
CHANGED
@@ -30,7 +30,11 @@ module Topaz
|
|
30
30
|
initialize_midi_io(options)
|
31
31
|
raise "You must specify an internal tempo rate or an external tempo source" if @source.nil?
|
32
32
|
|
33
|
-
|
33
|
+
unless options.nil?
|
34
|
+
@source.interval = options[:interval] unless options[:interval].nil?
|
35
|
+
initialize_sync(options[:children], options[:sync_to])
|
36
|
+
end
|
37
|
+
|
34
38
|
end
|
35
39
|
|
36
40
|
# this will change the tempo
|
@@ -115,6 +119,13 @@ module Topaz
|
|
115
119
|
end
|
116
120
|
|
117
121
|
private
|
122
|
+
|
123
|
+
def initialize_sync(children, sync_to)
|
124
|
+
children = [children].flatten.compact
|
125
|
+
sync_to = [sync_to].flatten.compact
|
126
|
+
children.each { |t| add_destination(t) }
|
127
|
+
sync_to.each { |t| sync_to(t) }
|
128
|
+
end
|
118
129
|
|
119
130
|
def initialize_midi_io(args)
|
120
131
|
ports = args.kind_of?(Hash) ? args[:midi] : args
|
data/lib/topaz.rb
CHANGED