Comments (9)
Changing noteNames
doesn't change the addresses of the buttons.
I think what you need is the ManyAddresses::NoteButton
.
That's the best way to do it if you need arbitrary addresses.
If you just want to transpose everything by the same amount of semitones, it's best to use the Bankable::NoteButton
class combined with a Transposer
.
from control-surface.
Can you show me some examples of ManyAddresses::NoteButton
?
from control-surface.
In addition, Is it possible to make when you press button 1, you increase one octave, when you press button 2, you go one octave down, when you press button 3, you can change the major order (F-C-G-D-A-E-B to Gb-Db-Ab-Eb-Bb-Fb-C), when the button 4 is pressed, return the majors in order?
(sorry this is translated comment, so it can be strange.)
from control-surface.
Sure, basically, you create a custom class that has a lock
, unlock
and getActiveAddress
method.
Lock and unlock ensure that the note number doesn't change while the button is pressed (otherwise the note off event will be sent to a different address, leaving the original note playing forever).
GetActiveAddress returns the right address, in your case, the address of the right note (F or Gb) plus or minus one octave.
ManyAddresses
is a class that handles a list of alternative addresses, and BankableMIDIOutput
is a class that adds an offset to a given address, so both are combined:
Then you just pass it as the first template argument to the Bankable::MIDIButton
class.
It looks scary, but it's all just glue between existing classes. You probably don't have to change that file.
What you do have to change is the note numbers etc. in the main sketch:
https://github.com/tttapa/Control-Surface/blob/8ebcc4dcfecbc6c002e3e57be6c85a85973fe2d3/examples/Other/GitHub-issues/Note-ManyAddresses-Transposer/Note-ManyAddresses-Transposer.ino
from control-surface.
That looks really nice, I'll try it.
I really love you and this library!
from control-surface.
Oh, by the way, if you're not seeing any MIDI output, that could be because the sketch uses a USBDebugMIDI_Interface
, it prints the MIDI message in a readable format to the serial monitor. You can change it to a USBMIDI_Interface
if you want.
from control-surface.
Can I ask one more question?
When there is a Bank , is it possible to press the button to go to the last bank and press the button again to return to the previous bank?
from control-surface.
Not sure what you mean.
The Bank
class has a select
method that you can call directly: https://tttapa.github.io/Control-Surface/Doc/Doxygen/db/dbd/classBank.html#ab4b91b7f4363e5e497b34e17a303bdbb
There are some included Selector
s that can manage a Bank
, based on the input from push buttons or rotary encoders etc. https://tttapa.github.io/Control-Surface/Doc/Doxygen/d0/d0c/group__Selectors.html
from control-surface.
It works very nice, thanks!
from control-surface.
Related Issues (20)
- Bankable::ManyAddresses::CCAbsoluteEncoder HOT 2
- Time Display does not work.
- Does it's support ESP32-S3/C3 via USB port? HOT 7
- How to use 1 shift button to change bank:
- The sketch compiles, but doesn't work HOT 3
- Error when compiling for ESP32 S3 HOT 3
- Metronome Led HOT 3
- Trying to setVelocity for all notebutton values in mux with piezo device HOT 1
- External app/webpage to change CC and Channel values HOT 1
- Hi, I would like to see the USBMIDI_Interface adapted so that you can specify the fixed cablenumber. This would it make possible to use pipes and filters connecting serial ports with virtual usb ports
- Support for MCP23S17 SPI
- error: 'SelectorPC' does not name a type HOT 2
- Switching presets Roland FP-30X HOT 2
- TYPO IN DOCUMENTATION HOT 1
- Error running on M1 Mac Sonoma with Teensy 4.0 HOT 4
- Arduino Nano 33 BLE Support? HOT 3
- Пример CCIncrementDecrementButtons.ino HOT 10
- Select bank HOT 2
- MIDI-монитор-OLED HOT 3
- Arduino Giga R1 Wifi support 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 control-surface.