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 +4 -4
- data/lib/musa-dsl/midi/midi-voices.rb +7 -7
- data/musa-dsl.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38a9835b1d87d869a99fac037037eed22b8eaaf3ad133c70e732578a5631aa79
|
4
|
+
data.tar.gz: 7e9057ff2498fc3039baa1d749cb1c23b5fcc42bdb56879aab38c4fafc3d9468
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 :
|
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
|
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,
|
52
|
-
|
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 =
|
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
|
-
|
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.
|
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.
|
4
|
-
s.date = '2021-
|
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.
|
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-
|
11
|
+
date: 2021-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: citrus
|