mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-05 17:11:40 -05:00
-Rearranged master track, moved metro buttons / blocks to bottom right.
This commit is contained in:
parent
95d1d7af70
commit
e90585bb39
3 changed files with 38 additions and 67 deletions
|
@ -174,17 +174,25 @@ void DiskReader::readMaster()
|
|||
// reverb
|
||||
{
|
||||
cJSON* reverb = cJSON_GetObjectItem( master, "reverb");
|
||||
|
||||
cJSON* active = cJSON_GetObjectItem( reverb, "active");
|
||||
cJSON* size = cJSON_GetObjectItem( reverb, "size");
|
||||
cJSON* wet = cJSON_GetObjectItem( reverb, "wet");
|
||||
cJSON* damping = cJSON_GetObjectItem( reverb, "damping");
|
||||
|
||||
if ( active && size && wet && damping )
|
||||
if ( reverb )
|
||||
{
|
||||
EventFxReverb e( active->valuedouble, size->valuedouble,
|
||||
wet->valuedouble, damping->valuedouble );
|
||||
writeToDspRingbuffer( &e );
|
||||
cJSON* active = cJSON_GetObjectItem( reverb, "active");
|
||||
cJSON* size = cJSON_GetObjectItem( reverb, "size");
|
||||
cJSON* wet = cJSON_GetObjectItem( reverb, "wet");
|
||||
cJSON* damping = cJSON_GetObjectItem( reverb, "damping");
|
||||
|
||||
if ( active && size && wet && damping )
|
||||
{
|
||||
EventFxReverb e( active->valuedouble, size->valuedouble,
|
||||
wet->valuedouble, damping->valuedouble );
|
||||
writeToDspRingbuffer( &e );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef DEBUG_STATE
|
||||
cout << "Session has no reverb element" << endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
#include "gmastertrack.hxx"
|
||||
|
||||
/*
|
||||
static void gmastertrack_reverb_cb(Fl_Widget *w, void *data)
|
||||
{
|
||||
int enable = ((Avtk::Reverb*)w)->getActive();
|
||||
|
@ -8,6 +9,7 @@ static void gmastertrack_reverb_cb(Fl_Widget *w, void *data)
|
|||
EventFxReverb e = EventFxReverb( enable, 0.5, 0.5, 0.5 );
|
||||
writeToDspRingbuffer( &e );
|
||||
}
|
||||
*/
|
||||
|
||||
static void gmastertrack_button_callback(Fl_Widget *w, void *data) {
|
||||
if ( strcmp( w->label(), "Metro" ) == 0 )
|
||||
|
@ -40,21 +42,19 @@ GMasterTrack::GMasterTrack(int x, int y, int w, int h, const char* l ) :
|
|||
title( strdup(l) ),
|
||||
bg( x, y , w, h, title ),
|
||||
|
||||
// with "true" master flag: won't influence grid
|
||||
// with "true" master flag: launches scenes instead of clips on tracks
|
||||
clipSel(x + 5, y + 26 + 102, 140, 294,"", true),
|
||||
|
||||
source(x+5, y+26, 140, 100, ""),
|
||||
volBox(x+5, y+422, 140, 172, ""),
|
||||
/*
|
||||
tapTempo(x + 25 + 52, y + 26 + 4, 63, 29,"Tap"),
|
||||
metronomeButton(x + 9,y + 26 + 4, 64, 29,"Metro"),
|
||||
*/
|
||||
sidechain(x+9, y +428, 94, 94, ""),
|
||||
reverb (x+9, y +527, 94, 62, ""),
|
||||
|
||||
tapTempo ( x + w * 2/4.f - 18, y + 426 + 41 * 0, 44,38, "Tap"),
|
||||
metronomeButton( x + w * 2/4.f - 18, y + 426 + 41 * 1, 44, 38,"Metro"),
|
||||
|
||||
tempoDial ( x + w * 2/4.f - 18, y + 426 + 41 * 2, 44, 38,"BPM"),
|
||||
aboutButton ( x + w * 2/4.f - 18, y + 426 + 41 * 3, 44, 38,"About"),
|
||||
|
||||
inputVolume(x + 9,y + 26 + 4, w - 18, 29,""),
|
||||
|
||||
volume(x+106, y +425, 36, 166, "")
|
||||
{
|
||||
ID = privateID++;
|
||||
|
@ -62,12 +62,9 @@ GMasterTrack::GMasterTrack(int x, int y, int w, int h, const char* l ) :
|
|||
bar = 0;
|
||||
|
||||
inputVolume.setOrientationHorizontal();
|
||||
/*
|
||||
|
||||
tapTempo.callback( gmastertrack_button_callback, &ID );
|
||||
metronomeButton.callback( gmastertrack_button_callback, 0 );
|
||||
*/
|
||||
reverb.callback( gmastertrack_reverb_cb, 0 );
|
||||
|
||||
//tapTempo.setBgColor( 0, 0, 0 );
|
||||
//metronomeButton.setBgColor( 0, 0, 0 );
|
||||
//metronomeButton.setColor( 0.4, 0.4, 0.4 );
|
||||
|
@ -75,34 +72,20 @@ GMasterTrack::GMasterTrack(int x, int y, int w, int h, const char* l ) :
|
|||
|
||||
for(int i = 0; i < 4; i++)
|
||||
{
|
||||
int offset = 0;
|
||||
/*
|
||||
if ( i > 1 )
|
||||
offset = 1;
|
||||
*/
|
||||
beatLights[i] = new Avtk::LightButton( x + 9 + 34 * i + offset, y + 25 + 37 , 30, 29, "" );
|
||||
beatLights[i+4] = new Avtk::LightButton( x + 9 + 34 * i + offset, y + 25 + 37 + 32, 30, 29, "" );
|
||||
beatLights[i] = new Avtk::LightButton( x + 11, y + 426 + 41 * i, 38, 38, "" );
|
||||
}
|
||||
|
||||
beatLights[0]->setColor( 0.0, 1.0 , 0.0 );
|
||||
beatLights[1]->setColor( 1.0, 1.0 , 0.0 );
|
||||
beatLights[2]->setColor( 1.0, 0.48, 0.0 );
|
||||
beatLights[3]->setColor( 1.0, 0.0 , 0.0 );
|
||||
|
||||
beatLights[4]->setColor( 0.0, 1.0 , 0.0 );
|
||||
beatLights[5]->setColor( 1.0, 1.0 , 0.0 );
|
||||
beatLights[6]->setColor( 1.0, 0.48, 0.0 );
|
||||
beatLights[7]->setColor( 1.0, 0.0 , 0.0 );
|
||||
beatLights[0]->setColor( 1.0, 0.0 , 0.0 );
|
||||
beatLights[1]->setColor( 1.0, 0.48, 0.0 );
|
||||
beatLights[2]->setColor( 1.0, 1.0 , 0.0 );
|
||||
beatLights[3]->setColor( 0.0, 1.0 , 0.0 );
|
||||
|
||||
volBox.maximum(1.0f);
|
||||
volBox.minimum(0.0f);
|
||||
volBox.color( FL_BLACK );
|
||||
volBox.selection_color( FL_BLUE );
|
||||
|
||||
source.maximum(1.0f);
|
||||
source.minimum(0.0f);
|
||||
source.color( FL_BLACK );
|
||||
source.selection_color( FL_BLUE );
|
||||
|
||||
volume.amplitude( 0.0, 0.0 );
|
||||
|
||||
|
@ -126,24 +109,14 @@ void GMasterTrack::setBarBeat(int b, int beat)
|
|||
//cout << bar << " " << num << endl;
|
||||
|
||||
// turn all off
|
||||
for( int i = 0; i < 8; i++)
|
||||
for( int i = 0; i < 4; i++)
|
||||
beatLights[i]->value( 0 );
|
||||
|
||||
// bar lights
|
||||
for( int i = 0; i < bar; i++)
|
||||
beatLights[i]->value( 1 );
|
||||
|
||||
|
||||
// beat starts at 4
|
||||
for( int i = 0; i < num; i++)
|
||||
beatLights[i+4]->value( 1 );
|
||||
|
||||
|
||||
beatLights[3-i]->value( 1 );
|
||||
}
|
||||
|
||||
// FIXME: refactor into time class?
|
||||
int bpm;
|
||||
|
||||
Avtk::Volume* GMasterTrack::getInputVolume()
|
||||
{
|
||||
return &inputVolume;
|
||||
|
@ -156,12 +129,6 @@ Avtk::ClipSelector* GMasterTrack::getClipSelector()
|
|||
{
|
||||
return &clipSel;
|
||||
}
|
||||
/*
|
||||
Avtk::Reverb* GMasterTrack::getReverb()
|
||||
{
|
||||
return &reverb;
|
||||
}
|
||||
*/
|
||||
|
||||
GMasterTrack::~GMasterTrack()
|
||||
{
|
||||
|
|
|
@ -39,7 +39,6 @@ class GMasterTrack : public Fl_Group
|
|||
Avtk::Volume* getInputVolume();
|
||||
Avtk::Volume* getVolume();
|
||||
Avtk::ClipSelector* getClipSelector();
|
||||
// Avtk::Reverb* getReverb()
|
||||
|
||||
~GMasterTrack();
|
||||
|
||||
|
@ -57,20 +56,17 @@ class GMasterTrack : public Fl_Group
|
|||
|
||||
Fl_Progress source;
|
||||
Fl_Progress volBox;
|
||||
/*
|
||||
|
||||
Avtk::Button tapTempo;
|
||||
Avtk::LightButton metronomeButton;
|
||||
*/
|
||||
Avtk::LightButton* beatLights[8];
|
||||
Avtk::Dial tempoDial;
|
||||
Avtk::Button aboutButton;
|
||||
|
||||
|
||||
Avtk::SidechainGain sidechain;
|
||||
Avtk::Reverb reverb;
|
||||
Avtk::LightButton* beatLights[4];
|
||||
|
||||
Avtk::Volume inputVolume;
|
||||
Avtk::Volume volume;
|
||||
|
||||
|
||||
static int privateID;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue