Pachelbel 1.1.5 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/project/Pachelbel.rb +21 -2
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84f1b658182f8fba5a14e8633462d3e55b1f875a
4
- data.tar.gz: 15243bf6d9b5aee27846ecec728c0d64e569475a
3
+ metadata.gz: 50fee0ff1c6935d57bc6a250de8ae5e49387654a
4
+ data.tar.gz: b72af1cd413eca5e31b4ccc9f0bd1c27b17be32d
5
5
  SHA512:
6
- metadata.gz: 60d4c5d2fbc556dee535c5d5ba2ad192597ca5bd0cb0bd5a0e4425025c7ecb9f52fb27a7a15698aba83f662c5f5f965d2d2bb4f5cf1bfd82588cc7bc019ef269
7
- data.tar.gz: 89be2aee260ed1911fdabc2402e7dee26ef5fd155db179b362926862c9beb48003f6c9787cf8b46a4fe8e34901ee8da371778c4aa906d23afdd67e552f4694ad
6
+ metadata.gz: 3d92810e82943e865358185d062fbdbe342054a94c2b19a2b6e1d5fb071538f3ec8f46c70a3cfe2cbed742c19670edb6cd80ed30d43f083f5d345eda41006d2a
7
+ data.tar.gz: 590d4a4ac7432deec58d062d4bc2b9ba71c21bd2ff02f8a0bf4a92be95e87eb5ba70d817f20281e19e6cd65823d2ebff6aaefdff5b79e52ac0404e8929d6da19
@@ -79,11 +79,18 @@ module Pachelbel
79
79
  # API Constructors
80
80
 
81
81
  def createOscillator
82
- object = Oscillator.allocate
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 Oscillator < AudioNode
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.1.5
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: []