Coder Social home page Coder Social logo

Comments (5)

Sammy1Am avatar Sammy1Am commented on July 20, 2024

Sorry it's taken me so long to get back to you on this.

My best guess off-hand is that Apple's driver is sending "technically-correct" MIDI messages, but in a way that confuses the code I wrote. For example, I found that in some cases, rather than sending a "note on" event, followed by a "note off" event, some synths will send a "note on at 127 (max) velocity" followed by a "note on at 0 velocity". Which, effectively makes the note "stop" playing, but without using the "note off" command.

I have that particular case handled, now, but maybe Apple's doing some weird stuff. If you put a breakpoint on line 56 of MoppyPlayerOutput.java and use "Debug" instead of "Run" in NetBeans, you should be able to examine the MidiMessage objects that are being received by the Java software and being sent to the Arduino. If you play a single note on the software keyboard, you should be able to step through the messages one at a time to see if anything weird comes through.

I know there might be a bit of a learning curve here as far as debugging Java software in NetBeans if you haven't before, but it's not as scary as it sounds, and if you run into any specific questions, I'll try to help as best I can from here

from moppyclassic.

Sammy1Am avatar Sammy1Am commented on July 20, 2024

Oh! I forgot to add this helpful link:
http://www.midi.org/techspecs/midimessages.php

Which will help give you a better idea of what the messages mean.

from moppyclassic.

charredUtensil avatar charredUtensil commented on July 20, 2024

So I actually ended up rewriting a command line version of Moppy's controller software in Ruby, as:

  1. Let's face it. There's a lot of code in Moppy right now and I was trying to see if I could get it done in only a few lines of code.
  2. I'm very familiar with Ruby at the moment and haven't used Java in a good long while
  3. The Ruby libraries I found seem to work very well on OSX and Linux, and installed perfectly fine with Bundler (a package manager for Ruby 'gems'), while I had one hell of a time trying to install the serial controller stuff on OSX

At the moment, it only works when bound to live MIDI, hasn't been successfully tested, and will only work on POSIX systems, as I hardcoded it to check /dev for serial modems instead of using anything in the library, so I'm not quite ready to push my changes upstream. I plan to do so once it either reads MIDI files or I can get the stream feature tested. In doing this, I did discover the problem:

MidiO, for whatever reason, is spamming MIDI control messages. I attempted to play a simple sequence, C4 D4 E4. The output to the pipeline, at the end of the sequence, was a random assortment of the following messages, sent in a random order every few milliseconds:

PROGRAM CHANGE
NOTE ON C4 127
NOTE OFF C4
NOTE ON D4 127
VELOCITY CHANGE C4 = 0
RESERVED
NOTE OFF E4
NOTE OFF D4
NOTE ON E4 127
RESERVED

Therefore, the problem is in MidiO and not Moppy. The drawback to this is that MidiO seems to be the only way to get MIDI out of GarageBand, hasn't been updated since 2004, is not open sourced, and has no official repository or issue tracking outside emailing the author. So, your guess was pretty accurate, but the driver isn't sending technically correct MIDI messages. It's sending something about one tier above line noise.

I can close this issue or leave it open for anyone else trying to use live MIDI streaming with Garageband or on OSX.

from moppyclassic.

charredUtensil avatar charredUtensil commented on July 20, 2024

Closing the issue because I just attempted this again after not touching it for a week (the wonders that works sometimes!) I tried everything I could, including reinstalling the midiO plugin. I used a different source to download the .component file and this source came with a more detailed README than the original source I found, which simply indicated where to place the .component file. In this, it explained not to highlight a midiO output track in GB when using the IAC (loopback) MIDI driver, because having a track highlighted causes that track to accept MIDI input, and it will sometimes accept any MIDI input, including what it's outputting. That creates a nifty feedback loop. The solution is to create an additional blank software instrument track and click on that before attempting any playback.

I'll be pushing my Ruby version of Moppy's controller software (it still uses the same Arduino code) to a new branch on my own fork after I clean it up to something I can be proud of, acquire my fourth drive & finish my first song. Thanks for your help!

from moppyclassic.

Sammy1Am avatar Sammy1Am commented on July 20, 2024

Awesome! Good detective work there, and thanks for posting your findings, I'm sure they'll come in handy for others attempting the same.

from moppyclassic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.