Comments (21)
Hi,
The RotaryEncoder
class has been renamed to CCRotaryEncoder
.
The interface has been changed as well, you can find the documentation for it here:
https://tttapa.github.io/Control-Surface/Doc/Doxygen/d3/d62/classCCRotaryEncoder.html
My apologies for the lack of proper examples or better documentation, the library has gotten really huge, and I have to find ways to combine working on it with my studies.
from control-surface.
from control-surface.
I'm in Belgium, it's 11:11 am here, no worries :)
from control-surface.
i have tried everything to get the rotary encoder working with no luck
either i have the incorrect encoder.H library or i am writing the code incorrect to create a new instance of CCRotaryEncoder
any help with an example would be greatly appreciated
also in the MCU protocol what midi message is it sending out for the VU meters
im hoping i can just send the midi data from cubase (which i can set the type of midi message on) to the controller and get the vu on a shift register working
from control-surface.
I added a rotary encoder example: https://tttapa.github.io/Control-Surface/Doc/Doxygen/d3/d15/CCRotaryEncoder_8ino-example.html
also in the MCU protocol what midi message is it sending out for the VU meters
It uses MIDI Channel Pressure events: the high nibble of the data byte is the track (0-7) and the low nibble is the value (0x0-0xC) or clear overload (0xF) or set overload (0xE). 0xD has no meaning.
from control-surface.
ok looking at the code you have put up it i would have to use the mcu mapping
is there any way for me to set specific channels and addresses like we could before?
so i can use the generic mapping in cubase
RotaryEncoder encoder(2, 3, 0x14, 1, speedMultiply, NORMAL_ENCODER, TWOS_COMPLEMENT);// comes through as a controller on channel 1,address 20
or has this all changed?
i.e.
CCRotaryEncoder enc ={
{2, 3},
MIDI_CC::Pan, CHANNEL_1,
1,
4,
};
The Reason for me to do this is i can do alot more through the generic program function in cubase
even create banks and flip modes
from control-surface.
this code below works
CCRotaryEncoder enc ={
{2, 3},
MIDI_CC::Pan,
1,
4,
};
it functions well and comes though to cubase on Channel 1 address 10
but i cant change channel number
from control-surface.
You have to add curly braces, the address is a single parameter:
CCRotaryEncoder enc ={
{2, 3},
{MIDI_CC::Pan, CHANNEL_1},
1,
4,
};
from control-surface.
Using the generic controller function is also why i was asking about the vu meters
when i set it to a Mackie controller in cubase my Vu meter works
but i cant set a specific channel and address in the code to use with the generic controller
from control-surface.
from control-surface.
Ok that makes sense
it compiles now
you are an awesome dude
How did you go with finding some Arduino Nano Boards to test out your faders????
from control-surface.
when i set it to a Mackie controller in cubase my Vu meter works
but i cant set a specific channel and address in the code to use with the generic controller
Could you check what kinds of messages Cubase sends? The easiest way is to use a MIDI monitor on you computer, alternatively, enable debugging information in Settings.hpp: uncomment lines 17 and 19.
How did you go with finding some Arduino Nano Boards to test out your faders????
I started working on it, but I don't have the right hardware here right now.
from control-surface.
Can you suggest a MIDI monitor to try
i have midi ox installed but it wont get anything from cubase
Feel free to Face time me on [email protected] so you can see it all
from control-surface.
I use MIDI Snoop on Linux, but any monitor that runs on your platform should work.
Edit: it seems that the MIDISnoop domain has expired, and is now just spam. It's still in the repositories though: https://packages.ubuntu.com/bionic/sound/midisnoop
from control-surface.
hmmmmm i tried the debug but it wouldnt compile and just had errors
and for some reason the midi monitor wont connect when cubase is running
from control-surface.
Did you pull the latest version of the library?
from control-surface.
yep yesterday
from control-surface.
I pushed another change this morning, that should have fixed the debug issues.
Did you install the library using git? https://tttapa.github.io/Control-Surface/Doc/Doxygen/d4/d6d/md_Installation.html
In that case, you can just do git pull
to update to the latest version.
from control-surface.
i have just downloaded the new version
it compiles
and i have put the USBDebugMIDI_Interface into the code but it doesnt seem to do anything
still works as a controller though
i might have to give up for the night,
have good day pete
Here is what i have so far
#include <Encoder.h>
#include <Control_Surface.h>
// Instantiate a MIDI over USB interface.
USBMIDI_Interface midi;
USBDebugMIDI_Interface midiInterface(115200);
const pin_t dataPin = 12; // Pin connected to DS of 74HC595
const pin_t clockPin = 13; // Pin connected to SH_CP of 74HC595
const pin_t latchPin = 10; // Pin connected to ST_CP of 74HC595
// Create a new shift register output connected to pins 12, 13 and 10,
// shift the data out with the most significant bit first.
// There are 8 outputs in total.
ShiftRegisterOut<12> sr(dataPin, clockPin, latchPin, MSBFIRST);
Channel channel = CHANNEL_1;
// Note: a VU meter of 12 LEDs will give the best effect, because
// in the MCU protocol, there are 12 values
MCU::VULEDs<12> vu = {
{0x01, channel},
{{
sr.pin(0),
sr.pin(1),
sr.pin(2),
sr.pin(3),
sr.pin(4),
sr.pin(5),
sr.pin(6),
sr.pin(7),
sr.pin(8),
sr.pin(9),
sr.pin(10),
sr.pin(11),
}},
150, // decay time in milliseconds or MCU::VU::NO_DECAY
};
// Create a new instance of the class CCPotentiometer
, called potentiometer
,
// on pin A0, that sends MIDI messages with controller 7 (channel volume)
// on channel 1.
CCPotentiometer potentiometer(A0, {MIDI_CC::Channel_Volume, CHANNEL_1});
CCRotaryEncoder enc = {
{2, 3},
{MIDI_CC::Pan, CHANNEL_1},
1,
4,
};
using namespace MIDI_Notes;
// Instantiate the momentary push buttons that send out MIDI Note events.
NoteButton buttons[] = {
{22, {note(C, -1), CHANNEL_1}},
{23, {note(Db, -1), CHANNEL_1}},
{24, {note(D, -1), CHANNEL_1}},
{25, {note(Eb, -1), CHANNEL_1}},
{26, {note(E, -1), CHANNEL_1}},
{27, {note(F, -1), CHANNEL_1}},
{28, {note(Gb, -1), CHANNEL_1}},
{29, {note(G, -1), CHANNEL_1}},
{30, {note(Ab, -1), CHANNEL_1}},
{31, {note(A, -1), CHANNEL_1}},
{32, {note(Bb, -1), CHANNEL_1}},
{33, {note(B, -1), CHANNEL_1}},
{34, {note(C, 0), CHANNEL_1}},
{35, {note(Db, 0), CHANNEL_1}},
{36, {note(D, 0), CHANNEL_1}},
// If you want to set the channel specifically, you can use:
// {2, {note(C, 4), CHANNEL_1}},
};
MIDINoteLED leds[] = {
{40, {note(E, 2), CHANNEL_1}},
{41, {note(F, 2), CHANNEL_1}},
{42, {note(Gb, 2), CHANNEL_1}},
{43, {note(G, 2), CHANNEL_1}},
{44, {note(Ab, 2), CHANNEL_1}},
{45, {note(A, 2), CHANNEL_1}},
{46, {note(Bb, 2), CHANNEL_1}},
{47, {note(B, 2), CHANNEL_1}},
{48, {note(C, 3), CHANNEL_1}},
{49, {note(Db, 3), CHANNEL_1}},
{50, {note(D, 3), CHANNEL_1}},
{51, {note(Eb, 3), CHANNEL_1}},
{52, {note(E, 3), CHANNEL_1}},
{53, {note(F, 3), CHANNEL_1}},
};
void setup() {
// Initialize everything
Control_Surface.begin();
}
void loop() {
// Update the Control Surface (check whether the potentiometer's
// input has changed since last time, if so, send the new value over MIDI).
Control_Surface.loop();
}
from control-surface.
Keep the USBMIDI_Interface, don't use the debug interface, just enable debugging in Settings.hpp, see the link in a previous reply: #13 (comment)
Then open the Serial monitor and check the incoming messages (prefixed with >>>).
from control-surface.
all good close this issue if you want as the encoder is working well
i will start a new one for debugging
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
- Arduino UNO R4 support and testing HOT 3
- Arduino Yun HOT 2
- 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.