Open benwadub opened 4 years ago
oh I found the problem! I have a2 button to manage my banks and added the same button to the mcu bank change but In wraps/wraps mode :-( so my banks displayed was never the same as the bank that was modified by the mute in Ableton! now all is working fine! and you know that push button can manage control surface bank at the same time as mcu bank but the have to be in wrap/clamp mode! thanks again!
hi Pieter, hope you are fine! I made working my screen nicely now I try to understand how to adapt it to my needs, I set Ableton to receive and send cc94 for mute, how can I write the code for my display get state of cc number 94 instead of
NoteBitmapDisplay muteDisp[] = {
{display, mute[0], XBM::mute_10B, {10, 13}, WHITE},```
like in your exemple
I thought writing it like this could work?
{display, {94, CHANNEL_1}, XBM::mute_10B, {10, 13}, WHITE},
Please see my previous reply:
The
NoteBitmapDisplay
doesn't do any MIDI related things, so94, CHANNEL_1
is meaningless in that context.You need two things: 1. a
NoteValue
object that listens for MIDI messages on the given address, and 2. aNoteBitmapDisplay
to display the values that are stored by theNoteValue
object.// Mute Bankable::NoteValue<2> mute[] = { {bank, {94, CHANNEL_1}}, {bank, {94, CHANNEL_2}}, // ... }; NoteBitmapDisplay muteDisp[] = { {display, mute[0], XBM::mute_10B, {10, 13}, WHITE}, {display, mute[1], XBM::mute_10B, {10, 13}, WHITE}, // ... };
If you want to use MIDI control change instead of notes, use CCValue
instead of NoteValue
.
sorry I didn't t understood all, English is not my native language so sometimes I don t understand all very well! so I send my mute like this:
Bankable::CCButtonLatched<2> mute[] = {
{{bank,BankType::CHANGE_ADDRESS}, mux5.pin(0), {94, CHANNEL_1}},//numéro de bank correspondant/indique que le changement de bank change le canal midi (+8 car on a 8 adresses par bank)/pin sur laquelle le controleur est branché/numéro de cc/numéro de canal midi
{{bank,BankType::CHANGE_ADDRESS},mux5.pin(1), {94, CHANNEL_2}},
{{bank,BankType::CHANGE_ADDRESS},mux5.pin(2), {94, CHANNEL_3}},
{{bank,BankType::CHANGE_ADDRESS},mux5.pin(3), {94, CHANNEL_4}},
{{bank,BankType::CHANGE_ADDRESS},mux5.pin(4), {94, CHANNEL_5}},
{{bank,BankType::CHANGE_ADDRESS},mux5.pin(5), {94, CHANNEL_6}},
{{bank,BankType::CHANGE_ADDRESS},mux5.pin(6), {94, CHANNEL_7}},
{{bank,BankType::CHANGE_ADDRESS},mux5.pin(7), {94, CHANNEL_8}},
};```
how does the bitmap display should be written please.
First you need a CCValue
object to receive the MIDI data from Ableton:
Bankable::CCValue<2> muteAbltn[] = {
{{bank, BankType::CHANGE_ADDRESS}, {94, CHANNEL_1}},
{{bank, BankType::CHANGE_ADDRESS}, {94, CHANNEL_2}},
// ...
};
Then you need a NoteBitmapDisplay
object to display the value you received:
NoteBitmapDisplay muteDisp[] = {
{display, muteAbltn[0], XBM::mute_10B, {10, 13}, WHITE},
{display, muteAbltn[1], XBM::mute_10B, {26, 13}, WHITE},
// ...
};
ohhhh yeahhhh thanks!! I finally understand! I was misunderstanding the cc value receiver and the cc I sent from my controller! all is clear now and that compile! now I ll be able to get away from the MCU and be able to use the Ableton script I made without using the MCU script except to receive theme display
a last question for tonight :-) why does this don t work for play and rec button with ccvalue?
CCValue play = {103, CHANNEL_1};
CCValue record = {104, CHANNEL_1};```
The MIDI address is a single argument, so you have to group it using braces:
CCValue play = {{103, CHANNEL_1}};
thanks!! a lot! for the time display in MCU do you know how that work? MCU receive midi time code and show it on display? do you know if that s possible to receive it without using MCU?
No, it doesn't use MIDI Time Code, the time is sent as text using Control Change messages. The implementation is as follows:
Also see page 116 of https://images.thomann.de/pics/prod/151261_manual.pdf.
wow thanks I ll look at it tomorrow at first read it s like Chinese for me!! don t know how I ll take theses informations from the daw!
hi pieter do you know why i need every time I start my midi controller everything works but not my displays, I always need to reboot the teensy to get the display working, at first boot the screen stay black but as soon as I reboot all is running fine?
// ----------------------------- Display setup ------------------------------ //
// ========================================================================== //
/*
Instantiate and initialize the SSD1306 OLED display
*/
constexpr uint8_t SCREEN_WIDTH = 128;
constexpr uint8_t SCREEN_HEIGHT = 64;
constexpr int8_t OLED_DC = 22; // Data/Command pin of the display
constexpr int8_t OLED_reset = -1; // Use the external RC circuit for reset
constexpr int8_t OLED_CS = 10; //wired on 13
constexpr uint32_t SPI_Frequency = SPI_MAX_SPEED;
// Instantiate the displays
Adafruit_SSD1306 ssd1306Display = {
SCREEN_WIDTH, SCREEN_HEIGHT, &SPI, OLED_DC,
OLED_reset, OLED_CS, SPI_Frequency,
};
// --------------------------- Display interface ---------------------------- //
// ========================================================================== //
// Implement the display interface, specifically, the begin and drawBackground
// methods.
class MySSD1306_DisplayInterface : public SSD1306_DisplayInterface {
public:
MySSD1306_DisplayInterface(Adafruit_SSD1306 &display)
: SSD1306_DisplayInterface(display) {}
void begin() override {
delay(200);
// Initialize the Adafruit_SSD1306 display
if (!disp.begin())
FATAL_ERROR(F("SSD1306 allocation failed."), 0x1306);
// If you override the begin method, remember to call the super class method
SSD1306_DisplayInterface::begin();
}
void drawBackground() override { disp.drawLine(1, 8, 126, 8, WHITE); }
} display = ssd1306Display;
CD74HC4067 mux1 = {
14, // numéro de broche de l'arduino
{9, 3, 4, 5} // numéro de pins de l'arduino sur lesquels sont branchés tous les multiplexeurs apellés mux S0, S1, S2
};
@tttapa i think you didn’t see this question, I didn’t wanted to open a new issue for this problem
hi, again me, I d like to add the ssd 1306 display I just received to my controller but can t find how to adapt the exemple code to my teensy 4.0, no problem to wire and and vcc but how to wire the scl sda res and dc pins of the screen and how to write it in the code, I can t find in your exemple code the screen pins, I just see dc pin reset and cs that I don t have on my screen