midi-fx 0.4 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/midi-fx.rb +3 -3
- data/test/filter_test.rb +7 -7
- data/test/helper.rb +1 -1
- data/test/limit_test.rb +4 -4
- data/test/module_test.rb +1 -1
- data/test/transpose_test.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e07399020a4b306fa191c824dd565a835cff6d9
|
4
|
+
data.tar.gz: 6587ca9838546b661c54fc09300088a4fddd3506
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9f719758d24d2f1c36105d7017297031c36964d2e364fffba7fc5e34300d9da5293dc105b33614644526f4042a2c7fc69e62aec4168d0929f09bf400f4b979a
|
7
|
+
data.tar.gz: 14a12b9c0d360121c7bef394bca419c7b94dc94bb227f5cefe0a052e32bbe41af98bf39624436ae4e3034bbe14d4a00fdf79e59de049164d7218c76e5577751a
|
data/lib/midi-fx.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
# (c)2011-2014 Ari Russo
|
7
7
|
# Apache 2.0 License
|
8
|
-
#
|
8
|
+
#
|
9
9
|
|
10
10
|
# libs
|
11
11
|
require "midi-message"
|
@@ -17,14 +17,14 @@ require "midi-fx/transpose"
|
|
17
17
|
|
18
18
|
module MIDIFX
|
19
19
|
|
20
|
-
VERSION = "0.4"
|
20
|
+
VERSION = "0.4.1"
|
21
21
|
|
22
22
|
MAP = {
|
23
23
|
:band_pass_filter => BandPassFilter,
|
24
24
|
:band_reject_filter => BandRejectFilter,
|
25
25
|
:filter => Filter,
|
26
26
|
:high_pass_filter => HighPassFilter,
|
27
|
-
:limit => Limit,
|
27
|
+
:limit => Limit,
|
28
28
|
:low_pass_filter => LowPassFilter,
|
29
29
|
:notch_filter => NotchFilter,
|
30
30
|
:transpose => Transpose
|
data/test/filter_test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require "helper"
|
2
2
|
|
3
|
-
class MIDIFX::FilterTest < Test
|
3
|
+
class MIDIFX::FilterTest < Minitest::Test
|
4
4
|
|
5
5
|
def test_high_pass_note_reject
|
6
6
|
message = MIDIMessage::NoteOn["C0"].new(0, 100)
|
@@ -43,7 +43,7 @@ class MIDIFX::FilterTest < Test::Unit::TestCase
|
|
43
43
|
output = MIDIFX::BandPassFilter.new(:note, (20..100)).process(message)
|
44
44
|
assert_equal(message, output)
|
45
45
|
end
|
46
|
-
|
46
|
+
|
47
47
|
def test_band_reject_note_reject
|
48
48
|
message = MIDIMessage::NoteOn["C4"].new(0, 100)
|
49
49
|
assert_equal(60, message.note)
|
@@ -57,7 +57,7 @@ class MIDIFX::FilterTest < Test::Unit::TestCase
|
|
57
57
|
output = MIDIFX::NotchFilter.new(:note, (20..50)).process(message)
|
58
58
|
assert_equal(message, output)
|
59
59
|
end
|
60
|
-
|
60
|
+
|
61
61
|
def test_multiband_note_reject
|
62
62
|
message = MIDIMessage::NoteOn["C4"].new(0, 100)
|
63
63
|
assert_equal(60, message.note)
|
@@ -71,7 +71,7 @@ class MIDIFX::FilterTest < Test::Unit::TestCase
|
|
71
71
|
output = MIDIFX::Filter.new(:note, [(20..30), (50..70)]).process(message)
|
72
72
|
assert_equal(message, output)
|
73
73
|
end
|
74
|
-
|
74
|
+
|
75
75
|
def test_multinotch_note_reject
|
76
76
|
message = MIDIMessage::NoteOn["C4"].new(0, 100)
|
77
77
|
assert_equal(60, message.note)
|
@@ -85,7 +85,7 @@ class MIDIFX::FilterTest < Test::Unit::TestCase
|
|
85
85
|
output = MIDIFX::Filter.new(:note, [(20..30), (40..50)], :reject => true).process(message)
|
86
86
|
assert_equal(message, output)
|
87
87
|
end
|
88
|
-
|
88
|
+
|
89
89
|
def test_numeric_note_accept
|
90
90
|
message1 = MIDIMessage::NoteOn["C4"].new(0, 100)
|
91
91
|
message2 = MIDIMessage::NoteOn["C5"].new(0, 100)
|
@@ -95,7 +95,7 @@ class MIDIFX::FilterTest < Test::Unit::TestCase
|
|
95
95
|
output = f.process(message2)
|
96
96
|
assert_equal(nil, output)
|
97
97
|
end
|
98
|
-
|
98
|
+
|
99
99
|
def test_numeric_note_reject
|
100
100
|
message1 = MIDIMessage::NoteOn["C4"].new(0, 100)
|
101
101
|
message2 = MIDIMessage::NoteOn["C5"].new(0, 100)
|
@@ -105,5 +105,5 @@ class MIDIFX::FilterTest < Test::Unit::TestCase
|
|
105
105
|
output = f.process(message2)
|
106
106
|
assert_equal(message2, output)
|
107
107
|
end
|
108
|
-
|
108
|
+
|
109
109
|
end
|
data/test/helper.rb
CHANGED
data/test/limit_test.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
require "helper"
|
2
2
|
|
3
|
-
class MIDIFX::LimitTest < Test
|
4
|
-
|
3
|
+
class MIDIFX::LimitTest < Minitest::Test
|
4
|
+
|
5
5
|
def test_numeric_range
|
6
6
|
message = MIDIMessage::NoteOn["C0"].new(0, 100)
|
7
7
|
assert_equal(12, message.note)
|
8
8
|
MIDIFX::Limit.new(:note, 30).process(message)
|
9
|
-
assert_equal(30, message.note)
|
9
|
+
assert_equal(30, message.note)
|
10
10
|
end
|
11
11
|
|
12
12
|
def test_low_note
|
@@ -36,5 +36,5 @@ class MIDIFX::LimitTest < Test::Unit::TestCase
|
|
36
36
|
MIDIFX::Limit.new(:velocity, (25..75)).process(message)
|
37
37
|
assert_equal(75, message.velocity)
|
38
38
|
end
|
39
|
-
|
39
|
+
|
40
40
|
end
|
data/test/module_test.rb
CHANGED
data/test/transpose_test.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: midi-fx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ari Russo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: midi-message
|