Need help with diy midi controlleer + ws2812b

I have made the 16 buttons with 16 ws2812b leds on arduino leonardo, when i push button and the light not revice the note from button, anyone made this please help me

No code. No schematic diagram. No way for us to help you.

Read the forum guidelines for some advice on asking questions and how to post code.

I have made the 16 buttons midi controller with 16 ws2812b rgb leds on arduino pro micro, when i push the button with note C2, the rgb leds is not recive message from the note C2 of button on ableton to bright, i need help to to fix this. The rgb led can change the color by velocity.

Here is my code, i use button matrix from pin 2 - 8 and the pin of ws2812b arrays is pin 9:

#include <FastLED.h>
// Must be before Control Surface to enable FastLED features of Control Surface
#include <Control_Surface.h>

// Define the array of leds.
Array<CRGB, 16> leds = {};

// The data pin with the strip connected.
constexpr uint8_t ledpin = 9;

USBMIDI_Interface midi;

// The note numbers corresponding to the buttons in the matrix
const AddressMatrix<4, 4> addresses = {{
  {51, 47, 43, 39},
  {50, 46, 42, 38},
  {49, 45, 41, 37},
  {48, 44, 40, 36} 
}};

NoteButtonMatrix<4, 4> buttonmatrix = {
  {2, 3, 4, 5}, // row pins
  {6, 7, 8, 9},    // column pins
  addresses,    // address matrix
  CHANNEL_3,    // channel and cable number
};

// Create a functor that maps the velocity and the index of a note to a color.
struct RainbowColorMapper {
  CHSV operator()(uint8_t velocity, uint8_t index) const {
    return CHSV(255 * index / leds.length, 255, 2 * velocity);
  }
};

// Range from note 36 to 99 (= 36 + leds.length - 1)
NoteRangeFastLED<leds.length, RainbowColorMapper> midileds = {leds, {36, CHANNEL_3}};

void setup() {
  // See FastLED examples and documentation for more information.
  FastLED.addLeds<NEOPIXEL, ledpin>(leds.data, leds.length);
  FastLED.setCorrection(TypicalPixelString);
  midileds.setBrightness(128);
  Control_Surface.begin();
}

void loop() {
  Control_Surface.loop();
  FastLED.show();
}

Why start a new thread instead of adding to the original post on the question?

Topics merged

@Tom4D - I do not know whether you did it on purpose or by accident but do not a start new topic on a problem being replied to in an existing topic

We've had the same discussion here: https://github.com/tttapa/Control-Surface/issues/68

Pieter

you can follow the tutorial from musicnerd to build a MDI controller https://www.musiconerd.com/single-post/Build-this-MIDI-controller-Fliper-Dj

PieterP: We've had the same discussion here: https://github.com/tttapa/Control-Surface/issues/68

Pieter

yeah i know that, but need someone one have solution for it.