-APC sidechain / post / reverb sends working

This commit is contained in:
Harry van Haaren 2013-08-16 12:39:59 +01:00
parent ba515fe76d
commit 0816edbda5
8 changed files with 11 additions and 121 deletions

View file

@ -154,17 +154,14 @@ void ccChange( int track, int cc, float value )
/// Device Control
case 16: {
EventTrackSend e( track, SEND_SIDE, value );
writeToGuiRingbuffer( &e ); }
break;
jack->getLogic()->trackSend( track, SEND_SIDE, value );
break; }
case 17: {
EventTrackSend e( track, SEND_POST, value );
writeToGuiRingbuffer( &e ); }
break;
jack->getLogic()->trackSend( track, SEND_POST, value );
break; }
case 18: {
EventTrackSend e( track, SEND_REV, value );
writeToGuiRingbuffer( &e ); }
break;
jack->getLogic()->trackSend( track, SEND_REV, value );
break; }
}
}

View file

@ -20,7 +20,7 @@ class Controller
virtual void masterVolume(float f){};
/// FX
virtual void fxTrackSend(int t, int send, float v){};
virtual void trackSend(int t, int send, float v){};
/// Time
virtual void tapTempo(bool b){};

View file

@ -27,9 +27,9 @@ void LupppGUI::recordArm(int t, bool enabled)
}
void LupppGUI::fxReverbSend(int t, float r)
void LupppGUI::trackSend(int t, int send, float r)
{
EventTrackSend e( t, SEND_REV, r );
EventTrackSend e( t, static_cast<Event::SEND_TYPE>(send), r );
writeToGuiRingbuffer( &e );
}

View file

@ -16,7 +16,7 @@ class LupppGUI : public Controller
void masterVolume(float f);
void fxReverbSend(int t, float r);
void trackSend(int t, int send, float r);
void tapTempo( bool b );

View file

@ -53,7 +53,7 @@ class ControllerUpdater
void setTrackSend(int t, int send, float v)
{
for(unsigned int i = 0; i < c.size(); i++)
c.at(i)->fxTrackSend(t, send, v);
c.at(i)->trackSend(t, send, v);
}
void setSceneState(int t, int clip, GridLogic::State s)

View file

@ -82,104 +82,6 @@ LooperClip* Looper::getClip(int scene)
return &clips[scene];
}
void Looper::midi(unsigned char* data)
{
/*
if ( data[0] - 144 == track )
{
switch ( data[1] )
{
case 48: setState( STATE_RECORD_QUEUED ); break;
case 53: case 54: case 55: case 56: case 57:
setState( STATE_PLAY_QUEUED );
setScene( data[1] - 53 );
break;
case 52: setState( STATE_STOP_QUEUED ); break;
}
}
else if ( data[0] - 128 == track )
{
switch ( data[1] )
{
case 48: setState( STATE_STOP_QUEUED );
}
}
else if ( data[0] - 176 == track )
{
switch ( data[1] )
{
//case 7: gain = int(data[2])/127.f; break;
case 7:{
printf("volue\n");
// volume from APC
EventTrackVol e( track, data[2] / 127.f );
writeToGuiRingbuffer( &e ); }
break;
}
}
*/
}
void Looper::queuePlayScene( int sc )
{
//queuedScene = sc;
//jack->getControllerUpdater()->clipSelect(track, scene, Controller::CLIP_MODE_PLAY_QUEUED);
}
//void Looper::setState( State s) {
/*
// quantize recording to next bar event
if ( state == STATE_RECORDING )
{
stopRecordOnBar = true;
}
state = s;
updateControllers();
} */
void Looper::updateControllers()
{
/*
if (state == STATE_RECORD_QUEUED )
{
numBeats = 0;
jack->getControllerUpdater()->recordArm(track, true);
jack->getControllerUpdater()->clipSelect(track, scene, Controller::CLIP_MODE_RECORD_QUEUED);
}
else if (state == STATE_RECORDING )
{
jack->getControllerUpdater()->recordArm(track, true);
jack->getControllerUpdater()->clipSelect(track, scene, Controller::CLIP_MODE_RECORDING);
}
else
{
jack->getControllerUpdater()->recordArm(track, false);
}
if (state == STATE_PLAY_QUEUED )
{
jack->getControllerUpdater()->clipSelect(track, scene, Controller::CLIP_MODE_PLAY_QUEUED);
}
if ( state == STATE_PLAYING )
{
jack->getControllerUpdater()->clipSelect(track, scene, Controller::CLIP_MODE_PLAYING);
}
if (state == STATE_STOP_QUEUED )
{
jack->getControllerUpdater()->clipSelect(track, scene, Controller::CLIP_MODE_STOP_QUEUED);
}
else if ( state == STATE_STOPPED )
{
jack->getControllerUpdater()->clipSelect(track, scene, Controller::CLIP_MODE_LOADED);
EventLooperProgress e(track, 0 );
writeToGuiRingbuffer( &e );
}
*/
}
void Looper::setRequestedBuffer(int s, AudioBuffer* ab)
{
clips[s].setRequestedBuffer( ab );

View file

@ -30,19 +30,13 @@ class Looper : public AudioProcessor, public TimeObserver
/// Used for infinite lenght recording
void setRequestedBuffer(int s, AudioBuffer* ab);
void midi(unsigned char* data);
void setFpb(int f) { fpb = f; }
void queuePlayScene( int sc );
void play(int scene, bool r);
void setRecord(int scene, bool r);
LooperClip* getClip(int scene);
void updateControllers();
void process(unsigned int nframes, Buffers* buffers);
private:

View file

@ -11,9 +11,6 @@ TrackOutput::TrackOutput(int t, AudioProcessor* ap) :
previousInChain(ap),
dbMeter(44100)
{
//printf("trackOutput ID: %i, ap = ", track );
//std::cout << ap << std::endl;
// UI update
uiUpdateConstant = 44100 / 30;
uiUpdateCounter = 44100 / 30;