-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jruby192 vs ruby193p0 input errors and latency on osx lion 10.7.3 and windows 7 64-bit #7
Comments
The exception on ^C is normal... but I'll consider suppressing it What do you mean by "ruby 1.9.3p0 running simultaneously (same behaviour if only running one or the other) " I'll deal with the bad controller messages in JRuby first...that definitely looks like a bug in http://github.com/arirusso/midi-jruby |
I mean that the two logs' output is from running the input loop on both ruby interpreters simultaneously, but that the symptoms (wrong controller messages and latency on ruby193) occur when running only one of them at a time as well. I never had JRuby throw the exception, it only seems to happen on ruby193. Is that expected? |
OK. Yes, it's just the default behavior of the interpreter. |
Hi, I can't seem to reproduce the JRuby bug in my environment. Would you mind running the unimidi tests using JRuby and posting the output? I'm hoping that if you do, a clue as to what's wrong will pop up. You should be able to just clone unimidi: git clone [email protected]:arirusso/unimidi.git and then while running JRuby, do jruby --1.9 -S rake test You'll be prompted to select an input and output -- just select two IAC devices that are connected to each other Thank you! |
Tests pass, but it hangs after the line "Test run options: --seed 10633" and doesn't return to the shell. I'm not sure how long that's supposed to take, but after a minute or so I just ^C and go straight back to the prompt.
|
I repeated the original test with another device, an X-Session Pro, and same result: messages with values less than 16 are corrupt under jruby. Another thing I noticed, is jruby is not detecting the device name/manufacturer but ruby is: jruby 1.9.2:
ruby 1.9.3:
And the message corruption is the same with the XSP as with the APC40 I used in the original bug report, messages with controller values < 16 appear corrupted: jruby 1.9.2:
ruby 1.9.3:
|
Thanks! This is all helpful. Basically what's happening is that interpreting null-termination on the raw data is broken. It's confusing 0 and null at some point. (I wrote the JRuby library very quickly and must have glossed over that) Will shoot for fixing it Sunday. I'll check out the hanging too. As far as the device names go, I'll check it out but we may be at the mercy of Java there |
Here are the same tests on Windows 7 Ultimate 64-bit. The only difference here is that I could not run them simultaneously (out of memory error -- misreporting a locked input maybe?). Same value < 16 message corruption, but this time ruby 1.9.3 (from rubyinstaller.org) is noticeably higher latency than even ruby 1.9.3 on OSX (I slid the knob similar speeds for the jruby and ruby tests, and the latter was 500-700ms per sample displaying on the screen).
|
try updating your version of the midi-jruby gem to 0.0.12 -- the "< 16 data" jruby bug should be fixed. Moving on to the other stuff... |
I'm going to break each of your issues up into different tickets and close this one |
Confirmed working on osx lion 1.7.3 and win7 64-bit. |
nice! thanks for reporting it. on to the next... |
Here have big latency on Win7 x64 and hang on close. C:\usr\bin>ruby -v ruby 1.9.3p0 (2011-10-30) [i386-mswin32_90] C:\usr\bin>ruby WinMM_test.rb Select a MIDI input... 0) In From MIDI Yoke: 1 1) In From MIDI Yoke: 2 2) In From MIDI Yoke: 3 3) In From MIDI Yoke: 4 4) In From MIDI Yoke: 5 5) In From MIDI Yoke: 6 6) In From MIDI Yoke: 7 7) In From MIDI Yoke: 8 8) Multiface Midi 9) Akai MPK49 10) MIDIIN2 (Akai MPK49) 11) MIDIIN3 (Akai MPK49) > 9 send some MIDI to your input now... {:data=>[176, 26, 125], :timestamp=>1361} {:data=>[176, 26, 122], :timestamp=>1696} {:data=>[176, 26, 118], :timestamp=>2296} {:data=>[176, 26, 114], :timestamp=>2896} {:data=>[176, 26, 109], :timestamp=>3496} {:data=>[176, 26, 104], :timestamp=>4096} {:data=>[176, 26, 99], :timestamp=>4696} {:data=>[176, 26, 94], :timestamp=>5296} {:data=>[176, 26, 88], :timestamp=>5896} {:data=>[176, 26, 83], :timestamp=>6496} {:data=>[176, 26, 77], :timestamp=>7096} {:data=>[176, 26, 69], :timestamp=>7696} {:data=>[176, 26, 62], :timestamp=>8296} {:data=>[176, 26, 56], :timestamp=>8896} {:data=>[176, 26, 49], :timestamp=>9496} {:data=>[176, 26, 43], :timestamp=>10096} {:data=>[176, 26, 36], :timestamp=>10696} {:data=>[176, 26, 29], :timestamp=>11296} {:data=>[176, 26, 22], :timestamp=>11896} {:data=>[176, 26, 16], :timestamp=>12496} {:data=>[176, 26, 0], :timestamp=>13096} {:data=>[176, 26, 0], :timestamp=>13696} {:data=>[176, 26], :timestamp=>14296}" |
A loop dumping received MIDI data on JRuby 1.9.2 is returning strange data for the bottom of my controller sliders and knobs (i.e.: if I turn the knobs or pull the sliders towards zero). (Both jruby and ruby where installed via brew.):
For comparison, ruby 1.9.3p0 running simultaneously (same behaviour if only running one or the other) -- this version also throw exception on ^C that JRuby version does not, and is quite chunky outputting received data compared to the JRuby version (I'm not sure how to measure that to prove it -- unless the number of elements in the dumped arrays is indicative?):
input.rb:
This is on Lion 10.7.3 on a late 2010 Mac Book Air.
Any ideas? Am I missing something?
Let me know if you need any more info. Thanks!
The text was updated successfully, but these errors were encountered: