Arduino Axe-Fx control library

Thank you for sharing the code.

I am starting to study it, but I cannot find the file "SC_multiplexer.h" (included in InputManager.h)
Here is my platformio.ini:

[env:teensylc]
platform = teensy
board = teensylc
framework = arduino
upload_protocol = teensy-cli
lib_deps =
PaulStoffregen/ST7735_t3
PaulStoffregen/ShiftPWM
JChristensen/Timer
thijse/Arduino-EEPROMEx
tysonlt/Simple_Controls
tysonlt/AxeFxControl
 
Thank you!

After having solved the issue with the EEPROMEx library by replacing "Wprogram.h" with "Arduino.h", I have the sketch compiling correctly for Arduino Mega.

I've just ordered the TLC5940 and CD74HC4067 multiplexers and a ST7735 display. Once its working, I will move to a Nextion Touch Screen and 16 switches
 
Last edited:
With the example "Preset Details" I got the data when the preset is changed, but the current Scene Name is not refreshed when the scene is changed, only the SceneNumber is refreshed. How can I get the current Scene Name on SceneChange?
Or do I have to fetch all SceneNames on PresetChange and call the current one using the SceneNumber?
 
Last edited:
Hi Piing, away from computer at the moment, but the scene name is included in the preset object passed to the preset change callback. You have to copy it into a buffer, it’s called copySceneName or something like that
 
Do you have 'Send MIDI PC' enabled in the MIDI/Remote menu?

Currently the library relies on this to detect changes and trigger refresh. The problem was that if the library automatically refreshes when you send a command, you will also get a refresh after the Axe send the PC notification, resulting in double refresh. Not a huge problem but can slow things down. I opted to make it rely on MIDI PC from the Axe, and intended to document it one day :)

I might add a setting to tell it to either rely on the Axe to tell us when the preset has changed, or to ask when we send a command.
 
I've got it!! I was missing this line on void setup()
Code:
Axe.enableRefresh(AXE_REFRESH_RATE);
Now the Current Scene Name is always refreshed
I've got it 2 times, but that is not an issue
Thank you!
 
Ah yes, I always have that on, haven't done much testing without it!

Regarding getting it twice, could you please send me the code you are using? Are you getting two preset change callbacks?
 
I attach the latest version of my code.
Yes, I have Send Midi PC enabled on CHAN1 at the Axe-FX
 

Attachments

  • Axe3Controller_V7.0.zip
    4.8 KB · Views: 28
All looks good! A couple of tips:

* Make sure you call Axe.update() every time you change the scene. Axe won't notify us of this, we have to ask.

* You don't need onPresetName() if you are using onPresetChange().

* By default, effect list retrieval is now turned off. Call Axe.fetchEffects(true) to get the list with the preset.

* I would avoid using delay() for debouncing. A delay could cause the RX buffer to fill up before we can read the sysex messages. I have a simple library to do easy debounce: https://github.com/tysonlt/Simple_Controls or any other debounce lib will be good.

* Same with flashing the led, I use https://github.com/JChristensen/Timer for this:

Code:
void onTapTempo() {
  //turn on led...
  timer.after(TAP_TEMPO_LED_DURATION, turnOffTapTempoLed);
}

void turnOffTapTempoLed() {
  //turn off led
}

Looks great though!
 
Thank you very much for the tips!
I've never studied programming. I'm learning by trial and error :)
 
Thank you very much for the tips!
I've never studied programming. I'm learning by trial and error :)

I hope you don't mind, but I made some changes to show you an example of doing this without using delay(). Using the button library means you don't have to do debounce with delay() and don't need to maintain global state.

I also changed the led flash to use the timer library instead of delay().

I haven't tested this though!!
 

Attachments

  • Axe3Controller_V7.0.zip
    4.4 KB · Views: 18
I hope you don't mind, but I made some changes to show you an example of doing this without using delay(). Using the button library means you don't have to do debounce with delay() and don't need to maintain global state.

I also changed the led flash to use the timer library instead of delay().

I haven't tested this though!!

Sorry, I missed that post. That is much more refined, indeed. I am learning a lot from it. I will keep working from there.

Thank you very much!
 
Last edited:
You are most welcome. Just didn't want to offend you by changing your code - it was pretty good as it was!

What part of Thailand are you from? My parents lived in Mae Sot for a few years...
 
Back
Top Bottom