Git Product home page Git Product logo

arduinoboy's Introduction

Arduinoboy

Official ArduinoBoy Repository for serial MIDI communication to the Nintendo Gameboy.

ScreenShot

About

Arduinoboy is software for the Arduino hardware platform that allows serial communication (MIDI) to the Nintendo Gameboy for music applications such as LittleSoundDJ, Nanoloop., and mGB

Current Features

  • Affordable and easily accessible parts for assembly.
  • Accurate MIDI Sync, Start and Stop commands.
  • Push Button selector sets the sync/state modes (7 modes available)
  • mGB Mode: Full MIDI in support across all Gameboy Channels, including a unique "poly" mode allows you to play your Game Boy like a synthesizer.
  • Midi Out Doubles as a Midi Thru
  • "Filtering" data for only sync messages, no dedicated MIDI line required.
  • Can be powered by the Game Boy's gamelink port.
  • USB upgradeable via Arduino.
  • Midi settings configurable using a Mac/PC editor built in Max.
  • Tested and works with DMG (Original), Gameboy Color, and Advance/SP.

Modes Details

Mode 1 - LSDJ as MIDI Slave Sync

Slave your Game Boy running LittleSoundDJ to your midi sequencer or Digital audio workstation.

You can send the arduinoboy midi notes to change sync resolution and start/stop the LSDJ sequencer.

LSDJ Slave Mode Midi Note Effects:

  • 48 - C-2 Sends a Sequencer Start Command
  • 49 - C#2 Sends a Sequencer Stop Command
  • 50 - D-2 Toggles Normal Tempo
  • 51 - D#2 Toggles 1/2 Tempo
  • 52 - E-2 Toggles 1/4 Tempo
  • 53 - F-2 Toggles 1/8 Tempo

Higher note values than these map LSDJ song position row offset on a Song Start.

In LSDJ the sync mode should be set to Slave

Mode 2 LSDJ as MIDI Master Sync.

Send Midi sync with LSDJ as a midi clock master, LSDJ also sends a Midi Note on message that corresponds to the song row number on play.

In LSDJ the sync mode should be set to Master

Mode 3 LSDJ PC Keyboard mode.

This mode emulates the PC Keyboard Mode built into LSDJ, allowing you to control the following aspects of LSDJ:

Features:

  • The first octave controls M-U-T-E,
  • Cursor control (LSDJ Live mode only),
  • Table selection
  • Table cue.

PC Keyboard mode midi note map

  • 36 - C-1 Mute Pu1 Off/On
  • 37 - C#1 Mute Pu2 Off/On
  • 38 - D-1 Mute Wav Off/On
  • 39 - D#1 Mute Noi Off/On
  • 40 - E-1 Livemode Cue Sequence
  • 41 - F-1 Livemode Cursor Up
  • 42 - F#1 Livemode Cursor Down
  • 43 - G-1 Livemode Cursor Left
  • 44 - G#1 Live mode Cursor Right
  • 45 - A-1 Table Up
  • 46 - A#1 Table Down
  • 47 - B-1 Cue Table
  • 48+ - Notes from this note up will accept midi in from an external keyboard or sequencer and allow you to play the notesC-2 to C-8.
  • Midi Program Change messages will select from instrument table
  • Default Midi channel is 16. You can set this in the top of the main source file in the archive, or via the Max Pat editor.

In LSDJ the sync mode should be set to Keyboard

Mode 4 MIDI to Nanoloop sync

Sync Nanoloop. to external midi clock signals sent to the midi in.

In Nanoloop, the sync mode should be set to slave.

Mode 5 Full MIDI with mGB

mGB is a Gameboy cartridge program (You need a Flash Cart and Transfer hardware) That enables the Gameboy to act as a MIDI supported sound module that allows full control of the Game Boy sound hardware.

It works with the old DMG Gameboy as well as GBC/GBA.

Mode 6 LSDJ MIDIMAP

Lsdj will sync to incoming MIDI sync, and incoming MIDI notes are mapped to LSDJ's song row #. The currently selected row's MIDI note is displayed on the top right of the LSDJ screen, and incoming MIDI notes will also display the relative song row number in the same location.

In LSDJ the sync mode should be set to MI.MAP.

This requires a special version of LSDJ, which can be found in your account on the LSDJ website.

Mode 7 LSDJ MIDIOUT

Each of the 4 gameboy channels send MIDI data on 4 midi channels by the use of effects commands:

  • Nxx - Sends a MIDI Note - Absolute to the value placed in the effect. N00 sends note off, N01-N6F send midi notes 1 to 112.
  • Qxx - Sends a MIDI Note relative to the current channel's pitch. The effect value is a offset. so Q0C in PU1 would send a note 1 octave higher than what PU1 is currently playing. This is useful as a table command to track midi notes as normal notes in the sequencer.
  • Xxx - Sends a MIDI CC - By default in Arduinoboy the high nibble selects a CC#, and the low nibble sends a value 0-F to 0-127. This can be changed to allow just 1 midi CC with a range of 00-6F, or 7 CCs with scaled or unscaled values.
  • Yxx - Sends a program/patch/preset change.

