musa-dsl 0.14.26 → 0.21.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/Gemfile +0 -1
- data/README.md +5 -1
- data/lib/musa-dsl.rb +54 -11
- data/lib/musa-dsl/core-ext.rb +7 -13
- data/lib/musa-dsl/core-ext/array-explode-ranges.rb +15 -23
- data/lib/musa-dsl/core-ext/arrayfy.rb +30 -12
- data/lib/musa-dsl/core-ext/attribute-builder.rb +194 -0
- data/lib/musa-dsl/core-ext/deep-copy.rb +185 -0
- data/lib/musa-dsl/core-ext/dynamic-proxy.rb +44 -40
- data/lib/musa-dsl/core-ext/inspect-nice.rb +40 -22
- data/lib/musa-dsl/core-ext/smart-proc-binder.rb +108 -0
- data/lib/musa-dsl/core-ext/with.rb +26 -0
- data/lib/musa-dsl/datasets.rb +8 -3
- data/lib/musa-dsl/datasets/dataset.rb +3 -0
- data/lib/musa-dsl/datasets/delta-d.rb +12 -0
- data/lib/musa-dsl/datasets/e.rb +61 -0
- data/lib/musa-dsl/datasets/gdv.rb +51 -411
- data/lib/musa-dsl/datasets/gdvd.rb +179 -0
- data/lib/musa-dsl/datasets/helper.rb +41 -0
- data/lib/musa-dsl/datasets/p.rb +68 -0
- data/lib/musa-dsl/datasets/packed-v.rb +19 -0
- data/lib/musa-dsl/datasets/pdv.rb +22 -15
- data/lib/musa-dsl/datasets/ps.rb +113 -0
- data/lib/musa-dsl/datasets/score.rb +210 -0
- data/lib/musa-dsl/datasets/score/queriable.rb +48 -0
- data/lib/musa-dsl/datasets/score/render.rb +31 -0
- data/lib/musa-dsl/datasets/score/to-mxml/process-pdv.rb +160 -0
- data/lib/musa-dsl/datasets/score/to-mxml/process-ps.rb +51 -0
- data/lib/musa-dsl/datasets/score/to-mxml/process-time.rb +153 -0
- data/lib/musa-dsl/datasets/score/to-mxml/to-mxml.rb +158 -0
- data/lib/musa-dsl/datasets/v.rb +23 -0
- data/lib/musa-dsl/generative.rb +5 -5
- data/lib/musa-dsl/generative/backboner.rb +274 -0
- data/lib/musa-dsl/generative/darwin.rb +102 -96
- data/lib/musa-dsl/generative/generative-grammar.rb +182 -187
- data/lib/musa-dsl/generative/markov.rb +56 -53
- data/lib/musa-dsl/generative/variatio.rb +234 -222
- data/lib/musa-dsl/logger.rb +1 -0
- data/lib/musa-dsl/logger/logger.rb +31 -0
- data/lib/musa-dsl/matrix.rb +1 -0
- data/lib/musa-dsl/matrix/matrix.rb +210 -0
- data/lib/musa-dsl/midi.rb +2 -2
- data/lib/musa-dsl/midi/midi-recorder.rb +54 -52
- data/lib/musa-dsl/midi/midi-voices.rb +183 -182
- data/lib/musa-dsl/music.rb +5 -5
- data/lib/musa-dsl/music/chord-definition.rb +54 -50
- data/lib/musa-dsl/music/chord-definitions.rb +13 -9
- data/lib/musa-dsl/music/chords.rb +236 -238
- data/lib/musa-dsl/music/equally-tempered-12-tone-scale-system.rb +187 -183
- data/lib/musa-dsl/music/scales.rb +331 -332
- data/lib/musa-dsl/musicxml.rb +1 -0
- data/lib/musa-dsl/musicxml/builder/attributes.rb +155 -0
- data/lib/musa-dsl/musicxml/builder/backup-forward.rb +45 -0
- data/lib/musa-dsl/musicxml/builder/direction.rb +322 -0
- data/lib/musa-dsl/musicxml/builder/helper.rb +90 -0
- data/lib/musa-dsl/musicxml/builder/measure.rb +137 -0
- data/lib/musa-dsl/musicxml/builder/note-complexities.rb +152 -0
- data/lib/musa-dsl/musicxml/builder/note.rb +577 -0
- data/lib/musa-dsl/musicxml/builder/part-group.rb +44 -0
- data/lib/musa-dsl/musicxml/builder/part.rb +67 -0
- data/lib/musa-dsl/musicxml/builder/pitched-note.rb +126 -0
- data/lib/musa-dsl/musicxml/builder/rest.rb +117 -0
- data/lib/musa-dsl/musicxml/builder/score-partwise.rb +120 -0
- data/lib/musa-dsl/musicxml/builder/typed-text.rb +43 -0
- data/lib/musa-dsl/musicxml/builder/unpitched-note.rb +112 -0
- data/lib/musa-dsl/neumalang.rb +1 -1
- data/lib/musa-dsl/neumalang/datatypes.citrus +79 -0
- data/lib/musa-dsl/neumalang/neuma.citrus +165 -0
- data/lib/musa-dsl/neumalang/neumalang.citrus +32 -242
- data/lib/musa-dsl/neumalang/neumalang.rb +373 -142
- data/lib/musa-dsl/neumalang/process.citrus +21 -0
- data/lib/musa-dsl/neumalang/terminals.citrus +67 -0
- data/lib/musa-dsl/neumalang/vectors.citrus +23 -0
- data/lib/musa-dsl/neumas.rb +5 -0
- data/lib/musa-dsl/neumas/array-to-neumas.rb +34 -0
- data/lib/musa-dsl/neumas/neuma-decoder.rb +63 -0
- data/lib/musa-dsl/neumas/neuma-gdv-decoder.rb +57 -0
- data/lib/musa-dsl/neumas/neuma-gdvd-decoder.rb +15 -0
- data/lib/musa-dsl/neumas/neumas.rb +37 -0
- data/lib/musa-dsl/neumas/string-to-neumas.rb +34 -0
- data/lib/musa-dsl/repl.rb +1 -1
- data/lib/musa-dsl/repl/repl.rb +105 -105
- data/lib/musa-dsl/sequencer.rb +1 -1
- data/lib/musa-dsl/sequencer/base-sequencer-implementation-control.rb +163 -136
- data/lib/musa-dsl/sequencer/base-sequencer-implementation-play-helper.rb +301 -286
- data/lib/musa-dsl/sequencer/base-sequencer-implementation.rb +562 -270
- data/lib/musa-dsl/sequencer/base-sequencer-public.rb +199 -199
- data/lib/musa-dsl/sequencer/base-sequencer-tick-based.rb +77 -0
- data/lib/musa-dsl/sequencer/base-sequencer-tickless-based.rb +75 -0
- data/lib/musa-dsl/sequencer/sequencer-dsl.rb +105 -85
- data/lib/musa-dsl/sequencer/timeslots.rb +34 -0
- data/lib/musa-dsl/series.rb +1 -1
- data/lib/musa-dsl/{core-ext → series}/array-to-serie.rb +1 -1
- data/lib/musa-dsl/series/base-series.rb +171 -168
- data/lib/musa-dsl/series/hash-serie-splitter.rb +134 -132
- data/lib/musa-dsl/series/holder-serie.rb +1 -1
- data/lib/musa-dsl/series/main-serie-constructors.rb +6 -1
- data/lib/musa-dsl/series/main-serie-operations.rb +807 -797
- data/lib/musa-dsl/series/proxy-serie.rb +6 -6
- data/lib/musa-dsl/series/queue-serie.rb +5 -5
- data/lib/musa-dsl/series/series.rb +2 -0
- data/lib/musa-dsl/transcription.rb +4 -0
- data/lib/musa-dsl/transcription/from-gdv-to-midi.rb +227 -0
- data/lib/musa-dsl/transcription/from-gdv-to-musicxml.rb +36 -0
- data/lib/musa-dsl/transcription/from-gdv.rb +17 -0
- data/lib/musa-dsl/transcription/transcription.rb +55 -0
- data/lib/musa-dsl/transport.rb +6 -6
- data/lib/musa-dsl/transport/clock.rb +26 -26
- data/lib/musa-dsl/transport/dummy-clock.rb +32 -30
- data/lib/musa-dsl/transport/external-tick-clock.rb +21 -20
- data/lib/musa-dsl/transport/input-midi-clock.rb +82 -80
- data/lib/musa-dsl/transport/timer-clock.rb +72 -71
- data/lib/musa-dsl/transport/timer.rb +28 -26
- data/lib/musa-dsl/transport/transport.rb +99 -95
- data/musa-dsl.gemspec +3 -3
- metadata +73 -24
- data/lib/musa-dsl/core-ext/array-apply-get.rb +0 -18
- data/lib/musa-dsl/core-ext/array-to-neumas.rb +0 -28
- data/lib/musa-dsl/core-ext/as-context-run.rb +0 -44
- data/lib/musa-dsl/core-ext/duplicate.rb +0 -134
- data/lib/musa-dsl/core-ext/key-parameters-procedure-binder.rb +0 -85
- data/lib/musa-dsl/core-ext/proc-nice.rb +0 -13
- data/lib/musa-dsl/core-ext/send-nice.rb +0 -21
- data/lib/musa-dsl/core-ext/string-to-neumas.rb +0 -27
- data/lib/musa-dsl/datasets/gdv-decorators.rb +0 -221
- data/lib/musa-dsl/generative/rules.rb +0 -282
- data/lib/musa-dsl/neuma.rb +0 -1
- data/lib/musa-dsl/neuma/neuma.rb +0 -181
@@ -1,273 +1,273 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require_relative '../core-ext/arrayfy'
|
2
|
+
require_relative '../core-ext/smart-proc-binder'
|
3
|
+
require_relative '../logger'
|
3
4
|
|
4
|
-
|
5
|
+
require_relative '../series'
|
5
6
|
|
6
|
-
|
7
|
-
attr_reader :beats_per_bar, :ticks_per_beat, :ticks_per_bar, :tick_duration, :running_position
|
8
|
-
attr_reader :everying, :playing, :moving
|
7
|
+
require_relative 'timeslots'
|
9
8
|
|
10
|
-
|
9
|
+
require_relative 'base-sequencer-tick-based'
|
10
|
+
require_relative 'base-sequencer-tickless-based'
|
11
11
|
|
12
|
-
|
13
|
-
|
12
|
+
module Musa
|
13
|
+
module Sequencer
|
14
|
+
class BaseSequencer
|
15
|
+
attr_reader :beats_per_bar, :ticks_per_beat
|
16
|
+
attr_reader :running_position
|
17
|
+
attr_reader :everying, :playing, :moving
|
18
|
+
attr_reader :logger
|
14
19
|
|
15
|
-
|
16
|
-
@on_block_error = []
|
20
|
+
def initialize(beats_per_bar = nil, ticks_per_beat = nil, logger: nil, do_log: nil, do_error_log: nil, log_position_format: nil)
|
17
21
|
|
18
|
-
|
19
|
-
|
22
|
+
raise ArgumentError,
|
23
|
+
"'beats_per_bar' and 'ticks_per_beat' parameters should be both nil or both have values" \
|
24
|
+
unless beats_per_bar && ticks_per_beat || beats_per_bar.nil? && ticks_per_beat.nil?
|
20
25
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
@tick_duration = Rational(1, @ticks_per_bar)
|
26
|
-
|
27
|
-
@score = {}
|
28
|
-
|
29
|
-
@everying = []
|
30
|
-
@playing = []
|
31
|
-
@moving = []
|
32
|
-
|
33
|
-
@do_log = do_log
|
34
|
-
|
35
|
-
reset
|
36
|
-
end
|
37
|
-
|
38
|
-
def reset
|
39
|
-
@score.clear
|
40
|
-
@everying.clear
|
41
|
-
@playing.clear
|
42
|
-
@moving.clear
|
43
|
-
|
44
|
-
@event_handlers = [EventHandler.new]
|
26
|
+
if logger
|
27
|
+
@logger = logger
|
28
|
+
else
|
29
|
+
@logger = Musa::Logger::Logger.new(sequencer: self, position_format: log_position_format)
|
45
30
|
|
46
|
-
|
47
|
-
|
31
|
+
@logger.error! if do_error_log || do_error_log.nil?
|
32
|
+
@logger.debug! if do_log
|
33
|
+
end
|
48
34
|
|
49
|
-
|
50
|
-
|
35
|
+
if beats_per_bar && ticks_per_beat
|
36
|
+
@beats_per_bar = Rational(beats_per_bar)
|
37
|
+
@ticks_per_beat = Rational(ticks_per_beat)
|
51
38
|
|
52
|
-
|
39
|
+
self.singleton_class.include TickBasedTiming
|
40
|
+
else
|
41
|
+
self.singleton_class.include TicklessBasedTiming
|
42
|
+
end
|
53
43
|
|
54
|
-
|
55
|
-
@score[position_to_run].each do |command|
|
44
|
+
_init_timing
|
56
45
|
|
57
|
-
|
58
|
-
|
46
|
+
@on_debug_at = []
|
47
|
+
@on_error = []
|
59
48
|
|
60
|
-
|
61
|
-
|
62
|
-
original_stderr = $stderr
|
49
|
+
@before_tick = []
|
50
|
+
@on_fast_forward = []
|
63
51
|
|
64
|
-
|
65
|
-
|
52
|
+
@tick_mutex = Mutex.new
|
53
|
+
@position_mutex = Mutex.new
|
66
54
|
|
67
|
-
|
55
|
+
@timeslots = Timeslots.new
|
68
56
|
|
69
|
-
|
70
|
-
|
71
|
-
|
57
|
+
@everying = []
|
58
|
+
@playing = []
|
59
|
+
@moving = []
|
72
60
|
|
73
|
-
|
74
|
-
else
|
75
|
-
@@tick_mutex.synchronize do
|
76
|
-
command[:block]._call command[:value_parameters], command[:key_parameters] if command[:block]
|
77
|
-
end
|
78
|
-
end
|
61
|
+
reset
|
79
62
|
end
|
80
63
|
|
81
|
-
|
82
|
-
|
83
|
-
|
64
|
+
def reset
|
65
|
+
@timeslots.clear
|
66
|
+
@everying.clear
|
67
|
+
@playing.clear
|
68
|
+
@moving.clear
|
84
69
|
|
85
|
-
|
86
|
-
@score.size
|
87
|
-
end
|
88
|
-
|
89
|
-
def empty?
|
90
|
-
@score.empty?
|
91
|
-
end
|
70
|
+
@event_handlers = [EventHandler.new]
|
92
71
|
|
93
|
-
|
94
|
-
|
95
|
-
end
|
96
|
-
|
97
|
-
def event_handler
|
98
|
-
@event_handlers.last
|
99
|
-
end
|
72
|
+
_reset_timing
|
73
|
+
end
|
100
74
|
|
101
|
-
|
102
|
-
|
103
|
-
|
75
|
+
def size
|
76
|
+
@timeslots.values.sum(&:size)
|
77
|
+
end
|
104
78
|
|
105
|
-
|
106
|
-
|
107
|
-
|
79
|
+
def empty?
|
80
|
+
@timeslots.empty?
|
81
|
+
end
|
108
82
|
|
109
|
-
|
110
|
-
|
111
|
-
|
83
|
+
def run
|
84
|
+
tick until empty?
|
85
|
+
end
|
112
86
|
|
113
|
-
|
114
|
-
|
115
|
-
|
87
|
+
def event_handler
|
88
|
+
@event_handlers.last
|
89
|
+
end
|
116
90
|
|
117
|
-
|
118
|
-
|
119
|
-
|
91
|
+
def on_debug_at(&block)
|
92
|
+
@on_debug_at << SmartProcBinder.new(block)
|
93
|
+
end
|
120
94
|
|
121
|
-
|
122
|
-
|
95
|
+
def on_error(&block)
|
96
|
+
@on_error << SmartProcBinder.new(block)
|
97
|
+
end
|
123
98
|
|
124
|
-
|
99
|
+
def on_fast_forward(&block)
|
100
|
+
@on_fast_forward << SmartProcBinder.new(block)
|
101
|
+
end
|
125
102
|
|
126
|
-
|
103
|
+
def before_tick(&block)
|
104
|
+
@before_tick << SmartProcBinder.new(block)
|
105
|
+
end
|
127
106
|
|
128
|
-
|
107
|
+
def on(event, &block)
|
108
|
+
@event_handlers.last.on event, &block
|
109
|
+
end
|
129
110
|
|
130
|
-
|
131
|
-
|
111
|
+
def launch(event, *value_parameters, **key_parameters)
|
112
|
+
@event_handlers.last.launch event, *value_parameters, **key_parameters
|
113
|
+
end
|
132
114
|
|
133
|
-
|
134
|
-
|
135
|
-
end
|
115
|
+
def wait(bars_delay, with: nil, debug: nil, &block)
|
116
|
+
debug ||= false
|
136
117
|
|
137
|
-
|
138
|
-
|
139
|
-
end
|
118
|
+
control = EventHandler.new @event_handlers.last
|
119
|
+
@event_handlers.push control
|
140
120
|
|
141
|
-
|
142
|
-
|
121
|
+
if bars_delay.is_a? Numeric
|
122
|
+
_numeric_at position + bars_delay.rationalize, control, with: with, debug: debug, &block
|
123
|
+
else
|
124
|
+
bars_delay = Series::S(*bars_delay) if bars_delay.is_a?(Array)
|
125
|
+
bars_delay = bars_delay.instance if bars_delay
|
143
126
|
|
144
|
-
|
145
|
-
|
127
|
+
with = Series::S(*with).repeat if with.is_a?(Array)
|
128
|
+
with = with.instance if with
|
146
129
|
|
147
|
-
|
148
|
-
|
149
|
-
else
|
150
|
-
bars_delay = Series::S(*bars_delay) if bars_delay.is_a? Array
|
151
|
-
bars_delay = bars_delay.instance if bars_delay
|
130
|
+
_serie_at bars_delay.eval { |delay| position + delay }, control, with: with, debug: debug, &block
|
131
|
+
end
|
152
132
|
|
153
|
-
|
154
|
-
with = with.instance if with
|
133
|
+
@event_handlers.pop
|
155
134
|
|
156
|
-
|
157
|
-
|
135
|
+
control
|
136
|
+
end
|
158
137
|
|
159
|
-
|
138
|
+
def now(with: nil, &block)
|
139
|
+
control = EventHandler.new @event_handlers.last
|
140
|
+
@event_handlers.push control
|
160
141
|
|
161
|
-
|
162
|
-
end
|
142
|
+
_numeric_at position, control, with: with, &block
|
163
143
|
|
164
|
-
|
165
|
-
control = EventHandler.new @event_handlers.last, capture_stdout: true
|
166
|
-
@event_handlers.push control
|
144
|
+
@event_handlers.pop
|
167
145
|
|
168
|
-
|
146
|
+
control
|
147
|
+
end
|
169
148
|
|
170
|
-
|
149
|
+
def raw_at(bar_position, force_first: nil, &block)
|
150
|
+
_raw_numeric_at bar_position.rationalize, force_first: force_first, &block
|
171
151
|
|
172
|
-
|
173
|
-
|
152
|
+
nil
|
153
|
+
end
|
174
154
|
|
175
|
-
|
176
|
-
|
155
|
+
def at(bar_position, with: nil, debug: nil, &block)
|
156
|
+
debug ||= false
|
177
157
|
|
178
|
-
|
179
|
-
|
158
|
+
control = EventHandler.new @event_handlers.last
|
159
|
+
@event_handlers.push control
|
180
160
|
|
181
|
-
|
182
|
-
|
161
|
+
if bar_position.is_a? Numeric
|
162
|
+
_numeric_at bar_position.rationalize, control, with: with, debug: debug, &block
|
163
|
+
else
|
164
|
+
bar_position = Series::S(*bar_position) if bar_position.is_a? Array
|
165
|
+
bar_position = bar_position.instance if bar_position
|
183
166
|
|
184
|
-
|
185
|
-
|
167
|
+
with = Series::S(*with).repeat if with.is_a? Array
|
168
|
+
with = with.instance if with
|
186
169
|
|
187
|
-
|
188
|
-
|
189
|
-
else
|
190
|
-
bar_position = Series::S(*bar_position) if bar_position.is_a? Array
|
191
|
-
bar_position = bar_position.instance if bar_position
|
170
|
+
_serie_at bar_position, control, with: with, debug: debug, &block
|
171
|
+
end
|
192
172
|
|
193
|
-
|
194
|
-
with = with.instance if with
|
173
|
+
@event_handlers.pop
|
195
174
|
|
196
|
-
|
197
|
-
|
175
|
+
control
|
176
|
+
end
|
198
177
|
|
199
|
-
|
178
|
+
def play(serie, mode: nil, parameter: nil, after: nil, context: nil, **mode_args, &block)
|
179
|
+
mode ||= :wait
|
200
180
|
|
201
|
-
|
202
|
-
|
181
|
+
control = PlayControl.new @event_handlers.last, after: after
|
182
|
+
@event_handlers.push control
|
203
183
|
|
204
|
-
|
205
|
-
mode ||= :wait
|
184
|
+
_play serie.instance, control, context, mode: mode, parameter: parameter, **mode_args, &block
|
206
185
|
|
207
|
-
|
208
|
-
@event_handlers.push control
|
186
|
+
@event_handlers.pop
|
209
187
|
|
210
|
-
|
188
|
+
@playing << control
|
211
189
|
|
212
|
-
|
190
|
+
control.after do
|
191
|
+
@playing.delete control
|
192
|
+
end
|
213
193
|
|
214
|
-
|
194
|
+
control
|
195
|
+
end
|
215
196
|
|
216
|
-
|
217
|
-
|
218
|
-
|
197
|
+
def continuation_play(parameters)
|
198
|
+
_play parameters[:serie],
|
199
|
+
parameters[:control],
|
200
|
+
parameters[:nl_context],
|
201
|
+
mode: parameters[:mode],
|
202
|
+
decoder: parameters[:decoder],
|
203
|
+
__play_eval: parameters[:play_eval],
|
204
|
+
**parameters[:mode_args]
|
205
|
+
end
|
219
206
|
|
220
|
-
|
221
|
-
|
207
|
+
def every(interval, duration: nil, till: nil, condition: nil, on_stop: nil, after_bars: nil, after: nil, &block)
|
208
|
+
# nil interval means 'only once'
|
209
|
+
interval = interval.rationalize unless interval.nil?
|
222
210
|
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
**parameters[:mode_args]
|
231
|
-
end
|
211
|
+
control = EveryControl.new @event_handlers.last,
|
212
|
+
duration: duration,
|
213
|
+
till: till,
|
214
|
+
condition: condition,
|
215
|
+
on_stop: on_stop,
|
216
|
+
after_bars: after_bars,
|
217
|
+
after: after
|
232
218
|
|
233
|
-
|
234
|
-
binterval = binterval.rationalize
|
219
|
+
@event_handlers.push control
|
235
220
|
|
236
|
-
|
237
|
-
@event_handlers.push control
|
221
|
+
_every interval, control, &block
|
238
222
|
|
239
|
-
|
223
|
+
@event_handlers.pop
|
240
224
|
|
241
|
-
|
225
|
+
@everying << control
|
242
226
|
|
243
|
-
|
227
|
+
control.after do
|
228
|
+
@everying.delete control
|
229
|
+
end
|
244
230
|
|
245
|
-
|
246
|
-
|
247
|
-
end
|
231
|
+
control
|
232
|
+
end
|
248
233
|
|
249
|
-
|
250
|
-
|
234
|
+
def move(every: nil,
|
235
|
+
from: nil, to: nil, step: nil,
|
236
|
+
duration: nil, till: nil,
|
237
|
+
function: nil,
|
238
|
+
right_open: nil,
|
239
|
+
on_stop: nil,
|
240
|
+
after_bars: nil,
|
241
|
+
after: nil,
|
242
|
+
&block)
|
243
|
+
|
244
|
+
control = _move every: every,
|
245
|
+
from: from, to: to, step: step,
|
246
|
+
duration: duration, till: till,
|
247
|
+
function: function,
|
248
|
+
right_open: right_open,
|
249
|
+
on_stop: on_stop,
|
250
|
+
after_bars: after_bars,
|
251
|
+
after: after,
|
252
|
+
&block
|
253
|
+
|
254
|
+
@moving << control
|
255
|
+
|
256
|
+
control.after do
|
257
|
+
@moving.delete control
|
258
|
+
end
|
251
259
|
|
252
|
-
|
253
|
-
|
260
|
+
control
|
261
|
+
end
|
254
262
|
|
255
|
-
|
263
|
+
def debug(msg = nil)
|
264
|
+
@logger.debug { msg || '...' }
|
265
|
+
end
|
256
266
|
|
257
|
-
|
258
|
-
|
267
|
+
def to_s
|
268
|
+
super + ": position=#{position}"
|
269
|
+
end
|
259
270
|
end
|
260
|
-
|
261
|
-
control
|
262
|
-
end
|
263
|
-
|
264
|
-
def log(msg = nil)
|
265
|
-
_log msg
|
266
271
|
end
|
267
|
-
|
268
|
-
def inspect
|
269
|
-
super + ": position=#{position}"
|
270
|
-
end
|
271
|
-
|
272
|
-
alias to_s inspect
|
273
272
|
end
|
273
|
+
|