Coder Social home page Coder Social logo

Comments (2)

tttapa avatar tttapa commented on July 20, 2024

The address is always an object of type MIDICNChannelAddress. The constructor takes three parameters: the MIDI address (note/controller number), the MIDI channel, and the MIDI cable number.

The latter two have default values, if you don't specify them, the channel is 1, and the cable number is 0.
You can specify those optional parameters, but you have to add braces to group them:

MIDICNChannelAddress address1 = note(C, 4); // default channel, default cable
MIDICNChannelAddress address2 = {note(C, 4), CHANNEL_1}; // default cable
MIDICNChannelAddress address3 = {note(C, 4), CHANNEL_1, 0}; // no defaults

https://tttapa.github.io/Control-Surface/Doc/Doxygen/d3/d10/classMIDICNChannelAddress.html#af01126768cafcda0d97f3297c65222c7

NoteButton button[] = {
  {mux.pin(0), {note(C, 4), CHANNEL_2}},
  {mux.pin(7), {note(D, 4), CHANNEL_2}},
  {mux.pin(15), {note(E, 4), CHANNEL_2}}
};

MIDINoteLED leds[] = {
  {sreg.pin(1), {note(C, 4), CHANNEL_2}}, // LED pin, address (note number, channel, cable)
  {sreg.pin(9), {note(D, 4), CHANNEL_2}},
  {sreg.pin(17), {note(E, 4), CHANNEL_2}}
};

from control-surface.

kentforth avatar kentforth commented on July 20, 2024

It works very well thank you!

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.