mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
split out the logic behind step editing from MidiTimeAxisView as much as possible
git-svn-id: svn://localhost/ardour2/branches/3.0@7633 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
66ea8edc6e
commit
faca3e5f5d
7 changed files with 555 additions and 439 deletions
73
gtk2_ardour/step_editor.h
Normal file
73
gtk2_ardour/step_editor.h
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
#ifndef __pbd__step_editor_h__
|
||||
#define __pbd__step_editor_h__
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <sigc++/trackable.h>
|
||||
|
||||
#include "pbd/signals.h"
|
||||
#include "evoral/types.hpp"
|
||||
|
||||
namespace ARDOUR {
|
||||
class MidiTrack;
|
||||
class MidiRegion;
|
||||
}
|
||||
|
||||
class MidiRegionView;
|
||||
class MidiTimeAxisView;
|
||||
class PublicEditor;
|
||||
class StepEntry;
|
||||
|
||||
class StepEditor : public PBD::ScopedConnectionList, public sigc::trackable
|
||||
{
|
||||
public:
|
||||
StepEditor (PublicEditor&, boost::shared_ptr<ARDOUR::MidiTrack>, MidiTimeAxisView&);
|
||||
virtual ~StepEditor ();
|
||||
|
||||
void check_step_edit ();
|
||||
void step_edit_rest (Evoral::MusicalTime beats);
|
||||
void step_edit_beat_sync ();
|
||||
void step_edit_bar_sync ();
|
||||
int step_add_bank_change (uint8_t channel, uint8_t bank);
|
||||
int step_add_program_change (uint8_t channel, uint8_t program);
|
||||
int step_add_note (uint8_t channel, uint8_t pitch, uint8_t velocity,
|
||||
Evoral::MusicalTime beat_duration);
|
||||
void step_edit_sustain (Evoral::MusicalTime beats);
|
||||
bool step_edit_within_triplet () const;
|
||||
void step_edit_toggle_triplet ();
|
||||
bool step_edit_within_chord () const;
|
||||
void step_edit_toggle_chord ();
|
||||
void reset_step_edit_beat_pos ();
|
||||
void resync_step_edit_to_edit_point ();
|
||||
void move_step_edit_beat_pos (Evoral::MusicalTime beats);
|
||||
void set_step_edit_cursor_width (Evoral::MusicalTime beats);
|
||||
|
||||
std::string name() const;
|
||||
|
||||
void start_step_editing ();
|
||||
void stop_step_editing ();
|
||||
|
||||
private:
|
||||
ARDOUR::framepos_t step_edit_insert_position;
|
||||
Evoral::MusicalTime step_edit_beat_pos;
|
||||
boost::shared_ptr<ARDOUR::MidiRegion> step_edit_region;
|
||||
MidiRegionView* step_edit_region_view;
|
||||
uint8_t _step_edit_triplet_countdown;
|
||||
bool _step_edit_within_chord;
|
||||
Evoral::MusicalTime _step_edit_chord_duration;
|
||||
PBD::ScopedConnection step_edit_region_connection;
|
||||
PublicEditor& _editor;
|
||||
boost::shared_ptr<ARDOUR::MidiTrack> _track;
|
||||
StepEntry* step_editor;
|
||||
MidiTimeAxisView& _mtv;
|
||||
|
||||
void region_removed (boost::weak_ptr<ARDOUR::Region>);
|
||||
void playlist_changed ();
|
||||
bool step_editor_hidden (GdkEventAny*);
|
||||
void step_editor_hide ();
|
||||
void resync_step_edit_position ();
|
||||
void prepare_step_edit_region ();
|
||||
};
|
||||
|
||||
#endif /* __pbd__step_editor_h__ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue