tommitytom / RetroPlug

A frontend for the SameBoy GameBoy emulator, with a focus on music creation. It runs standalone and can be used as an audio plugin (VST) in your favourite DAW!
MIT License
304 stars 15 forks source link

Req: support sync for Nanoloop #4

Open r4dian opened 5 years ago

r4dian commented 5 years ago

This ROM also supports syncing Via MIDI

Demo ROM can be obtained here for testing:

https://www.nanoloop.com/one/index.html

tommitytom commented 5 years ago

Sure, I'll take a look. Is there any option I have to enable to accept MIDI clock? Any kind of slave mode? Or do I just start throwing data at it?

tommitytom commented 5 years ago

OK I read the manual bit I am still confused. I entered slave mode with A+B while positioned on the last icon of the second menu, then I pressed B+SELECT to switch between the modes. However the manual says the options are

m = MIDI
c = analog
c/2 = analog halfspeed

However I get A, C, E.

r4dian commented 5 years ago

A, c, e are the right options, you might be looking at the manual for the GBA version.

Here is the DMG version: https://www.nanoloop.com/one/nanoloop17.html

Thanks for taking a look.

tommitytom commented 5 years ago

You are right! I requires a different sync method to LSDj so it needs a small amount of work, but confident I'll get it working.

tommitytom commented 5 years ago

I've tried implementing sync exactly the same way as Arduinoboy, however it doesn't appear to work. Before I continue to debug this, can you confirm MIDI sync definitely works in the demo version? Also once I've enabled midi slave mode, are there any other buttons I need to press to enable sync?

lpla commented 4 years ago

First of all, Nanoloop One (1.7) only works as Slave in MIDI sync mode. Arduinoboy implements a "Mode 4 MIDI to Nanoloop sync", probably because it works in a different way than LSDj (also look at the USB MIDI adapter: https://www.nanoloop.com/sync/index.html)

So, unless you want to implement the analog sync in Retroplug (which will give option to sync as Master and Slave in LSDj and Nanoloop, probably even between Retroplug instances), I think that you should look at the Mode 4 code of Arduinoboy.

tommitytom commented 4 years ago

I tried to implement things exactly the same as Arduinoboy but with no luck, sadly. You can see part of my attempt here: https://github.com/tommitytom/RetroPlug/commit/8d8d9a1ace01895ad384bfb131ed79836a33d96d (here is the simplified Arduinoboy implementation for reference: https://github.com/trash80/Arduinoboy/blob/feature_arduinoboy_cpp/Arduinoboy/NanoloopSlave.cpp)

I tried it both by sending individual bits, and as pre-prepared bytes. I also emailed Oliver about it but got no response - it's likely he's not going to want to support a project like this since it may impact his hardware sales

Glaferg commented 2 years ago

Bump. Nanoloop is the other good synth for GB.

tommitytom commented 2 years ago

Is this possible in any other emulator? I'm unsure if syncing 2 demo instances of nanoloop together is even possible! Can anyone confirm that it's possible to sync the nanoloop demo with another instance of nanoloop, or with a MIDI device? The demo ROM is all that is available