jsound 0.1.2-java → 0.1.3-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/INTRO.md +10 -1
- data/README.md +15 -12
- data/Rakefile +5 -0
- data/lib/jsound/midi/devices/recorder.rb +4 -2
- data/spec/jsound/midi/devices/recorder_spec.rb +13 -3
- metadata +2 -2
data/INTRO.md
CHANGED
@@ -7,7 +7,7 @@ Java's cross-platform standard library includes a
|
|
7
7
|
[sound API for MIDI and sampled sound](http://download.oracle.com/javase/tutorial/sound/index.html).
|
8
8
|
JSound builds on this API and provides a Ruby interface via [JRuby](http://jruby.org).
|
9
9
|
|
10
|
-
For now, JSound is
|
10
|
+
For now, JSound is focused on use of the [javax.sound.midi API](http://download.oracle.com/javase/7/docs/api/javax/sound/midi/package-summary.html)
|
11
11
|
in Ruby scripts and applications.
|
12
12
|
Support for the [javax.sound.samples API](http://download.oracle.com/javase/7/docs/api/javax/sound/sampled/package-summary.html)
|
13
13
|
may arrive in the future.
|
@@ -123,6 +123,15 @@ Some of the {JSound::Midi::DeviceList} methods will automatically open the devic
|
|
123
123
|
The {JSound::Midi::DeviceList#method_missing} behavior for DeviceList provides a convenient way to
|
124
124
|
find and automatically open devices.
|
125
125
|
|
126
|
+
<br>
|
127
|
+
### Known Issues ###
|
128
|
+
|
129
|
+
See http://github.com/adamjmurray/jsound/wiki/Known-Issues for the most up-to-date list of known issues.
|
130
|
+
|
131
|
+
<br>
|
132
|
+
### Feature Requests and Bug Reports ###
|
133
|
+
|
134
|
+
https://github.com/adamjmurray/jsound/issues (requires a github account)
|
126
135
|
|
127
136
|
<br>
|
128
137
|
### OS X ###
|
data/README.md
CHANGED
@@ -14,21 +14,14 @@ Home: http://github.com/adamjmurray/jsound
|
|
14
14
|
|
15
15
|
Author: Adam Murray (adam@compusition.com)
|
16
16
|
|
17
|
-
License: Distributed under a permissive BSD-style license,
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
Getting started
|
22
|
-
---------------
|
23
|
-
|
24
|
-
See [the documentation's introduction](INTRO.md).
|
17
|
+
License: Distributed under a permissive BSD-style license, see LICENSE.txt
|
25
18
|
|
26
19
|
|
27
20
|
|
28
21
|
Documentation
|
29
22
|
-------------
|
30
23
|
|
31
|
-
Gem: http://rubydoc.info/gems/jsound/0.1.
|
24
|
+
Gem: http://rubydoc.info/gems/jsound/0.1.3/frames
|
32
25
|
|
33
26
|
Latest for source: http://rubydoc.info/github/adamjmurray/jsound/master/frames
|
34
27
|
|
@@ -39,11 +32,15 @@ Development Notes
|
|
39
32
|
|
40
33
|
### Run Tests ###
|
41
34
|
|
42
|
-
|
35
|
+
Test with current version of JRuby:
|
43
36
|
|
44
|
-
|
37
|
+
jruby -S rake spec
|
45
38
|
|
46
|
-
|
39
|
+
Test with all supported versions of JRuby (requires [rvm](https://rvm.beginrescueend.com/), JRuby 1.5.6, and JRuby 1.6.2):
|
40
|
+
|
41
|
+
rake spec:xversion
|
42
|
+
|
43
|
+
spec:xversion must pass for a pull request to be accepted or for a release of the jsound gem.
|
47
44
|
|
48
45
|
|
49
46
|
### Generate Docs ###
|
@@ -65,8 +62,14 @@ https://www.pivotaltracker.com/projects/85719
|
|
65
62
|
Changelog
|
66
63
|
---------
|
67
64
|
|
65
|
+
* June 29, 2011, version 0.1.3
|
66
|
+
- enhanced JSound::Devices::Recorder to record floating point seconds, instead integer seconds (which wasn't particularly useful)
|
67
|
+
|
68
68
|
* June 18, 2011, version 0.1.2
|
69
69
|
- added a "Hash of mappings" feature to Transformer, for easy implementation of simple transformation patterns
|
70
70
|
- improved examples
|
71
71
|
- got rid of the Repeater device and built its functionality into the base Device
|
72
72
|
- added #output= and #>> to DeviceList, to construct parallel paths in device graphs
|
73
|
+
|
74
|
+
* June 16, 2011, version 0.1.0
|
75
|
+
- first stable release
|
data/Rakefile
CHANGED
@@ -16,4 +16,9 @@ namespace :spec do
|
|
16
16
|
RSpec::Core::RakeTask.new(:fast) do |spec|
|
17
17
|
spec.rspec_opts = ["--color", "--fail-fast"]
|
18
18
|
end
|
19
|
+
|
20
|
+
desc "Run RSpecs tests on mutiple versions of JRuby: JRuby 1.5.6, and JRuby 1.6.2"
|
21
|
+
task :xversion do
|
22
|
+
fail unless system("rvm jruby-1.5.6,jruby-1.6.2 rake -f #{__FILE__} spec:fast")
|
23
|
+
end
|
19
24
|
end
|
@@ -5,7 +5,9 @@ module JSound
|
|
5
5
|
# A Device that records incoming messages, and the timestamp at which they were received.
|
6
6
|
class Recorder < Device
|
7
7
|
|
8
|
-
# The recorded [message,timestamp] pairs
|
8
|
+
# The recorded [message,timestamp] pairs.
|
9
|
+
#
|
10
|
+
# Timestamps are in floating point seconds.
|
9
11
|
attr_reader :messages_with_timestamps
|
10
12
|
|
11
13
|
# The recorded messages without timestamps
|
@@ -50,7 +52,7 @@ module JSound
|
|
50
52
|
end
|
51
53
|
|
52
54
|
def message(message)
|
53
|
-
@messages_with_timestamps << [message, Time.now.
|
55
|
+
@messages_with_timestamps << [message, Time.now.to_f] if recording?
|
54
56
|
end
|
55
57
|
|
56
58
|
end
|
@@ -38,12 +38,22 @@ module JSound::Midi::Devices
|
|
38
38
|
describe '#messages_with_timestamps' do
|
39
39
|
it 'should return all recorded [message,timestamp] pairs in an Array' do
|
40
40
|
recorder.start
|
41
|
-
|
41
|
+
start_time = Time.now.to_f
|
42
42
|
recorder <= :one
|
43
43
|
recorder <= 2
|
44
44
|
recorder <= 'three'
|
45
|
-
|
46
|
-
|
45
|
+
mwt = recorder.messages_with_timestamps
|
46
|
+
|
47
|
+
message1, time1 = *mwt[0]
|
48
|
+
message2, time2 = *mwt[1]
|
49
|
+
message3, time3 = *mwt[2]
|
50
|
+
[message1, message2, message3].should == [:one, 2, 'three']
|
51
|
+
time1.should be_a Float
|
52
|
+
time1.should be_within(0.01).of start_time
|
53
|
+
time2.should be_within(0.015).of start_time
|
54
|
+
time3.should be_within(0.02).of start_time
|
55
|
+
time1.should <= time2
|
56
|
+
time2.should <= time3
|
47
57
|
end
|
48
58
|
end
|
49
59
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: jsound
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.3
|
6
6
|
platform: java
|
7
7
|
authors:
|
8
8
|
- Adam Murray
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-06-
|
13
|
+
date: 2011-06-30 00:00:00 Z
|
14
14
|
dependencies: []
|
15
15
|
|
16
16
|
description: A Ruby interface for Java's javax.sound API. Runs on the JVM via JRuby.
|