By default each channel of LSDJ is mapped to midi channels 1-4. For example note commands from PU1 will be sent to midi channel 1.

In LSDJ the sync mode should be set to Midiout.

This requires a special version of LSDJ, which can be found in your account on the LSDJ website.

Max Editor

Editor gui The Arduinoboy Editor for Max for PC/OSX machines is a gui editor that allows you to edit the various global midi settings of your arduinoboy without editing or flashing code, over midi. It used to required the now deprecated Max Runtime, but you can also run it using a demo of Cycling '74's Max application

Maxpat Settings

  • Midi In/Out Connect your arduinoboy to these ports on your system. Once it has connected, all the lights on your arduinoboy should flash in order, and the editor will show a green Connected.
  • Mode Setting this will tell your arduinoboy what mode to boot into automatically. This is handy if you built your own arduinoboy and decided you wanted to skimp out on LEDs and a button.
  • LSDJ Slave Mode settings - The midi channel LSDJ slave mode will receive its commands on.
  • LSDJ Master Mode settings - The midi channel LSDJ Master mode will send its midi notes mapped to row number on.
  • Keyboard Mode settings - What channel LSDJ will look for its keyboard mode midi commands. No idea what compatibility mode does.
  • mGB midi settings - Map each incoming midi channel to a specific Gameboy channel in mGB.
  • LSDJ Livesync/Livemap settings - The midi channel Livesync/Livemap will listen to incoming midi commands from.
  • LSDJ Midiout settings - Here you can set the following:
    • Note midi channel - The channel each LSDJ channel will send it's midi note commands on.
    • CC midi channel - The channel each LSDJ channel will send it's Continuous Controller commands on.
    • CC 0 - The initial CC each channel will send. The type of data it will send is based on the next setting.
    • CC Mode - Game Boys have limitations! You can either have arduinoboy send one CC with many values, or 7 with limited 8bit values. By default in Arduinoboy the high nibble selects a CC#, and the low nibble sends a value [0-F] to [0-127]. This can be changed to allow just 1 midi CC with a range of 00-6F, or 7 CCs with scaled or unscaled values.
    • CC Scaling - Set wether the 7 CCs are scaled or unscaled.

Future Features & wishlist

  • Build instructions, and a Arduino Shield

How To build an Arduinoboy

ScreenShot ScreenShot

Video Demos

Thanks To

arduinoboy's People

Contributors

jkotlinski avatar lpla avatar trash80 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arduinoboy's Issues

Random Mode error

I have an issue where my arduinoboy randomly cycles through modes. I compiled the Code and after several attempts it finally compiled without any Error. I wanted to try it out, but pressing the mode button won't do anything. Sometimes it randomly starts to cycle through the modes and when it comes to MGB i can play notes with my Midi Keyboard and the Green Status Led Lights up correctly. This ist Just temporarely because of the mode cycle. MGB does Not detect anything and I was not able to ever hear a Sound in MGB while I was playing a Note. LSDJ has the Same Problem. Maybe someone knows how to fix it. I have tried several hours and days but I ended writing this text Here. My Setup is a Catskull DIY Kit, a Arduino Uno and a Gameboy Color with Ezflash Junior and the Roms.

Channel 3 Pitch-Bend Issue

While using pitch bend in the wave channel, a popping occurs whenever the PB is brought back to value 64. After a good number of pops the channel's waveform will change (audibly but not on the display). In order to restore the original waveform, I need to move the waveform manually to a different shape and then toggle back to the original shape.

I am using Arduinoboy software 1.3.3, a DMG-01 Play-it-Loud, and an Arduinoboy made by Xiwi Electronics.

Issue compiling

/tmp/596570401/Arduinoboy/Mode_LSDJ_Keyboard.ino:47:32: error: 'class PS2Keyboard' has no member named 'readScanCode'; did you mean 'readUnicode'?

Having trouble compiling for Arduino Uno. Compiling for original ArduinoBoy design.

Error when trying to compile

Any way to solve this issue? Tying to flash the files to a Teensy 2.0 on a PCB made with Trash80s schematic for the teensboy.

Arduinoboy:187: error: cannot convert 'usb_serial_class*' to 'HardwareSerial*' in initialization
HardwareSerial *serial = &Serial;

Using library EEPROM at version 2.0 in folder: C:\Users\avonb\Desktop\arduino-1.8.9\hardware\teensy\avr\libraries\EEPROM
cannot convert 'usb_serial_class*' to 'HardwareSerial*' in initialization

