1

(5 replies, posted in General Discussion)

Check out Hypnogram:
https://smokingmirrors.bandcamp.com/album/eye

herr_prof wrote:

would it be possible if you marked the last two zero, it works as a full range cc command with just one value?

Yes, I think that’s possible. If you want to disable the last two custom functions, change these lines like the comment says:

————————————————————
// Only 0-6 can be used. Set to 7 or greater to turn off a function and free up a CC.
#define VELOCITY_CC 3
#define TEMPO_CC 4
#define CHORD_CC 5
#define CHANNEL_CC 6
————————————————————

If you set CHORD_CC and CHANNEL_CC to greater than 7, these custom functions will be unavailable and the LSDJ commands X5_ and X6_ will send CC as usual. The CC# are configured in the midiCcNumbers list.

By default the CC values span the whole range 0-127 in steps of 8. So for your needs, send a value greater than 64 to enable, and less than 64 to disable something. E.g. X59=enable, X57=disable.

cyberic wrote:

@ledfyr I have a question: if I buy a teensyboy from Catskull, do you know if it will be able to send data to the GB too (using the USB port)?
I know I will have to code this, but I am asking if the hardware is supporting this
Thx

I’m sure the Teensyboy/Arduinoboy hardware supports simultaneous MIDI in/out.

LSDJ MIDI out mode doesn’t read any note input currently. It only sends out notes, CC etc.
Maybe the LSDJ rom can be changed to support simultaneous MIDI note in and output, but I think the performance won’t be any good (I suspect the Gameboy CPU will choke).

Did I understand your use case correctly?

toasterpastries wrote:

Can you elaborate on what the values in this line are? Are these the MIDI CCs that are sent if a custom function (e.g. tempo, chord) is disabled?

byte midiCcNumbers[7] = {1, 2, 3, 7, 10, 11, 12};

The values in that list are the MIDI CC numbers sent when you use the X command in LSDJ.
The four last ones cannot be used since they are overridden by my custom functions (velocity, clock, chords, channel).
The rest (1, 2, 3) can be used to send CC from LSDJ. You can change them if you want other CC numbers.
The second digit in the X command is the scaled CC value (will be multiplied with 8).
If you disable a custom function, then it will work as a regular CC.

