Open 4dvn opened 3 years ago
You cannot use the MIDIUSB library when using Control Surface, you'll have to use Control Surface for everything.
The best solution is to use the NoteRangeFastLED
class to drive your LED strip, see Note-FastLED-ColorMapper.ino and Note-FastLED.ino. By default, it uses the Novation Launchpad color scheme, but you can provide your own color mapper as demonstrated in the example.
The latest development version of Control Surface tells you when to update the LED strip as well, see here.
If you want to re-use most of your existing code, you can use the MIDI input callbacks, see MIDI-Input-Callback.ino or MIDI-Input.ino.
re-use most of your existing code
I wanna re-use most of my existing code, can you give me the code of buttons with with my rgb code?
You already have working code with buttons in your previous thread. Have you checked the examples? If you want help, please post specific questions, I won't be writing on-demand code.
You already have working code with buttons in your previous thread. Have you checked the examples? If you want help, please post specific questions, I won't be writing on-demand code.
Yes, is working but i want to try more with rgb, sorry for the rgb code, can you help me with that idea with controll surface library?
Instead of using MidiUSB.read()
like in your first post, you use the Control Surface MIDI callbacks as shown here: https://tttapa.github.io/Control-Surface-doc/Doxygen/d0/d32/MIDI-Input-Callback_8ino-example.html
cm.header
contains the MIDI status byte, if it's equal to 0x90
, you've received a Note On message on channel 1. If it's equal to 0x80
, it's a Note Off message on channel 1.
cm.data1
contains the note number (cfr. rx.byte2
), and cm.data2
contains the velocity (cfr. rx.byte3
).
Instead of using
MidiUSB.read()
like in your first post, you use the Control Surface MIDI callbacks as shown here: https://tttapa.github.io/Control-Surface-doc/Doxygen/d0/d32/MIDI-Input-Callback_8ino-example.html
cm.header
contains the MIDI status byte, if it's equal to0x90
, you've received a Note On message on channel 1. If it's equal to0x80
, it's a Note Off message on channel 1.cm.data1
contains the note number (cfr.rx.byte2
), andcm.data2
contains the velocity (cfr.rx.byte3
).
i'm still stuck to made button work rgb 2 years :( the idea i got from this video: https://www.youtube.com/watch?v=RMJNVMaHM7g
I can't help you if you don't tell me where you're stuck. What piece of the code are you having trouble with?
The FastLED examples I linked to in my first reply just work. If you want to keep your RGB code (I wouldn't recommend it), you'll have a bit more work, as I explained in my previous posts.
I can't help you if you don't tell me where you're stuck. What piece of the code are you having trouble with?
The FastLED examples I linked to in my first reply just work. If you want to keep your RGB code (I wouldn't recommend it), you'll have a bit more work, as I explained in my previous posts.
oh, i have trouble with adding button code to make rgb recived signal an light up like the video on youtube i've sent you
Well, I gave you multiple options, have you tried them? What went wrong?
Instead of using
MidiUSB.read()
like in your first post, you use the Control Surface MIDI callbacks as shown here: https://tttapa.github.io/Control-Surface-doc/Doxygen/d0/d32/MIDI-Input-Callback_8ino-example.html
cm.header
contains the MIDI status byte, if it's equal to0x90
, you've received a Note On message on channel 1. If it's equal to0x80
, it's a Note Off message on channel 1.cm.data1
contains the note number (cfr.rx.byte2
), andcm.data2
contains the velocity (cfr.rx.byte3
).
Can you upload the code of this maybe is hard to me to fix that code to keep my code and made it work with button code included on rgb code
Can you upload the code of this maybe is hard to me to fix that code to keep my code and made it work with button code included on rgb code
I don't have the code of this, and I don't have time to write it. Please show some effort and try it yourself. The only difference is where the MIDI messages come from, either you get them from MidiUSB.read()
, or the channelMessageCallback()
gives them to you. If you get stuck, you can ask specific questions here.
Hello Petter, I have the code of rgb recived midi signal from Ableton and can change the color by the notes have velocity work like launchpad but i don't know how to add 16 midi buttons code and make it work together ( push the button and light up follow the rgb midi code )