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. tysonlt

    tysonlt
    Expand Collapse
    Inspired

    Joined:
    Dec 16, 2018
    Messages:
    212
    Likes Received:
    176
    Location:
    Victoria, Australia
    Yes I will do that, good call.
     
  2. tysonlt

    tysonlt
    Expand Collapse
    Inspired

    Joined:
    Dec 16, 2018
    Messages:
    212
    Likes Received:
    176
    Location:
    Victoria, Australia
    Yes it's designed that you just recycle power once you have finished. You hold any button down on power up to enter setup mode, then restart. I haven't fully finished that feature either. It works for basic button presses though.

    I should not really have released that repo as it's a work in progress. I have since made it private, but you are welcome to keep using the code you have.
     
  3. #163 tysonlt, May 10, 2019
    Last edited: May 10, 2019
    tysonlt

    tysonlt
    Expand Collapse
    Inspired

    Joined:
    Dec 16, 2018
    Messages:
    212
    Likes Received:
    176
    Location:
    Victoria, Australia
    That looks like a hole in the documentation. You have the right idea though; in the tuner status callback, you will have to tell your display code that it's time to redisplay its current data. The library relies completely on callbacks and tries to avoid storing much state, so the implementing code is responsible for maintaining app state. This gives you more flexibility rather than having to follow the flow logic of a library.
     
  4. tysonlt

    tysonlt
    Expand Collapse
    Inspired

    Joined:
    Dec 16, 2018
    Messages:
    212
    Likes Received:
    176
    Location:
    Victoria, Australia
    Looks great mate! Thrilled to see someone is using the library!

    For making the button layouts, the best way for now is probably to just modify one of the Layout classes. That way you can make them do whatever you want. I should stress that the AxeHandle project was just something I was doing for my own controller, I haven't really focused on making it easy to use for others. It is by no means the only (or even the ideal) way to use the library. If you want to use it for learning, I would consider starting your own version fresh, using the AxeHandle stuff just as a reference on how to do specific things. For example, you could simplify the button handling code.
     
    Piing likes this.
  5. Piing

    Piing
    Expand Collapse
    Forum Addict

    Joined:
    Jul 30, 2008
    Messages:
    1,291
    Likes Received:
    1,296
    Location:
    Thailand
    There is some issue with the FetchAllScenes example included at the library.

    The data is corrupted when there is a fast preset change.

    This is the correct result, when there is a pause between preset changes (current selected scene is #8):

    onPresetChange()
    =====================
    Preset: 384 - This is the name of this preset
    Scene: 8 - This is the name of Scene --- 8
    =====================

    ++++++++++++++++++++++++

    onSceneName(): 1: This is the name of Scene --- 1
    onSceneName(): 2: This is the name of Scene --- 2
    onSceneName(): 3: This is the name of Scene --- 3
    onSceneName(): 4: This is the name of Scene --- 4
    onSceneName(): 5: This is the name of Scene --- 5
    onSceneName(): 6: This is the name of Scene --- 6
    onSceneName(): 7: This is the name of Scene --- 7


    And this is the result when the presets are switched fast (current selected scene is #8 but it returns #1, the scene that was selected at the previous preset. Scene #2 is missing and Scene #3 is corrupted):

    onPresetChange()
    =====================
    Preset: 384 - This is the name of this preset
    Scene: 1 - This is the name of Scene --- 1
    =====================

    onSceneName(): 8: This is the name of Scene --- 8
    onSceneName(): 3: This is the nam⸮
    onSceneName(): 4: This is the name of Scene --- 4
    onSceneName(): 5: This is the name of Scene --- 5
    onSceneName(): 6: This is the name of Scene --- 6
    onSceneName(): 7: This is the name of Scene --- 7
     
  6. tysonlt

    tysonlt
    Expand Collapse
    Inspired

    Joined:
    Dec 16, 2018
    Messages:
    212
    Likes Received:
    176
    Location:
    Victoria, Australia
    Fast preset changes are a challenge for sure. It could be that the sysex messages are filling the serial input buffer before it can be read, but given the speed of the arduino this is unlikely. It is also possible that the axe is sending the sysex but then aborting mid-stream if it has to send a new message before current one is finished. This is also unlikely.

    At the moment the lib deals with this by dropping stale messages and only responding to input related to the latest preset. I am able to spin the wheel on my axe without any corrupt data, but I have definitely noticed some funny stuff coming back in the past.

    I have added sysex validation as suggested by @AlbertA to this branch: https://github.com/tysonlt/AxeFxControl/tree/sysex-checksum-validation but I am at work atm so I haven't run it against the axe. Please feel free to test it for me! Hopefully that will fix the issue.

    Thanks for the feedback!
     
    Piing likes this.
  7. Piing

    Piing
    Expand Collapse
    Forum Addict

    Joined:
    Jul 30, 2008
    Messages:
    1,291
    Likes Received:
    1,296
    Location:
    Thailand
    Thank you for reviewing the library!
    This branch is not receiving any input from the Axe-FX.
     
  8. tysonlt

    tysonlt
    Expand Collapse
    Inspired

    Joined:
    Dec 16, 2018
    Messages:
    212
    Likes Received:
    176
    Location:
    Victoria, Australia
    Ha ha that’s no good... I am getting home soon so I’ll be able to plug in to test it
     
    Piing likes this.

Share This Page