Giter VIP home page Giter VIP logo

Comments (7)

tttapa avatar tttapa commented on May 23, 2024

I added an example, but I haven't tested it yet.

from control-surface.

zley1 avatar zley1 commented on May 23, 2024

thnx!! but how do i choose the notes for each bank? i want to have different scales for playing melodies.

from control-surface.

tttapa avatar tttapa commented on May 23, 2024

That's currently not supported. But I'm in the process of adding the code for it.

from control-surface.

zley1 avatar zley1 commented on May 23, 2024

from control-surface.

tttapa avatar tttapa commented on May 23, 2024

I added ManyAddresses::NoteButtonMatrix, but I don't have time at the moment to add the LEDs.

from control-surface.

panakronic avatar panakronic commented on May 23, 2024

Hi

I have 4 banks with two butons for changing banks. Please see example MIDI_controller-97.

My question: Is is possible to use RGB LED strip with 4 pre-defined colors instead of 4 seperate LED of different color? I am currently using a 5mm 4-pin RGB LED bulb and it allows me only 3 color changes - Red, Green and Blue. How can I add one or more colors?

from control-surface.

tttapa avatar tttapa commented on May 23, 2024

The LED outputs for the Selectors are defined here:

template <setting_t N>
class SelectorLEDsCallback {
public:
SelectorLEDsCallback(const PinList<N> &ledPins) : ledPins{ledPins} {}
/// Initialize.
void begin() {
for (pin_t pin : ledPins) {
AH::ExtIO::pinMode(pin, OUTPUT);
AH::ExtIO::digitalWrite(pin, LOW);
}
}
/// Refresh, called periodically.
void update() {}
/// Called when the setting changes.
void update(setting_t oldSetting, setting_t newSetting) {
AH::ExtIO::digitalWrite(ledPins[oldSetting], LOW);
AH::ExtIO::digitalWrite(ledPins[newSetting], HIGH);
}
private:
PinList<N> ledPins;
};

You can easily write your own callback to drive the LEDs the way you want. Then you just pass your callback class to the Generic***Selector template classes, as shown in further down in the file mentioned earlier.

from control-surface.

Related Issues (20)

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.