-
Notifications
You must be signed in to change notification settings - Fork 20
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
Midi signal via serial seems wrong #4
Comments
I've just realised this when testing today- it's not actually sending MIDI over Serial at all, but is instead sending a string representation of it. See: https://github.com/Microsoft/pxt-midi/blob/fb9de98860c6c5cd0a60844673f450f1bc55abbf/midi.ts#L80-L95 The practical upshot of this is that the "MIDI" is very human-readable, but unfortunately isn't readable by any off-the-shell Serial->MIDI bridge software I've come across. The format is:
(Not I've taken liberty with the amount of whitespace, but that is part of the output) You could write your own client in Python that handles MIDI messages in this format and injects them directly into the system. It'd be relatively easy using However I think this library needs a new block: "useRawSerial()" This block would run the following code: function send(data: Buffer): void {
serial.writeBuffer(data)
}
midi.setTransport(send); This writes the raw - not human readable - MIDI data directly out to the serial port, and I can confirm this works with Hairless MIDI <-> Serial Bridge. |
Using the new block "midi use raw serial" it works like a charm. Thanks a lot for your help! |
Anyone up to write a project on how to use this? |
This setup allows to connect any kind of instrument with a midi-input. I tested it with an e-piano and this little devices which was described in the German Make magazine. |
Nicely done! I originally wrote my own package for this that I haven't put
on gitgub yet. I have however run into trouble with hardware serial bytes
inexplicably going missing both on tx and rx. Have you stress tested this
yet?
…On Sun, 20 May 2018, 23:27 JonahPi, ***@***.***> wrote:
[image: micromidiconnection]
<https://user-images.githubusercontent.com/6844732/40283811-cb598e68-5c84-11e8-83fb-8eac127f9430.PNG>
[image: microbitsamplecode]
<https://user-images.githubusercontent.com/6844732/40283815-d0789f92-5c84-11e8-83f7-3a36d9d7d573.PNG>
This setup allows to connect any kind of instrument with a midi-input. I
tested it with an e-piano and this little devices
<https://www.heise.de/make/meldung/NanoSynth-Breakout-Board-fuer-mehrstimmigen-Musikgenuss-3982004.html>which
was described in the German Make magazine.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMQ0FUHn8N7pEq_Ciwv-sxm-HfqcuwgFks5t0d_RgaJpZM4S51TI>
.
|
@pelikhan : Sure, 'would be cool to see more people using it. @CaptainCredible : No long time tests run yet but I will work on a midi project soon, 'hope it works out. |
In this case I think it should be a little bit extended to see the differences between polymorphic and single tones:
|
I used the Midi package with a very simple program but was not able to get out any tone. Using a similar Python code worked perfectly fine. In both cases I transmit the Midi-code via Pin 0 and use the Midi via Serial command. When I compared the signals from the Phython code with the one from the PXT-code there was an obivious difference. (s.a. forum entry here: link )
The text was updated successfully, but these errors were encountered: