Arduino RGB strip

Collaborate with other modders to make Synthesia the way you want it.
Always the latest versions: [ colors.xml | ui.xml ]
Read the Getting Started topic to learn how important it is to MERGE YOUR CHANGES every time you download a new dev preview.
Post Reply
Montelion2004
Posts: 12
Location: Piedmont, Italy

Post by Montelion2004 » 09-08-18 5:34 am

Hi,
Is there a way to do something like this in Synthesia?
https://www.linkedin.com/pulse/musescor ... cucinotta/
It's like the PianoMaestro.
I tried it, but Synthesia is way better for learning piano than MuseScore.
Any ideas?
Montelion

Nicholas
Posts: 12351

Post by Nicholas » 09-08-18 6:28 am

The "Finger-based channel" key light mode (under Settings --> [your virtual MIDI port] --> Key Lights) is designed specifically to support this kind of thing. It'll take a little bit of adaptation of their Arduino code, but all of the upcoming-note information is nicely exposed using that setting.

Montelion2004
Posts: 12
Location: Piedmont, Italy

Post by Montelion2004 » 09-08-18 7:19 am

UH-OH!
Arduino doesn't show up as a MIDI instrument!
What can I do? :?:
Montelion

Nicholas
Posts: 12351

Post by Nicholas » 09-10-18 3:01 am

You'll probably need some app that pretends to be a virtual MIDI device and can write to the Arduino's serial port. Or you could update the Arduino's boot loader to behave like a physical USB-MIDI device. (The Arduino-compatible Teensy boards have this built in and available just by changing a drop-down menu option. I know this because I just used one to do something rather similar.) :D

In any event, some programming will be involved somewhere -- either on the Arduino or computer side -- to get this up and running. Synthesia isn't compatible with that MuseScore feature out of the box.

Montelion2004
Posts: 12
Location: Piedmont, Italy

Post by Montelion2004 » 09-10-18 6:27 am

Ok. Thanks!
Montelion

GeorgeProfenza
Posts: 2

Post by GeorgeProfenza » 10-22-18 1:42 pm

Nicholas' suggestion is great: Teensy is pretty easy to do MIDI with.

Additionally, if you have a Leonardo / Yun or another Atmega 32u4 based micro-controller you can use https://github.com/rkistner/arcore

For Uno you might be able to get away with Hairless MIDI and their MIDI/Serial support software: http://projectgus.github.io/hairless-midiserial/

Might be able to get away on an Uno with LUFA too, but it's not as straight forward as the previously mentioned options:
http://www.fourwalledcubicle.com/LUFA.php (MIT license)

Montelion2004
Posts: 12
Location: Piedmont, Italy

Post by Montelion2004 » 10-22-18 3:32 pm

Thanks! I don't know why but I couldn't install the MIDI bootloader, and I couldn't find any alternative.
Montelion

Astinsa
Posts: 1

Post by Astinsa » 10-09-19 11:15 pm

Has anything come of it?

Montelion2004
Posts: 12
Location: Piedmont, Italy

Post by Montelion2004 » 10-12-19 8:09 am

Yeaaaah....
Nope. I gave up one year ago, and never tried again. Maybe one day I'll be able to finish this project...
Sadly I'm a procrastinator...

thiagolr
Posts: 37

Post by thiagolr » 04-19-20 1:45 pm

I'm working on it, but I'm still waiting for some parts that I bought on ebay! =)

I will make a post here about the progress later!

Montelion2004
Posts: 12
Location: Piedmont, Italy

Post by Montelion2004 » 04-19-20 2:08 pm

That's great! :D
Montelion

lenz
Posts: 1
Location: Russia

Post by lenz » 05-12-20 1:04 am

Hello. I made an implementation of the Arduino RGB Strip for an application on android. But I need a little help to finish the project to the end, I was engaged in the analysis of the protocol and did not fully understand how the program indicates the duration of pressing the keys?
P.S. Sory for my bad English.

Nicholas
Posts: 12351

Post by Nicholas » 06-04-20 5:00 am

Sorry for the wait on this.

In MIDI the duration isn't usually specified. Instead of a single event with a start/end time, MIDI notes are sent in two separate events: the "Note On" event when the note (or key light in this case) should begin. Then a "Note Off" event when it should end.

Does that help?

thiagolr
Posts: 37

Post by thiagolr » 06-09-20 12:32 pm

Nicholas,

Would it be possible to have some extra information from Synthesia for RGB lights?

Example:
- which color is selected for each hand/channel (maybe using a custom SysEx message?)
- different led light channels for each hand/channel

Thanks!

Nicholas
Posts: 12351

Post by Nicholas » 06-11-20 5:36 am

Hmm, this might get a little tricky because you can technically use all the colors on each hand. Each track lets you choose per-hand colors independently. Combined with the hand splitting tool (or just a song with lots of tracks), and you can get some arbitrary combinations.

In the "Finger-Based Channel" mode, right now the Note On messages don't use the 7 bits of the velocity parameter for anything particularly useful. So we've got some room to add data without sending any additional messages. If we assume that Synthesia only has six colors (which has been true for 13 years but won't be forever), we could fit both the original note channel and the note's color in those 7 bits.

That scheme would break once more arbitrary colors were allowed.

Can you think of anything useful you'd use the original note channel for? If not, we could dedicate all 7 of those bits to the color, which gives a lot of room for future flexibility in the number of available colors.

thiagolr
Posts: 37

Post by thiagolr » 06-13-20 1:16 pm

I can't think of anything useful, the idea to add the color to the velocity data is very interesting.

With 7 bits with have room for 128 predefined colors, which is more than enough for this purpose!

If you decide to do this (with the current 6 colors), I can test it here on a dev preview!

Nicholas
Posts: 12351

Post by Nicholas » 07-20-20 1:39 pm

Instead of going the predefined color route, I was thinking more along the lines of just doing a "7 bit hue" or maybe a "6 bit hue with 1 bit toggle for 'bright' or 'dark'". Either 128 or 64 hues would be more than enough for anything I'd ever expect to offer a choice between.

Heck, even 32 different hues is plenty and we could reserve the last two bits for future use. :lol: We talked about the ceiling on the number of useful colors a million years ago, over here. If you look at the image linked in qwertyo76's post that follows mine there, 36 shades is already in "holy moly" territory. :D

This solution changes the requirement for implementers from needing to store a big table of pre-selected colors into a simple description: "the H from HSV, starting at 0 and proceeding to 360° linearly as you reach the value 31."

thiagolr
Posts: 37

Post by thiagolr » 07-23-20 1:10 pm

I agree, it is easier and no one would actually need/use all those colors!

My RGB strip is almost done, it is already functional and is working as expected! I just need to do some "beautification", organize the wires, print a 3D case for the arduino, etc.

Image

Nicholas
Posts: 12351

Post by Nicholas » 07-23-20 8:42 pm

That looks awesome. :D

Post Reply