feep 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/bin/feep +20 -10
- data/lib/feep/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad44164b261eb318f20f3e1fc3c44528f5f18552
|
4
|
+
data.tar.gz: 3f0905a2d7fc561454920e73d911d20f15cc25d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af5021622f750a39e7609645ff117bcf30bbd85d0d63b88cc956fab9b6cce185522f74a92588e0ac898b81f1a24a2a766ce71fc14ac66900d0a036cdcf5a62e0
|
7
|
+
data.tar.gz: a8c86f5474b26d368d1dd633749d5f9416969ecbf2bd109c2566e8c099601bc51a609c2437bbbb86afbc0b6a0a68bce1336a5515af2709fcfce9305e10bf2b56
|
data/Gemfile.lock
CHANGED
data/bin/feep
CHANGED
@@ -1,33 +1,43 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'optparse'
|
4
|
-
require 'pry'
|
5
4
|
|
6
5
|
require_relative '../lib/feep'
|
7
6
|
require_relative '../lib/feep/version'
|
8
7
|
|
9
8
|
def parse_options
|
10
|
-
options = {
|
9
|
+
options = {
|
10
|
+
:freq_or_note => '440.000',
|
11
|
+
:scale => nil,
|
12
|
+
:waveform => 'sine',
|
13
|
+
:volume => 0.5,
|
14
|
+
:duration => 100,
|
15
|
+
:save => false,
|
16
|
+
:loud => false,
|
17
|
+
:notext => false,
|
18
|
+
:usage => nil
|
19
|
+
}
|
11
20
|
|
12
21
|
optparse = OptionParser.new do |opts|
|
13
|
-
opts.banner =
|
22
|
+
opts.banner = "Play sounds on the command line\n"
|
23
|
+
opts.banner += "usage: feep [-f, -n, --frequency, --note FREQUENCY|NOTE_NAME] [-s, --scale SCALE_ID] [-sd, --degrees NUMBER_OF_SCALE_DEGREES] [-w, --waveform WAVEFORM_ID] [-a, --amplitude MAX_AMPLITUDE] [-d, --duration DURATION] [--save] [--loud] [--notext]\n\n"
|
14
24
|
|
15
25
|
opts.on('-f', '--frequency FREQUENCY', 'One or more frequencies or to play at once, e.g. 440 or 220,440,880') do |frequency|
|
16
26
|
options[:freq_or_note] = frequency
|
17
27
|
end
|
18
|
-
|
28
|
+
|
19
29
|
opts.on('-n', '--note NOTE_NAME', 'One or more note names to play at once, e.g. A4 or A4,C5,E5') do |note|
|
20
30
|
options[:freq_or_note] = note
|
21
31
|
end
|
22
|
-
|
32
|
+
|
23
33
|
opts.on('-s', '--scale SCALE_ID', 'Name of a scale to play') do |scale_id|
|
24
34
|
options[:scale] = scale_id
|
25
35
|
end
|
26
|
-
|
36
|
+
|
27
37
|
opts.on('--degrees SCALE_DEGREES', 'Number of degrees of the scale to play') do |degrees|
|
28
38
|
options[:degrees] = degrees
|
29
39
|
end
|
30
|
-
|
40
|
+
|
31
41
|
opts.on('-w', '--waveform WAVEFORM', 'Waveform type to use for the sound') do |waveform|
|
32
42
|
options[:waveform] = waveform
|
33
43
|
end
|
@@ -35,7 +45,7 @@ def parse_options
|
|
35
45
|
opts.on('-a', '--amplitude MAX_AMPLITUDE', 'Amplitude/volume (0.0 - 1.0) to play the sound(s) at') do |amplitude|
|
36
46
|
options[:volume] = amplitude.to_f
|
37
47
|
end
|
38
|
-
|
48
|
+
|
39
49
|
opts.on('-d', '--duration DURATION', 'Duration in ms to play the sound(s)') do |duration|
|
40
50
|
options[:duration] = duration.to_i
|
41
51
|
end
|
@@ -43,11 +53,11 @@ def parse_options
|
|
43
53
|
opts.on('--save', 'Save the resulting WAV file in the current directory') do
|
44
54
|
options[:save] = true
|
45
55
|
end
|
46
|
-
|
56
|
+
|
47
57
|
opts.on('--loud', 'Displays information about note(s) being played') do
|
48
58
|
options[:loud] = true
|
49
59
|
end
|
50
|
-
|
60
|
+
|
51
61
|
opts.on('--notext', 'No "Feeep!" text on play') do
|
52
62
|
options[:notext] = true
|
53
63
|
end
|
data/lib/feep/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: feep
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Chadwick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: wavefile
|
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
version: '0'
|
160
160
|
requirements: []
|
161
161
|
rubyforge_project:
|
162
|
-
rubygems_version: 2.
|
162
|
+
rubygems_version: 2.6.6
|
163
163
|
signing_key:
|
164
164
|
specification_version: 4
|
165
165
|
summary: Make your computer feep with Ruby
|