use -r argument with JACK if realtime is not requested in engine dialog (also applied...
[ArdourMidi.git] / gtk2_ardour / rhythm_ferret.h
blob043b9fe8a71ac716dd581822c8ad81ed6f37c962
1 #ifndef __gtk2_ardour_rhythm_ferret_h__
2 #define __gtk2_ardour_rhythm_ferret_h__
4 #include <gtkmm/box.h>
5 #include <gtkmm/scale.h>
6 #include <gtkmm/spinbutton.h>
7 #include <gtkmm/radiobutton.h>
8 #include <gtkmm/radiobuttongroup.h>
9 #include <gtkmm/frame.h>
10 #include <gtkmm/image.h>
11 #include <gtkmm/comboboxtext.h>
12 #include <gtkmm/button.h>
14 #include "ardour_dialog.h"
16 namespace ARDOUR {
17 class Readable;
20 class Editor;
21 class RegionView;
23 class RhythmFerret : public ArdourDialog {
24 public:
25 /* order of these enums must match the _analyse_mode_strings
26 in rhythm_ferret.cc
28 enum AnalysisMode {
29 PercussionOnset,
30 NoteOnset
33 enum Action {
34 SplitRegion,
35 DefineTempoMap,
36 ConformRegion
39 RhythmFerret (Editor&);
41 void set_session (ARDOUR::Session*);
43 protected:
44 void on_hide ();
46 private:
47 Editor& editor;
49 Gtk::ComboBoxText operation_selector;
51 Gtk::ComboBoxText analysis_mode_selector;
53 /* transient detection widgets */
55 Gtk::Adjustment detection_threshold_adjustment;
56 Gtk::HScale detection_threshold_scale;
57 Gtk::Adjustment sensitivity_adjustment;
58 Gtk::HScale sensitivity_scale;
59 Gtk::Button analyze_button;
61 /* onset detection widgets */
63 Gtk::ComboBoxText onset_detection_function_selector;
64 Gtk::Adjustment peak_picker_threshold_adjustment;
65 Gtk::HScale peak_picker_threshold_scale;
66 Gtk::Adjustment silence_threshold_adjustment;
67 Gtk::HScale silence_threshold_scale;
69 /* generic stuff */
71 Gtk::Adjustment trigger_gap_adjustment;
72 Gtk::SpinButton trigger_gap_spinner;
74 Gtk::Button action_button;
76 std::vector<std::string> analysis_mode_strings;
77 std::vector<std::string> onset_function_strings;
78 std::vector<std::string> operation_strings;
80 ARDOUR::AnalysisFeatureList current_results;
82 AnalysisMode get_analysis_mode () const;
83 Action get_action() const;
84 void analysis_mode_changed ();
85 int get_note_onset_function ();
87 void run_analysis ();
88 int run_percussion_onset_analysis (boost::shared_ptr<ARDOUR::Readable> region, nframes64_t offset, ARDOUR::AnalysisFeatureList& results);
89 int run_note_onset_analysis (boost::shared_ptr<ARDOUR::Readable> region, nframes64_t offset, ARDOUR::AnalysisFeatureList& results);
91 void do_action ();
92 void do_split_action ();
93 void do_region_split (RegionView* rv, const ARDOUR::AnalysisFeatureList&);
96 #endif /* __gtk2_ardour_rhythm_ferret_h__ */