musa-dsl 0.23.5 → 0.23.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/lib/musa-dsl/series/series-composer.rb +18 -3
- 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: d4151142ca6664ad550224f1ab9af55f31ce8982ff24cd4bfdd5bcd02bd45756
|
4
|
+
data.tar.gz: 9c2f01bb75266047984017e7edbd7f18ed353c34321b197af0faf7a3e385449a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b02d2620956fd954a7435bb7b6888d7107d02b7e57722a0f5e2f84c57f38576eab3a3bc5972b058387bcf4ad92833acce44d60c2808f36690e865b2ac776d38
|
7
|
+
data.tar.gz: 6a13c17fb864649fe6881e5ee3d34f2c1c48ada65b1640835310fb1658897d43a631cb63c30a186c7fa71bf3cee809ddd46627a36869a25a0a94099ea079bcb0
|
data/Gemfile
CHANGED
@@ -6,7 +6,7 @@ module Musa
|
|
6
6
|
module Series
|
7
7
|
module Operations
|
8
8
|
def composer(&block)
|
9
|
-
Composer::Composer.new(&block).
|
9
|
+
Composer::Composer.new(input: self, &block).output
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
@@ -14,9 +14,22 @@ module Musa
|
|
14
14
|
class Composer
|
15
15
|
using Musa::Extension::Arrayfy
|
16
16
|
|
17
|
-
def initialize(inputs: [:input], outputs: [:output], auto_commit: nil, &block)
|
17
|
+
def initialize(input: nil, inputs: [:input], outputs: [:output], auto_commit: nil, &block)
|
18
18
|
auto_commit = true if auto_commit.nil?
|
19
19
|
|
20
|
+
inputs = case inputs
|
21
|
+
when Array
|
22
|
+
inputs.collect { |_| [_, nil] }.to_h
|
23
|
+
when nil
|
24
|
+
{}
|
25
|
+
when Hash
|
26
|
+
inputs
|
27
|
+
else
|
28
|
+
raise ArgumentError, "inputs: expected a Hash with input names and source series { name: serie, ... } or an Array with names [name, ...] but received #{inputs}"
|
29
|
+
end
|
30
|
+
|
31
|
+
inputs[:input] = input if input
|
32
|
+
|
20
33
|
@pipelines = {}
|
21
34
|
|
22
35
|
def @pipelines.[]=(name, pipeline)
|
@@ -28,8 +41,10 @@ module Musa
|
|
28
41
|
@inputs = {}
|
29
42
|
@outputs = {}
|
30
43
|
|
31
|
-
inputs&.each do |input|
|
44
|
+
inputs.keys&.each do |input|
|
32
45
|
p = PROXY()
|
46
|
+
p.proxy_source = inputs[input] if inputs[input]
|
47
|
+
|
33
48
|
@inputs[input] = @pipelines[input] = Pipeline.new(input, input: p, output: p.buffered, pipelines: @pipelines)
|
34
49
|
|
35
50
|
@dsl.define_singleton_method(input) { input }
|
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-07-
|
3
|
+
s.version = '0.23.6'
|
4
|
+
s.date = '2021-07-29'
|
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.6
|
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-07-
|
11
|
+
date: 2021-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: citrus
|