Page 1 of 1

[SOLVED] AKAI APC40 and APC20 - feedbacks on Linux

Posted: Tue Jul 07, 2015 6:34 pm
by adriankapka
Welcome

Sorry for the translation , I used google transtalor

1. There is a problem with feedback when they are connected APC40 and APC20 . Turning on the APC40 led illuminates on the APC20 and vice versa.
https://www.youtube.com/watch?v=bPp1QsyzFP0


2. Assign speed dial to dial with feedback signal blocks the smooth change of time, and at konb is OK.
https://www.youtube.com/watch?v=vkN5dsXU1d8


When turning off the feedback is ok.
https://www.youtube.com/watch?v=TQCs0U1awCI


QLC+ 4.9.0 from GIT
AKAI APC MODE 1 and MODE 2
http://www.housecontainer.nl/images/blo ... -rev-1.pdf

Greetings
Adrian Kapka

Re: AKAI APC40 and APC20 - bugs

Posted: Tue Jul 07, 2015 6:42 pm
by mcallegari
Hi, I don't think configuring both devices on the MIDI OMNI channel (1-16) is a good idea.
I don't know exactly how the APCs work internally, but can you configure them to send/receive one on MIDI channel 1 and one on MIDI channel 2 ?

Maybe all the issues you're seeing are related to that

Re: AKAI APC40 and APC20 - bugs

Posted: Tue Jul 07, 2015 6:58 pm
by adriankapka
Channels 1-16 for the inputs are OK , no problem recognizes included the keys. For feedback signal is sent to both APC . Unfortunately it is not possible to switch the APC on one channel .

Re: AKAI APC40 and APC20 - bugs

Posted: Tue Jul 07, 2015 7:31 pm
by mcallegari
Can you please create an empty project and share here with just the input/output mapping as shown in the picture you attached ?

I want to check if for some reason the line numbers are messed up.

[EDIT] Also, since you built from GIT (in debug mode I guess), can you please share a txt file with a QLC+ run with the option -d ?
There are some interesting debug messages in the code that I would like to check

Thanks

Re: AKAI APC40 and APC20 - bugs

Posted: Tue Jul 07, 2015 7:57 pm
by adriankapka
I put two projects and templates files for APC . I found an information mode that APC20 is 0x43 (decimal 67 ) APC20 Note Mode , but it works only for the keys CLIP LAUNCH channel changes , other buttons remain unchanged.

http://remotescripts.blogspot.com/2010_ ... chive.html

Re: AKAI APC40 and APC20 - bugs

Posted: Tue Jul 07, 2015 8:22 pm
by mcallegari
Ok thanks.
Can you please try to map the APC20 on universe 3 and APC40 on universe 4 and see if feedbacks work at all ?
I'm starting to suspect there's a mismatch between the universe number and the MIDI plugin line number

Re: AKAI APC40 and APC20 - bugs

Posted: Tue Jul 07, 2015 8:34 pm
by adriankapka
On the universe 3 and 4 does the same thing , nothing has changed .

Please help to save the file with debugging , because it saves only the beginning of the execution of qlcplus -d > debug.txt
I'm using Ubuntu 14.04

Please check that was it

Re: AKAI APC40 and APC20 - bugs

Posted: Wed Jul 08, 2015 1:49 pm
by mcallegari
Hi Adrian, the log looks fine, thank you.
However I am not able to understand why feedbacks go to the wrong device.

Would you please replace the code of MIDIPlugin::sendFeedback in plugins/midi/common/midiplugin.cpp (line 290) with the following ?
The rebuild and send me the log again.
Please just do the necessary operation to show me the wrong feedbacks, otherwise it is difficult for me to understand it from the debug messages.

Code: Select all

void MidiPlugin::sendFeedBack(quint32 universe, quint32 output, quint32 channel, uchar value, const QString &)
{
    Q_UNUSED(universe)

    qDebug() << "[sendFeedBack] universe:" << universe << ", output:" << output;

    MidiOutputDevice* dev = outputDevice(output);
    if (dev != NULL)
    {
        qDebug() << "[sendFeedBack] Dev:" << dev->name() << ", channel:" << channel << ", value:" << value;
        uchar cmd = 0;
        uchar data1 = 0, data2 = 0;
        if (QLCMIDIProtocol::feedbackToMidi(channel, value, dev->midiChannel(),
                                        &cmd, &data1, &data2) == true)
        {
            qDebug() << "[sendFeedBack] cmd:" << cmd << "data1:" << data1 << "data2:" << data2;
            dev->writeFeedback(cmd, data1, data2);
        }
    }
}
Thanks !

Re: AKAI APC40 and APC20 - bugs

Posted: Wed Jul 08, 2015 7:22 pm
by adriankapka
hello
In the attached log after changes



adrian@E4310:~/QLC/qlcplus$ lsusb |grep AKAI
Bus 001 Device 011: ID 09e8:0073 AKAI Professional M.I. Corp.
Bus 001 Device 012: ID 09e8:007b AKAI Professional M.I. Corp.



EDIT

In my opinion, sending a stream of return function does not specify the device only sends to everyone because it reacts to any device that has enabled feedback
Please check.

https://youtu.be/1bZWbTgV4NE

Re: AKAI APC40 and APC20 - bugs

Posted: Mon Jul 13, 2015 10:47 am
by adriankapka
Solution 1 - Please verify

Edit /plugins/midi/alsa/alsamidioutputdevice.cpp

disable line
snd_seq_ev_set_subs(&ev);
to function
void AlsaMidiOutputDevice::writeFeedback(uchar cmd, uchar dara1, uchar data2);

http://www.alsa-project.org/alsa-doc/al ... 18731ed6d7

Re: AKAI APC40 and APC20 - bugs

Posted: Mon Jul 13, 2015 10:59 am
by mcallegari
Hi, did you try the change and does it work ?

Re: AKAI APC40 and APC20 - bugs

Posted: Mon Jul 13, 2015 1:08 pm
by adriankapka
Yes , it works.

https://youtu.be/Juqm9LbFD0E


According to the description snd_seq_ev_set_subs function(ev) (set broadcasting to subscribers ) sends a stream to all devices , so all APC responded .

Re: AKAI APC40 and APC20 - bugs

Posted: Mon Jul 13, 2015 1:34 pm
by mcallegari
OK, thank you very much. Good catch !

So basically the _subs call overwrites the previous line:
snd_seq_ev_set_dest(&ev, m_receiver_address->client, m_receiver_address->port);

Interesting...and I'm wondering if this never worked or if depends on some ALSA version.
Anyway, I'll comment the line and push on GIT.

Thanks again

Re: AKAI APC40 and APC20 - bugs

Posted: Mon Jul 13, 2015 6:32 pm
by adriankapka
2 .Please check the log , you can see the different calculations in time for the 78 ms. For this value, a loop while the feedback signal .

Maybe you will quickly find that this is happening in different functions

Re: AKAI APC40 and APC20 - bugs

Posted: Mon Jul 13, 2015 6:32 pm
by mcallegari
adriankapka wrote:2 .Please check the log , you can see the different calculations in time for the 78 ms. For this value, a loop while the feedback signal .
Adrian, are we still talking about feedbacks to multiple MIDI devices or is this something related to Speed Dials ?
In the second case, please open a new thread because it would be off-topic here.

I can't understand the log because you changed a lot of debug messages, and I can't relate them to the current GIT sources

Re: AKAI APC40 and APC20 - bugs

Posted: Tue Jul 14, 2015 9:21 am
by adriankapka
The problem concerns only feedback for speed dial . I will try to explain more on a new thread