Skip to content

Commit

Permalink
Using Maschine 2 knobs force pause
Browse files Browse the repository at this point in the history
  • Loading branch information
ypujante committed Jul 16, 2018
1 parent ed31f52 commit ac4d32a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ set(SMTG_CREATE_VST3_LINK OFF)
# Platform Detection
#-------------------------------------------------------------------------------

# TODO Fix broken link created to VST3

if(APPLE)
set(MAC TRUE)
elseif(WIN32)
Expand Down
24 changes: 23 additions & 1 deletion src/cpp/VAC6Processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,18 @@ tresult VAC6Processor::genericProcessInputs(ProcessData &data)
bool isNewLiveView = false;
bool isNewPause = false;

// some DAW like Maschine exposes the controls which then bypasses pause => force into pause
if(fPreviousState.fLCDInputX != fState.fLCDInputX ||
fPreviousState.fLCDHistoryOffset != fState.fLCDHistoryOffset)
{
if(fState.fLCDLiveView)
{
fState.updateLCDLiveView(data, false);
}
}

// TODO: in Maschine 2, updating vst parameters from processing does not change the knob in the Maschine 2 interface

// live view/pause has changed
if(fPreviousState.fLCDLiveView != fState.fLCDLiveView)
{
Expand Down Expand Up @@ -289,7 +301,7 @@ tresult VAC6Processor::genericProcessInputs(ProcessData &data)
fRightChannelProcessor->setDirty();
}

// Scrollbar has been moved (should happen only in pause mode)
// Scrollbar has been moved
if(fPreviousState.fLCDHistoryOffset != fState.fLCDHistoryOffset)
{
fZoomWindow->setWindowOffset(fState.fLCDHistoryOffset);
Expand Down Expand Up @@ -628,5 +640,15 @@ void VAC6Processor::State::updateLCDHistoryOffset(ProcessData &iData, double iLC
addOutputParameterChange(iData, EVAC6ParamID::kLCDHistoryOffset, LCDHistoryOffsetParamConverter::normalize(fLCDHistoryOffset));

}

///////////////////////////////////////////
// VAC6Processor::State::updateLCDLiveView
///////////////////////////////////////////
void VAC6Processor::State::updateLCDLiveView(ProcessData &iData, bool iLCDLiveView)
{
fLCDLiveView = iLCDLiveView;
addOutputParameterChange(iData, EVAC6ParamID::kLCDLiveView, BooleanParamConverter::normalize(fLCDLiveView));
}

}
}
1 change: 1 addition & 0 deletions src/cpp/VAC6Processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class VAC6Processor : public AudioEffect, ITimerCallback

void updateLCDInputX(ProcessData& iData, int iLCDInputX);
void updateLCDHistoryOffset(ProcessData& iData, double iLCDHistoryOffset);
void updateLCDLiveView(ProcessData& iData, bool iLCDLiveView);
};

bool fMaxLevelResetRequested;
Expand Down
1 change: 0 additions & 1 deletion src/cpp/controller/LCDScrollbarView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ CMouseEventResult LCDScrollbarView::onMouseDown(CPoint &where, const CButtonStat

if(fLCDLiveViewParameter->getValue())
{
DLOG_F(INFO, "LCDScrollbarView::onMouseDown() => stopping");
fLCDLiveViewParameter->setValue(false);
}

Expand Down

0 comments on commit ac4d32a

Please sign in to comment.