2013-12-08 22:44:43 +01:00
|
|
|
/*
|
|
|
|
* Author: Harry van Haaren 2013
|
|
|
|
* harryhaaren@gmail.com
|
2016-12-27 13:47:19 +01:00
|
|
|
*
|
2013-12-08 22:44:43 +01:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
2016-12-27 13:47:19 +01:00
|
|
|
*
|
2013-12-08 22:44:43 +01:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2016-12-27 13:47:19 +01:00
|
|
|
*
|
2013-12-08 22:44:43 +01:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2013-04-20 13:20:46 +02:00
|
|
|
|
2019-06-09 10:41:19 +02:00
|
|
|
#ifndef LOOPP_G_TRACK_H
|
|
|
|
#define LOOPP_G_TRACK_H
|
2013-04-20 13:20:46 +02:00
|
|
|
|
2013-05-13 23:04:12 +02:00
|
|
|
#include <iostream>
|
|
|
|
|
2013-04-20 13:20:46 +02:00
|
|
|
#include <FL/Fl.H>
|
|
|
|
#include <FL/Fl_Group.H>
|
|
|
|
#include <FL/Fl_Slider.H>
|
2013-05-16 14:38:46 +02:00
|
|
|
#include <FL/Fl_Progress.H>
|
2013-05-20 00:57:12 +02:00
|
|
|
#include <FL/Fl_Native_File_Chooser.H>
|
2013-04-20 13:20:46 +02:00
|
|
|
|
2013-10-18 13:32:57 +02:00
|
|
|
#include "avtk/avtk_box.h"
|
2013-05-13 03:43:44 +02:00
|
|
|
#include "avtk/avtk_dial.h"
|
2013-04-20 13:20:46 +02:00
|
|
|
#include "avtk/avtk_button.h"
|
2013-05-13 03:43:44 +02:00
|
|
|
#include "avtk/avtk_background.h"
|
2013-08-27 01:01:51 +02:00
|
|
|
#include "avtk/avtk_light_button.h"
|
2013-07-30 17:15:02 +02:00
|
|
|
#include "avtk/avtk_radial_status.h"
|
2013-04-20 13:20:46 +02:00
|
|
|
|
2013-09-08 15:24:27 +02:00
|
|
|
#include "avtk/volume.hxx"
|
2013-09-05 19:33:16 +02:00
|
|
|
#include "avtk/clipselector.hxx"
|
2013-05-13 23:04:12 +02:00
|
|
|
|
2013-07-24 20:09:35 +02:00
|
|
|
#include "config.hxx"
|
2013-05-20 00:57:12 +02:00
|
|
|
#include "audiobuffer.hxx"
|
2013-05-13 23:04:12 +02:00
|
|
|
#include "eventhandler.hxx"
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
2013-04-20 13:20:46 +02:00
|
|
|
class GTrack : public Fl_Group
|
|
|
|
{
|
2016-12-27 13:47:19 +01:00
|
|
|
public:
|
|
|
|
|
|
|
|
Avtk::Volume* getVolume()
|
|
|
|
{
|
|
|
|
return &volume;
|
|
|
|
}
|
|
|
|
Avtk::RadialStatus* getRadialStatus()
|
|
|
|
{
|
|
|
|
return &radial;
|
|
|
|
}
|
|
|
|
Avtk::ClipSelector* getClipSelector()
|
|
|
|
{
|
|
|
|
return &clipSel;
|
|
|
|
}
|
|
|
|
|
|
|
|
GTrack(int x, int y, int w, int h, const char* l = 0 );
|
|
|
|
|
|
|
|
|
|
|
|
// getters
|
|
|
|
float getSend();
|
|
|
|
float getXSide();
|
2017-01-09 15:38:19 +01:00
|
|
|
float getPan() {return panDial.value(); }
|
2017-03-08 20:20:45 +01:00
|
|
|
void setPan(float p) {panDial.value( (p+1.f)*0.5 ); }
|
2016-12-27 13:47:19 +01:00
|
|
|
|
|
|
|
bool getSendActive();
|
|
|
|
bool getKeyActive();
|
|
|
|
bool getRecordActive();
|
|
|
|
|
|
|
|
// setters
|
|
|
|
void setSend(float s);
|
|
|
|
void setXSide(float s);
|
|
|
|
|
|
|
|
void setSendActive(bool a);
|
|
|
|
void setKeyActive(bool a);
|
|
|
|
void setRecordActive(bool a);
|
|
|
|
|
|
|
|
void setJackSend(float s);
|
|
|
|
void setJackSendActivate(bool a);
|
|
|
|
|
|
|
|
int ID;
|
|
|
|
|
|
|
|
Avtk::Background bg;
|
|
|
|
|
|
|
|
Avtk::RadialStatus radial;
|
|
|
|
|
|
|
|
Avtk::ClipSelector clipSel;
|
|
|
|
|
2017-01-09 15:38:19 +01:00
|
|
|
Avtk::Box sndBox;
|
2016-12-27 13:47:19 +01:00
|
|
|
Avtk::Box volBox;
|
|
|
|
|
|
|
|
Avtk::Volume volume;
|
|
|
|
|
|
|
|
float getJackSend();
|
|
|
|
bool getJackSendActivate();
|
2016-11-19 00:35:43 +01:00
|
|
|
private:
|
2016-12-27 13:47:19 +01:00
|
|
|
Avtk::Box jackSendBox;
|
|
|
|
Avtk::Dial jackSendDial;
|
|
|
|
Avtk::LightButton jackSendActivate;
|
|
|
|
|
|
|
|
Avtk::Dial sendDial;
|
|
|
|
Avtk::LightButton sendActive;
|
|
|
|
|
|
|
|
Avtk::Dial xsideDial;
|
|
|
|
Avtk::LightButton keyActive;
|
|
|
|
|
|
|
|
Avtk::LightButton recordActive;
|
|
|
|
|
2017-01-09 15:38:19 +01:00
|
|
|
Avtk::Dial panDial;
|
|
|
|
|
2016-12-27 13:47:19 +01:00
|
|
|
|
|
|
|
static int privateID;
|
2013-04-20 13:20:46 +02:00
|
|
|
};
|
|
|
|
|
2019-06-09 10:41:19 +02:00
|
|
|
#endif // LOOPP_G_TRACK_H
|
2013-04-20 13:20:46 +02:00
|
|
|
|