roborabb 0.0.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.md +4 -0
- data/README.md +3 -3
- data/lib/roborabb.rb +0 -1
- data/lib/roborabb/version.rb +1 -1
- data/spec/acceptance_spec.rb +3 -3
- data/spec/unit_spec.rb +6 -6
- metadata +6 -7
- data/lib/roborabb/core_ext.rb +0 -1
data/HISTORY.md
CHANGED
data/README.md
CHANGED
@@ -24,9 +24,9 @@ Then use it:
|
|
24
24
|
unit: 8,
|
25
25
|
time_signature: "4/4",
|
26
26
|
notes: {
|
27
|
-
hihat:
|
28
|
-
kick:
|
29
|
-
snare:
|
27
|
+
hihat: ->(env) { true },
|
28
|
+
kick: ->(env) { (env.subdivision + 0) % 4 == 0 },
|
29
|
+
snare: ->(env) { (env.subdivision + 2) % 4 == 0 },
|
30
30
|
}
|
31
31
|
)
|
32
32
|
|
data/lib/roborabb.rb
CHANGED
data/lib/roborabb/version.rb
CHANGED
data/spec/acceptance_spec.rb
CHANGED
@@ -8,9 +8,9 @@ describe 'outputting to lilypond' do
|
|
8
8
|
unit: 8,
|
9
9
|
time_signature: "4/4",
|
10
10
|
notes: {
|
11
|
-
hihat:
|
12
|
-
kick:
|
13
|
-
snare:
|
11
|
+
hihat: ->(env) { true },
|
12
|
+
kick: ->(env) { (env.subdivision + 0) % 4 == 0 },
|
13
|
+
snare: ->(env) { (env.subdivision + 2) % 4 == 0 },
|
14
14
|
}
|
15
15
|
)
|
16
16
|
ly = Roborabb::Lilypond.new(rabb, bars: 2)
|
data/spec/unit_spec.rb
CHANGED
@@ -50,7 +50,7 @@ describe Roborabb do
|
|
50
50
|
|
51
51
|
it 'includes bar number in env yielded to config' do
|
52
52
|
rabb = construct(
|
53
|
-
subdivisions:
|
53
|
+
subdivisions: ->(e) { e.index + 1 },
|
54
54
|
notes: { a: 1 }
|
55
55
|
)
|
56
56
|
|
@@ -64,7 +64,7 @@ describe Roborabb do
|
|
64
64
|
it 'includes bar number in env yielded to notes' do
|
65
65
|
rabb = construct(
|
66
66
|
subdivisions: 2,
|
67
|
-
notes: { a:
|
67
|
+
notes: { a: ->(e) { e.bar.index } }
|
68
68
|
)
|
69
69
|
|
70
70
|
3.times.map { notes(rabb) }.should == [
|
@@ -85,7 +85,7 @@ describe Roborabb do
|
|
85
85
|
end
|
86
86
|
|
87
87
|
it 'includes generated unit in returned object' do
|
88
|
-
rabb = construct(unit:
|
88
|
+
rabb = construct(unit: ->(e) { 8 })
|
89
89
|
rabb.next.unit.should == 8
|
90
90
|
end
|
91
91
|
|
@@ -95,7 +95,7 @@ describe Roborabb do
|
|
95
95
|
end
|
96
96
|
|
97
97
|
it 'includes generated time_signature in returned object' do
|
98
|
-
rabb = construct(time_signature:
|
98
|
+
rabb = construct(time_signature: ->(e) { "7/8" })
|
99
99
|
rabb.next.time_signature.should == "7/8"
|
100
100
|
end
|
101
101
|
|
@@ -105,7 +105,7 @@ describe Roborabb do
|
|
105
105
|
end
|
106
106
|
|
107
107
|
it 'includes generated beat_structure in returned object' do
|
108
|
-
rabb = construct(beat_structure:
|
108
|
+
rabb = construct(beat_structure: ->(e) { [3, 2, 2] })
|
109
109
|
rabb.next.beat_structure.should == [3, 2, 2]
|
110
110
|
end
|
111
111
|
|
@@ -115,7 +115,7 @@ describe Roborabb do
|
|
115
115
|
end
|
116
116
|
|
117
117
|
it 'includes generated title in returned object' do
|
118
|
-
rabb = construct(title:
|
118
|
+
rabb = construct(title: ->(e) { "Hello" })
|
119
119
|
rabb.next.title.should == "Hello"
|
120
120
|
end
|
121
121
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roborabb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-12-
|
12
|
+
date: 2011-12-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &2160544040 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '2.0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2160544040
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &2160543380 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2160543380
|
36
36
|
description: Algorithmically generate practice drum scores
|
37
37
|
email:
|
38
38
|
- hello@xaviershay.com
|
@@ -44,7 +44,6 @@ files:
|
|
44
44
|
- spec/unit_spec.rb
|
45
45
|
- lib/roborabb/bar.rb
|
46
46
|
- lib/roborabb/builder.rb
|
47
|
-
- lib/roborabb/core_ext.rb
|
48
47
|
- lib/roborabb/lilypond.rb
|
49
48
|
- lib/roborabb/version.rb
|
50
49
|
- lib/roborabb.rb
|
data/lib/roborabb/core_ext.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
alias :L :lambda
|