Arduino Axe-Fx control library

Hey,

in my case I'm using ie. COMP1, CHORUS1 to change bypass and effect channel.
I tried to roll over the effects, but the id of the effects is different from preset to preset. So I gave up to get the active channel of each effect.

Greetings
 
Hey,

in my case I'm using ie. COMP1, CHORUS1 to change bypass and effect channel.
I tried to roll over the effects, but the id of the effects is different from preset to preset. So I gave up to get the active channel of each effect.

Greetings
Yes, it changes from preset to preset, but! howmany are you using? i am using 19 , but am showing only 10 on the screens.
To work around, you can make your own variable for the effect.
In my case: i used byte effect1, effect2 up to 19 etc.. ;

For instance: loop the effectindex

switch (effectindex)
{
case 1: / the first effect from the loop
effect1 = (effect.getEffectId()); set this effect to your variable (in my case effect1)

Now you can do whatever you want, because the effectId from case 1 is stored in effect1.

If you repeat this for all your effects, you are in control
With every new preset or Axe.fetchEffects() query, the variable will be overwritten, but all would be used again.

But to think of it:
This could be a problem if you cannot see what the effect is if you don't show its name somewhere. An LCD or TFT is needed for this i guess.

NOTE: this may not be the way how the PRO's would do it... but its convenient and it works ;)

Cheers
 
Don’t confuse the effect index with the effect ID. The index is just the loop index, so it will change depending on which effects are active. To check the identity of the effect, you have to compare the effect ID with the list from Fractal (ID_COMP1 etc)
 
Don’t confuse the effect index with the effect ID. The index is just the loop index, so it will change depending on which effects are active. To check the identity of the effect, you have to compare the effect ID with the list from Fractal (ID_COMP1 etc)
Hey there

Yes that is correct. That is exactly how i approach the code. I am looping through the index and grabbing the effectID to store in a variable.. this way i can work screen and button independent. When pushing a button it will correspond with the value stored in the variable. It updates on every new preset or scene selection.

Cheers
 
Can you post the code of your effects filter?
Hey there,

Here are the filters i use. i have 2 pages with different filters.
Page 1: Effects filter
Page 2: Amp-Cab filter

//Serial.println("On effect filter");
//only show drives, reverbs, and delays etc.
bool onEffectFilter(const PresetNumber number, AxeEffect effect) {

if (strcmp(page, "AMP_effect") != 0)

{
return effect.isDrive() || effect.isDelay() || effect.isPhaser() ||
effect.isChorus() || effect.isPitch() || effect.isReverb() ||
effect.isCompressor() || effect.isFlanger() || effect.isMultitap() ||
effect.isMulticomp() || effect.isLooper() || effect.isWah();
}
else
{
return effect.isDistort() || effect.isCab();
}
}

On AxeEffect.cpp i have this entry for the Distort:
bool AxeEffect::isDistort() {
return (_effectId >= ID_DISTORT1 && _effectId <= ID_DISTORT4);
}

As discussed in earlier post, the isDistort() would be the AMP1-AMP4

I have a workaround for AMP1 by using the effectID no 58, but this is hard coded, so not flexible to let the program decide where to put this effect. I did manage to get the active channel and changing channel working on this effect, so basicly i am covered. Just that AMP1 is not returned from the axe-fx is a bug i guess.


GITHUB:
Question about your mentioning Github. Do i make a request in your github or are you suggesting me to create one for my own and post the code? I will have to digg in how to even use Github, but sure if that would help i could do that.


Cheers
 
Hmm that is odd. I will have to dust off my old arduino project to check it out.

re git, using source control will save your sanity! It is pretty easy to get started if you use GitHub desktop, and add your project to a repository. Then you can just post a link to the whole code. It’s pretty hard to see what’s happening otherwise.
 
Hmm that is odd. I will have to dust off my old arduino project to check it out.

re git, using source control will save your sanity! It is pretty easy to get started if you use GitHub desktop, and add your project to a repository. Then you can just post a link to the whole code. It’s pretty hard to see what’s happening otherwise.
Hey there @tysonlt

i have posted the code on github. Here is the link to the code that is grabbing the Effects from the AxeFxIII:
https://github.com/Axelman8/Pari_V4...c1c8bb9c4f0e6d414bfe/axe_handler.h#L893-L1159

And for the information on the screens of the AMP and CAB page:
https://github.com/Axelman8/Pari_V4...1c8bb9c4f0e6d414bfe/axe_handler.h#L1165-L1259

This code gets all effects that i need, only the return of: effect.isDistort() doesnt return AMP1

In the attachment is the backup of the AxeEffect.CPP and .h file that i have replaced in the AxeController library.

Thank you in advance for looking into this

Cheers
 

Attachments

Hey there @tysonlt

Today i started debugging the code to get AMP1 showing as an effect. While debugging, i also discovered that CHORUS1 is not showing.
I am using the onEffectFilter(); function like this:

=======
bool onEffectFilter(const PresetNumber number, AxeEffect effect) {

if (strcmp(page, "AMP_effect") != 0)

{
return effect.isCompressor()|| effect.isReverb()|| effect.isDelay() || effect.isPhaser() || effect.isPitch() || effect.isFlanger() ||
effect.isChorus() || effect.isLooper() || effect.isWah() || effect.isMultitap() || effect.isMulticomp() || effect.isDrive();
}
else
{
return effect.isDistort() || effect.isCab();
}
}
=========
I left out the AMP and the CAB, because those are only usefull in another screen.

--> I found a solution for CHORUS1
After several tryouts, i found out that if i put effect.isCAB(); or effect.isDistort(); (one of the two) back in the 1st filter, CHORUS1 is showing again.
I guess this has similar effect for the amp1 block not showing by adding another effect in the filter, but i havnt discovered it yet.


Hope this gives you a hint on what could be the problem in the effectfilter?


I will keep debugging to find the actual solution.

Cheers
 
Last edited:
Hi Tysonlt,

Stumbled on this thread by mistake - but have read with excited interest until I realised it was for the AxeFX3.
Gutted.
I cut my teeth on Arduino but writting a sketch to control my Teensy 3.6 based Midi Foot Controller but for AxeFX2.
It works - but it's by no means super sleak.
And tbh still dont fully understand everything i put in it.
My biggest gripe is its quite slow to update the display between presets.

Apprecaite the 2 & 3 are different beasts & also don't appear to even use common sysex ID's.

But any idea how I would go about "butchering" your library to work on the 2?
 
Hi, I haven’t got a 2 so I wouldn’t be able to test it, and I think the midi implementation is quite different. This was more of a hobby project for me to help me make a foot controller for the 3. I’m sure there would be a few libraries around for the 2.
 
Thanks Tyson for doing this. I'm also FCB_Infinity implementer. I built one with Teensey 3.1 for my AxeFx2 probably 7 or 8 years ago and used it live plenty of times without issue.

I would like to get it working with my FM3. I've noticed examples so far show how to do SysEx and Program Changes but how do you do Control Changes?

I have my expression pedals working now with Control Changes and I guess I can use SysEx for everything else.

I have this so far in my .ino file:

#define FM3_MIDI_CHAN 1
#define FM3_DEFAULTCC_External_Control_1 16
#define FM3_DEFAULTCC_External_Control_2 17

// Expression Pedal 1
if (ExpPedal1.hasChanged()) {
Axe.sendControlChange(FM3_DEFAULTCC_External_Control_1, ExpPedal1.getValue(),FM3_MIDI_CHAN);
}

And it works!! Any comments on how you handle this type of thing?
 
Hi , I’m not sure what you’re asking.... are you wondering how to get CC working, or do you already have it working?
 
Sorry about that. When I started writing the post, I didn’t know how to do CC’s but by the time I finished the post I had it working. Then I was just wondering if that is how you would do it or would you put the define statements in a header file.

With FM3 and probably AxeFx3 their isn’t any default CC’s so I guess CC’s are custom to the user and not something you would include as header files but I think I might like to make a header file to define them. Just trying to clean up my code.
 
Oh cool. Yes defines are your friend. I tend to put them all in one separate file so you’ve got one place to see all your settings. It’s convenient to make them all caps so you can remember what’s a define and what’s a variable, but really it’s just got to make sense to you!
 
Not sure what I am doing wrong. Shouldn't the following command toggle the effect at effect index 0?

Axe.toggleEffect(0);
 
I see I need to use EffectID for Axe.toggleEffect() like

Axe.toggleEffect(ID_COMP1);

is there another way to toggle an effect block on/off?
 
Back
Top Bottom