Pachelbel 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/project/Pachelbel.rb +11 -0
- 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: 35771b89b892f6241a2642eda99cd87677965106
|
4
|
+
data.tar.gz: 066e590f877871b88d3c0e561d0fd48727d3562a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7531d88bb38072972c0a110b0b0aba5aaa85cac29c71c0e689285e52d5f7fc4f58f10f99235f6a412d49e2e520658b395a873cdc8ced0d71d282b11427a3bbde
|
7
|
+
data.tar.gz: 9687068727809efea4c0f22fa526721017c2c9f0a14061851f0fe8b6906ba6edfe4205662ae2977cb2bc62d93af8e8d31e83c3a11bc2e25e16b0838b8b4b1acb
|
data/lib/project/Pachelbel.rb
CHANGED
@@ -154,6 +154,17 @@ module Pachelbel
|
|
154
154
|
run_js("#{_js_snippet}.frequency.value = #{value.to_f};").to_f
|
155
155
|
end
|
156
156
|
|
157
|
+
def type
|
158
|
+
run_js("#{_js_snippet}.type;").to_sym
|
159
|
+
end
|
160
|
+
|
161
|
+
TYPES = [:sine, :square, :sawtooth, :triangle]
|
162
|
+
|
163
|
+
def type=(value)
|
164
|
+
raise ArgumentError unless TYPES.include? value
|
165
|
+
run_js("#{_js_snippet}.type = #{TYPES.index(value)};").to_sym
|
166
|
+
end
|
167
|
+
|
157
168
|
# API Methods
|
158
169
|
|
159
170
|
def start(time)
|