musa-dsl 0.14.17 → 0.14.18
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d4df51d6162aef04ab11bd89ad57d36542c6eb2ef5e9b3e0ad2e66b18c75f76
|
4
|
+
data.tar.gz: 31387f0b48ddb90cb3ed3ec628bcb6c60fea207a73350d3664c657bff5cc3ab9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d04c5711e673f5d26b17132506648915676fcee7994f6ecf770abdb810972a59a209e2ff21e8cbdd9c535de5e36c43944c29db2fa28d1ccd1725f1ec6a560aa9
|
7
|
+
data.tar.gz: 845cdd7371bc3db81090bf380ef38244ffd2debc0cfacbf07f8a13171f48bf850f318b99eb08d19cc2288395825ebe16877dd148de6eb6e8716c2be258f0d388
|
@@ -285,7 +285,7 @@ class Musa::BaseSequencer
|
|
285
285
|
nil
|
286
286
|
end
|
287
287
|
|
288
|
-
def _move(every: nil, from:, to: nil, step: nil, duration: nil, till: nil, on_stop: nil, after_bars: nil, after: nil, &block)
|
288
|
+
def _move(every: nil, from:, to: nil, step: nil, duration: nil, till: nil, right_open: nil, on_stop: nil, after_bars: nil, after: nil, &block)
|
289
289
|
|
290
290
|
raise ArgumentError, "Cannot use duration: #{duration} and till: #{till} parameters at the same time. Use only one of them." if till && duration
|
291
291
|
|
@@ -297,23 +297,25 @@ class Musa::BaseSequencer
|
|
297
297
|
block ||= proc {}
|
298
298
|
|
299
299
|
step = -step if step && to && ((step > 0 && to < from) || (step < 0 && from < to))
|
300
|
+
right_open ||= false
|
300
301
|
|
301
302
|
start_position = position
|
302
303
|
|
303
304
|
if duration || till
|
304
305
|
effective_duration = duration || till - start_position
|
306
|
+
right_open_offset = right_open ? 0 : 1 # Add 1 tick to arrive to final value in duration time (no need to add an extra tick)
|
305
307
|
|
306
308
|
if to && step && !every
|
307
309
|
steps = (to - from) / step
|
308
|
-
every = Rational(effective_duration, steps +
|
310
|
+
every = Rational(effective_duration, steps + right_open_offset)
|
309
311
|
|
310
312
|
elsif to && !step && !every
|
311
|
-
step = (to - from) / (effective_duration * @ticks_per_bar -
|
313
|
+
step = (to - from) / (effective_duration * @ticks_per_bar - right_open_offset)
|
312
314
|
every = @tick_duration
|
313
315
|
|
314
316
|
elsif to && !step && every
|
315
317
|
steps = effective_duration / every
|
316
|
-
step = (to - from) / (steps -
|
318
|
+
step = (to - from) / (steps - right_open_offset)
|
317
319
|
|
318
320
|
elsif !to && step && every
|
319
321
|
# ok
|
@@ -238,8 +238,8 @@ class Musa::BaseSequencer
|
|
238
238
|
control
|
239
239
|
end
|
240
240
|
|
241
|
-
def move(every: nil, from: nil, to: nil, step: nil, duration: nil, till: nil, on_stop: nil, after_bars: nil, after: nil, &block)
|
242
|
-
control = _move every: every, from: from, to: to, step: step, duration: duration, till: till, on_stop: on_stop, after_bars: after_bars, after: after, &block
|
241
|
+
def move(every: nil, from: nil, to: nil, step: nil, duration: nil, till: nil, right_open: nil, on_stop: nil, after_bars: nil, after: nil, &block)
|
242
|
+
control = _move every: every, from: from, to: to, step: step, duration: duration, till: till, right_open: right_open, on_stop: on_stop, after_bars: after_bars, after: after, &block
|
243
243
|
|
244
244
|
@moving << control
|
245
245
|
|
data/musa-dsl.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'musa-dsl'
|
3
|
-
s.version = '0.14.
|
4
|
-
s.date = '2019-09-
|
3
|
+
s.version = '0.14.18'
|
4
|
+
s.date = '2019-09-29'
|
5
5
|
s.summary = 'A simple Ruby DSL for making complex music'
|
6
6
|
s.description = 'Musa-DSL: A Ruby DSL for algorithmic music composition, device language neutral (MIDI, OSC, etc)'
|
7
7
|
s.authors = ['Javier Sánchez Yeste']
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: musa-dsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Sánchez Yeste
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: citrus
|