mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 17:30:17 +01:00
Re-implement note tracks in MixerBoard
This commit adds note tracks into the mixerboard. It's done as a separate slider this time instead of via subclasses (as PRL requested), so which should be easier to use. This also changes some of the gaurds to EXPERIMENTAL_MIDI_OUT from USE_MIDI, as it's meaningless to have the note track code in mixerboard when it cannot do anything (depends on methods that exist behind EXPERIMENTAL_MIDI_OUT).
This commit is contained in:
@@ -64,7 +64,9 @@ class Meter;
|
||||
class MixerBoard;
|
||||
|
||||
class Track;
|
||||
#ifdef USE_MIDI
|
||||
class NoteTrack;
|
||||
#endif
|
||||
class PlayableTrack;
|
||||
|
||||
class WaveTrack;
|
||||
@@ -81,13 +83,18 @@ public:
|
||||
|
||||
WaveTrack *GetWave() const;
|
||||
WaveTrack *GetRight() const;
|
||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||
NoteTrack *GetNote() const;
|
||||
#endif
|
||||
|
||||
void UpdatePrefs();
|
||||
|
||||
void HandleResize(); // For wxSizeEvents, update gain slider and meter.
|
||||
|
||||
void HandleSliderGain(const bool bWantPushState = false);
|
||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||
void HandleSliderVelocity(const bool bWantPushState = false);
|
||||
#endif
|
||||
void HandleSliderPan(const bool bWantPushState = false);
|
||||
|
||||
void ResetMeter(const bool bResetClipping);
|
||||
@@ -99,6 +106,9 @@ public:
|
||||
void UpdateSolo();
|
||||
void UpdatePan();
|
||||
void UpdateGain();
|
||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||
void UpdateVelocity();
|
||||
#endif
|
||||
void UpdateMeter(const double t0, const double t1);
|
||||
|
||||
private:
|
||||
@@ -113,6 +123,9 @@ private:
|
||||
|
||||
void OnButton_MusicalInstrument(wxCommandEvent& event);
|
||||
void OnSlider_Gain(wxCommandEvent& event);
|
||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||
void OnSlider_Velocity(wxCommandEvent& event);
|
||||
#endif
|
||||
void OnSlider_Pan(wxCommandEvent& event);
|
||||
void OnButton_Mute(wxCommandEvent& event);
|
||||
void OnButton_Solo(wxCommandEvent& event);
|
||||
@@ -133,6 +146,9 @@ private:
|
||||
AButton* mToggleButton_Solo;
|
||||
MixerTrackSlider* mSlider_Pan;
|
||||
MixerTrackSlider* mSlider_Gain;
|
||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||
MixerTrackSlider* mSlider_Velocity;
|
||||
#endif
|
||||
Meter* mMeter;
|
||||
|
||||
public:
|
||||
@@ -222,6 +238,9 @@ public:
|
||||
void UpdateSolo(const PlayableTrack* pTrack = NULL); // NULL means update for all tracks.
|
||||
void UpdatePan(const PlayableTrack* pTrack);
|
||||
void UpdateGain(const PlayableTrack* pTrack);
|
||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||
void UpdateVelocity(const PlayableTrack* pTrack);
|
||||
#endif
|
||||
|
||||
void UpdateMeters(const double t1, const bool bLoopedPlay);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user