mGB USB Midi not working with newer Teensyduino versions.

Teensyduino 1.41+ changed the values returned by usbMIDI.getType(). Instead of 0, 1, 2, etc. it now returns the hex values described here: https://www.pjrc.com/teensy/td_midi.html

This is easily fixed by modifying the switch statement in modeMidiGbUsbMidiReceive in Mode_MidiGB.

There is another issue where MIDI_INTERFACE does not seem to get defined anymore. This could be an error on my part as I was not able to find anything about it but after manually defining it and applying the above fix everything is working again.

Other modes might need fixing too, I have only tested mGB on a teensy LC.

Trouble receiving midi message

Using a Teensy 3.2, I can compile and upload the sketch fine.
It goes through the startup animation on the LEDs.
I can select a mode with the button.
It even remembers the mode when I restart.

I'm trying to use mGB mode.
But when sending midi from my computer, using Live, through USB, I don't get any status LED changes (or any sound on my gameboy).

The settings in the Arduino IDE are:
Board: "Teensy 3.2 / 3.1"
USB Type: "MIDI"
CPU Speed: "96 MHz (overclock)"
Optimize: "Faster"
Keyboard Layout: "US English"
Port: "HID=#### MIDI (Teensy 3.2"

I can also see a "Teensy MIDI" in my Audio MIDI Setup on macOS and can see "Teensy MIDI" in Live as a "Midi to" output.

I've used the same pins as in the original code. I updated all the libraries in the Arduino IDE. I tried other USB Types to see if there was some serial debugging info printed.

Here is a picture of my breadboard layout.
IMG_0796

I also have an Arduino UNO with a which I can send midi to fine with a USB to DIN 5 cable.

I'm not sure where I have gone wrong, since the start up and mode selection appear to work. Does anybody have any ideas?

Compilation Error for Arduino Nano Every: 'PIND' was not declared in this scope.

I'm trying to build this with an Arduino Nano Every.
I get a compilation error that "PIND" is not declared.

Is there a workaround of some sort for the Nano Every?

./Mode_LSDJ_Keyboard.ino: In function 'void sendKeyboardByteToGameboy(byte)':
./Arduinoboy.ino:231:48: error: 'PIND' was not declared in this scope
 #define GB_SET(bit_cl,bit_out,bit_in) PORTD = (PIND & B11111000) | ((bit_in<<2) | ((bit_out)<<1) | bit_cl)
                                                ^
./Mode_LSDJ_Keyboard.ino:209:3: note: in expansion of macro 'GB_SET'
   GB_SET(0,0,0);
   ^~~~~~
./Arduinoboy.ino:231:48: note: suggested alternative: 'PIN0'
 #define GB_SET(bit_cl,bit_out,bit_in) PORTD = (PIND & B11111000) | ((bit_in<<2) | ((bit_out)<<1) | bit_cl)
                                                ^
./Mode_LSDJ_Keyboard.ino:209:3: note: in expansion of macro 'GB_SET'
   GB_SET(0,0,0);
   ^~~~~~
./Mode_LSDJ_Midiout.ino: In function 'boolean getIncommingSlaveByte()':
./Arduinoboy.ino:231:48: error: 'PIND' was not declared in this scope
 #define GB_SET(bit_cl,bit_out,bit_in) PORTD = (PIND & B11111000) | ((bit_in<<2) | ((bit_out)<<1) | bit_cl)
                                                ^
./Mode_LSDJ_Midiout.ino:254:3: note: in expansion of macro 'GB_SET'
   GB_SET(0,0,0);
   ^~~~~~
./Arduinoboy.ino:231:48: note: suggested alternative: 'PIN0'
 #define GB_SET(bit_cl,bit_out,bit_in) PORTD = (PIND & B11111000) | ((bit_in<<2) | ((bit_out)<<1) | bit_cl)
                                                ^
./Mode_LSDJ_Midiout.ino:254:3: note: in expansion of macro 'GB_SET'
   GB_SET(0,0,0);
   ^~~~~~
./Mode_LSDJ_SlaveSync.ino: In function 'void sendClockTickToLSDJ()':
./Arduinoboy.ino:231:48: error: 'PIND' was not declared in this scope
 #define GB_SET(bit_cl,bit_out,bit_in) PORTD = (PIND & B11111000) | ((bit_in<<2) | ((bit_out)<<1) | bit_cl)
                                                ^
./Mode_LSDJ_SlaveSync.ino:91:5: note: in expansion of macro 'GB_SET'
     GB_SET(0,0,0);
     ^~~~~~
./Arduinoboy.ino:231:48: note: suggested alternative: 'PIN0'
 #define GB_SET(bit_cl,bit_out,bit_in) PORTD = (PIND & B11111000) | ((bit_in<<2) | ((bit_out)<<1) | bit_cl)
                                                ^
