Arduino Axe-Fx control library

Ya. I don't know how to turn an effect on or off in the preset's effect list.

Here's what I'm trying to achieve. I have FCB1010 which I used FCB_Infinity code years ago to control AxeFx2. I would like to get it working with FM3. Here's what works so far:
1. Expression Pedals
2. TapTempo/Tuner
3. Preset Inc/Dec
4. Scene Change
5. Led's to indicate which effects are engaged in a preset and they update when scene or preset changes.

So, now I am trying to get foot switches to turn off/on effect blocks and get the led's to update with the current status.

I'm using onPresetChange to build an array of effects and their position in the array indicates there index number for that preset.
At the same time, it builds an array of the effect bypass states.

I use that info to update led's for those effects.

With Axe.toggleEffect(ID_COMP1); I can toggle the compressor on/off but the LED doesn't update.

I think I would like to try using AxeEffect.enable(index_no) but I don't know how to use anything in the AxeEffect.h. I thought I would just type AxeEffect.xxxxxxx(yyy); but I get errors like this:

fcb1010: In function 'void loop()':
fcb1010:264: error: expected unqualified-id before '.' token
AxeEffect.bypass(Btn_Upper_Effect_Index[0]);
^
expected unqualified-id before '.' token
 
Ok a little more digging and I find that I can put

effect.enable();

inside onPresetChange and it will turn on all the effects as it loops thru the list.

what does effect.enable() need to be inside for it to be recognized?
 
what does effect.enable() need to be inside for it to be recognized?
Not really sure what you mean... if you call enable()/disable()/toggle() on an AxeEffect object, it will immediately send it to the AFX. If you have a look here:

https://github.com/tysonlt/AxeFxControl/blob/master/examples/EffectList/EffectList.ino

All you need to do is loop over the effect list returned from AxePreset. The effect index indicates where the effect sits in the list of effects for that preset. Once you fetch the effect with AxePreset.getEffectAt(index), you can read it and control its state. There is no need to worry about the internal EFFECT_ID_ values (eg ID_COMP1) if you do it this way.
 
Thanks for the reply and trying to understand me, Tyson. My problem might be that I don't understand callbacks and pointers, yet. I will keep at it.

On my FCB1010, I have a mode button so that I can make the buttons respond differently for different modes of operation. 2 of the 12 buttons are always for inc/dec preset but the other 10 buttons depend on the mode of operation:
1. 10 stomps mode uses 10 buttons for effects
2. Scenes modes is similar to above but uses bottom 5 buttons for scenes
3. Looper mode uses bottom 5 buttons for looper functions
4. 10 stomps Extended mode uses the 10 buttons as a 2nd page of effects

So, I handle these modes in my void loop () section and I was hoping to use the index numbers there to enable/disable effects.

I'm not sure why but when I enter this line in the void loop() section:
AxePreset.getEffectAt(index);

I get this error on compile
fcb1010: In function 'void loop()':
fcb1010:266: error: expected unqualified-id before '.' token
AxePreset.getEffectAt(0);
^

expected unqualified-id before '.' token

Do I have to register something? Or can I only call AxePreset.getEffectAt(index); from within void onPresetChange(AxePreset preset)?
 
Ah, I think we are having a problem with terminology. AxePreset.getIndexAt is shorthand for “whatever your preset variable is called”.getEffectAt().

So in your onPresetChange callback, if you have defined it like this: onPresetChange(AxePreset preset), then you would call preset.getEffectAt(...).

have a look at the examples in the repo and it should be clear.
 
Hey there,

Here is my approach of using the effects


//Function:
void onEffectsReceived(PresetNumber number, AxePreset preset)

In this function, I set the effectindex to a variable so i can reuse it. i guess you can skip this part and just use effectId.
I use the variables to let the program descide to wich button to add the effect. My tft screen(s) show the name of the effect.

