spcore 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog.rdoc CHANGED
@@ -8,3 +8,6 @@
8
8
  ** Linear interpolation
9
9
  ** Oscillator with selectable wave type (sine, square, triangle, sawtooth)
10
10
 
11
+ === 0.1.1 / 2013-02-04
12
+
13
+ Add EnvelopeDetector#attack_time= and EnvelopeDetector#release_time=
@@ -19,6 +19,16 @@ class EnvelopeDetector
19
19
  @envelope = 0.0
20
20
  end
21
21
 
22
+ def attack_time= attack_time
23
+ raise ArgumentError, "attack_time is <= 0.0" if attack_time <= 0.0
24
+ @g_attack = Math.exp(-1.0 / (sample_rate * attack_time))
25
+ end
26
+
27
+ def release_time= release_time
28
+ raise ArgumentError, "release_time is <= 0.0" if release_time <= 0.0
29
+ @g_release = Math.exp(-1.0 / (sample_rate * release_time))
30
+ end
31
+
22
32
  def process_sample sample
23
33
  input_abs = sample.abs
24
34
 
@@ -1,4 +1,4 @@
1
1
  module SPCore
2
2
  # spcore version
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spcore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-04 00:00:00.000000000 Z
12
+ date: 2013-02-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: hashmake
@@ -185,7 +185,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
185
185
  version: '0'
186
186
  segments:
187
187
  - 0
188
- hash: 324932257
188
+ hash: -754557937
189
189
  required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  none: false
191
191
  requirements:
@@ -194,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
194
  version: '0'
195
195
  segments:
196
196
  - 0
197
- hash: 324932257
197
+ hash: -754557937
198
198
  requirements: []
199
199
  rubyforge_project:
200
200
  rubygems_version: 1.8.23