Examples
X03  (CC#1 value: 3x8=24)
X12  (CC#2 value: 16)
X2F  (CC#3 value: 127)

Now with Teensy support! See readme for details.

toasterpastries wrote:

To be honest it's been at least 2 months since I last tried it so I might be remembering it completely wrong. Thanks for looking into it.

Also curious about the clock... If I edit MIN_BPM and MAX_BPM, will the values in between scale? Like if I edit it to being 80-140, I'll end up with smaller steps in tempo?

No prob, let me know if you still have issues with killing chords.

There is no scaling between MIN_BPM and MAX_BPM. These are the bounds for tap tempo (when you ”tap” command X4y every beat) to avoid setting undesired tempos by mistake.
MIN_BPM is also used to set tempo the first time you tap X4y like this:
tempo = MIN_BPM + y*8

So use the closest BPM value the first tap and then let the tap tempo function find the perfect BPM by sending X4y a few more times.

herr_prof wrote:

n00 sends ALL NOTES off.  This is a good way to kill stuck notes, or kill droning notes at the end of a phrase, so I wouldnt mess with its function.

You should consider making special note functions work at the Fx end of the spectrum, since those are probably less used?


herr_prof wrote:

I find it useful as a midi command being sent from a lsdj channel status at least.

Oh I just got an idea, since there arent any aboy modes in your fork, maybe have the pushbutton do a midi panic?


It does not look like N00 sends ALL NOTES OFF, and I also think I was wrong with my note ON idea. I checked the code and it looks like N00 just sends a regular note OFF of the previous played note, just like what happens with the K command (but K kills the sound in the GB channel too). If you check the code you see that the only way to send an ALL NOTES OFF is to stop the sequencer (this looks the same in my fork and the original code).
So sorry @toasterpastries, I have no good explanation why N00 doesn't work to kill notes/chords for you, it looks like it should work, and it works as expected for me.

Regarding using F (or any other existing command): the Fxx command (finetune) does not send any data from the Gameboy to the Arduinoboy, so a modified LSDJ rom would need to be used for this to work.
I want to keep my code compatible with the official LSDJ versions, and I don't know nearly enough about Gameboy development to attempt anything like that.
The signals sent from the Gameboy to the Arduionoboy are: start/stop seq, note on/off, CC and program changes.
My functions use 4 of the 7 available CC numbers (the X command), so there are still 3 CC numbers available to use normally. Sacrificing a few CCs felt better for me than sacrificing e.g. notes or program changes (though maybe I could live without program changes).
Though it would be cool with dedicated commands instead of using up some CC numbers, however much more work is needed for this to happen (it affects both LSDJ and Arduinoboy code).

I agree that the LED blinking is nice for status and just to see that it's working, but for me the "simplicity factor" is more important.

MIDI panic via the pushbutton is a good idea, I can see how this would be a useful function. Personally I use a panic button on my synth when needed, which is very rarely. I'll keep this in mind.

toasterpastries wrote:

Ahh just found my issue... I think I was trying to use N00 instead K00 to end the notes using chords.
Do you think it would be possible for chords to kill with N00? I've been trying to use NOI as a external drum sequencer as well as retaining the original NOI sounds. Using N00 would enable the MIDI notes to be killed without cutting of a longer NOI sound.

I tested this on my rig today, N00 actually does kill chords for me. I would guess the reason we get different results is this:
N00 generates a MIDI note ON with note value 0. Some synths/drum machines may recognize this as a note OFF, others may see this as the lowest possible note or filter it out as an invalid note.

If this is correct, I can change so that N00 generates a note OFF instead. Or does anyone use N00 to reach the lowest note? I wouldn't want to break things. If nobody seems to do that, I'll probably change this in the next few days.

catskull wrote:

Kind of might make an "arduinoboy lite" hardware that targets only this build.

If I send you a teensyboy, will you get it working on it? I know many people really like this fork.

EDIT:
Actually, thinking about it here, I'm pretty sure this will work on the GBA MIDI board I'll be releasing very soon with very little modifications to your code...

Hey, I saw your facebook posts about the GBA MIDI board. Looks way cool - I'll be sure to pick one up when they're ready. Using that board as an Arduinoboy for MIDI out would simply be awesome.

Thanks for the offer - I'll PM you!

DSC wrote:

Curious to why you removed the LED flashing.

No real reason apart from keeping it as simple and stripped down as possible. LED flashing can probably be added again without any impact on performance, but I personally like the concept that the Arduino does as little as possible besides handling the precious note sequencing.

unexpectedbowtie wrote:

Yxx - Sends a program/patch/preset change.

This description is a bit bare. Any ideas on how this is implemented?

I forgot you also asked about program changes. A program change MIDI message consists of channel 1-16 and value (0-127).

Example:

You use command "Y0A" in the PU2 channel - this sends a program change with value=10 on MIDI channel 2. This changes the patch to #10 on your synth if it listens to MIDI channel 2 and if it supports program changes (might need to be enabled in your synth's settings to work).

12

(6 replies, posted in Nintendo Handhelds)

herr_prof wrote:

@ledfyr: why did you choose to use the x command instead of the n command for the chords? If you have another thread for your fork id love to talk more.

The N command plays a single note in the current channel, I still want this to work the way it does. Though I heard you can use the C command with MIDI out to play chords. I never tried that, but I still think you get more chords to choose from with my code.

toasterpastries wrote:

I'm also a fan of this fork and would like to open some chat about it. I use NOI for external drum sequencing and use the chord command for allowing more than one drum to be triggered at the same time, but it often suffers from stuck notes.

You have to kill the note before switching to a new chord and playing it to avoid hanging notes.

I created a thread if you want to continue there:
https://chipmusic.org/forums/topic/2022 … -out-fork/

This is my custom MIDI out version of the Arduinoboy.

https://github.com/ledfyr/ab-midiout-lite

Background:
I started out trying to slim down the original Arduinoboy code to the bare minimum needed to handle LSDJ MIDI out. The main motivation was to learn how the code worked and if possible solve an issue I'd had with notes dropping out.
I managed to solve the issue by removing a buffering/timeout handling of previously played notes. My solution keeps at most one previous note per channel instead of a list, and I got rid of the timeout handling. I never fully understood the intention of the original code in this area, but as far as I know my changes haven't broken anything. If anyone has ideas or knowledge about this, feel free to share.
Later I added some more functions, just because.

Functions:
- MIDI clock out (tap tempo control of BPM)
- Velocity
- Chords
- Channel switching (channels can be switched rapidly giving you access to 16 channels - though only 4 notes at a time)
- CC scaling 0-127 instead of 0-120

Gotcha #1: If you want to change between two different chords, you must kill the first note (chord) before changing and starting the next - otherwise notes from the first chord will be left hanging. So do it in this order: set chord, play note, kill note, set other chord, play note ... and so on.

Gotcha #2: All settings (channel switching etc) are lost when you power off the Arduinoboy. Keep a row in the top of your LSDJ songs with settings, play this row to "load" them before starting the song.

See readme in the link above for installation instructions and more info. This code should work with any Arduino based build following the original schematics by trash80.

Please let me know if anything is unclear and I'll try to help. Enjoy!

Hi, I also like the MIDI out mode! LSDJ works great as a 4 channel sequencer.

With the default settings of the arduinoboy, CC works like this.
Say you use command Xyz, then you’ll get:

Value of y - CC number
1 - 1
2 - 2
3 - 3
4 - 7
5 - 10
6 - 11
7 - 12

Value of z - CC value
1 - 1 (or 0, not sure)
2 - 8
3 - 16
4 - 24
...
E - 112
F - 120

This is the default behaviour, it can be changed as you quoted from the docs.
Changes can be hard-coded in this file and then loaded to the Arduinoboy (search for the word midiOutCCMessageNumbers):
https://github.com/trash80/Arduinoboy/b … inoboy.ino

Or you can use the max patch to change this I think.

Also, I made some additions to the MIDI out mode in my personal repo, like MIDI clock out, velocity and more. Check it out if you’re interested, the readme contains documentation of functions and instructions on how to install on your arduinoboy:

https://github.com/ledfyr/ab-midiout-lite

Last but not least I found that the GBC and GBA models works best for busy sequencing in multiple channels.

Hope this helps!

unexpectedbowtie wrote:

Thanks Catskull!

Coincidentally, I'm trying to work out a way to connect multiple Game Boys to a single arduinoboy so I can control external MIDI gear live with more than one DMG. A related, but different problem...

This would be awesome, one Gameboy could control MIDI channel 1-4 and the other channel 5-8.

However, I think this requires a new LSDJ version. Currently there is no way to sync 2 gameboys while running in MIDI out mode. (Correct  me if I'm wrong anyone - I hope I am smile)

Hi, have you seen this?
http://chipmusic.org/forums/topic/19565 … olderless/

This, maybe in combination with a prosound mod, should make the old GBA pretty quiet. I'm not getting any noticable noise when using my GBA (just prosound) with lsdj and an arduinoboy.