Comments (4)
Note that your code has several errors:
- Your multiplexers have only 4 address pins, so use multiple
AnalogMultiplex
objects. - Use
Digital
objects for buttons, notAnalog
. - You can't use the same pins for rotary encoders.
#include <MIDI_Controller.h>
const int speedMultiply = 1;
//BUTTONS
AnalogMultiplex multiplexers[] = {
{A0, {10, 11, 12, 13}},
{A1, {10, 11, 12, 13}},
{A2, {10, 11, 12, 13}},
// ...
};
Digital buttons[] = {
{ multiplexers[0].pin(0), 0x1, 1 },
{ multiplexers[0].pin(1), 0x2, 1 },
{ multiplexers[0].pin(2), 0x3, 1 },
// ...
{ multiplexers[1].pin(0), 0x11, 1 },
{ multiplexers[1].pin(1), 0x12, 1 },
// ...
{ multiplexers[2].pin(0), 0x21, 1 },
// ...
};
//FADERS
AnalogMultiplex multiplexerF(A3, {10, 11, 12, 13} );
Analog potentiometersF[] = {
{ multiplexerF.pin(0), 0x1, 3 },
{ multiplexerF.pin(1), 0x2, 3 },
{ multiplexerF.pin(3), 0x4, 3 },
{ multiplexerF.pin(4), 0x5, 3 },
{ multiplexerF.pin(5), 0x6, 3 },
{ multiplexerF.pin(6), 0x7, 3 },
{ multiplexerF.pin(7), 0x8, 3 },
{ multiplexerF.pin(8), 0x9, 3 },
{ multiplexerF.pin(9), 0xA, 3 },
{ multiplexerF.pin(10), 0xB, 3 },
{ multiplexerF.pin(11), 0xC, 3 },
{ multiplexerF.pin(12), 0xD, 3 },
{ multiplexerF.pin(13), 0xE, 3 },
{ multiplexerF.pin(14), 0xF, 3 },
{ multiplexerF.pin(15), 0x10, 3 },
};
//ENCODERS
RotaryEncoder enc0 = {0, 1, 0x1, 4, speedMultiply, NORMAL_ENCODER, TWOS_COMPLEMENT};
RotaryEncoder enc1 = {2, 3, 0x2, 4, speedMultiply, NORMAL_ENCODER, TWOS_COMPLEMENT};
// ...
void setup() {}
void loop() {
MIDI_Controller.refresh();
}
from midi_controller.
An advantage of the MIDI Controller library is that it's easy to use and very flexible. This comes at a cost, of course: it uses more memory.
You can either write your own code from scratch, or you could use a board that has more RAM, like a Teensy.
from midi_controller.
I love teensy 3.6 <3
Archiving built core (caching) in: C:\Users*\AppData\Local\Temp\arduino_cache_336804\core\core_teensy_avr_teensy36_usb_serialmidi,speed_180,opt_o2std,keys_en-us_4939f5412a75a8560acb0f9e98268f02.a
Opening Teensy Loader...
Sketch uses 34528 bytes (3%) of program storage space. Maximum is 1048576 bytes.
Global variables use 15764 bytes (6%) of dynamic memory, leaving 246380 bytes for local variables. Maximum is 262144 bytes.
from midi_controller.
Thanks for the comments.
I decided to buy a Tennsy 3.5. With Tennsy I don't have to use double-level multiplexer system, because it has lot of input pins.
from midi_controller.
Related Issues (20)
- Is the Nano Every board compatible? HOT 3
- How to Echo MIDI IN to MIDI OUT? HOT 2
- no response when change banks and instruments HOT 11
- USB host arduino uno HOT 1
- Use Momentary as Toggle HOT 2
- Potentiometer mapping - unable to use full range of potentiometer HOT 1
- Problem to reload the code HOT 19
- Documentation HOT 1
- Mapping logarithmic potentiometers to linear curve HOT 2
- Create 4 midi banks controlled by 1 potentiometer HOT 3
- [Feature request] Can you add support for piezo inputs? HOT 1
- Octave change for multiplexer buttons HOT 4
- Cant upload encoder exmple to arduino mega HOT 1
- Why return MidiUSB.read().header != 0 in USBMIDI_Interface::refresh class ? HOT 1
- Can I use the analog multiplexer library of 8, to connect one of 16? HOT 1
- Connecting multiple multiplexers to analog inputs for micro HOT 2
- Can the name of the board be changed? HOT 8
- Conect 2 or more buttons to a single led HOT 19
- How to send midi over serial HOT 2
- unsupported board: Adafruit Bluefruit Feather nRF52840 Express HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from midi_controller.