1. We would like to remind our members that this is a privately owned, run and supported forum. You are here at the invitation and discretion of the owners. As such, rules and standards of conduct will be applied that help keep this forum functioning as the owners desire. These include, but are not limited to, removing content and even access to the forum.

    Please give yourself a refresher on the forum rules you agreed to follow when you signed up.
    Dismiss Notice

Arduino Axe-Fx control library

Discussion in 'Other MIDI Controllers' started by tysonlt, Feb 6, 2019.

  1. #1 tysonlt, Feb 6, 2019
    Last edited: Feb 10, 2019
    tysonlt

    tysonlt
    Expand Collapse
    Inspired

    Joined:
    Dec 16, 2018
    Messages:
    212
    Likes Received:
    176
    Location:
    Victoria, Australia
    Greetings!

    I would like to announce my AxeFX control library:

    https://github.com/tysonlt/AxeFxControl

    This is a 100% complete implementation of the AxeFX III 3rd party MIDI spec.

    So far I have tested it with my AFX3, and it is based solely on that. The 2 has different messages and I don't have one to test with.

    Implemented are:
    • Preset change
    • Preset increment/decrement with rollover
    • Scene change
    • Scene increment/decrement with rollover
    • Display preset name and number
    • Display scene name and number
    • Effect channel change
    • Retrieve list of effect blocks with channel and bypass status (filters out non-effects such as input/output etc)
    • Effect bypass
    • Tuner control
    • Looper status and control
    • Realtime tuner data
    • Detects preset change from front panel
    • Send and receive tap tempo events
    • Get and set tempo value
    • Configurable auto-refresh
    • Send custom PC/CC/SysEx
    • Add custom sysex handlers with option to override normal processing
    • Add custom effect list filters to change which effects will be displayed
    All of this is tested and working. I am working on the following:
    • Change the order that effects are displayed in (perhaps another filter? Or just sensible defaults?)
    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!
     
  2. tysonlt

    tysonlt
    Expand Collapse
    Inspired

    Joined:
    Dec 16, 2018
    Messages:
    212
    Likes Received:
    176
    Location:
    Victoria, Australia
    PS please forgive the stupid tab formatting... switched editors a while ago!
     
  3. AlbertA

    AlbertA
    Expand Collapse
    Forum Addict

    Joined:
    Jul 30, 2008
    Messages:
    1,972
    Likes Received:
    1,716
    Location:
    Frisco, TX
    clang-format is your friend
     
    iaresee likes this.
  4. tysonlt

    tysonlt
    Expand Collapse
    Inspired

    Joined:
    Dec 16, 2018
    Messages:
    212
    Likes Received:
    176
    Location:
    Victoria, Australia
    I don't like the way it formats blocks of defines... I like to have all the values aligned in a column
     
  5. AlbertA

    AlbertA
    Expand Collapse
    Forum Addict

    Joined:
    Jul 30, 2008
    Messages:
    1,972
    Likes Received:
    1,716
    Location:
    Frisco, TX
    I’m sure there’s a setting you can tweak
     
  6. axifist

    axifist
    Expand Collapse
    Veteran

    Joined:
    Mar 29, 2014
    Messages:
    773
    Likes Received:
    579
    Location:
    Germany
    Dude that is a VERY nice idea! Thanks for creating this and for sharing it. Open Source ftw!! :D
     
    tysonlt likes this.
  7. tysonlt

    tysonlt
    Expand Collapse
    Inspired

    Joined:
    Dec 16, 2018
    Messages:
    212
    Likes Received:
    176
    Location:
    Victoria, Australia
    Effect bypass now implemented.
     
    ajt likes this.
  8. Arcio

    Arcio
    Expand Collapse
    New here

    Joined:
    Aug 29, 2018
    Messages:
    7
    Likes Received:
    2
    This is looking very promising! I can imagine how much time it takes you...
    I tried to run examples on my Mega2560


    Arduino: 1.8.8 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
    C:\Users\Arek\AppData\Local\Temp\cccrr4NH.ltrans0.ltrans.o: In function `main':
    <artificial:mad:.text.startup+0x3ac): undefined reference to `AxeSystem::registerPresetChangingCallback(void (*)(int))'
    <artificial:mad:.text.startup+0x3d2): undefined reference to `AxeSystem::sendPresetChange(unsigned int)'
    collect2.exe: error: ld returned 1 exit status
    exit status 1
    Error compiling for board Arduino/Genuino Mega or Mega 2560.
     
  9. tysonlt

    tysonlt
    Expand Collapse
    Inspired

    Joined:
    Dec 16, 2018
    Messages:
    212
    Likes Received:
    176
    Location:
    Victoria, Australia
    Ok I will have a look
     
  10. tysonlt

    tysonlt
    Expand Collapse
    Inspired

    Joined:
    Dec 16, 2018
    Messages:
    212
    Likes Received:
    176
    Location:
    Victoria, Australia
    Hmm... can’t reproduce this. Do you have the latest version? I just added a tag, please try that
     
  11. tysonlt

    tysonlt
    Expand Collapse
    Inspired

    Joined:
    Dec 16, 2018
    Messages:
    212
    Likes Received:
    176
    Location:
    Victoria, Australia
  12. Arcio

    Arcio
    Expand Collapse
    New here

    Joined:
    Aug 29, 2018
    Messages:
    7
    Likes Received:
    2
    Hi, sadly the same with 0.3

    as example trying to run examples/Tempo :

    Arduino: 1.8.8 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
    C:\Users\Arek\AppData\Local\Temp\ccwNgjSD.ltrans0.ltrans.o: In function `main':
    <artificial:mad:.text.startup+0x3d8): undefined reference to `AxeSystem::registerSystemChangeCallback(void (*)())'
    <artificial:mad:.text.startup+0x3e4): undefined reference to `AxeSystem::registerTapTempoCallback(void (*)())'
    <artificial:mad:.text.startup+0x456): undefined reference to `AxeSystem::setTempo(unsigned char)'
    <artificial:mad:.text.startup+0x45e): undefined reference to `AxeSystem::update()'
    collect2.exe: error: ld returned 1 exit status
    exit status 1
    Error compiling for board Arduino/Genuino Mega or Mega 2560.
     
  13. tysonlt

    tysonlt
    Expand Collapse
    Inspired

    Joined:
    Dec 16, 2018
    Messages:
    212
    Likes Received:
    176
    Location:
    Victoria, Australia
    Hmm, most mysterious. The source for those files is under src/axe, whereas some versions of Arduino don't like subdirectories. I just compiled for the Mega with no problems. I am using Arduino 1.8.7, I assume you are using 1.8.8?

    I have created a branch with all the source files in one folder, if that is the problem:

    https://github.com/tysonlt/AxeFxControl/tree/folders
     
  14. Arcio

    Arcio
    Expand Collapse
    New here

    Joined:
    Aug 29, 2018
    Messages:
    7
    Likes Received:
    2
    Yes, that was the case!
    Also,I had to replace

    MIDI_CREATE_DEFAULT_INSTANCE();

    with

    MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, MIDI);

    in AxeSystem.cpp @ Line #4 , because for some reason the default is Serial , not Serial1

    I'll have a play on weekend, but, I was digging in your code, and man.. i see so many work has been putted into it, and it has much more features that I wanted to create in my one. It is written very well as well..

    I really appreciate your work and thank you for publishing such a good project!
    Will give you a feedback on weekend, but ,yeah, this seems to be amazing!

    Cheers! //Arek
     
  15. tysonlt

    tysonlt
    Expand Collapse
    Inspired

    Joined:
    Dec 16, 2018
    Messages:
    212
    Likes Received:
    176
    Location:
    Victoria, Australia
    No worries bro, thank you for the feedback. I will make that change to the main branch.

    As for the MIDI thing, it bothers me that I have to create it like that with no control over it. The MID library usually does a pretty good job of figuring out which serial to use. Ideally I would read the sysex manually... maybe in the future!
     
  16. axifist

    axifist
    Expand Collapse
    Veteran

    Joined:
    Mar 29, 2014
    Messages:
    773
    Likes Received:
    579
    Location:
    Germany
    For me the examples work just fine. So it doesn't necessarily be caused by the code.
     
  17. tysonlt

    tysonlt
    Expand Collapse
    Inspired

    Joined:
    Dec 16, 2018
    Messages:
    212
    Likes Received:
    176
    Location:
    Victoria, Australia
    The only reason for having a subdir within source was so that if you choose "Include library" in the Arduino editor, it won't include all of the headers! This isn't really that important, but if it stops it compiling for some people I don't mind changing it.
     
  18. tysonlt

    tysonlt
    Expand Collapse
    Inspired

    Joined:
    Dec 16, 2018
    Messages:
    212
    Likes Received:
    176
    Location:
    Victoria, Australia
    I have bitten the bullet and started to write my own MIDI code. It will let you specify the serial port to use. Hang tight for about 12 hours!
     
  19. tysonlt

    tysonlt
    Expand Collapse
    Inspired

    Joined:
    Dec 16, 2018
    Messages:
    212
    Likes Received:
    176
    Location:
    Victoria, Australia
    https://github.com/tysonlt/AxeFxControl/releases/tag/0.4

    No longer relies on any external libraries. MIDI has been implemented in AxeSystem.

    A pluggable sysex override has also been added. You can register a callback to receive sysex responses, and returning true from the callback will halt normal sysex processing. Therefore you can send and receive custom sysex to extend the library in the future.

    Also added a SysEx test utility in the extra/ folder. This just lets you type sysex bytes to send to the axe, and it prints the response. Currently has a custom handler for command 0x13, which is the effects dump. This has been mostly useful for debugging, but it's fun sending stuff to the Axe to see what it says! An 0x64 response generally means no comprende.
     
  20. pauly

    pauly
    Expand Collapse
    Fractal Fanatic

    Joined:
    May 22, 2013
    Messages:
    2,027
    Likes Received:
    1,424
    Location:
    Victoria australia
    Hey Tyson,

    Thanks - that’s gold! I’m off site for a few weeks but look forward to having a look when I get back!

    Pauly

     

Share This Page