Offline
Sweden

MIDIcloro is software for the Raspberry Pi for merging MIDI data, sending clock and affecting notes in different ways.
It can be used with any MIDI devices, but is designed to work particularly well with the Gameboy + Arduinoboy (LSDJ MIDI out mode).

Installation instructions, LSDJ examples and more info:
https://github.com/ledfyr/midicloro


News:
* Velocity mode - set velocity via CC, comes with a random velocity setting which can be toggled on the fly.

* Mono mode - solves problem with occasional dropped notes from the Gameboy. About 1 note of every 30-50 was dropped for me, but with this it almost never happens anymore. (Experimental fix, requires custom Arduinoboy software, only tested with GBC, see README).


Other functions:
* MIDI clock
* Channel switching
* Chords

Last edited by Ledfyr (Jul 16, 2016 9:35 pm)

Offline
Unsubscribe

You should just support hooking a link cable to the pi gpio directly. Will try to find time to pay with this!

Offline
Toronto, Ontario, Canada
herr_prof wrote:

You should just support hooking a link cable to the pi gpio directly. Will try to find time to pay with this!

Yeah, they stated that as a future goal and that would make it rather exciting. Particularly if support for a few pushbuttons were added to control some of the settings.

Offline

This is great!
I see lots of interesting uses.

I tried to find a way to send the gameboy song position in 'realtime' or at least at each line
I would like to be able to loop manually on blocks, in LSDJ, in live mode, and I would like the current Song Position Pointer to be sent in relatime to external devices.

Do you think it is possible?

Last edited by cyberic (Jan 13, 2016 10:46 pm)

Offline
Glasgow, Scotland.

Just noting here that this is awesome. I'm using a raspberry Pi to hook up a USB keyboard to my DMG (running mgb) with a USB-MIDI adaptor and the Arduinoboy. Thanks for all the work you put into this; it's perfect for what I need!

Offline
Sweden

Thanks for all the positive comments. I'm glad to hear this can be of use for someone other than myself.


@cyberic: I think what you want is possible. From what I've read on the Arduinoboy GitHub page it seems like the LSDJ Master sync mode sends the song row position as a MIDI note message.
This note can probably be changed to a Song Position Pointer message. It feels like the best solution is to modify the Arduinoboy code to achieve this.

@unexpectedbow: Sounds like a nice setup! May I ask which USB-MIDI adaptor you use? (I will add it to the list of supported devices).

Offline
Ledfyr wrote:

@cyberic: I think what you want is possible. From what I've read on the Arduinoboy GitHub page it seems like the LSDJ Master sync mode sends the song row position as a MIDI note message.
This note can probably be changed to a Song Position Pointer message. It feels like the best solution is to modify the Arduinoboy code to achieve this.

Yes, but the row is only sent once, at start, not at every row.

Offline
Glasgow, Scotland.
Ledfyr wrote:

Thanks for all the positive comments. I'm glad to hear this can be of use for someone other than myself.


@cyberic: I think what you want is possible. From what I've read on the Arduinoboy GitHub page it seems like the LSDJ Master sync mode sends the song row position as a MIDI note message.
This note can probably be changed to a Song Position Pointer message. It feels like the best solution is to modify the Arduinoboy code to achieve this.

@unexpectedbow: Sounds like a nice setup! May I ask which USB-MIDI adaptor you use? (I will add it to the list of supported devices).

Just some cheap rubbish!

http://www.ebay.co.uk/itm/262043252427? … EBIDX%3AIT

Offline
Sweden

@cyberic: Ok, then an idea is to translate the note to song position in midicloro. A CC message can be put at the start of each row which will make midicloro send a new song position message incremented by 1. On the first row of each block, another CC is used to reset the position back to the note value again to handle looping.
This means you have to start the sequencer at the first row of your blocks.
Would this work for your use case?

Currently I want to focus on getting the GB link port communication with the GPIO port working, and I also have some other ideas for the chord settings. So I can't really say when this function might be available.

@unexpectedbow: Thanks!

Offline
Ledfyr wrote:

@cyberic: Ok, then an idea is to translate the note to song position in midicloro. A CC message can be put at the start of each row which will make midicloro send a new song position message incremented by 1. On the first row of each block, another CC is used to reset the position back to the note value again to handle looping.
This means you have to start the sequencer at the first row of your blocks.
Would this work for your use case?

Yes ledfyr, it would work.
But it would be great to be able to loop even inside the same block.
And I don't know how it could handle tempo changes.... maybe by storing the song position for each row

GB link <--> GPIO communication would be great! what kind of latency do you expect?

Offline
Sweden

I mixed up the master sync and MIDI out mode. You cannot send CC in master sync mode, so my idea will not work.
There is also no good way to handle it in MIDI out mode. CC values can only be sent in steps of 8, which makes it hard to write your own song positions manually in LSDJ.
Tell me if you come up with a solution for this.

I've tested the gb-gpio a few times but havent gotten it working properly. Some notes are missed in MIDI out mode for instance. The latency will hopefully be ok, but the Arduino might be more reliable since it runs without an OS.

Offline
Utah

This sounds super useful. Color me interested,

Offline
Sweden

New functions are added. See updated original post and README on github!

Offline
Sweden

Regarding connecting the GB to GPIO directly:
I got MIDI out mode working this way. Sadly it's very unstable - a lot of notes are dropped. I've given up on this for now, thinking that the RPi is not well suited for this (though I might be wrong). Possible solutions could be to try with a RPi 3 and/or try to optimize the real time build (requires RT kernel).

Here is the code: https://github.com/ledfyr/lsdj_mo

Offline
Ledfyr wrote:

Regarding connecting the GB to GPIO directly:
I got MIDI out mode working this way. Sadly it's very unstable - a lot of notes are dropped. I've given up on this for now, thinking that the RPi is not well suited for this (though I might be wrong). Possible solutions could be to try with a RPi 3 and/or try to optimize the real time build (requires RT kernel).

Here is the code: https://github.com/ledfyr/lsdj_mo

There is also: https://github.com/BarrensZeppelin/PiBoy
The dev told me that:
"Synchronizing the GameBoy in Slave mode with a MIDI master works.
You can follow a general guide on how to wire a MIDI input to the serial connection of the Raspberry Pi."


I didn't test it

Last edited by cyberic (Jun 27, 2016 9:00 am)

Offline
Sweden

Thanks for the advice. I did mail with zii.hrs who is the author of PiBoy and he did help me by spotting a bug, and we talked a bit about the problem. But we couldn't solve it.

I suspect sending sync signals out of the RPi might not be as timing critical as reading bytes from the GB (LSDJ MIDI out mode).