cw 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cw.gemspec +1 -1
- data/example.rb +1 -1
- data/lib/cw/tone_generator.rb +6 -5
- 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: c8c794c0c8a7b01afddd938dafa43edffed66b60
|
4
|
+
data.tar.gz: cc85d6cab352aa6d7b386c50e5cc6f5e3c1f2b4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9223673c474a332758358a730ae3f1f0917bf7f92b8047d57b1180f50823823befadc72f62adc14a4d9ee5090a2b5124b7cab09af893927318fcec61b52283a
|
7
|
+
data.tar.gz: e8a02db8b25a318678d87cfc12984da848d74797f0a04fda35948b830a6f7907c796fa4b30bf6e73d1e101bffae941b78b585ad8b08229dcf9f7295e939d7491
|
data/cw.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'cw'
|
7
|
-
spec.version = '0.0.
|
7
|
+
spec.version = '0.0.5'
|
8
8
|
spec.date = '2016-05-21'
|
9
9
|
spec.authors = ["Martyn Jago"]
|
10
10
|
spec.email = ["martyn.jago@btinternet.com"]
|
data/example.rb
CHANGED
data/lib/cw/tone_generator.rb
CHANGED
@@ -4,10 +4,11 @@ require 'wavefile'
|
|
4
4
|
|
5
5
|
class ToneGenerator
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
HERE = File.dirname(__FILE__) + '/../../'
|
8
|
+
DOT_FILENAME = HERE + "audio/dot.wav"
|
9
|
+
DASH_FILENAME = HERE + "audio/dash.wav"
|
10
|
+
SPACE_FILENAME = HERE + "audio/space.wav"
|
11
|
+
E_SPACE_FILENAME = HERE + "audio/e_space.wav"
|
11
12
|
TWO_PI = 2 * Math::PI
|
12
13
|
|
13
14
|
def initialize
|
@@ -40,7 +41,7 @@ class ToneGenerator
|
|
40
41
|
end
|
41
42
|
|
42
43
|
def play_filename
|
43
|
-
"audio/#{Params.audio_filename}"
|
44
|
+
HERE + "audio/#{Params.audio_filename}"
|
44
45
|
end
|
45
46
|
|
46
47
|
def play
|