-Testing new JACK port routing system

main
Harry van Haaren 2013-09-11 01:50:47 +01:00
parent f884d43be7
commit d9ae0129fc
4 changed files with 33 additions and 21 deletions

View File

@ -20,33 +20,36 @@ class Buffers
// AUDIO
MASTER_INPUT = 0,
MASTER_OUT_L = 1,
MASTER_OUT_R = 2,
MASTER_OUT_L,
MASTER_OUT_R,
JACK_MASTER_OUT_L = 3,
JACK_MASTER_OUT_R = 4,
JACK_SEND_OUT,
JACK_MASTER_OUT_L,
JACK_MASTER_OUT_R,
JACK_SIDECHAIN_KEY,
JACK_SIDECHAIN_SIGNAL,
SEND = 5,
SIDECHAIN_KEY = 6,
SIDECHAIN_SIGNAL = 7,
SEND,
SIDECHAIN_KEY,
SIDECHAIN_SIGNAL,
MASTER_RETURN_L = 8,
MASTER_RETURN_R = 9,
MASTER_RETURN_L,
MASTER_RETURN_R,
// MIDI
MASTER_MIDI_INPUT = 10,
MASTER_MIDI_INPUT,
// track buffers: they are the "working" buffers per track:
// the end result is mixed into the master output, while each
// stage along the way the amplitude etc can be analysed
TRACK_0 = 11,
TRACK_1 = 12,
TRACK_2 = 13,
TRACK_3 = 14,
TRACK_4 = 15,
TRACK_5 = 16,
TRACK_6 = 17,
TRACK_7 = 18,
TRACK_0,
TRACK_1,
TRACK_2,
TRACK_3,
TRACK_4,
TRACK_5,
TRACK_6,
TRACK_7,
};
// Jack details

View File

@ -22,7 +22,7 @@ GTrack::GTrack(int x, int y, int w, int h, const char* l ) :
//active (x+11, y +427 + 0, 50, 25, ""), // active
side (x+11, y +427 + 00, 50, 25, "Key"),
//recEnable(x+11, y +427 + 54, 50, 25, ""), // record
post (x+21, y +435 + 35, 30, 30, "Side/Mix"),
post (x+21, y +435 + 35, 30, 30, "to Side"),
rev (x+21, y +440 + 100, 30, 30, "Send")
{
ID = privateID++;
@ -37,7 +37,6 @@ GTrack::GTrack(int x, int y, int w, int h, const char* l ) :
rev.callback( gtrack_reverb_cb, this );
post.callback( gtrack_post_cb, this );
post.value( 1.0 );
post.align( FL_ALIGN_BOTTOM );
volume.callback( gtrack_vol_cb, this );

View File

@ -232,8 +232,13 @@ int Jack::process (jack_nframes_t nframes)
buffers.audio[Buffers::MASTER_INPUT] = (float*)jack_port_get_buffer( masterInput , nframes );
buffers.audio[Buffers::MASTER_RETURN_L] = (float*)jack_port_get_buffer( masterReturnL , nframes );
buffers.audio[Buffers::MASTER_RETURN_R] = (float*)jack_port_get_buffer( masterReturnR , nframes );
buffers.audio[Buffers::JACK_SEND_OUT] = (float*)jack_port_get_buffer( sendOutput , nframes );
buffers.audio[Buffers::JACK_MASTER_OUT_L] = (float*)jack_port_get_buffer( masterOutputL , nframes );
buffers.audio[Buffers::JACK_MASTER_OUT_R] = (float*)jack_port_get_buffer( masterOutputR , nframes );
buffers.audio[Buffers::JACK_SIDECHAIN_KEY] = (float*)jack_port_get_buffer(sidechainKeyOutput,nframes);
buffers.audio[Buffers::JACK_SIDECHAIN_SIGNAL]=(float*)jack_port_get_buffer(sidechainSignalOutput,nframes);
buffers.midi [Buffers::MASTER_MIDI_INPUT] = (void*) jack_port_get_buffer( masterMidiInput, nframes );
memset( buffers.audio[Buffers::JACK_MASTER_OUT_L] , 0, sizeof(float) * nframes );
@ -305,6 +310,11 @@ int Jack::process (jack_nframes_t nframes)
buffers.audio[Buffers::MASTER_OUT_L][i] = (L + returnL) * masterVol;
buffers.audio[Buffers::MASTER_OUT_R][i] = (R + returnR) * masterVol;
/// write SEND content to JACK port
buffers.audio[Buffers::JACK_SEND_OUT][i] = buffers.audio[Buffers::SEND][i];
buffers.audio[Buffers::JACK_SIDECHAIN_KEY][i] = buffers.audio[Buffers::SIDECHAIN_KEY][i];
buffers.audio[Buffers::JACK_SIDECHAIN_SIGNAL][i] = buffers.audio[Buffers::SIDECHAIN_SIGNAL][i];
}

View File

@ -19,7 +19,7 @@ TrackOutput::TrackOutput(int t, AudioProcessor* ap) :
_toReverb = 0.0;
_toMaster = 0.8;
_toSidechain = 0.0;
_toPostSidechain = 1.0;
_toPostSidechain = 0.0;
}