midi-topaz 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/topaz/tempo.rb +9 -22
- data/lib/topaz.rb +1 -1
- metadata +2 -2
data/lib/topaz/tempo.rb
CHANGED
@@ -89,15 +89,15 @@ module Topaz
|
|
89
89
|
#
|
90
90
|
def start(options = {})
|
91
91
|
@start_time = Time.now
|
92
|
-
@destinations.each { |dest| dest.start
|
93
|
-
@source.start(options)
|
92
|
+
@destinations.each { |dest| dest.start }
|
93
|
+
@source.start(options)
|
94
94
|
@actions[:start].call unless @actions[:start].nil?
|
95
95
|
end
|
96
96
|
|
97
97
|
# this will stop tempo
|
98
98
|
def stop(options = {})
|
99
|
-
@destinations.each { |dest| dest.stop
|
100
|
-
@source.stop(options)
|
99
|
+
@destinations.each { |dest| dest.stop }
|
100
|
+
@source.stop(options)
|
101
101
|
@actions[:stop].call unless @actions[:stop].nil?
|
102
102
|
@start_time = nil
|
103
103
|
end
|
@@ -109,25 +109,12 @@ module Topaz
|
|
109
109
|
alias_method :time_since_start, :time
|
110
110
|
|
111
111
|
# add a destination
|
112
|
-
# accepts MIDISyncOutput
|
113
|
-
def add_destination(
|
114
|
-
@destinations <<
|
115
|
-
@start_time.nil? ? tempo.stop(:parent => self) : tempo.start(:parent => self)
|
112
|
+
# accepts MIDISyncOutput
|
113
|
+
def add_destination(dest)
|
114
|
+
@destinations << dest
|
116
115
|
end
|
117
|
-
alias_method :<<, :add_destination
|
118
|
-
|
119
|
-
|
120
|
-
# sync to another Tempo object
|
121
|
-
def sync_to(tempo)
|
122
|
-
tempo.add_destination(self)
|
123
|
-
end
|
124
|
-
|
125
|
-
# remove all sync connections to <em>tempo</em>
|
126
|
-
def unsync(tempo)
|
127
|
-
@destinations.delete(tempo)
|
128
|
-
tempo.unsync(self)
|
129
|
-
end
|
130
|
-
|
116
|
+
#alias_method :<<, :add_destination
|
117
|
+
|
131
118
|
protected
|
132
119
|
|
133
120
|
def tick
|
data/lib/topaz.rb
CHANGED
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.
|
5
|
+
version: 0.0.10
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Ari Russo
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-06-
|
13
|
+
date: 2011-06-29 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|