//loop through:
switch (effectindex)
{
case 1:
effect1 = (effect.getEffectId());


//For the buttons I call the variable i made (effect1), but for your FCB1010, you could call the effect ID and set it to a button and led
AxeEffect *effect = Axe.getCurrentPreset().getEffectById(effect1); // <- you enter the effectId here
effect->toggle(); // set ON or OFF, most easy approach

//Effect bypass option for the led
AxeEffect *effect = Axe.getCurrentPreset().getEffectById(effectindex);
if (effect->isBypassed()) { //Code here for led on/off; }


* See attachment for the effectId list.


-> Some idea to show if an effect is available in a preset:
You could also create a function for your own convenience to show if a effect is available yes/no
f.i.: If delay is not used in the preset, than the led is OFF. If effect is present, but bypassed, you could BLINK the led or something and if the effect is present and active led is ON.. or something like that. If i remember correctly the FCB only has a red LED color. if it had Green also it would be much more easier to deal with this situation.


Hope this helps you out


Cheers
 

Attachments

  • AxeFxIII_effect_Id list.txt
    2.1 KB · Views: 16
Last edited:
Hey there,

Here is my approach of using the effects


//Function:
void onEffectsReceived(PresetNumber number, AxePreset preset)

In this function, I set the effectindex to a variable so i can reuse it. i guess you can skip this part and just use effectId.
I use the variables to let the program descide to wich button to add the effect. My tft screen(s) show the name of the effect.

//loop through:
switch (effectindex)
{
case 1:
effect1 = (effect.getEffectId());


//For the buttons I call the variable i made (effect1), but for your FCB1010, you could call the effect ID and set it to a button and led
AxeEffect *effect = Axe.getCurrentPreset().getEffectById(effect1); // <- you enter the effectId here
effect->toggle(); // set ON or OFF, most easy approach

//Effect bypass option for the led
AxeEffect *effect = Axe.getCurrentPreset().getEffectById(effectindex);
if (effect->isBypassed()) { //Code here for led on/off; }


* See attachment for the effectId list.


-> Some idea to show if an effect is available in a preset:
You could also create a function for your own convenience to show if a effect is available yes/no
f.i.: If delay is not used in the preset, than the led is OFF. If effect is present, but bypassed, you could BLINK the led or something and if the effect is present and active led is ON.. or something like that. If i remember correctly the FCB only has a red LED color. if it had Green also it would be much more easier to deal with this situation.


Hope this helps you out


Cheers
Thanks guys. I will check this out. And yes, i have a “reveal” button that I used with axefx2 that would show which effects are available so that is feature on my list to get working again
 
How can I use the code to make it work with my axe fx II XL? :)
Thanks in advance!

I think it's Axe 3 only.

There are other projects that address the 2. It may take some digging.

What are you trying to do? What devices are you trying to use?
 
Hey there,

The OP has the following statement:
"I would love this open-source project to become a reference implementation for the AxeFX3, and possibly add AFX2 support if this is desired. Please feel free to jump in and collaborate!"

If you want to have a go with the 2 with this libriary, then here is your answer... try to get a collaboration with the OP for the AFX2.


Cheers
 
The II uses quite a different protocol to the three, so it would have to be basically implemented from scratch. I don’t have a II so I wouldn’t be able to test it!
 
Hey there,

The OP has the following statement:
"I would love this open-source project to become a reference implementation for the AxeFX3, and possibly add AFX2 support if this is desired. Please feel free to jump in and collaborate!"

If you want to have a go with the 2 with this libriary, then here is your answer... try to get a collaboration with the OP for the AFX2.


Cheers
I'm sorry for my bad english, but what does "OP" stands for?
Thanks for the reply!
 
I'm sorry for my bad english, but what does "OP" stands for?
Thanks for the reply!
OP means either “original post” (the first post in the thread), or “original poster” (the person who wrote the first post in the thread).
 
Fantastic work Tyson! Well done. I may have to hit you up for some info in the near future, I'm building a Raspberry pi, Python based controller, but I don't plan to implement any more than I need. The only info that I have not worked out yet is how to get the patch name and scene number when they change, but I'll talk when I am at that stage of the code. Cheers Simon
 
After reading 13 pages of code description (in my search to assign amp vol increase via FC12 switch), I really want to go down this rabbit hole! I have been a programmer for decades!! I think I am just going to play my guitars instead though!!! This thread has certainly motivated me to move forward with my Arduino project idea to control my shades on the porch!!!! Thanks for all the work all have put into this, I know how the enthusiasm can get one to spend many many hours on implementing the perfect solution!!!!!
 
After reading 13 pages of code description (in my search to assign amp vol increase via FC12 switch), I really want to go down this rabbit hole! I have been a programmer for decades!! I think I am just going to play my guitars instead though!!! This thread has certainly motivated me to move forward with my Arduino project idea to control my shades on the porch!!!! Thanks for all the work all have put into this, I know how the enthusiasm can get one to spend many many hours on implementing the perfect solution!!!!!

The FCs support a switch function called Amp Volume and Save.
 
The FCs support a switch function called Amp Volume and Save.
Let me clarify that the reason I was on this thread is a did a search for "CS1", and from the results I clicked on this thread (because it sounded interesting). I understand it has NOTHING to do with the FC12, that is simply how I stumbled into this thread and then read 13 pages about a rabbit hole I would be intrigued to venture down. Sorry I was not more clear ;~))
 
Let me clarify that the reason I was on this thread is a did a search for "CS1", and from the results I clicked on this thread (because it sounded interesting). I understand it has NOTHING to do with the FC12, that is simply how I stumbled into this thread and then read 13 pages about a rabbit hole I would be intrigued to venture down. Sorry I was not more clear ;~))
Gotcha!

I've been curious myself but my time is limited and I'd rather use it to play since I have the FC-12 :)
 
Back
Top Bottom