Pachelbel 1.1.5 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/project/Pachelbel.rb +21 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50fee0ff1c6935d57bc6a250de8ae5e49387654a
|
4
|
+
data.tar.gz: b72af1cd413eca5e31b4ccc9f0bd1c27b17be32d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d92810e82943e865358185d062fbdbe342054a94c2b19a2b6e1d5fb071538f3ec8f46c70a3cfe2cbed742c19670edb6cd80ed30d43f083f5d345eda41006d2a
|
7
|
+
data.tar.gz: 590d4a4ac7432deec58d062d4bc2b9ba71c21bd2ff02f8a0bf4a92be95e87eb5ba70d817f20281e19e6cd65823d2ebff6aaefdff5b79e52ac0404e8929d6da19
|
data/lib/project/Pachelbel.rb
CHANGED
@@ -79,11 +79,18 @@ module Pachelbel
|
|
79
79
|
# API Constructors
|
80
80
|
|
81
81
|
def createOscillator
|
82
|
-
object =
|
82
|
+
object = OscillatorNode.allocate
|
83
83
|
object._audio_context = self
|
84
84
|
object._index = run_js('audio_nodes.push( audio_context.createOscillator() );').to_i - 1
|
85
85
|
object
|
86
86
|
end
|
87
|
+
|
88
|
+
def createGain
|
89
|
+
object = GainNode.allocate
|
90
|
+
object._audio_context = self
|
91
|
+
object._index = run_js('audio_nodes.push( audio_context.createGain() );').to_i - 1
|
92
|
+
object
|
93
|
+
end
|
87
94
|
end
|
88
95
|
|
89
96
|
class AudioNode
|
@@ -124,7 +131,19 @@ module Pachelbel
|
|
124
131
|
end
|
125
132
|
end
|
126
133
|
|
127
|
-
class
|
134
|
+
class GainNode < AudioNode
|
135
|
+
# API Attributes
|
136
|
+
|
137
|
+
def gain
|
138
|
+
run_js("#{_js_snippet}.gain.value;").to_f
|
139
|
+
end
|
140
|
+
|
141
|
+
def gain=(value)
|
142
|
+
run_js("#{_js_snippet}.gain.value = #{value.to_f};").to_f
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
class OscillatorNode < AudioNode
|
128
147
|
# API Attributes
|
129
148
|
|
130
149
|
def frequency
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Pachelbel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Drew Carey Buglione
|
@@ -14,14 +14,14 @@ dependencies:
|
|
14
14
|
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
description: Process and synthesize audio in RubyMotion
|
@@ -44,12 +44,12 @@ require_paths:
|
|
44
44
|
- lib
|
45
45
|
required_ruby_version: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- -
|
47
|
+
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: '0'
|
50
50
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
requirements: []
|