Menu

Akai APC Mini Led Output not working properly

2014-09-03
2015-03-22
1 2 > >> (Page 1 of 2)
  • Maikel Boerebach

    I am having a problem with my new Akai APC Mini.
    I have used a Novation Launchpad in the past to control QLC via MIDI, and the Feedback of the LEDs worked as expected. When I pushed a button, the LED would turn on and when i hit it again the LED turned off. The APC Mini however does not seem to work that way. When i hit a button, the LED will turn on, but it will not turn off again. This is really annoying, since the LEDs have no use, when they are all continuously lit. Does anyone have a similar problem? If so, does anyone have a workaround for this?

     
  • Maikel Boerebach

    I attached the Screenshot, which apparently states, that the button both sends an note on and note off value. I am guessing since QLC only sends back the first incoming note value the light stays lit. Is it possible to send a note off value?

     
  • Maikel Boerebach

    I managed to come close to the problem. Apparently the APC Mini which sends notes, needs a velocity larger than 0 to trigger the LED output. Since QLC sends a 0 as an output, the LED wont reset and therefore stays continuously lit. Can anyone tell me how to change the code to change this?

     
  • Jano Svitok

    Jano Svitok - 2014-09-04

    Hi,

    https://github.com/mcallegari/qlcplus/blob/master/plugins/midi/common/midiprotocol.cpp#L147 is the line that sets velocity (data2) to 0 (value).

    I can see to quick solutions:

    1. change line 147 to

      *data2 = DMX2MIDI((value == 0) ? 255 : value);

    2. remove lines 140-142, so MIDI_NOTE_ON is always used.

    Either of them may or may not work. I suppose that there is some more magic involved, since the LEDs are 3-color.

    Good luck and please let us know your results!

     
    • Maikel Boerebach

      Thank you so much for your response. I will try to compile it as soon as possible, and will come back to you with my (hopefull) progress.

       
  • Maikel Boerebach

    Since this was my first try compiling qlc, i expected to stumble on the environment itself.
    I keep getting this error message from xcode while compiling. I am guessing it has something to do with the way i installed OLA. I tried both the original qlc, as well as the revised version, but the error stays the same.
    Undefined symbols for architecture x86_64:
    "ola::StringTrim(std::string)", referenced from:
    ola::QLCLogDestination::Write(ola::log_level, std::string const&) in qlclogdestination.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: [libolaio.dylib] Error 1
    make[1]:
    [sub-ola-make_default] Error 2
    make:
    ** [sub-plugins-make_default-ordered] Error 2
    jonass-mbp:qlcplus jonas$

    I am using a macbook pro x64 with xcode to compile the software.

     
  • Legi008

    Legi008 - 2014-09-07

    Hi, sorry to use your post but i have 2 questions about the Akai APC Mini.

    Is it possible to assign a custom sound to each key ? (like a laugh or a quote)
    The sound the Akai makes come out of the PC ? or is there a mini jack (headset) out ?

    Thank You

     
  • Joep Admiraal

    Joep Admiraal - 2014-09-11

    It could be that the reason why the led's are not working as expected is the fact that we did not yet create a midi template for it. QLC+ works correct with the APC20/40 in Ableton mode2. To set the device in that specific mode, a midi sysex message has to be send at when QLC+ starts. This message is unique for each type of APC device. So far I only know the sysex message for the APC20 and APC40.
    Also I could not find any documentations on the midi messages of the new APC devices.
    Could you start Ableton and record the sysex message it is sending to your device?
    I can then create the correct midi template for QLC+

    Regards,
    Joep

     
  • Maikel Boerebach

    I used MidiMonitor to find the Sysex message(s). I attached the file.
    The Log states: To APC Mini: 00 F0 7E 7F 06 01 F7
    From APC:00 F0 7E 7F 06 02 47 28 00 19 01 00 00 00 7F 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00 F7
    Cheers,
    Maikel

     
  • Joep Admiraal

    Joep Admiraal - 2014-09-12

    Thanks for the MidiMonitor file. I think this is the message we're looking for:
    F0 47 7F 28 60 00 04 41 09 01 04 F7

    I created an updated midi template for it and attached it to this post.
    You have to place this file in the correct folder (~/Library/Application Support/QLC+/MidiTemplates on a mac).
    When this is done, you can select the APC mini init message in the Configure Midi Plugin screen.

     
    • Maikel Boerebach

      Hi Joep, first of all thanks for the help. I have transferred the .qxm-file to the appropriate folder and qlc does seem to send the sysex-message to the apc.(see attached file). Unfortunately, it does not seem to have an effect on the Led behaviour. I also attached the Ableton live midi output, and it seems to me that the apc sort of communicates with live. Ableton sends a 6-bit string sysex to the apc and the apc responds with a 35 bit string sysex. Then ableton sends out the 12-bit sysex that you implemented in the .qxm-file. I tried using both strings, but i cannot seem to get qlc to send the two strings. Any suggestions?

       
      • Maikel Boerebach

        Somehow my browser crashes when I try to upload multiple attachments, so here is the midi-monitor file containing the ableton startup-sequence.

         
        • Joep Admiraal

          Joep Admiraal - 2014-09-15

          The first two messages are the Device Enquiry messages. They should not alter the state of APC.
          See the communication protocol document for more info about the APC protocol:
          http://www.akaipro.com/product/apc40#downloads

           
  • Joep Admiraal

    Joep Admiraal - 2014-09-16

    As for the compilation issue, I am no expert but here are some tips.
    I am also using MacOS.
    Did you follow this HOWTO?
    https://github.com/mcallegari/qlcplus/wiki/OSX-Build-HOWTO

    I tend to have some compilation issues with some of the plugins and just disable them when I am compiling for myself.
    Since you seem to have problems with OLA, you can try to disable it by adding a # in the plugins/plugins.pro file in the beginning of the ola line.

     
  • Maikel Boerebach

    I have disabled it as you guys suggested, but now I'm struck with another error... I have tried reinstalling the necessary tools about ten times now an I cannot find a way to fix this. I am currently compiling on OSX 10.9.5.. I attached the error code, and I have no idea where to follow back on it..

    d hid/ && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile
    g++ -c -pipe -Werror -g -gdwarf-2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -fPIC -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.8/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -I../interfaces -I. -I. -F/Library/Frameworks -o hidfx5device.o hidfx5device.cpp
    hidfx5device.cpp:189:26: error: expression which evaluates to zero treated as a
    null pointer constant of type 'const char *'
    [-Werror,-Wnon-literal-null-conversion]
    chunk.append((char)0x0, 32 - chunk.size());
    ^~~~~~~~~

     
    • Jano Svitok

      Jano Svitok - 2014-09-23

      Hi,

      this seems like a genuine bug. Please try to replace line 189 in plugins/hid/hidfx5device.cpp:

      chunk.append((char)0x0, 32 - chunk.size());
      

      with

      chunk.append(QByteArray(32 - chunk.size(), 0));
      
       
  • Anonymous

    Anonymous - 2014-09-23

    Hi,

    I don't even get how this line can work ?
    There is no prototype of QByteArray::append(char ch, int size)
    It could call QByteArray::append(QByteArray const& other)
    by creating a QByteArray on the fly, but even then, the prototype for creating a QByteArray is QByteArray(int size, char ch)

    CF:
    http://qt-project.org/doc/qt-4.8/qbytearray.html

    I think here, when the compiler is happy, we actually append an empty byte array. (QByteArray(int size, char ch) is called with size = 0 and ch = 32 - chunk.size())

    Try replacing the line from:
    chunk.append((char)0x0, 32 - chunk.size());
    to :
    chunk.append(QByteArray(32 - chunk.size(), (char)0x0));

     
    • Jano Svitok

      Jano Svitok - 2014-09-23

      Most probably this was being called (http://qt-project.org/doc/qt-4.8/qbytearray.html#append-4):

      QByteArray & QByteArray::append ( const char * str, int len )
      

      thus compiler complained that pointer str is null.

       
      • Anonymous

        Anonymous - 2014-09-23

        Yes, you are right !

        Result is the same, nothing is appended at the end of the buffer.

         

        Last edit: Anonymous 2014-09-23
    • Jano Svitok

      Jano Svitok - 2014-09-23

      David, I've pushed your solution to git. Maikel, try to pull from git.

       
      • Maikel Boerebach

        Thank you guys for the quick responses, I was starting to get really frustrated. Unfortunately my Terminal still pops up some error messages after 15 minutes of compiling..
        Undefined symbols for architecture x86_64:
        "ola::StringTrim(std::string)", referenced from:
        ola::QLCLogDestination::Write(ola::log_level, std::string const&) in qlclogdestination.o
        ld: symbol(s) not found for architecture x86_64
        clang: error: linker command failed with exit code 1 (use -v to see invocation)
        make[2]: [libolaio.dylib] Error 1
        make[1]:
        [sub-ola-install_subtargets] Error 2
        make:
        ** [sub-plugins-install_subtargets-ordered] Error 2

        I should mention that earlier today i have installed QLC from the image and wasn't able to start it, because it kept crashing while loading OLA. I then googled a bit and removed the file "libolaio.dylib", after which QLC managed to startup properly. Is this somehow connected? I have not altered the files in the GIT-repository in any way, so i don't know if it is connected.

         
        • Jano Svitok

          Jano Svitok - 2014-09-23

          Maikel, you are a brave man, since you are most probably the first one that tries to compile QLC+ with clang :)

          To disable OLA plugin, go to plugins/plugins.pro and comment out (prepend #) this line:

          unix:SUBDIRS += ola
          

          To make git ignore this change, issue this command:

          git update-index assume-unchanged plugins.pro
          

          in that directory.

          If you need OLA plugin most probably you'll have to compile OLA from sources... did you follow https://github.com/mcallegari/qlcplus/wiki/OSX-Build-HOWTO ?

          especially "qmake -spec macx-g++"

           
          • Maikel Boerebach

            Thanks again for the advice. I have followed the instructions except for the "qmake -spec macx-g++". I have done that now and it is compiling right now. I do not understand what you mean with git ignoring the change. Do i need to enter this while i'm in the plugins directory or the one above?
            I am starting to think i am incapable of understanding the instructions of the Howto :D

             
            • Jano Svitok

              Jano Svitok - 2014-09-23

              If you change the plugins.pro file, git will refuse to pull new changes until you commit the file. If you issue the line above in the plugins dir (where the plugins.pro is) then it will ignore the changes and will not complain about uncommitted changes. Obviously, if you did compile OLA, then there's no need to edit plugins.pro and no changes to ignore.

               
              • Maikel Boerebach

                I can't thank you enough for the help! I have finally managed to compile it and after testing the two options you gave me it is now finally working. Removing the two lines did the trick.
                I will now try to find out how I get a multiple color output. I know that I need to change the velocity levels to make the colors change so I will try that tomorrow, and report back.

                 
1 2 > >> (Page 1 of 2)