2013-08-04 19:04:26 +02:00
|
|
|
|
|
|
|
|
2013-08-22 05:32:51 +02:00
|
|
|
#include "guicontroller.hxx"
|
2013-08-04 19:04:26 +02:00
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
#include "../jack.hxx"
|
2013-08-04 19:49:27 +02:00
|
|
|
#include "../event.hxx"
|
2013-08-04 19:04:26 +02:00
|
|
|
#include "../gridlogic.hxx"
|
|
|
|
|
2013-10-12 14:19:37 +02:00
|
|
|
#include "../eventhandler.hxx"
|
|
|
|
|
2013-08-04 19:04:26 +02:00
|
|
|
extern Jack* jack;
|
|
|
|
|
|
|
|
LupppGUI::LupppGUI() :
|
|
|
|
Controller()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-11-09 23:11:45 +01:00
|
|
|
void LupppGUI::masterInputVol(float f)
|
|
|
|
{
|
|
|
|
EventMasterInputVol e( f );
|
|
|
|
writeToGuiRingbuffer( &e );
|
|
|
|
}
|
|
|
|
|
2013-11-09 22:50:21 +01:00
|
|
|
void LupppGUI::masterInputTo(int to,float f)
|
|
|
|
{
|
|
|
|
EventMasterInputTo e( (Event::INPUT_TO)to, f );
|
|
|
|
writeToGuiRingbuffer( &e );
|
|
|
|
}
|
|
|
|
|
|
|
|
void LupppGUI::masterInputToActive(int to,float f)
|
|
|
|
{
|
|
|
|
EventMasterInputToActive e( (Event::INPUT_TO)to, f );
|
|
|
|
writeToGuiRingbuffer( &e );
|
|
|
|
}
|
|
|
|
|
2013-08-04 19:49:27 +02:00
|
|
|
void LupppGUI::masterVolume(float f)
|
|
|
|
{
|
|
|
|
EventTrackVol e( -1, f );
|
|
|
|
writeToGuiRingbuffer( &e );
|
|
|
|
}
|
|
|
|
|
2013-10-09 01:15:31 +02:00
|
|
|
void LupppGUI::metronomeEnable(bool r)
|
|
|
|
{
|
|
|
|
EventMetronomeActive e( r );
|
|
|
|
writeToGuiRingbuffer( &e );
|
|
|
|
}
|
|
|
|
|
2013-09-23 13:51:41 +02:00
|
|
|
void LupppGUI::recordArm(int t, bool r)
|
2013-08-04 19:04:26 +02:00
|
|
|
{
|
2013-09-23 13:51:41 +02:00
|
|
|
EventTrackRecordArm e( t, r );
|
|
|
|
writeToGuiRingbuffer( &e );
|
2013-08-04 19:04:26 +02:00
|
|
|
}
|
|
|
|
|
2013-08-16 13:39:59 +02:00
|
|
|
void LupppGUI::trackSend(int t, int send, float r)
|
2013-08-04 19:49:27 +02:00
|
|
|
{
|
2013-08-16 13:39:59 +02:00
|
|
|
EventTrackSend e( t, static_cast<Event::SEND_TYPE>(send), r );
|
2013-08-04 19:49:27 +02:00
|
|
|
writeToGuiRingbuffer( &e );
|
|
|
|
}
|
|
|
|
|
2013-09-24 19:30:29 +02:00
|
|
|
void LupppGUI::trackSendActive(int t, int send, bool a)
|
|
|
|
{
|
|
|
|
EventTrackSendActive e( t, static_cast<Event::SEND_TYPE>(send), a );
|
|
|
|
writeToGuiRingbuffer( &e );
|
|
|
|
}
|
|
|
|
|
2013-08-04 19:04:26 +02:00
|
|
|
void LupppGUI::setSceneState(int t, int clip, GridLogic::State s)
|
|
|
|
{
|
2013-08-07 00:19:56 +02:00
|
|
|
EventGridState e( t, clip, s );
|
|
|
|
writeToGuiRingbuffer( &e );
|
2013-08-04 19:04:26 +02:00
|
|
|
}
|
|
|
|
|
2013-08-27 19:05:21 +02:00
|
|
|
void LupppGUI::launchScene( int scene )
|
|
|
|
{
|
|
|
|
EventGridLaunchScene e( scene );
|
|
|
|
writeToGuiRingbuffer( &e );
|
|
|
|
}
|
|
|
|
|
2013-08-04 19:04:26 +02:00
|
|
|
void LupppGUI::mute(int t, bool b)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-08-05 18:52:53 +02:00
|
|
|
void LupppGUI::tapTempo( bool b )
|
|
|
|
{
|
|
|
|
EventTimeTempoTap e(b);
|
|
|
|
writeToGuiRingbuffer( &e );
|
|
|
|
}
|
|
|
|
|
2013-09-05 23:35:48 +02:00
|
|
|
void LupppGUI::bpm(int bpm)
|
|
|
|
{
|
|
|
|
EventTimeBPM e(bpm);
|
|
|
|
writeToGuiRingbuffer( &e );
|
|
|
|
}
|
|
|
|
|
2013-08-04 19:04:26 +02:00
|
|
|
void LupppGUI::volume(int t, float f)
|
|
|
|
{
|
2013-08-04 19:49:27 +02:00
|
|
|
EventTrackVol e( t, f );
|
|
|
|
writeToGuiRingbuffer( &e );
|
2013-08-04 19:04:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void LupppGUI::progress(int t, int s, float f)
|
|
|
|
{
|
|
|
|
EventLooperProgress e( t, f );
|
|
|
|
writeToGuiRingbuffer( &e );
|
|
|
|
}
|