2010-01-23 19:44:49 +00:00
|
|
|
/**********************************************************************
|
|
|
|
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
|
|
|
|
TimeScale.cpp
|
|
|
|
|
|
|
|
Clayton Otey
|
|
|
|
|
|
|
|
*******************************************************************//**
|
|
|
|
|
|
|
|
\class EffectTimeScale
|
|
|
|
\brief An EffectTimeScale does high quality sliding time scaling/pitch shifting
|
|
|
|
|
|
|
|
*//****************************************************************//**
|
|
|
|
|
|
|
|
\class TimeScaleDialog
|
|
|
|
\brief Dialog used with EffectTimeScale
|
|
|
|
|
|
|
|
*//*******************************************************************/
|
|
|
|
|
|
|
|
#include "../Audacity.h" // for USE_SBSMS
|
|
|
|
|
|
|
|
#if USE_SBSMS
|
|
|
|
|
|
|
|
#include "TimeScale.h"
|
|
|
|
|
|
|
|
#include "../ShuttleGui.h"
|
|
|
|
|
|
|
|
#include <math.h>
|
2011-07-02 18:35:18 +00:00
|
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
#include <wx/sizer.h>
|
|
|
|
#include <wx/stattext.h>
|
|
|
|
#include <wx/textctrl.h>
|
|
|
|
#include <wx/checkbox.h>
|
|
|
|
#include <wx/valtext.h>
|
|
|
|
|
|
|
|
//
|
|
|
|
// EffectTimeScale
|
|
|
|
//
|
|
|
|
|
2011-07-02 18:35:18 +00:00
|
|
|
EffectTimeScale::EffectTimeScale()
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
2010-06-07 06:41:32 +00:00
|
|
|
m_RatePercentChangeStart = 0;
|
|
|
|
m_RatePercentChangeEnd = 0;
|
|
|
|
m_PitchHalfStepsStart = 0;
|
|
|
|
m_PitchHalfStepsEnd = 0;
|
|
|
|
m_PitchPercentChangeStart = 0;
|
|
|
|
m_PitchPercentChangeEnd = 0;
|
2011-07-02 18:35:18 +00:00
|
|
|
m_RateSlideType = 0;
|
|
|
|
m_PitchSlideType = 0;
|
|
|
|
m_RateSlideReference = 0;
|
|
|
|
m_PitchSlideReference = 0;
|
|
|
|
m_RateLinkInitialFinal = false;
|
|
|
|
m_PitchLinkInitialFinal = false;
|
|
|
|
m_LinkRatePitch = false;
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
wxString EffectTimeScale::GetEffectDescription() {
|
|
|
|
// Note: This is useful only after change amount has been set.
|
|
|
|
return wxString::Format(_("Applied effect: %s"), this->GetEffectName().c_str());
|
|
|
|
}
|
|
|
|
|
|
|
|
bool EffectTimeScale::Init()
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool EffectTimeScale::PromptUser()
|
|
|
|
{
|
|
|
|
TimeScaleDialog dlog(this, mParent);
|
2010-06-07 06:41:32 +00:00
|
|
|
dlog.m_RatePercentChangeStart = m_RatePercentChangeStart;
|
|
|
|
dlog.m_RatePercentChangeEnd = m_RatePercentChangeEnd;
|
|
|
|
dlog.m_PitchHalfStepsStart = m_PitchHalfStepsStart;
|
|
|
|
dlog.m_PitchHalfStepsEnd = m_PitchHalfStepsEnd;
|
|
|
|
dlog.m_PitchPercentChangeStart = m_PitchPercentChangeStart;
|
|
|
|
dlog.m_PitchPercentChangeEnd = m_PitchPercentChangeEnd;
|
2011-07-02 18:35:18 +00:00
|
|
|
dlog.m_LinkRatePitch = m_LinkRatePitch;
|
|
|
|
dlog.m_RateSlideType = m_RateSlideType;
|
|
|
|
dlog.m_PitchSlideType = m_PitchSlideType;
|
|
|
|
dlog.m_RateSlideReference = m_RateSlideReference;
|
|
|
|
dlog.m_PitchSlideReference = m_PitchSlideReference;
|
|
|
|
dlog.m_RateLinkInitialFinal = m_RateLinkInitialFinal;
|
|
|
|
dlog.m_PitchLinkInitialFinal = m_PitchLinkInitialFinal;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
// Don't need to call TransferDataToWindow, although other
|
|
|
|
// Audacity dialogs (from which I derived this one) do it, because
|
|
|
|
// ShowModal calls stuff that eventually calls wxWindowBase::OnInitDialog,
|
|
|
|
// which calls dlog.TransferDataToWindow();
|
|
|
|
dlog.CentreOnParent();
|
|
|
|
dlog.ShowModal();
|
|
|
|
|
|
|
|
if (dlog.GetReturnCode() == wxID_CANCEL)
|
|
|
|
return false;
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
m_RatePercentChangeStart = dlog.m_RatePercentChangeStart;
|
|
|
|
m_RatePercentChangeEnd = dlog.m_RatePercentChangeEnd;
|
|
|
|
m_PitchHalfStepsStart = dlog.m_PitchHalfStepsStart;
|
|
|
|
m_PitchHalfStepsEnd = dlog.m_PitchHalfStepsEnd;
|
|
|
|
m_PitchPercentChangeStart = dlog.m_PitchPercentChangeStart;
|
|
|
|
m_PitchPercentChangeEnd = dlog.m_PitchPercentChangeEnd;
|
2011-07-02 18:35:18 +00:00
|
|
|
m_LinkRatePitch = dlog.m_LinkRatePitch;
|
|
|
|
m_RateSlideType = dlog.m_RateSlideType;
|
|
|
|
m_PitchSlideType = dlog.m_PitchSlideType;
|
|
|
|
m_RateSlideReference = dlog.m_RateSlideReference;
|
|
|
|
m_PitchSlideReference = dlog.m_PitchSlideReference;
|
|
|
|
m_RateLinkInitialFinal = dlog.m_RateLinkInitialFinal;
|
|
|
|
m_PitchLinkInitialFinal = dlog.m_PitchLinkInitialFinal;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool EffectTimeScale::TransferParameters( Shuttle & shuttle )
|
|
|
|
{
|
2010-06-07 06:41:32 +00:00
|
|
|
shuttle.TransferDouble(wxT("RatePercentChangeStart"),m_RatePercentChangeStart,0.0);
|
|
|
|
shuttle.TransferDouble(wxT("RatePercentChangeEnd"),m_RatePercentChangeEnd,0.0);
|
|
|
|
shuttle.TransferDouble(wxT("PitchHalfStepsStart"),m_PitchHalfStepsStart,0.0);
|
|
|
|
shuttle.TransferDouble(wxT("PitchHalfStepsEnd"),m_PitchHalfStepsEnd,0.0);
|
|
|
|
shuttle.TransferDouble(wxT("PitchPercentChangeStart"),m_PitchPercentChangeStart,0.0);
|
|
|
|
shuttle.TransferDouble(wxT("PitchPercentChangeEnd"),m_PitchPercentChangeEnd,0.0);
|
2011-07-02 18:35:18 +00:00
|
|
|
shuttle.TransferBool(wxT("LinkRatePitch"),m_LinkRatePitch,false);
|
|
|
|
shuttle.TransferInt(wxT("RateSlideType"),m_RateSlideType,0);
|
|
|
|
shuttle.TransferInt(wxT("PitchSlideType"),m_PitchSlideType,0);
|
|
|
|
shuttle.TransferInt(wxT("RateSlideReference"),m_RateSlideReference,0);
|
|
|
|
shuttle.TransferInt(wxT("PitchSlideReference"),m_PitchSlideReference,0);
|
|
|
|
shuttle.TransferBool(wxT("RateLinkInitialFinal"),m_RateLinkInitialFinal,false);
|
|
|
|
shuttle.TransferBool(wxT("PitchLinkInitialFinal"),m_PitchLinkInitialFinal,false);
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2011-07-02 18:35:18 +00:00
|
|
|
return true;
|
2010-06-07 06:41:32 +00:00
|
|
|
}
|
|
|
|
|
2011-01-29 22:32:39 +00:00
|
|
|
inline double PercentChangeToRatio(double percentChange)
|
|
|
|
{
|
|
|
|
return 1.0 + percentChange / 100.0;
|
|
|
|
}
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
inline double HalfStepsToPercentChange(double halfSteps)
|
|
|
|
{
|
2011-01-01 16:02:42 +00:00
|
|
|
return 100.0 * (pow(2.0,halfSteps/12.0) - 1.0);
|
2010-06-07 06:41:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline double PercentChangeToHalfSteps(double percentChange)
|
|
|
|
{
|
2010-06-08 01:06:03 +00:00
|
|
|
return 17.312340490667560888319096172023 * log(PercentChangeToRatio(percentChange));
|
2010-06-07 06:41:32 +00:00
|
|
|
}
|
|
|
|
|
2010-01-23 19:44:49 +00:00
|
|
|
bool EffectTimeScale::Process()
|
|
|
|
{
|
2011-07-02 18:35:18 +00:00
|
|
|
double pitchStart = PercentChangeToRatio(m_PitchPercentChangeStart);
|
|
|
|
double pitchEnd = PercentChangeToRatio(m_PitchPercentChangeEnd);
|
2010-06-07 06:41:32 +00:00
|
|
|
double rateStart = PercentChangeToRatio(m_RatePercentChangeStart);
|
|
|
|
double rateEnd = PercentChangeToRatio(m_RatePercentChangeEnd);
|
2011-07-02 18:35:18 +00:00
|
|
|
SlideType rateSlideType;
|
|
|
|
SlideType pitchSlideType;
|
|
|
|
if(rateStart == rateEnd || m_RateLinkInitialFinal) {
|
|
|
|
rateSlideType = SlideConstant;
|
|
|
|
} else if(m_RateSlideType == 0) {
|
|
|
|
if(m_RateSlideReference == 1) {
|
|
|
|
rateSlideType = SlideLinearInputRate;
|
|
|
|
} else {
|
|
|
|
rateSlideType = SlideLinearOutputRate;
|
|
|
|
}
|
|
|
|
} else if(m_RateSlideType == 1) {
|
|
|
|
if(m_RateSlideReference == 1) {
|
|
|
|
rateSlideType = SlideLinearInputStretch;
|
|
|
|
} else {
|
|
|
|
rateSlideType = SlideLinearOutputStretch;
|
|
|
|
}
|
|
|
|
} else if(m_RateSlideType == 2) {
|
|
|
|
if(m_RateSlideReference == 1) {
|
|
|
|
rateSlideType = SlideGeometricInput;
|
|
|
|
} else {
|
|
|
|
rateSlideType = SlideGeometricOutput;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(pitchStart == pitchEnd || m_PitchLinkInitialFinal) {
|
|
|
|
pitchSlideType = SlideConstant;
|
|
|
|
} else if(m_PitchSlideType == 0) {
|
|
|
|
pitchSlideType = SlideLinearInputRate;
|
|
|
|
} else if(m_PitchSlideType == 1) {
|
|
|
|
pitchSlideType = SlideLinearInputStretch;
|
|
|
|
} else if(m_PitchSlideType == 2) {
|
|
|
|
pitchSlideType = SlideGeometricInput;
|
|
|
|
}
|
|
|
|
bool rateReferenceInput = (m_RateSlideReference == 1);
|
|
|
|
bool pitchReferenceInput = (m_PitchSlideReference == 1);
|
|
|
|
this->EffectSBSMS::setParameters(rateStart,rateEnd,pitchStart,pitchEnd,rateSlideType,pitchSlideType,m_LinkRatePitch,rateReferenceInput,pitchReferenceInput);
|
2010-01-23 19:44:49 +00:00
|
|
|
return this->EffectSBSMS::Process();
|
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
// TimeScaleDialog
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
#define RATE_PERCENTCHANGE_MIN_SLIDER -75
|
2011-07-02 18:35:18 +00:00
|
|
|
#define RATE_PERCENTCHANGE_MAX_SLIDER 150
|
2010-06-07 06:41:32 +00:00
|
|
|
#define RATE_PERCENTCHANGE_MIN_TEXT -90
|
2011-07-02 18:35:18 +00:00
|
|
|
#define RATE_PERCENTCHANGE_MAX_TEXT 500
|
2010-06-07 06:41:32 +00:00
|
|
|
#define RATE_PERCENTCHANGE_DEFAULT 0
|
2011-07-02 18:35:18 +00:00
|
|
|
#define PITCH_HALFSTEPS_MIN_TEXT -24
|
|
|
|
#define PITCH_HALFSTEPS_MAX_TEXT 24
|
|
|
|
#define PITCH_PERCENTCHANGE_MIN_TEXT -75
|
|
|
|
#define PITCH_PERCENTCHANGE_MAX_TEXT 300
|
2010-06-07 06:41:32 +00:00
|
|
|
|
|
|
|
#define ID_TEXT_RATE_PERCENTCHANGE_START 10001
|
|
|
|
#define ID_TEXT_RATE_PERCENTCHANGE_END 10002
|
|
|
|
#define ID_TEXT_PITCH_HALFSTEPS_START 10003
|
|
|
|
#define ID_TEXT_PITCH_HALFSTEPS_END 10004
|
|
|
|
#define ID_TEXT_PITCH_PERCENTCHANGE_START 10005
|
|
|
|
#define ID_TEXT_PITCH_PERCENTCHANGE_END 10006
|
|
|
|
#define ID_SLIDER_RATE_PERCENTCHANGE_START 10007
|
|
|
|
#define ID_SLIDER_RATE_PERCENTCHANGE_END 10008
|
2011-07-02 18:35:18 +00:00
|
|
|
#define ID_CHECKBOX_LINKRATEPITCH 10010
|
|
|
|
#define ID_CHOICE_RATE_SLIDETYPE 10011
|
|
|
|
#define ID_CHOICE_PITCH_SLIDETYPE 10012
|
|
|
|
#define ID_CHOICE_RATE_SLIDEREFERENCE 10013
|
|
|
|
#define ID_CHOICE_PITCH_SLIDEREFERENCE 10014
|
|
|
|
#define ID_CHECKBOX_RATE_LINKINITIALFINAL 10015
|
|
|
|
#define ID_CHECKBOX_PITCH_LINKINITIALFINAL 10016
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
// event table for TimeScaleDialog
|
|
|
|
|
|
|
|
BEGIN_EVENT_TABLE(TimeScaleDialog, EffectDialog)
|
2010-06-07 06:41:32 +00:00
|
|
|
EVT_TEXT(ID_TEXT_RATE_PERCENTCHANGE_START, TimeScaleDialog::OnText_RatePercentChangeStart)
|
|
|
|
EVT_TEXT(ID_TEXT_RATE_PERCENTCHANGE_END, TimeScaleDialog::OnText_RatePercentChangeEnd)
|
|
|
|
EVT_TEXT(ID_TEXT_PITCH_HALFSTEPS_START, TimeScaleDialog::OnText_PitchHalfStepsStart)
|
|
|
|
EVT_TEXT(ID_TEXT_PITCH_HALFSTEPS_END, TimeScaleDialog::OnText_PitchHalfStepsEnd)
|
|
|
|
EVT_TEXT(ID_TEXT_PITCH_PERCENTCHANGE_START, TimeScaleDialog::OnText_PitchPercentChangeStart)
|
|
|
|
EVT_TEXT(ID_TEXT_PITCH_PERCENTCHANGE_END, TimeScaleDialog::OnText_PitchPercentChangeEnd)
|
|
|
|
EVT_SLIDER(ID_SLIDER_RATE_PERCENTCHANGE_START, TimeScaleDialog::OnSlider_RatePercentChangeStart)
|
|
|
|
EVT_SLIDER(ID_SLIDER_RATE_PERCENTCHANGE_END, TimeScaleDialog::OnSlider_RatePercentChangeEnd)
|
2011-07-02 18:35:18 +00:00
|
|
|
EVT_CHECKBOX(ID_CHECKBOX_LINKRATEPITCH, TimeScaleDialog::OnCheckBox_LinkRatePitch)
|
|
|
|
EVT_CHOICE(ID_CHOICE_RATE_SLIDETYPE, TimeScaleDialog::OnChoice_RateSlideType)
|
|
|
|
EVT_CHOICE(ID_CHOICE_PITCH_SLIDETYPE, TimeScaleDialog::OnChoice_PitchSlideType)
|
|
|
|
EVT_CHOICE(ID_CHOICE_RATE_SLIDEREFERENCE, TimeScaleDialog::OnChoice_RateSlideReference)
|
|
|
|
EVT_CHOICE(ID_CHOICE_PITCH_SLIDEREFERENCE, TimeScaleDialog::OnChoice_PitchSlideReference)
|
|
|
|
EVT_CHECKBOX(ID_CHECKBOX_RATE_LINKINITIALFINAL, TimeScaleDialog::OnCheckBox_RateLinkInitialFinal)
|
|
|
|
EVT_CHECKBOX(ID_CHECKBOX_PITCH_LINKINITIALFINAL, TimeScaleDialog::OnCheckBox_PitchLinkInitialFinal)
|
|
|
|
EVT_BUTTON(ID_EFFECT_PREVIEW, TimeScaleDialog::OnPreview)
|
2010-01-23 19:44:49 +00:00
|
|
|
END_EVENT_TABLE()
|
|
|
|
|
|
|
|
TimeScaleDialog::TimeScaleDialog(EffectTimeScale *effect, wxWindow *parent)
|
2011-07-02 18:35:18 +00:00
|
|
|
: EffectDialog(parent, _("Time Scale"), PROCESS_EFFECT),
|
2010-01-23 19:44:49 +00:00
|
|
|
mEffect(effect)
|
|
|
|
{
|
2011-07-02 18:35:18 +00:00
|
|
|
rateSlideTypes.Add(_("Linear Rate"));
|
|
|
|
rateSlideTypes.Add(_("Linear Stretch"));
|
|
|
|
rateSlideTypes.Add(_("Geometric"));
|
|
|
|
pitchSlideTypes.Add(_("Linear Rate"));
|
|
|
|
pitchSlideTypes.Add(_("Linear Stretch"));
|
|
|
|
pitchSlideTypes.Add(_("Geometric"));
|
|
|
|
rateSlideReferences.Add(_("Output"));
|
|
|
|
rateSlideReferences.Add(_("Input"));
|
|
|
|
pitchSlideReferences.Add(_("Output"));
|
|
|
|
pitchSlideReferences.Add(_("Input"));
|
|
|
|
|
2010-01-23 19:44:49 +00:00
|
|
|
m_bLoopDetect = false;
|
|
|
|
|
|
|
|
// NULL out these control members because there are some cases where the
|
|
|
|
// event table handlers get called during this method, and those handlers that
|
|
|
|
// can cause trouble check for NULL.
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
m_pTextCtrl_RatePercentChangeStart = NULL;
|
|
|
|
m_pTextCtrl_RatePercentChangeEnd = NULL;
|
|
|
|
m_pSlider_RatePercentChangeStart = NULL;
|
|
|
|
m_pSlider_RatePercentChangeEnd = NULL;
|
|
|
|
m_pTextCtrl_PitchPercentChangeStart = NULL;
|
|
|
|
m_pTextCtrl_PitchPercentChangeEnd = NULL;
|
|
|
|
m_pTextCtrl_PitchHalfStepsStart = NULL;
|
|
|
|
m_pTextCtrl_PitchHalfStepsEnd = NULL;
|
2011-07-02 18:35:18 +00:00
|
|
|
m_pCheckBox_LinkRatePitch = NULL;
|
|
|
|
m_pChoice_RateSlideType = NULL;
|
|
|
|
m_pChoice_PitchSlideType = NULL;
|
|
|
|
m_pChoice_RateSlideReference = NULL;
|
|
|
|
m_pChoice_PitchSlideReference = NULL;
|
|
|
|
m_pCheckBox_RateLinkInitialFinal = NULL;
|
|
|
|
m_pCheckBox_PitchLinkInitialFinal = NULL;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
// effect parameters
|
2010-06-07 06:41:32 +00:00
|
|
|
m_RatePercentChangeStart = 0;
|
|
|
|
m_RatePercentChangeEnd = 0;
|
|
|
|
m_PitchPercentChangeStart = 0;
|
|
|
|
m_PitchPercentChangeEnd = 0;
|
|
|
|
m_PitchHalfStepsStart = 0;
|
|
|
|
m_PitchHalfStepsEnd = 0;
|
2011-07-02 18:35:18 +00:00
|
|
|
m_LinkRatePitch = false;
|
|
|
|
m_RateSlideType = 0;
|
|
|
|
m_PitchSlideType = 0;
|
|
|
|
m_RateSlideReference = 0;
|
|
|
|
m_PitchSlideReference = 0;
|
|
|
|
m_RateLinkInitialFinal = false;
|
|
|
|
m_PitchLinkInitialFinal = false;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
Init();
|
|
|
|
}
|
|
|
|
|
2011-07-02 18:35:18 +00:00
|
|
|
void TimeScaleDialog::OnPreview(wxCommandEvent & event)
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
2011-07-02 18:35:18 +00:00
|
|
|
mEffect->Preview();
|
|
|
|
}
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2011-07-02 18:35:18 +00:00
|
|
|
void TimeScaleDialog::PopulateOrExchange(ShuttleGui & S)
|
|
|
|
{
|
2010-01-23 19:44:49 +00:00
|
|
|
wxTextValidator nullvld(wxFILTER_INCLUDE_CHAR_LIST);
|
|
|
|
wxTextValidator numvld(wxFILTER_NUMERIC);
|
2011-07-02 18:35:18 +00:00
|
|
|
|
2010-01-23 19:44:49 +00:00
|
|
|
S.SetBorder(10);
|
|
|
|
S.StartHorizontalLay(wxCENTER, false);
|
|
|
|
{
|
|
|
|
S.AddTitle(_("Sliding Time Scale/Pitch Shift") +
|
|
|
|
wxString(wxT("\n")) +
|
|
|
|
_("using SBSMS, by Clayton Otey"));
|
|
|
|
}
|
|
|
|
S.EndHorizontalLay();
|
|
|
|
S.SetBorder(5);
|
2011-07-02 18:35:18 +00:00
|
|
|
|
|
|
|
S.StartStatic(_("Tempo Change"));
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
2011-07-02 18:35:18 +00:00
|
|
|
S.StartHorizontalLay(wxEXPAND);
|
2010-06-07 06:41:32 +00:00
|
|
|
{
|
2011-07-02 18:35:18 +00:00
|
|
|
S.StartVerticalLay(wxCENTER);
|
|
|
|
{
|
|
|
|
S.StartHorizontalLay(wxCENTER,0);
|
|
|
|
{
|
|
|
|
m_pTextCtrl_RatePercentChangeStart = S.Id(ID_TEXT_RATE_PERCENTCHANGE_START)
|
|
|
|
.AddTextBox(_("Initial (%)"), wxT(""), 12);
|
|
|
|
m_pTextCtrl_RatePercentChangeStart->SetValidator(numvld);
|
|
|
|
}
|
|
|
|
S.EndHorizontalLay();
|
|
|
|
|
|
|
|
S.StartHorizontalLay(wxEXPAND,0);
|
|
|
|
{
|
|
|
|
S.SetStyle(wxSL_HORIZONTAL);
|
|
|
|
m_pSlider_RatePercentChangeStart = S.Id(ID_SLIDER_RATE_PERCENTCHANGE_START)
|
|
|
|
.AddSlider(wxT(""), (int)RATE_PERCENTCHANGE_DEFAULT, (int)RATE_PERCENTCHANGE_MAX_SLIDER, (int)RATE_PERCENTCHANGE_MIN_SLIDER);
|
|
|
|
}
|
|
|
|
S.EndHorizontalLay();
|
|
|
|
}
|
|
|
|
S.EndVerticalLay();
|
|
|
|
|
|
|
|
S.StartVerticalLay(wxCENTER);
|
|
|
|
{
|
|
|
|
S.StartHorizontalLay(wxCENTER,0);
|
|
|
|
{
|
|
|
|
m_pTextCtrl_RatePercentChangeEnd = S.Id(ID_TEXT_RATE_PERCENTCHANGE_END)
|
|
|
|
.AddTextBox(_("Final (%)"), wxT(""), 12);
|
|
|
|
m_pTextCtrl_RatePercentChangeEnd->SetValidator(numvld);
|
|
|
|
}
|
|
|
|
S.EndHorizontalLay();
|
|
|
|
|
|
|
|
S.StartHorizontalLay(wxEXPAND,0);
|
|
|
|
{
|
|
|
|
S.SetStyle(wxSL_HORIZONTAL);
|
|
|
|
m_pSlider_RatePercentChangeEnd = S.Id(ID_SLIDER_RATE_PERCENTCHANGE_END)
|
|
|
|
.AddSlider(wxT(""), (int)RATE_PERCENTCHANGE_DEFAULT, (int)RATE_PERCENTCHANGE_MAX_SLIDER, (int)RATE_PERCENTCHANGE_MIN_SLIDER);
|
|
|
|
}
|
|
|
|
S.EndHorizontalLay();
|
|
|
|
}
|
|
|
|
S.EndVerticalLay();
|
2010-06-07 06:41:32 +00:00
|
|
|
}
|
|
|
|
S.EndHorizontalLay();
|
|
|
|
|
2011-07-02 18:35:18 +00:00
|
|
|
S.StartHorizontalLay(0,0);
|
2010-06-07 06:41:32 +00:00
|
|
|
{
|
2011-07-02 18:35:18 +00:00
|
|
|
m_pChoice_RateSlideType = S.Id(ID_CHOICE_RATE_SLIDETYPE)
|
|
|
|
.AddChoice(_("Slide Type"),_("Linear Rate"),&rateSlideTypes);
|
|
|
|
m_pChoice_RateSlideType->SetSelection(0);
|
|
|
|
m_pChoice_RateSlideType->SetSizeHints(-1,-1);
|
|
|
|
m_pChoice_RateSlideReference = S.Id(ID_CHOICE_RATE_SLIDEREFERENCE)
|
|
|
|
.AddChoice(_("Reference"),_("Output"),&rateSlideReferences);
|
|
|
|
m_pChoice_RateSlideReference->SetSelection(0);
|
|
|
|
m_pChoice_RateSlideReference->SetSizeHints(-1,-1);
|
|
|
|
m_pCheckBox_RateLinkInitialFinal = S.Id(ID_CHECKBOX_RATE_LINKINITIALFINAL)
|
|
|
|
.AddCheckBox(_("Link Initial/Final"), wxT("false"));
|
2010-06-07 06:41:32 +00:00
|
|
|
}
|
|
|
|
S.EndHorizontalLay();
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
2010-06-07 06:41:32 +00:00
|
|
|
S.EndStatic();
|
|
|
|
|
2011-07-02 18:35:18 +00:00
|
|
|
// Pitch Change
|
|
|
|
S.StartStatic(_("Pitch Shift"));
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
2010-06-07 06:41:32 +00:00
|
|
|
S.StartMultiColumn(2, wxCENTER);
|
|
|
|
{
|
2011-07-02 18:35:18 +00:00
|
|
|
S.StartMultiColumn(2, wxCENTER);
|
|
|
|
{
|
|
|
|
m_pTextCtrl_PitchHalfStepsStart = S.Id(ID_TEXT_PITCH_HALFSTEPS_START)
|
|
|
|
.AddTextBox(_("Initial (semitones) [-24 to 24]:"), wxT(""), 12);
|
|
|
|
m_pTextCtrl_PitchHalfStepsStart->SetValidator(numvld);
|
|
|
|
m_pTextCtrl_PitchPercentChangeStart = S.Id(ID_TEXT_PITCH_PERCENTCHANGE_START)
|
|
|
|
.AddTextBox(_("Initial (%) [-75 to 300]:"), wxT(""), 12);
|
|
|
|
m_pTextCtrl_PitchPercentChangeStart->SetValidator(numvld);
|
|
|
|
}
|
|
|
|
S.EndMultiColumn();
|
2010-06-07 06:41:32 +00:00
|
|
|
|
2011-07-02 18:35:18 +00:00
|
|
|
S.StartMultiColumn(2, wxCENTER);
|
|
|
|
{
|
|
|
|
m_pTextCtrl_PitchHalfStepsEnd = S.Id(ID_TEXT_PITCH_HALFSTEPS_END)
|
|
|
|
.AddTextBox(_("Final (semitones) [-24 to 24]:"), wxT(""), 12);
|
|
|
|
m_pTextCtrl_PitchHalfStepsEnd->SetValidator(numvld);
|
|
|
|
|
|
|
|
m_pTextCtrl_PitchPercentChangeEnd = S.Id(ID_TEXT_PITCH_PERCENTCHANGE_END)
|
|
|
|
.AddTextBox(_("Final (%) [-75 to 300]:"), wxT(""), 12);
|
|
|
|
m_pTextCtrl_PitchPercentChangeEnd->SetValidator(numvld);
|
|
|
|
}
|
|
|
|
S.EndMultiColumn();
|
2010-06-07 06:41:32 +00:00
|
|
|
}
|
|
|
|
S.EndMultiColumn();
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2011-07-02 18:35:18 +00:00
|
|
|
S.StartHorizontalLay(0,0);
|
2010-06-07 06:41:32 +00:00
|
|
|
{
|
2011-07-02 18:35:18 +00:00
|
|
|
m_pChoice_PitchSlideType = S.Id(ID_CHOICE_PITCH_SLIDETYPE)
|
|
|
|
.AddChoice(_("Slide Type"),_("Linear"),&pitchSlideTypes);
|
|
|
|
m_pChoice_PitchSlideType->SetSelection(0);
|
|
|
|
m_pChoice_PitchSlideType->SetSizeHints(-1,-1);
|
|
|
|
m_pChoice_PitchSlideReference = S.Id(ID_CHOICE_PITCH_SLIDEREFERENCE)
|
|
|
|
.AddChoice(_("Reference"),_("Output"),&pitchSlideReferences);
|
|
|
|
m_pChoice_PitchSlideReference->SetSelection(0);
|
|
|
|
m_pChoice_PitchSlideReference->SetSizeHints(-1,-1);
|
|
|
|
m_pCheckBox_PitchLinkInitialFinal = S.Id(ID_CHECKBOX_PITCH_LINKINITIALFINAL)
|
|
|
|
.AddCheckBox(_("Link Initial/Final"), wxT("false"));
|
2010-06-07 06:41:32 +00:00
|
|
|
}
|
2011-07-02 18:35:18 +00:00
|
|
|
S.EndHorizontalLay();
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
2010-06-07 06:41:32 +00:00
|
|
|
S.EndStatic();
|
2011-07-02 18:35:18 +00:00
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
|
|
|
|
S.StartStatic(_("Options"));
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
2010-06-07 06:41:32 +00:00
|
|
|
S.StartHorizontalLay(wxEXPAND);
|
|
|
|
{
|
|
|
|
S.SetStyle(wxSL_HORIZONTAL);
|
2011-07-02 18:35:18 +00:00
|
|
|
m_pCheckBox_LinkRatePitch = S.Id(ID_CHECKBOX_LINKRATEPITCH)
|
|
|
|
.AddCheckBox(_("Link Rate/Pitch (Resample)"), wxT("false"));
|
2010-06-07 06:41:32 +00:00
|
|
|
}
|
|
|
|
S.EndHorizontalLay();
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
2010-06-07 06:41:32 +00:00
|
|
|
S.EndStatic();
|
2011-07-02 18:35:18 +00:00
|
|
|
|
2010-01-23 19:44:49 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool TimeScaleDialog::TransferDataToWindow()
|
|
|
|
{
|
|
|
|
m_bLoopDetect = true;
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
this->Update_Text_RatePercentChangeStart();
|
|
|
|
this->Update_Text_RatePercentChangeEnd();
|
|
|
|
this->Update_Slider_RatePercentChangeStart();
|
|
|
|
this->Update_Slider_RatePercentChangeEnd();
|
|
|
|
this->Update_Text_PitchHalfStepsStart();
|
|
|
|
this->Update_Text_PitchHalfStepsEnd();
|
|
|
|
this->Update_Text_PitchPercentChangeStart();
|
|
|
|
this->Update_Text_PitchPercentChangeEnd();
|
2011-07-02 18:35:18 +00:00
|
|
|
this->Update_CheckBox_LinkRatePitch();
|
|
|
|
this->Update_Choice_RateSlideType();
|
|
|
|
this->Update_Choice_PitchSlideType();
|
|
|
|
this->Update_Choice_RateSlideReference();
|
|
|
|
this->Update_Choice_PitchSlideReference();
|
|
|
|
this->Update_CheckBox_RateLinkInitialFinal();
|
|
|
|
this->Update_CheckBox_PitchLinkInitialFinal();
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
m_bLoopDetect = false;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool TimeScaleDialog::TransferDataFromWindow()
|
|
|
|
{
|
|
|
|
wxString str;
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
if (m_pTextCtrl_RatePercentChangeStart) {
|
|
|
|
str = m_pTextCtrl_RatePercentChangeStart->GetValue();
|
|
|
|
double newValue = 0;
|
|
|
|
str.ToDouble(&newValue);
|
|
|
|
m_RatePercentChangeStart = newValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (m_pTextCtrl_RatePercentChangeEnd) {
|
|
|
|
str = m_pTextCtrl_RatePercentChangeEnd->GetValue();
|
|
|
|
double newValue = 0;
|
|
|
|
str.ToDouble(&newValue);
|
|
|
|
m_RatePercentChangeEnd = newValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (m_pTextCtrl_PitchHalfStepsStart) {
|
|
|
|
str = m_pTextCtrl_PitchHalfStepsStart->GetValue();
|
2010-01-23 19:44:49 +00:00
|
|
|
double newValue = 0;
|
|
|
|
str.ToDouble(&newValue);
|
2010-06-07 06:41:32 +00:00
|
|
|
m_PitchHalfStepsStart = newValue;
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
if (m_pTextCtrl_PitchHalfStepsEnd) {
|
|
|
|
str = m_pTextCtrl_PitchHalfStepsEnd->GetValue();
|
2010-01-23 19:44:49 +00:00
|
|
|
double newValue = 0;
|
|
|
|
str.ToDouble(&newValue);
|
2010-06-07 06:41:32 +00:00
|
|
|
m_PitchHalfStepsEnd = newValue;
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
if (m_pTextCtrl_PitchPercentChangeStart) {
|
|
|
|
str = m_pTextCtrl_PitchPercentChangeStart->GetValue();
|
2010-01-23 19:44:49 +00:00
|
|
|
double newValue = 0;
|
|
|
|
str.ToDouble(&newValue);
|
2010-06-07 06:41:32 +00:00
|
|
|
m_PitchPercentChangeStart = newValue;
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
if (m_pTextCtrl_PitchPercentChangeEnd) {
|
|
|
|
str = m_pTextCtrl_PitchPercentChangeEnd->GetValue();
|
2010-01-23 19:44:49 +00:00
|
|
|
double newValue = 0;
|
|
|
|
str.ToDouble(&newValue);
|
2010-06-07 06:41:32 +00:00
|
|
|
m_PitchPercentChangeEnd = newValue;
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
|
2011-07-02 18:35:18 +00:00
|
|
|
if(m_pCheckBox_LinkRatePitch) {
|
|
|
|
m_LinkRatePitch = m_pCheckBox_LinkRatePitch->GetValue();
|
|
|
|
}
|
|
|
|
|
|
|
|
if(m_pChoice_RateSlideType) {
|
|
|
|
m_RateSlideType = m_pChoice_RateSlideType->GetSelection();
|
|
|
|
}
|
|
|
|
|
|
|
|
if(m_pChoice_PitchSlideType) {
|
|
|
|
m_PitchSlideType = m_pChoice_PitchSlideType->GetSelection();
|
|
|
|
}
|
|
|
|
|
|
|
|
if(m_pChoice_RateSlideReference) {
|
|
|
|
m_RateSlideReference = m_pChoice_RateSlideReference->GetSelection();
|
|
|
|
}
|
|
|
|
|
|
|
|
if(m_pChoice_PitchSlideReference) {
|
|
|
|
m_PitchSlideReference = m_pChoice_PitchSlideReference->GetSelection();
|
|
|
|
}
|
|
|
|
|
|
|
|
if(m_pCheckBox_RateLinkInitialFinal) {
|
|
|
|
m_RateLinkInitialFinal = m_pCheckBox_RateLinkInitialFinal->GetValue();
|
|
|
|
}
|
|
|
|
|
|
|
|
if(m_pCheckBox_PitchLinkInitialFinal) {
|
|
|
|
m_PitchLinkInitialFinal = m_pCheckBox_PitchLinkInitialFinal->GetValue();
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool TimeScaleDialog::CheckParameters()
|
|
|
|
{
|
|
|
|
return
|
2010-06-07 06:41:32 +00:00
|
|
|
(m_RatePercentChangeStart >= RATE_PERCENTCHANGE_MIN_TEXT &&
|
|
|
|
m_RatePercentChangeStart <= RATE_PERCENTCHANGE_MAX_TEXT)
|
|
|
|
&&
|
|
|
|
(m_RatePercentChangeEnd >= RATE_PERCENTCHANGE_MIN_TEXT &&
|
|
|
|
m_RatePercentChangeEnd <= RATE_PERCENTCHANGE_MAX_TEXT)
|
|
|
|
&&
|
2011-07-02 18:35:18 +00:00
|
|
|
(m_LinkRatePitch ||
|
|
|
|
((m_PitchHalfStepsStart >= PITCH_HALFSTEPS_MIN_TEXT &&
|
|
|
|
m_PitchHalfStepsStart <= PITCH_HALFSTEPS_MAX_TEXT)
|
|
|
|
&&
|
|
|
|
(m_PitchHalfStepsEnd >= PITCH_HALFSTEPS_MIN_TEXT &&
|
|
|
|
m_PitchHalfStepsEnd <= PITCH_HALFSTEPS_MAX_TEXT)
|
|
|
|
&&
|
|
|
|
(m_PitchPercentChangeStart >= PITCH_PERCENTCHANGE_MIN_TEXT &&
|
|
|
|
m_PitchPercentChangeStart <= PITCH_PERCENTCHANGE_MAX_TEXT)
|
|
|
|
&&
|
|
|
|
(m_PitchPercentChangeEnd >= PITCH_PERCENTCHANGE_MIN_TEXT &&
|
|
|
|
m_PitchPercentChangeEnd <= PITCH_PERCENTCHANGE_MAX_TEXT)));
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// handler implementations for TimeScaleDialog
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
void TimeScaleDialog::OnText_RatePercentChangeStart(wxCommandEvent & event)
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
|
|
|
if (m_bLoopDetect)
|
|
|
|
return;
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
if (m_pTextCtrl_RatePercentChangeStart) {
|
|
|
|
wxString str = m_pTextCtrl_RatePercentChangeStart->GetValue();
|
2010-01-23 19:44:49 +00:00
|
|
|
double newValue = 0;
|
|
|
|
str.ToDouble(&newValue);
|
2010-06-07 06:41:32 +00:00
|
|
|
m_RatePercentChangeStart = newValue;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
m_bLoopDetect = true;
|
2010-06-07 06:41:32 +00:00
|
|
|
this->Update_Slider_RatePercentChangeStart();
|
2011-07-02 18:35:18 +00:00
|
|
|
if(m_LinkRatePitch) {
|
|
|
|
m_PitchPercentChangeStart = m_RatePercentChangeStart;
|
|
|
|
m_PitchHalfStepsStart = PercentChangeToHalfSteps(m_PitchPercentChangeStart);
|
|
|
|
this->Update_Text_PitchPercentChangeStart();
|
|
|
|
this->Update_Text_PitchHalfStepsStart();
|
|
|
|
if(m_PitchLinkInitialFinal) {
|
|
|
|
m_PitchPercentChangeEnd = m_RatePercentChangeStart;
|
|
|
|
m_PitchHalfStepsEnd = m_PitchHalfStepsStart;
|
|
|
|
this->Update_Text_PitchPercentChangeEnd();
|
|
|
|
this->Update_Text_PitchHalfStepsEnd();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(m_RateLinkInitialFinal) {
|
|
|
|
m_RatePercentChangeEnd = m_RatePercentChangeStart;
|
|
|
|
this->Update_Text_RatePercentChangeEnd();
|
|
|
|
this->Update_Slider_RatePercentChangeEnd();
|
|
|
|
}
|
2010-01-23 19:44:49 +00:00
|
|
|
m_bLoopDetect = false;
|
|
|
|
|
|
|
|
FindWindow(wxID_OK)->Enable(CheckParameters());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
void TimeScaleDialog::OnText_RatePercentChangeEnd(wxCommandEvent & event)
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
|
|
|
if (m_bLoopDetect)
|
|
|
|
return;
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
if (m_pTextCtrl_RatePercentChangeEnd) {
|
|
|
|
wxString str = m_pTextCtrl_RatePercentChangeEnd->GetValue();
|
2010-01-23 19:44:49 +00:00
|
|
|
double newValue = 0;
|
|
|
|
str.ToDouble(&newValue);
|
2010-06-07 06:41:32 +00:00
|
|
|
m_RatePercentChangeEnd = newValue;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
m_bLoopDetect = true;
|
2010-06-07 06:41:32 +00:00
|
|
|
this->Update_Slider_RatePercentChangeEnd();
|
2011-07-02 18:35:18 +00:00
|
|
|
if(m_LinkRatePitch) {
|
|
|
|
m_PitchPercentChangeEnd = m_RatePercentChangeEnd;
|
|
|
|
m_PitchHalfStepsEnd = PercentChangeToHalfSteps(m_PitchPercentChangeEnd);
|
|
|
|
this->Update_Text_PitchPercentChangeEnd();
|
|
|
|
this->Update_Text_PitchHalfStepsEnd();
|
|
|
|
if(m_PitchLinkInitialFinal) {
|
|
|
|
m_PitchPercentChangeStart = m_RatePercentChangeEnd;
|
|
|
|
m_PitchHalfStepsStart = m_PitchHalfStepsEnd;
|
|
|
|
this->Update_Text_PitchPercentChangeStart();
|
|
|
|
this->Update_Text_PitchHalfStepsStart();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(m_RateLinkInitialFinal) {
|
|
|
|
m_RatePercentChangeStart = m_RatePercentChangeEnd;
|
|
|
|
this->Update_Text_RatePercentChangeStart();
|
|
|
|
this->Update_Slider_RatePercentChangeStart();
|
|
|
|
}
|
2010-01-23 19:44:49 +00:00
|
|
|
m_bLoopDetect = false;
|
|
|
|
|
|
|
|
FindWindow(wxID_OK)->Enable(CheckParameters());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
void TimeScaleDialog::OnSlider_RatePercentChangeStart(wxCommandEvent & event)
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
|
|
|
if (m_bLoopDetect)
|
|
|
|
return;
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
if (m_pSlider_RatePercentChangeStart) {
|
|
|
|
m_RatePercentChangeStart = (double)(m_pSlider_RatePercentChangeStart->GetValue());
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
m_bLoopDetect = true;
|
2010-06-07 06:41:32 +00:00
|
|
|
this->Update_Text_RatePercentChangeStart();
|
2011-07-02 18:35:18 +00:00
|
|
|
if(m_LinkRatePitch) {
|
|
|
|
m_PitchPercentChangeStart = m_RatePercentChangeStart;
|
|
|
|
m_PitchHalfStepsStart = PercentChangeToHalfSteps(m_PitchPercentChangeStart);
|
|
|
|
this->Update_Text_PitchPercentChangeStart();
|
|
|
|
this->Update_Text_PitchHalfStepsStart();
|
|
|
|
if(m_PitchLinkInitialFinal) {
|
|
|
|
m_PitchPercentChangeEnd = m_RatePercentChangeStart;
|
|
|
|
m_PitchHalfStepsEnd = m_PitchHalfStepsStart;
|
|
|
|
this->Update_Text_PitchPercentChangeEnd();
|
|
|
|
this->Update_Text_PitchHalfStepsEnd();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(m_RateLinkInitialFinal) {
|
|
|
|
m_RatePercentChangeEnd = m_RatePercentChangeStart;
|
|
|
|
this->Update_Text_RatePercentChangeEnd();
|
|
|
|
this->Update_Slider_RatePercentChangeEnd();
|
|
|
|
}
|
2010-01-23 19:44:49 +00:00
|
|
|
m_bLoopDetect = false;
|
2011-07-02 18:35:18 +00:00
|
|
|
|
|
|
|
FindWindow(wxID_OK)->Enable(CheckParameters());
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
void TimeScaleDialog::OnSlider_RatePercentChangeEnd(wxCommandEvent & event)
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
|
|
|
if (m_bLoopDetect)
|
|
|
|
return;
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
if (m_pSlider_RatePercentChangeEnd) {
|
|
|
|
m_RatePercentChangeEnd = (double)(m_pSlider_RatePercentChangeEnd->GetValue());
|
|
|
|
|
|
|
|
m_bLoopDetect = true;
|
|
|
|
this->Update_Text_RatePercentChangeEnd();
|
2011-07-02 18:35:18 +00:00
|
|
|
if(m_LinkRatePitch) {
|
|
|
|
m_PitchPercentChangeEnd = m_RatePercentChangeEnd;
|
|
|
|
m_PitchHalfStepsEnd = PercentChangeToHalfSteps(m_PitchPercentChangeEnd);
|
|
|
|
this->Update_Text_PitchPercentChangeEnd();
|
|
|
|
this->Update_Text_PitchHalfStepsEnd();
|
|
|
|
if(m_PitchLinkInitialFinal) {
|
|
|
|
m_PitchPercentChangeStart = m_RatePercentChangeEnd;
|
|
|
|
m_PitchHalfStepsStart = m_PitchHalfStepsEnd;
|
|
|
|
this->Update_Text_PitchPercentChangeStart();
|
|
|
|
this->Update_Text_PitchHalfStepsStart();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(m_RateLinkInitialFinal) {
|
|
|
|
m_RatePercentChangeStart = m_RatePercentChangeEnd;
|
|
|
|
this->Update_Text_RatePercentChangeStart();
|
|
|
|
this->Update_Slider_RatePercentChangeStart();
|
|
|
|
}
|
2010-06-07 06:41:32 +00:00
|
|
|
m_bLoopDetect = false;
|
2011-07-02 18:35:18 +00:00
|
|
|
|
|
|
|
FindWindow(wxID_OK)->Enable(CheckParameters());
|
2010-06-07 06:41:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void TimeScaleDialog::OnText_PitchHalfStepsStart(wxCommandEvent & event)
|
|
|
|
{
|
|
|
|
if (m_bLoopDetect)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (m_pTextCtrl_PitchHalfStepsStart) {
|
|
|
|
wxString str = m_pTextCtrl_PitchHalfStepsStart->GetValue();
|
|
|
|
double newValue = 0;
|
|
|
|
str.ToDouble(&newValue);
|
|
|
|
m_PitchHalfStepsStart = newValue;
|
|
|
|
m_PitchPercentChangeStart = HalfStepsToPercentChange(newValue);
|
|
|
|
|
|
|
|
m_bLoopDetect = true;
|
|
|
|
this->Update_Text_PitchPercentChangeStart();
|
2011-07-02 18:35:18 +00:00
|
|
|
if(m_LinkRatePitch) {
|
|
|
|
m_RatePercentChangeStart = m_PitchPercentChangeStart;
|
|
|
|
this->Update_Text_RatePercentChangeStart();
|
|
|
|
this->Update_Slider_RatePercentChangeStart();
|
|
|
|
if(m_RateLinkInitialFinal) {
|
|
|
|
m_RatePercentChangeEnd = m_PitchPercentChangeStart;
|
|
|
|
this->Update_Text_RatePercentChangeEnd();
|
|
|
|
this->Update_Slider_RatePercentChangeEnd();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(m_PitchLinkInitialFinal) {
|
|
|
|
m_PitchPercentChangeEnd = m_PitchPercentChangeStart;
|
|
|
|
m_PitchHalfStepsEnd = m_PitchHalfStepsStart;
|
|
|
|
this->Update_Text_PitchPercentChangeEnd();
|
|
|
|
this->Update_Text_PitchHalfStepsEnd();
|
|
|
|
}
|
2010-06-07 06:41:32 +00:00
|
|
|
m_bLoopDetect = false;
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
FindWindow(wxID_OK)->Enable(CheckParameters());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void TimeScaleDialog::OnText_PitchHalfStepsEnd(wxCommandEvent & event)
|
|
|
|
{
|
|
|
|
if (m_bLoopDetect)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (m_pTextCtrl_PitchHalfStepsEnd) {
|
|
|
|
wxString str = m_pTextCtrl_PitchHalfStepsEnd->GetValue();
|
|
|
|
double newValue = 0;
|
|
|
|
str.ToDouble(&newValue);
|
|
|
|
m_PitchHalfStepsEnd = newValue;
|
|
|
|
m_PitchPercentChangeEnd = HalfStepsToPercentChange(newValue);
|
|
|
|
|
2010-01-23 19:44:49 +00:00
|
|
|
m_bLoopDetect = true;
|
2010-06-07 06:41:32 +00:00
|
|
|
this->Update_Text_PitchPercentChangeEnd();
|
2011-07-02 18:35:18 +00:00
|
|
|
if(m_LinkRatePitch) {
|
|
|
|
m_RatePercentChangeEnd = m_PitchPercentChangeEnd;
|
|
|
|
this->Update_Text_RatePercentChangeEnd();
|
|
|
|
this->Update_Slider_RatePercentChangeEnd();
|
|
|
|
if(m_RateLinkInitialFinal) {
|
|
|
|
m_RatePercentChangeStart = m_PitchPercentChangeEnd;
|
|
|
|
this->Update_Text_RatePercentChangeStart();
|
|
|
|
this->Update_Slider_RatePercentChangeStart();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(m_PitchLinkInitialFinal) {
|
|
|
|
m_PitchPercentChangeStart = m_PitchPercentChangeEnd;
|
|
|
|
m_PitchHalfStepsStart = m_PitchHalfStepsEnd;
|
|
|
|
this->Update_Text_PitchPercentChangeStart();
|
|
|
|
this->Update_Text_PitchHalfStepsStart();
|
|
|
|
}
|
2010-01-23 19:44:49 +00:00
|
|
|
m_bLoopDetect = false;
|
2010-06-07 06:41:32 +00:00
|
|
|
|
|
|
|
FindWindow(wxID_OK)->Enable(CheckParameters());
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
void TimeScaleDialog::OnText_PitchPercentChangeStart(wxCommandEvent & event)
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
2010-06-07 06:41:32 +00:00
|
|
|
if (m_bLoopDetect)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (m_pTextCtrl_PitchPercentChangeStart) {
|
|
|
|
wxString str = m_pTextCtrl_PitchPercentChangeStart->GetValue();
|
|
|
|
double newValue = 0;
|
|
|
|
str.ToDouble(&newValue);
|
|
|
|
m_PitchPercentChangeStart = newValue;
|
|
|
|
m_PitchHalfStepsStart = PercentChangeToHalfSteps(newValue);
|
2011-07-02 18:35:18 +00:00
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
m_bLoopDetect = true;
|
|
|
|
this->Update_Text_PitchHalfStepsStart();
|
2011-07-02 18:35:18 +00:00
|
|
|
if(m_LinkRatePitch) {
|
|
|
|
m_RatePercentChangeStart = m_PitchPercentChangeStart;
|
|
|
|
this->Update_Text_RatePercentChangeStart();
|
|
|
|
this->Update_Slider_RatePercentChangeStart();
|
|
|
|
if(m_PitchLinkInitialFinal) {
|
|
|
|
m_RatePercentChangeEnd = m_PitchPercentChangeStart;
|
|
|
|
this->Update_Text_RatePercentChangeEnd();
|
|
|
|
this->Update_Slider_RatePercentChangeEnd();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(m_PitchLinkInitialFinal) {
|
|
|
|
m_PitchPercentChangeEnd = m_PitchPercentChangeStart;
|
|
|
|
m_PitchHalfStepsEnd = m_PitchHalfStepsStart;
|
|
|
|
this->Update_Text_PitchPercentChangeEnd();
|
|
|
|
this->Update_Text_PitchHalfStepsEnd();
|
|
|
|
}
|
2010-06-07 06:41:32 +00:00
|
|
|
m_bLoopDetect = false;
|
2011-07-02 18:35:18 +00:00
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
FindWindow(wxID_OK)->Enable(CheckParameters());
|
|
|
|
}
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
void TimeScaleDialog::OnText_PitchPercentChangeEnd(wxCommandEvent & event)
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
2010-06-07 06:41:32 +00:00
|
|
|
if (m_bLoopDetect)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (m_pTextCtrl_PitchPercentChangeEnd) {
|
|
|
|
wxString str = m_pTextCtrl_PitchPercentChangeEnd->GetValue();
|
|
|
|
double newValue = 0;
|
|
|
|
str.ToDouble(&newValue);
|
|
|
|
m_PitchPercentChangeEnd = newValue;
|
|
|
|
m_PitchHalfStepsEnd = PercentChangeToHalfSteps(newValue);
|
|
|
|
|
|
|
|
m_bLoopDetect = true;
|
|
|
|
this->Update_Text_PitchHalfStepsEnd();
|
2011-07-02 18:35:18 +00:00
|
|
|
if(m_LinkRatePitch) {
|
|
|
|
m_RatePercentChangeEnd = m_PitchPercentChangeEnd;
|
|
|
|
this->Update_Text_RatePercentChangeEnd();
|
|
|
|
this->Update_Slider_RatePercentChangeEnd();
|
|
|
|
if(m_PitchLinkInitialFinal) {
|
|
|
|
m_RatePercentChangeStart = m_PitchPercentChangeEnd;
|
|
|
|
this->Update_Text_RatePercentChangeStart();
|
|
|
|
this->Update_Slider_RatePercentChangeStart();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(m_PitchLinkInitialFinal) {
|
|
|
|
m_PitchPercentChangeStart = m_PitchPercentChangeEnd;
|
|
|
|
m_PitchHalfStepsStart = m_PitchHalfStepsEnd;
|
|
|
|
this->Update_Text_PitchPercentChangeStart();
|
|
|
|
this->Update_Text_PitchHalfStepsStart();
|
|
|
|
}
|
2010-06-07 06:41:32 +00:00
|
|
|
m_bLoopDetect = false;
|
|
|
|
|
|
|
|
FindWindow(wxID_OK)->Enable(CheckParameters());
|
|
|
|
}
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
|
2011-07-02 18:35:18 +00:00
|
|
|
void TimeScaleDialog::OnCheckBox_LinkRatePitch(wxCommandEvent & event)
|
|
|
|
{
|
|
|
|
if (m_bLoopDetect)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (m_pCheckBox_LinkRatePitch) {
|
|
|
|
m_LinkRatePitch = m_pCheckBox_LinkRatePitch->GetValue();
|
|
|
|
|
|
|
|
if(m_LinkRatePitch) {
|
|
|
|
m_bLoopDetect = true;
|
|
|
|
m_RatePercentChangeStart = m_PitchPercentChangeStart;
|
|
|
|
m_RatePercentChangeEnd = m_PitchPercentChangeEnd;
|
|
|
|
m_RateSlideType = m_PitchSlideType;
|
|
|
|
m_RateSlideReference = m_PitchSlideReference;
|
|
|
|
m_RateLinkInitialFinal = m_PitchLinkInitialFinal;
|
|
|
|
this->Update_Text_RatePercentChangeStart();
|
|
|
|
this->Update_Text_RatePercentChangeEnd();
|
|
|
|
this->Update_Slider_RatePercentChangeStart();
|
|
|
|
this->Update_Slider_RatePercentChangeEnd();
|
|
|
|
this->Update_Choice_RateSlideType();
|
|
|
|
this->Update_Choice_RateSlideReference();
|
|
|
|
this->Update_CheckBox_RateLinkInitialFinal();
|
|
|
|
m_bLoopDetect = false;
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
|
|
|
|
FindWindow(wxID_OK)->Enable(CheckParameters());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void TimeScaleDialog::OnCheckBox_RateLinkInitialFinal(wxCommandEvent & event)
|
|
|
|
{
|
|
|
|
if (m_bLoopDetect)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (m_pCheckBox_RateLinkInitialFinal) {
|
|
|
|
m_RateLinkInitialFinal = m_pCheckBox_RateLinkInitialFinal->GetValue();
|
|
|
|
|
|
|
|
if(m_RateLinkInitialFinal) {
|
|
|
|
m_bLoopDetect = true;
|
|
|
|
m_RatePercentChangeEnd = m_RatePercentChangeStart;
|
|
|
|
this->Update_Text_RatePercentChangeEnd();
|
|
|
|
this->Update_Slider_RatePercentChangeEnd();
|
|
|
|
m_bLoopDetect = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void TimeScaleDialog::OnCheckBox_PitchLinkInitialFinal(wxCommandEvent & event)
|
|
|
|
{
|
|
|
|
if (m_bLoopDetect)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (m_pCheckBox_PitchLinkInitialFinal) {
|
|
|
|
m_PitchLinkInitialFinal = m_pCheckBox_PitchLinkInitialFinal->GetValue();
|
|
|
|
|
|
|
|
if(m_PitchLinkInitialFinal) {
|
|
|
|
m_bLoopDetect = true;
|
|
|
|
m_PitchPercentChangeEnd = m_PitchPercentChangeStart;
|
|
|
|
m_PitchHalfStepsEnd = m_PitchHalfStepsStart;
|
|
|
|
this->Update_Text_PitchPercentChangeEnd();
|
|
|
|
this->Update_Text_PitchHalfStepsEnd();
|
|
|
|
m_bLoopDetect = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void TimeScaleDialog::OnChoice_RateSlideType(wxCommandEvent & event)
|
|
|
|
{
|
|
|
|
if (m_bLoopDetect)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (m_pChoice_RateSlideType) {
|
|
|
|
m_RateSlideType = m_pChoice_RateSlideType->GetSelection();
|
|
|
|
if(m_LinkRatePitch) {
|
|
|
|
m_PitchSlideType = m_RateSlideType;
|
|
|
|
m_bLoopDetect = true;
|
|
|
|
this->Update_Choice_PitchSlideType();
|
|
|
|
m_bLoopDetect = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void TimeScaleDialog::OnChoice_PitchSlideType(wxCommandEvent & event)
|
|
|
|
{
|
|
|
|
if (m_bLoopDetect)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (m_pChoice_PitchSlideType) {
|
|
|
|
m_PitchSlideType = m_pChoice_PitchSlideType->GetSelection();
|
|
|
|
if(m_LinkRatePitch) {
|
|
|
|
m_RateSlideType = m_PitchSlideType;
|
|
|
|
m_bLoopDetect = true;
|
|
|
|
this->Update_Choice_RateSlideType();
|
|
|
|
m_bLoopDetect = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void TimeScaleDialog::OnChoice_RateSlideReference(wxCommandEvent & event)
|
|
|
|
{
|
|
|
|
if (m_bLoopDetect)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (m_pChoice_RateSlideReference) {
|
|
|
|
m_RateSlideReference = m_pChoice_RateSlideReference->GetSelection();
|
|
|
|
if(m_LinkRatePitch) {
|
|
|
|
m_PitchSlideReference = m_RateSlideReference;
|
|
|
|
m_bLoopDetect = true;
|
|
|
|
this->Update_Choice_PitchSlideReference();
|
|
|
|
m_bLoopDetect = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void TimeScaleDialog::OnChoice_PitchSlideReference(wxCommandEvent & event)
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
2011-07-02 18:35:18 +00:00
|
|
|
if (m_bLoopDetect)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (m_pChoice_PitchSlideReference) {
|
|
|
|
m_PitchSlideReference = m_pChoice_PitchSlideReference->GetSelection();
|
|
|
|
if(m_LinkRatePitch) {
|
|
|
|
m_RateSlideReference = m_PitchSlideReference;
|
|
|
|
m_bLoopDetect = true;
|
|
|
|
this->Update_Choice_RateSlideReference();
|
|
|
|
m_bLoopDetect = false;
|
|
|
|
}
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
void TimeScaleDialog::Update_Text_RatePercentChangeStart()
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
2010-06-07 06:41:32 +00:00
|
|
|
if (m_pTextCtrl_RatePercentChangeStart) {
|
2010-01-23 19:44:49 +00:00
|
|
|
wxString str;
|
2010-06-07 06:41:32 +00:00
|
|
|
str.Printf(wxT("%.3f"), m_RatePercentChangeStart);
|
|
|
|
m_pTextCtrl_RatePercentChangeStart->SetValue(str);
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
void TimeScaleDialog::Update_Text_RatePercentChangeEnd()
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
2010-06-07 06:41:32 +00:00
|
|
|
if (m_pTextCtrl_RatePercentChangeEnd) {
|
2010-01-23 19:44:49 +00:00
|
|
|
wxString str;
|
2010-06-07 06:41:32 +00:00
|
|
|
str.Printf(wxT("%.3f"), m_RatePercentChangeEnd);
|
|
|
|
m_pTextCtrl_RatePercentChangeEnd->SetValue(str);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void TimeScaleDialog::Update_Slider_RatePercentChangeStart()
|
|
|
|
{
|
|
|
|
if (m_pSlider_RatePercentChangeStart) {
|
|
|
|
m_pSlider_RatePercentChangeStart->SetValue((int)(m_RatePercentChangeStart + 0.5));
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
void TimeScaleDialog::Update_Slider_RatePercentChangeEnd()
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
2010-06-07 06:41:32 +00:00
|
|
|
if (m_pSlider_RatePercentChangeEnd) {
|
|
|
|
m_pSlider_RatePercentChangeEnd->SetValue((int)(m_RatePercentChangeEnd + 0.5));
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
void TimeScaleDialog::Update_Text_PitchHalfStepsStart()
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
2010-06-07 06:41:32 +00:00
|
|
|
if (m_pTextCtrl_PitchHalfStepsStart) {
|
|
|
|
wxString str;
|
|
|
|
str.Printf(wxT("%.3f"), m_PitchHalfStepsStart);
|
|
|
|
m_pTextCtrl_PitchHalfStepsStart->SetValue(str);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void TimeScaleDialog::Update_Text_PitchHalfStepsEnd()
|
|
|
|
{
|
|
|
|
if (m_pTextCtrl_PitchHalfStepsEnd) {
|
|
|
|
wxString str;
|
|
|
|
str.Printf(wxT("%.3f"), m_PitchHalfStepsEnd);
|
|
|
|
m_pTextCtrl_PitchHalfStepsEnd->SetValue(str);
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
void TimeScaleDialog::Update_Text_PitchPercentChangeStart()
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
2010-06-07 06:41:32 +00:00
|
|
|
if (m_pTextCtrl_PitchPercentChangeStart) {
|
2010-01-23 19:44:49 +00:00
|
|
|
wxString str;
|
2010-06-07 06:41:32 +00:00
|
|
|
str.Printf(wxT("%.3f"), m_PitchPercentChangeStart);
|
|
|
|
m_pTextCtrl_PitchPercentChangeStart->SetValue(str);
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-06-07 06:41:32 +00:00
|
|
|
void TimeScaleDialog::Update_Text_PitchPercentChangeEnd()
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
2010-06-07 06:41:32 +00:00
|
|
|
if (m_pTextCtrl_PitchPercentChangeEnd) {
|
2010-01-23 19:44:49 +00:00
|
|
|
wxString str;
|
2010-06-07 06:41:32 +00:00
|
|
|
str.Printf(wxT("%.3f"), m_PitchPercentChangeEnd);
|
|
|
|
m_pTextCtrl_PitchPercentChangeEnd->SetValue(str);
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-07-02 18:35:18 +00:00
|
|
|
void TimeScaleDialog::Update_CheckBox_LinkRatePitch()
|
|
|
|
{
|
|
|
|
if (m_pCheckBox_LinkRatePitch) {
|
|
|
|
m_pCheckBox_LinkRatePitch->SetValue(m_LinkRatePitch);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void TimeScaleDialog::Update_CheckBox_RateLinkInitialFinal()
|
|
|
|
{
|
|
|
|
if (m_pCheckBox_RateLinkInitialFinal) {
|
|
|
|
m_pCheckBox_RateLinkInitialFinal->SetValue(m_RateLinkInitialFinal);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void TimeScaleDialog::Update_CheckBox_PitchLinkInitialFinal()
|
|
|
|
{
|
|
|
|
if (m_pCheckBox_PitchLinkInitialFinal) {
|
|
|
|
m_pCheckBox_PitchLinkInitialFinal->SetValue(m_PitchLinkInitialFinal);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void TimeScaleDialog::Update_Choice_RateSlideType()
|
|
|
|
{
|
|
|
|
if (m_pChoice_RateSlideType) {
|
|
|
|
m_pChoice_RateSlideType->SetSelection(m_RateSlideType);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void TimeScaleDialog::Update_Choice_PitchSlideType()
|
|
|
|
{
|
|
|
|
if (m_pChoice_PitchSlideType) {
|
|
|
|
m_pChoice_PitchSlideType->SetSelection(m_PitchSlideType);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void TimeScaleDialog::Update_Choice_RateSlideReference()
|
|
|
|
{
|
|
|
|
if (m_pChoice_RateSlideReference) {
|
|
|
|
m_pChoice_RateSlideReference->SetSelection(m_RateSlideReference);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void TimeScaleDialog::Update_Choice_PitchSlideReference()
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
2011-07-02 18:35:18 +00:00
|
|
|
if (m_pChoice_PitchSlideReference) {
|
|
|
|
m_pChoice_PitchSlideReference->SetSelection(m_PitchSlideReference);
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|