Audacity 3.2.0
ScoreAlignDialog.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 ScoreAlignDialog.h
6
7**********************************************************************/
8
9#ifndef __AUDACITY_SCORE_ALIGN_DIALOG__
10#define __AUDACITY_SCORE_ALIGN_DIALOG__
11
12#ifdef EXPERIMENTAL_SCOREALIGN
13
14#include "wxPanelWrapper.h"
15
16#if 1
17
18#include "ScoreAlignParams.h"
19
20#else
21
22// Stub definitions
23struct ScoreAlignParams
24{
25 int mStatus;
26 double mMidiStart, mMidiEnd;
27 double mAudioStart, mAudioEnd;
28 float mFramePeriod;
29 float mWindowSize;
30 float mSilenceThreshold;
31 float mForceFinalAlignment;
32 float mIgnoreSilence;
33 float mPresmoothTime;
34 float mLineTime;
35 float mSmoothTime;
36};
37class SAProgress;
38class Alg_seq;
39
40extern int scorealign(
41 void *data,
42 long (*process)(void *data, float **buffer, long n),
43 unsigned channels,
44 double rate,
45 double endTime,
46 Alg_seq *seq,
47 SAProgress *progress,
48 ScoreAlignParams params
49);
50
51#endif
52
53class wxButton;
54class wxCheckBox;
55class wxSlider;
56class wxStaticText;
57
58void CloseScoreAlignDialog();
59
60//----------------------------------------------------------------------------
61// ScoreAlignDialog
62//----------------------------------------------------------------------------
63
64// Declare window functions
65
66class ScoreAlignDialog final : public wxDialogWrapper
67{
68public:
69 ScoreAlignParams p;
70
71 wxStaticText *mFramePeriodLabel;
72 wxSlider *mFramePeriodSlider;
73 wxStaticText *mFramePeriodText;
74
75 wxStaticText *mWindowSizeLabel;
76 wxSlider *mWindowSizeSlider;
77 wxStaticText *mWindowSizeText;
78
79 wxStaticText *mSilenceThresholdLabel;
80 wxSlider *mSilenceThresholdSlider;
81 wxStaticText *mSilenceThresholdText;
82
83 wxCheckBox *mForceFinalAlignmentCheckBox;
84 wxCheckBox *mIgnoreSilenceCheckBox;
85
86 wxStaticText *mPresmoothLabel;
87 wxSlider *mPresmoothSlider;
88 wxStaticText *mPresmoothText;
89
90 wxStaticText *mLineTimeLabel;
91 wxSlider *mLineTimeSlider;
92 wxStaticText *mLineTimeText;
93
94 wxStaticText *mSmoothTimeLabel;
95 wxSlider *mSmoothTimeSlider;
96 wxStaticText *mSmoothTimeText;
97
98 wxButton *mDefaultButton;
99
100 // constructors and destructors
101 ScoreAlignDialog(ScoreAlignParams &params);
103
104 bool TransferDataFromWindow() override;
105
106private:
107 enum {
108 ID_BASE = 10000,
109 ID_PRESMOOTH,
110 ID_WINDOWSIZE,
111 ID_FRAMEPERIOD,
112 ID_LINETIME,
113 ID_SMOOTHTIME,
114 ID_SILENCETHRESHOLD,
115 ID_FORCEFINALALIGNMENT,
116 ID_IGNORESILENCE,
117 ID_DEFAULT
118 };
119
120 // handlers
121 void OnOK(wxCommandEvent & event);
122 void OnCancel(wxCommandEvent & event);
123 void OnSlider(wxCommandEvent & event);
124 void OnDefault(wxCommandEvent & event);
125
126 DECLARE_EVENT_TABLE()
127
128};
129
130#endif
131
132#endif
EffectDistortionSettings params
ScoreAlignDialog is \TODO.