musa-dsl 0.23.0 → 0.23.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b4a1fb5e2fc74d27266ed15f6edcc335c61b580f3c8fa83fd2c425066230a42b
4
- data.tar.gz: 5778babbeeab02ea23d511369946990209929b284e0025f65a67602a1c8fa504
3
+ metadata.gz: 38a9835b1d87d869a99fac037037eed22b8eaaf3ad133c70e732578a5631aa79
4
+ data.tar.gz: 7e9057ff2498fc3039baa1d749cb1c23b5fcc42bdb56879aab38c4fafc3d9468
5
5
  SHA512:
6
- metadata.gz: 33c4b5ab4b14c941ed36ede8919961f0c9bc4d0ec6acf34f2b02f297483c17dfb2e23d270118143c7199f2e073cf001591ad393cae09cbc41e75ac20d8f82c7a
7
- data.tar.gz: 4ffcea9a0a82bd7f97ef659ba0a3b03d9b319980df8987986ee0f63eb694d144fc03d0299b3a87665b78a52fafb5d9b840cf10e7461f36cbfe58b30ce4712f22
6
+ metadata.gz: 191ea705bc3b3378d5660d1e75e63bb53ef0e53d1030fcae2642ff777b9753118b33af4ec7cf0edaec884c793fecded95d41bc6aef9ad41698feb2ca2c04e14e
7
+ data.tar.gz: 0ee6ed871246af66ed7553a95ec2ca683d874034344b06e3c6128c54f70ec9592b33c7ac0df196dd11dc9a5290bd4c247df008fbf5b4f57af975fbd3a66bb468
@@ -10,7 +10,7 @@ using Musa::Extension::ExplodeRanges
10
10
  module Musa
11
11
  module MIDIVoices
12
12
  class MIDIVoices
13
- attr_accessor :log
13
+ attr_accessor :do_log
14
14
 
15
15
  def initialize(sequencer:, output:, channels:, do_log: nil)
16
16
  do_log ||= false
@@ -24,7 +24,7 @@ module Musa
24
24
  end
25
25
 
26
26
  def reset
27
- @voices = @channels.collect { |channel| MIDIVoice.new sequencer: @sequencer, output: @output, channel: channel, log: @do_log }.freeze
27
+ @voices = @channels.collect { |channel| MIDIVoice.new(sequencer: @sequencer, output: @output, channel: channel, do_log: @do_log) }.freeze
28
28
  end
29
29
 
30
30
  attr_reader :voices
@@ -48,14 +48,14 @@ module Musa
48
48
  attr_accessor :name, :do_log
49
49
  attr_reader :sequencer, :output, :channel, :active_pitches, :tick_duration
50
50
 
51
- def initialize(sequencer:, output:, channel:, name: nil, log: nil)
52
- log ||= false
51
+ def initialize(sequencer:, output:, channel:, name: nil, do_log: nil)
52
+ do_log ||= false
53
53
 
54
54
  @sequencer = sequencer
55
55
  @output = output
56
56
  @channel = channel
57
57
  @name = name
58
- @do_log = log
58
+ @do_log = do_log
59
59
 
60
60
  @tick_duration = Rational(1, @sequencer.ticks_per_bar)
61
61
 
@@ -64,7 +64,7 @@ module Musa
64
64
  @active_pitches = []
65
65
  fill_active_pitches @active_pitches
66
66
 
67
- log 'Warning: voice without output' unless @output
67
+ @sequencer.logger.warn 'voice without output' unless @output
68
68
 
69
69
  self
70
70
  end
@@ -118,7 +118,7 @@ module Musa
118
118
  end
119
119
 
120
120
  def log(msg)
121
- @sequencer.log "voice #{name || @channel}: #{msg}" if @do_log
121
+ @sequencer.logger.info('MIDIVoice') { "voice #{name || @channel}: #{msg}" } if @do_log
122
122
  end
123
123
 
124
124
  def to_s
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.0'
4
- s.date = '2021-06-29'
3
+ s.version = '0.23.1'
4
+ s.date = '2021-07-02'
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.0
4
+ version: 0.23.1
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-06-29 00:00:00.000000000 Z
11
+ date: 2021-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: citrus