-Debugging KEY GUI->APC MIDI message, not working

main
Harry van Haaren 2013-09-11 02:19:39 +01:00
parent 1dca11851f
commit b7d989ecef
2 changed files with 9 additions and 16 deletions

View File

@ -44,7 +44,7 @@ void AkaiAPC::trackSend(int t, int send, float v)
{
if ( t >= NTRACKS)
{
// master track
// master track, no sidechains / sends
return;
}
@ -52,9 +52,10 @@ void AkaiAPC::trackSend(int t, int send, float v)
if ( send == SEND_SIDE )
{
data[0] = 144 + t;
int tmp = v > 0.5 ? 144 : 128;
data[0] = tmp + t;
data[1] = 49;
data[2] = v > 0.5 ? 127 : 0 ;
data[2] = 127 ;
}
else if ( send == SEND_POST )
{
@ -68,6 +69,10 @@ void AkaiAPC::trackSend(int t, int send, float v)
data[1] = 17;
data[2] = 127 * v;
}
else
{
cout << "AkaiAPC::trackSend() unknown send!" << endl;
}
jack->midiObserverWriteMIDI( _port, &data[0] );
}

View File

@ -143,18 +143,6 @@ void Jack::activate()
Controller* g = new LupppGUI();
/*
// move to "settings" class or so
Controller* c = new AkaiAPC();
controllerUpdater->registerController( c );
Controller* g = new LupppGUI();
controllerUpdater->registerController( g );
*/
// move to time class, get instantiate order right
//jack->getTimeManager()->registerObserver( metronome );
//jack->getTimeManager()->registerObserver( gridLogic );
jack_activate( client );
jack_transport_start(client);
}
@ -369,7 +357,7 @@ void Jack::midiObserverWriteMIDI( int portIndex, unsigned char* data )
if( buf != 0 )
{
memcpy( buf, data, sizeof( unsigned char ) * 3);
//cout << "writeApcOutput " << int(buf[0]) << ", " << int(buf[1]) << ", " << int(buf[2]) << endl;
cout << "midiObserverWriteMIDI portID " << portIndex << " " << int(buf[0]) << ", " << int(buf[1]) << ", " << int(buf[2]) << endl;
}
else
{