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>
14 #include "ardour_dialog.h"
23 class RhythmFerret
: public ArdourDialog
{
25 /* order of these enums must match the _analyse_mode_strings
39 RhythmFerret (PublicEditor
&);
41 void set_session (ARDOUR::Session
*);
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
;
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 ();
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
);
92 void do_split_action ();
93 void do_region_split (RegionView
* rv
, const ARDOUR::AnalysisFeatureList
&);
96 #endif /* __gtk2_ardour_rhythm_ferret_h__ */