1 #ifndef __gtk2_ardour_rhythm_ferret_h__
2 #define __gtk2_ardour_rhythm_ferret_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>
13 #include <gtkmm/label.h>
15 #include "ardour_dialog.h"
24 class RhythmFerret
: public ArdourDialog
{
26 /* order of these enums must match the _analyse_mode_strings
40 RhythmFerret (PublicEditor
&);
43 void set_session (ARDOUR::Session
*);
51 Gtk::HBox upper_hpacker
;
52 Gtk::HBox lower_hpacker
;
54 Gtk::Frame operation_frame
;
55 Gtk::Frame selection_frame
;
56 Gtk::Frame ferret_frame
;
58 Gtk::VBox op_logo_packer
;
64 Gtk::RadioButtonGroup operation_button_group
;
65 Gtk::RadioButton region_split_button
;
66 Gtk::RadioButton tempo_button
;
67 Gtk::RadioButton region_conform_button
;
71 Gtk::VBox ferret_packer
;
72 Gtk::ComboBoxText analysis_mode_selector
;
73 Gtk::Label analysis_mode_label
;
75 /* transient detection widgets */
77 Gtk::Adjustment detection_threshold_adjustment
;
78 Gtk::HScale detection_threshold_scale
;
79 Gtk::Label detection_threshold_label
;
80 Gtk::Adjustment sensitivity_adjustment
;
81 Gtk::HScale sensitivity_scale
;
82 Gtk::Label sensitivity_label
;
83 Gtk::Button analyze_button
;
84 Gtk::VBox perc_onset_packer
;
86 /* onset detection widgets */
88 Gtk::ComboBoxText onset_detection_function_selector
;
89 Gtk::Label onset_function_label
;
90 Gtk::Adjustment peak_picker_threshold_adjustment
;
91 Gtk::HScale peak_picker_threshold_scale
;
92 Gtk::Label peak_picker_label
;
93 Gtk::Adjustment silence_threshold_adjustment
;
94 Gtk::HScale silence_threshold_scale
;
95 Gtk::Label silence_label
;
96 Gtk::VBox note_onset_packer
;
100 Gtk::Adjustment trigger_gap_adjustment
;
101 Gtk::SpinButton trigger_gap_spinner
;
102 Gtk::Label trigger_gap_label
;
104 Gtk::VBox analysis_packer
;
106 Gtk::Label operation_clarification_label
;
107 Gtk::Button action_button
;
109 std::vector
<std::string
> analysis_mode_strings
;
110 std::vector
<std::string
> onset_function_strings
;
112 ARDOUR::AnalysisFeatureList current_results
;
114 AnalysisMode
get_analysis_mode () const;
115 Action
get_action() const;
116 void analysis_mode_changed ();
117 int get_note_onset_function ();
119 void run_analysis ();
120 int run_percussion_onset_analysis (boost::shared_ptr
<ARDOUR::Readable
> region
, nframes64_t offset
, ARDOUR::AnalysisFeatureList
& results
);
121 int run_note_onset_analysis (boost::shared_ptr
<ARDOUR::Readable
> region
, nframes64_t offset
, ARDOUR::AnalysisFeatureList
& results
);
124 void do_split_action ();
125 void do_region_split (RegionView
* rv
, const ARDOUR::AnalysisFeatureList
&);
128 #endif /* __gtk2_ardour_rhythm_ferret_h__ */