./Mode_LSDJ_SlaveSync.ino:91:5: note: in expansion of macro 'GB_SET'
     GB_SET(0,0,0);
     ^~~~~~
./Mode_MidiGb.ino: In function 'void sendByteToGameboy(byte)':
./Arduinoboy.ino:231:48: error: 'PIND' was not declared in this scope
 #define GB_SET(bit_cl,bit_out,bit_in) PORTD = (PIND & B11111000) | ((bit_in<<2) | ((bit_out)<<1) | bit_cl)
                                                ^
./Mode_MidiGb.ino:107:8: note: in expansion of macro 'GB_SET'
        GB_SET(0,1,0);
        ^~~~~~
./Arduinoboy.ino:231:48: note: suggested alternative: 'PIN0'
 #define GB_SET(bit_cl,bit_out,bit_in) PORTD = (PIND & B11111000) | ((bit_in<<2) | ((bit_out)<<1) | bit_cl)
                                                ^
./Mode_MidiGb.ino:107:8: note: in expansion of macro 'GB_SET'
        GB_SET(0,1,0);
        ^~~~~~
./Arduinoboy.ino:231:48: error: 'PIND' was not declared in this scope
 #define GB_SET(bit_cl,bit_out,bit_in) PORTD = (PIND & B11111000) | ((bit_in<<2) | ((bit_out)<<1) | bit_cl)
                                                ^
./Mode_MidiGb.ino:110:8: note: in expansion of macro 'GB_SET'
        GB_SET(0,0,0);
        ^~~~~~
./Arduinoboy.ino:231:48: note: suggested alternative: 'PIN0'
 #define GB_SET(bit_cl,bit_out,bit_in) PORTD = (PIND & B11111000) | ((bit_in<<2) | ((bit_out)<<1) | bit_cl)
                                                ^
./Mode_MidiGb.ino:110:8: note: in expansion of macro 'GB_SET'
        GB_SET(0,0,0);
        ^~~~~~
./Mode_Nanoloop.ino: In function 'boolean sendTickToNanoloop(boolean, boolean)':
./Arduinoboy.ino:231:48: error: 'PIND' was not declared in this scope
 #define GB_SET(bit_cl,bit_out,bit_in) PORTD = (PIND & B11111000) | ((bit_in<<2) | ((bit_out)<<1) | bit_cl)
                                                ^
./Mode_Nanoloop.ino:74:8: note: in expansion of macro 'GB_SET'
        GB_SET(0,1,0);
        ^~~~~~
./Arduinoboy.ino:231:48: note: suggested alternative: 'PIN0'
 #define GB_SET(bit_cl,bit_out,bit_in) PORTD = (PIND & B11111000) | ((bit_in<<2) | ((bit_out)<<1) | bit_cl)
                                                ^
./Mode_Nanoloop.ino:74:8: note: in expansion of macro 'GB_SET'
        GB_SET(0,1,0);
        ^~~~~~
./Arduinoboy.ino:231:48: error: 'PIND' was not declared in this scope
 #define GB_SET(bit_cl,bit_out,bit_in) PORTD = (PIND & B11111000) | ((bit_in<<2) | ((bit_out)<<1) | bit_cl)
                                                ^
./Mode_Nanoloop.ino:77:8: note: in expansion of macro 'GB_SET'
        GB_SET(0,0,0);
        ^~~~~~
./Arduinoboy.ino:231:48: note: suggested alternative: 'PIN0'
 #define GB_SET(bit_cl,bit_out,bit_in) PORTD = (PIND & B11111000) | ((bit_in<<2) | ((bit_out)<<1) | bit_cl)
                                                ^
./Mode_Nanoloop.ino:77:8: note: in expansion of macro 'GB_SET'
        GB_SET(0,0,0);
        ^~~~~~
./Arduinoboy.ino:231:48: error: 'PIND' was not declared in this scope
 #define GB_SET(bit_cl,bit_out,bit_in) PORTD = (PIND & B11111000) | ((bit_in<<2) | ((bit_out)<<1) | bit_cl)
                                                ^
./Mode_Nanoloop.ino:82:5: note: in expansion of macro 'GB_SET'
     GB_SET(0,1,0);
     ^~~~~~
./Arduinoboy.ino:231:48: note: suggested alternative: 'PIN0'
 #define GB_SET(bit_cl,bit_out,bit_in) PORTD = (PIND & B11111000) | ((bit_in<<2) | ((bit_out)<<1) | bit_cl)
                                                ^
./Mode_Nanoloop.ino:82:5: note: in expansion of macro 'GB_SET'
     GB_SET(0,1,0);
     ^~~~~~

exit status 1

Compilation error: 'PIND' was not declared in this scope

pcb

if i dont wanna use the 面包板,how can i make the pcb (over the arduino

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.