~ubuntu-branches/ubuntu/lucid/ardour/lucid-proposed

« back to all changes in this revision

Viewing changes to gtk2_ardour/rhythm_ferret.h

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2008-02-07 20:51:55 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20080207205155-xzi5lq5s2o1okvx8
Tags: 1:2.3.1-1
* New upstream release
* debian/control:
   - build-depend on libfftw3-dev (Closes: #463803)
   - added Homepage, Vcs-Svn, Vcs-Browser
* debian/patches
   - dropped 50-soundtouch.patch (fixed upstream)
   - updated 80_ardourino.patch
   - dropped unused patches from source package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __gtk2_ardour_rhythm_ferret_h__
 
2
#define __gtk2_ardour_rhythm_ferret_h__
 
3
 
 
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>
 
13
#include <gtkmm/label.h>
 
14
 
 
15
#include "ardour_dialog.h"
 
16
 
 
17
namespace ARDOUR {
 
18
        class Readable;
 
19
}
 
20
 
 
21
class PublicEditor;
 
22
class RegionView;
 
23
 
 
24
class RhythmFerret : public ArdourDialog {
 
25
  public:
 
26
        /* order of these enums must match the _analyse_mode_strings
 
27
           in rhythm_ferret.cc
 
28
        */
 
29
        enum AnalysisMode {
 
30
                PercussionOnset,
 
31
                NoteOnset
 
32
        };
 
33
 
 
34
        enum Action {
 
35
                SplitRegion,
 
36
                DefineTempoMap,
 
37
                ConformRegion
 
38
        };
 
39
        
 
40
        RhythmFerret (PublicEditor&);
 
41
        ~RhythmFerret ();
 
42
 
 
43
        void set_session (ARDOUR::Session*);
 
44
        
 
45
  private:
 
46
        PublicEditor& editor;
 
47
 
 
48
        Gtk::HBox  upper_hpacker;
 
49
        Gtk::HBox  lower_hpacker;
 
50
 
 
51
        Gtk::Frame operation_frame;
 
52
        Gtk::Frame selection_frame;
 
53
        Gtk::Frame ferret_frame;
 
54
 
 
55
        Gtk::VBox  op_logo_packer;
 
56
        Gtk::Image* logo;
 
57
 
 
58
        /* operation frame */
 
59
 
 
60
        Gtk::VBox op_packer;
 
61
        Gtk::RadioButtonGroup operation_button_group;
 
62
        Gtk::RadioButton region_split_button;
 
63
        Gtk::RadioButton tempo_button;
 
64
        Gtk::RadioButton region_conform_button;
 
65
 
 
66
        /* analysis frame */
 
67
 
 
68
        Gtk::VBox ferret_packer;
 
69
        Gtk::ComboBoxText analysis_mode_selector;
 
70
        Gtk::Label analysis_mode_label;
 
71
        Gtk::Adjustment detection_threshold_adjustment;
 
72
        Gtk::HScale detection_threshold_scale;
 
73
        Gtk::Label detection_threshold_label;
 
74
        Gtk::Adjustment sensitivity_adjustment;
 
75
        Gtk::HScale sensitivity_scale;
 
76
        Gtk::Label sensitivity_label;
 
77
        Gtk::Button analyze_button;
 
78
        Gtk::Adjustment trigger_gap_adjustment;
 
79
        Gtk::SpinButton trigger_gap_spinner;
 
80
        Gtk::Label trigger_gap_label;
 
81
 
 
82
        Gtk::Label operation_clarification_label;
 
83
        Gtk::Button action_button;
 
84
 
 
85
        std::vector<std::string> analysis_mode_strings;
 
86
 
 
87
        ARDOUR::AnalysisFeatureList current_results;
 
88
 
 
89
        AnalysisMode get_analysis_mode () const;
 
90
        Action get_action() const;
 
91
 
 
92
        void run_analysis ();
 
93
        int run_percussion_onset_analysis (boost::shared_ptr<ARDOUR::Readable> region, nframes64_t offset, ARDOUR::AnalysisFeatureList& results);
 
94
 
 
95
        void do_action ();
 
96
        void do_split_action ();
 
97
        void do_region_split (RegionView* rv, const ARDOUR::AnalysisFeatureList&);
 
98
};
 
99
 
 
100
#endif /* __gtk2_ardour_rhythm_ferret_h__ */