music_theory 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/music_theory/transpose.rb +2 -14
- data/lib/music_theory/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbcc50c0ee55faff0c747fa2312e37fdf91690fd
|
4
|
+
data.tar.gz: 41bf16f428f46e92f9c98671a3e0c178b425a9b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b0789452cd2456771e98936218cfffd9e068928fc74a23239d1228638b7bff90cf1b200a6bdd904325276323ec9fda4e0c80bf8e905b27f6b7b09e72d2ceda4
|
7
|
+
data.tar.gz: f485e44ce864a1d2ca1cf92b5aba5f45514c246b4f20db74919fafe382e462a35af7c576859a2f67266dbf68bc6ba333fadecf619608c47b04c71af9b7769e92
|
@@ -6,21 +6,9 @@ module MusicTheory
|
|
6
6
|
|
7
7
|
attr_accessor :samples
|
8
8
|
|
9
|
-
def initialize
|
10
|
-
|
11
|
-
[*things_to_flatten].each do |group|
|
12
|
-
group.each_with_index do |value, i|
|
13
|
-
@samples[i] ||= 0
|
14
|
-
@samples[i] += value
|
15
|
-
end
|
16
|
-
end
|
17
|
-
max = @samples.map {|s| s.abs }.max
|
18
|
-
multiplier = 1.0 / max
|
19
|
-
@samples.map!{ |s| multiplier * s }
|
9
|
+
def initialize
|
10
|
+
# Add code that transposes up or down x octaves
|
20
11
|
end
|
21
12
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
13
|
end
|
26
14
|
end
|
data/lib/music_theory/version.rb
CHANGED