Menu

AKAI APC mini - Button-LED

matthe_tp
2014-11-20
2015-03-06
  • matthe_tp

    matthe_tp - 2014-11-20

    Hallo, I'm from germany, my english is not so good, sorry.
    I have a problem with the Button-LED on AKAI APC MINI. The LEDs turn on but not off. Can anyboby help me?

     
    • Maikel Boerebach

      Since i compile all the qlc versions for myself i could send my working version. However I have OLA disabled, so if you need this particular function, you will have to compile QLC from GIT on your own.

       
  • Alessandro Grechi

    Hi Maikel,
    I read on the other thread you managed to change led colors to APC buttons. Could you please share your work? I would be pleased to try it also on mine!

    Thank you!

     
    • Maikel Boerebach

      Hi Allesandro, sorry for the very late reply.. I forgot to check the thread for a while.
      I used Janos' ideas and adapted them to my needs, since I wanted a bi-color-feedback: Red(Off) Green(On).
      I managed to do this by editing the lines in the file "midiprotocol.cpp".
      This is the part I have changed in lines 138 to 145:

      else if (channel >= CHANNEL_OFFSET_NOTE && channel <= CHANNEL_OFFSET_NOTE_MAX)
      {
      cmd = MIDI_NOTE_ON;
      cmd |= midiChannel;

          *data1 = static_cast <uchar> (channel - CHANNEL_OFFSET_NOTE);
          *data2 = DMX2MIDI((value==0) ? 3 : value);
      }
      

      In the 6th line "3" represents the midi-value for the On state. When you play with these you can change the colors to green,red,amber(orange). And you can choose to let the LEDs flash. In the other thread i have posted a text-file which describes which values you need to get certain colors.
      For your convenience i have also attached the midi protocol.cpp file.
      If you replace it in your git directory you will just need to recompile.
      As i have mentioned, this also works for the launchpad, however the colors are a bit different.
      Cheers,
      Maikel

       
      • Alessandro Grechi

        Thank you Maikel, I'll try it asap with my APC40 and APC20, they should both work in similar way, I hope.

        In my opinion the best result would be to have the button colored in red only if there is a function attached to it, and leave it off otherwise... (this is the behaviour I saw in other software)

         
        • Maikel Boerebach

          I don't really know what you mean by a function being attached. Only buttons mapped to a function in Virtual Desk are lit in colors and the ones not mapped are simply blank.

           
          • Alessandro Grechi

            Yes, that is what I meant, sorry!.
            I've just tried your mods with my APC20 and I can confirm that WORKS as expected! :)
            Buttons mapped to a function which is not running are lit in red, the others are off.
            Just wow! Thanks!

            I noticed that this is working well only in the main "clip launch" section. With the others (clip stop, navigation...) the lit is always green.

             

            Last edit: Alessandro Grechi 2015-01-02
  • Ronnie Roselli

    Ronnie Roselli - 2014-12-29

    Thank you for your answer, but I can not figure out where to find the file "midiprotocol.cpp" in my computer (windows7 64 bit).
    I downloaded your file already modified and thought I replace it with the present in my computer, but I realized that you can not do.
    Can you explain exactly how and where I have to replace or edit this file "midiprotocol.cpp"?
    Excuse me, but are not as experienced in programming ...

     
    • Jano Svitok

      Jano Svitok - 2014-12-29

      Hi,

      you need to follow https://github.com/mcallegari/qlcplus/wiki/Windows-build-HOWTO and when it tells you to download sources, do that, and replace file plugins/midi/common/midiprotocol.cpp with the one provided above. Then follow the guide again.

      In other words, you need to create your very own installation file from the (modified) sources, which is a bit complicated process.

       
  • Ronnie Roselli

    Ronnie Roselli - 2014-12-30

    Thank you but it's really too complicated to solve my problem!

    Per Massimo Callegari:
    è possibile risolvere il problema ormai noto e a quanto pare risolto con una patch o un aggiornamento? Mi sto pentendo di aver preso l'unico controller che non funziona come dovrebbe!

     
    • Massimo Callegari

      Translation: "To Massimo Callegari: is it possible to solve the issue that is now known and solved with a patch or an update ? I am repenting I bought the only controller that doesn't work as it should !"

      Ronnie, I am not gonna have a private conversation with you about the APC (which I don't even own btw), so please stop bugging me with private emails, private messages on Sourceforge and messages in italian here.
      This is not your personal answering machine. This is a public and international forum where everyone write in english - even if they are italians.

      Moreover you didn't get the point of this whole thread (and the original one). The Akai APC has a specific functionality that most of the other MIDI controllers don't have, so including this change would make few users happy and a lot more users unhappy as it breaks feedbacks on other devices (like BCF2000)

       
  • Massimo Callegari

    To Maikel, Joep, Alessandro and Jano: the only way to bring this upstream is to bind this behaviour to the input profiles. So basically users can specify a (global?) setting and define the feedback MIDI values to be sent.

    I am a bit confused though regarding the 'off' state. I understand LEDs can have 3 or 4 colors, but what about if I want to completely turn off a button ?
    I found weird that MIDI value 0 doesn't do it, especially because 0 is supposed to be the "factory default" value when you turn the device on.

    So, anyone can please explain and come up with a constructive proposal of how we can implement this without breaking other devices ?

     
    • Maikel Boerebach

      I can't really tell you why a velocity value greater than 0 needs to be sent. I guess it is something hardware-related. I agree with your proposal to attach the output to the midi-input profile. I would suggest making different classes inside the midiprotocol.cpp which are then called by choosing the appropriate profile in the dropdown menu.

       
    • Joep Admiraal

      Joep Admiraal - 2015-03-06

      Hi Massimo,

      The APC communications protocol document states we should use note on/off messages to control the LED's. A note on message with a velocity of 0 can be used to turn the LED off, but a note off message is preferred. See page 8 of the attached document.

       
      • Joep Admiraal

        Joep Admiraal - 2015-03-06

        Please ignore this post, the APC mini seems to work a bit different than the APC20/40. Which seems weird because the documentation of the APC40 mk2 also states we could use velocity 0. I think the mk2 is the same generation as the mini so I would expect them to behave the same.

         

        Last edit: Joep Admiraal 2015-03-06
  • Ronnie Roselli

    Ronnie Roselli - 2014-12-30

    Dear Massimo, usually when I receive a private message, i always answer, receiving no reply, I thought you did not read or received.
    I took the liberty to write you privately just because I had an urge to work and I'm sorry that with my two private messages I disturbed ...
    However I have solved my problem, now it works perfectly!

     

    Last edit: Ronnie Roselli 2014-12-30
  • Adrian Kapka

    Adrian Kapka - 2015-01-19

    Hi
    Sorry for my English, I use google translate.

    • data2 = DMX2MIDI ((value == 0)? 3: value);

    The solution with the change to "3" is ok, but only for 8x8 buttons. Other buttons have only one color for the ON value of 1-127. I suggest change to "0"

    • data2 = DMX2MIDI ((value == 0)? 0: value);

    The buttons then lit on green or red when they are ON, and go out when they are turned off.

    Sincerely
    Adrian