musa-dsl 0.23.15 → 0.23.16

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: 8dab879e30a1ece7bc5a71a32398213d0592b4a95bb6a852346ec472314bcee7
4
- data.tar.gz: c10467430f594206804aee8521c51b514af79c29bca67b70782e0c7820294eb1
3
+ metadata.gz: 3b3e60773ea063a58c602a45986f15216e3015f945f89a49f352735cc1a87049
4
+ data.tar.gz: 80f1c48c3ff0d433cd0c4bb8ff31ba6f68c18bf08324c765137fd092e4255554
5
5
  SHA512:
6
- metadata.gz: 892c2017cc142814b475872a1bd9a4471686667b8237c5130ea3e7589fd50a0a0eb6d163ef40bd46b4924385fff4dc0ff9abfb18186349053fb362fe65becb17
7
- data.tar.gz: 9f287f7302a6d3547e5b85190c5cbda040e4a2e0f0c4dc89b4bb0dea3823772fcaae32c137aec1733b1e658fefe06963ef3cb4bbcc468244a77ef623f0cd7c17
6
+ metadata.gz: 2159188db8b3f2155c700535b396431c3e962dcc89ab658d9c0ce802ad99938bbc16050b4ecedc75a32edc61960a1196ca82ec88ecd4d40d79749bc592ddb61e
7
+ data.tar.gz: 78fd0289ba61f1269c03172e151f42841bc00472761d7653b613ce28f9e8d748a1e25576bae6b4a0d93b87e23a99d184c4b73d005402bf974db5e7662c24e62b
@@ -468,16 +468,19 @@ module Musa
468
468
  private def next_crossings
469
469
  from_time, from_value = get_time_value(@source.next_value)
470
470
 
471
- if from_time && from_value
472
- raise 'time only can go forward' if @last_time && from_time <= @last_time
471
+ return unless from_time && from_value
473
472
 
474
- @last_time = from_time
473
+ if @last_time && from_time < @last_time
474
+ raise "time only can go forward: last time = #{@last_time} (#{@last_time.to_f}) but " \
475
+ "from_time = #{from_time} (#{from_time.to_f}) (expected last_time to be < from_time) "
476
+ end
475
477
 
476
- to_time, to_value = get_time_value(@source.peek_next_value)
478
+ @last_time = from_time
477
479
 
478
- if to_time && to_value
479
- crossings(from_time, from_value, to_time, to_value)
480
- end
480
+ to_time, to_value = get_time_value(@source.peek_next_value)
481
+
482
+ if to_time && to_value
483
+ crossings(from_time, from_value, to_time, to_value)
481
484
  end
482
485
  end
483
486
 
data/lib/musa-dsl.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Musa
2
- VERSION = '0.23.15'
2
+ VERSION = '0.23.16'
3
3
  end
4
4
 
5
5
  require_relative 'musa-dsl/core-ext'
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.23.15'
4
- s.date = '2021-09-07'
3
+ s.version = '0.23.16'
4
+ s.date = '2021-09-13'
5
5
  s.summary = 'A simple Ruby DSL for making complex music'
6
6
  s.description = 'Musa-DSL: A Ruby framework and DSL for algorithmic sound and musical thinking and composition'
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.23.15
4
+ version: 0.23.16
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: 2021-09-07 00:00:00.000000000 Z
11
+ date: 2021-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: citrus