mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 17:16:38 +01:00
remove visible "sound notes" button,add Config parameter to control this (which then saves the state the user selected), add control to the prefs dialog
git-svn-id: svn://localhost/ardour2/branches/3.0@10934 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
20aeb5af0a
commit
50aee54219
7 changed files with 15 additions and 28 deletions
|
|
@ -642,7 +642,6 @@ Editor::Editor ()
|
||||||
// load_bindings ();
|
// load_bindings ();
|
||||||
|
|
||||||
setup_toolbar ();
|
setup_toolbar ();
|
||||||
setup_midi_toolbar ();
|
|
||||||
|
|
||||||
_snap_type = SnapToBeat;
|
_snap_type = SnapToBeat;
|
||||||
set_snap_to (_snap_type);
|
set_snap_to (_snap_type);
|
||||||
|
|
@ -2982,27 +2981,9 @@ Editor::setup_tooltips ()
|
||||||
ARDOUR_UI::instance()->set_tip (snap_type_selector, _("Snap/Grid Units"));
|
ARDOUR_UI::instance()->set_tip (snap_type_selector, _("Snap/Grid Units"));
|
||||||
ARDOUR_UI::instance()->set_tip (snap_mode_selector, _("Snap/Grid Mode"));
|
ARDOUR_UI::instance()->set_tip (snap_mode_selector, _("Snap/Grid Mode"));
|
||||||
ARDOUR_UI::instance()->set_tip (edit_point_selector, _("Edit point"));
|
ARDOUR_UI::instance()->set_tip (edit_point_selector, _("Edit point"));
|
||||||
ARDOUR_UI::instance()->set_tip (midi_sound_notes, _("Sound Notes"));
|
|
||||||
ARDOUR_UI::instance()->set_tip (edit_mode_selector, _("Edit Mode"));
|
ARDOUR_UI::instance()->set_tip (edit_mode_selector, _("Edit Mode"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
Editor::setup_midi_toolbar ()
|
|
||||||
{
|
|
||||||
RefPtr<Action> act;
|
|
||||||
|
|
||||||
/* Midi sound notes */
|
|
||||||
midi_sound_notes.add (*(manage (new Image (::get_icon("midi_sound_notes")))));
|
|
||||||
midi_sound_notes.unset_flags (CAN_FOCUS);
|
|
||||||
midi_sound_notes.set_name (X_("MidiSoundNotesButton"));
|
|
||||||
|
|
||||||
/* Panic */
|
|
||||||
|
|
||||||
panic_box.pack_start (midi_sound_notes , true, true);
|
|
||||||
// panic_box.pack_start (midi_panic_button, true, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
Editor::convert_drop_to_paths (
|
Editor::convert_drop_to_paths (
|
||||||
vector<string>& paths,
|
vector<string>& paths,
|
||||||
|
|
|
||||||
|
|
@ -1607,8 +1607,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
/* midi toolbar */
|
/* midi toolbar */
|
||||||
|
|
||||||
Gtk::HBox panic_box;
|
Gtk::HBox panic_box;
|
||||||
Gtkmm2ext::StatefulToggleButton midi_sound_notes;
|
|
||||||
bool sound_notes () const { return midi_sound_notes.get_active(); }
|
|
||||||
|
|
||||||
void setup_midi_toolbar ();
|
void setup_midi_toolbar ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1541,7 +1541,7 @@ MidiRegionView::extend_active_notes()
|
||||||
void
|
void
|
||||||
MidiRegionView::play_midi_note(boost::shared_ptr<NoteType> note)
|
MidiRegionView::play_midi_note(boost::shared_ptr<NoteType> note)
|
||||||
{
|
{
|
||||||
if (_no_sound_notes || !trackview.editor().sound_notes()) {
|
if (_no_sound_notes || !Config->get_sound_midi_notes()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1559,7 +1559,7 @@ MidiRegionView::play_midi_note(boost::shared_ptr<NoteType> note)
|
||||||
void
|
void
|
||||||
MidiRegionView::play_midi_chord (vector<boost::shared_ptr<NoteType> > notes)
|
MidiRegionView::play_midi_chord (vector<boost::shared_ptr<NoteType> > notes)
|
||||||
{
|
{
|
||||||
if (_no_sound_notes || !trackview.editor().sound_notes()) {
|
if (_no_sound_notes || !Config->get_sound_midi_notes()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2341,7 +2341,7 @@ MidiRegionView::move_selection(double dx, double dy, double cumulative_dy)
|
||||||
(*i)->move_event(dx, dy);
|
(*i)->move_event(dx, dy);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dy && !_selection.empty() && !_no_sound_notes && trackview.editor().sound_notes()) {
|
if (dy && !_selection.empty() && !_no_sound_notes && Config->get_sound_midi_notes()) {
|
||||||
|
|
||||||
if (to_play.size() > 1) {
|
if (to_play.size() > 1) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -181,10 +181,6 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
|
||||||
|
|
||||||
virtual bool internal_editing() const = 0;
|
virtual bool internal_editing() const = 0;
|
||||||
|
|
||||||
/** @return Sound edited notes in MIDI regions while editing
|
|
||||||
*/
|
|
||||||
virtual bool sound_notes () const = 0;
|
|
||||||
|
|
||||||
/** Possibly start the audition of a region. If @param r is 0, or not an AudioRegion
|
/** Possibly start the audition of a region. If @param r is 0, or not an AudioRegion
|
||||||
* any current audition is cancelled. If we are currently auditioning @param r,
|
* any current audition is cancelled. If we are currently auditioning @param r,
|
||||||
* the audition will be cancelled. Otherwise an audition of @param r will start.
|
* the audition will be cancelled. Otherwise an audition of @param r will start.
|
||||||
|
|
|
||||||
|
|
@ -1486,6 +1486,14 @@ RCOptionEditor::RCOptionEditor ()
|
||||||
sigc::mem_fun (*_rc_config, &RCConfiguration::set_never_display_periodic_midi)
|
sigc::mem_fun (*_rc_config, &RCConfiguration::set_never_display_periodic_midi)
|
||||||
));
|
));
|
||||||
|
|
||||||
|
add_option (_("MIDI"),
|
||||||
|
new BoolOption (
|
||||||
|
"sound-midi-notes",
|
||||||
|
_("Sound MIDI notes as they are selected"),
|
||||||
|
sigc::mem_fun (*_rc_config, &RCConfiguration::get_sound_midi_notes),
|
||||||
|
sigc::mem_fun (*_rc_config, &RCConfiguration::set_sound_midi_notes)
|
||||||
|
));
|
||||||
|
|
||||||
/* USER INTERACTION */
|
/* USER INTERACTION */
|
||||||
|
|
||||||
add_option (_("User interaction"), new OptionEditorHeading (_("Keyboard")));
|
add_option (_("User interaction"), new OptionEditorHeading (_("Keyboard")));
|
||||||
|
|
|
||||||
|
|
@ -170,6 +170,7 @@ CONFIG_VARIABLE (bool, color_regions_using_track_color, "color-regions-using-tra
|
||||||
CONFIG_VARIABLE (gain_t, max_gain, "max-gain", 2.0) /* +6.0dB */
|
CONFIG_VARIABLE (gain_t, max_gain, "max-gain", 2.0) /* +6.0dB */
|
||||||
CONFIG_VARIABLE (bool, update_editor_during_summary_drag, "update-editor-during-summary-drag", true)
|
CONFIG_VARIABLE (bool, update_editor_during_summary_drag, "update-editor-during-summary-drag", true)
|
||||||
CONFIG_VARIABLE (bool, never_display_periodic_midi, "never-display-periodic-midi", true)
|
CONFIG_VARIABLE (bool, never_display_periodic_midi, "never-display-periodic-midi", true)
|
||||||
|
CONFIG_VARIABLE (bool, sound_midi_notes, "sound-midi-notes", false)
|
||||||
|
|
||||||
/* denormal management */
|
/* denormal management */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "pbd/xml++.h"
|
#include "pbd/xml++.h"
|
||||||
|
#include "pbd/boost_debug.h"
|
||||||
|
|
||||||
#include "ardour/amp.h"
|
#include "ardour/amp.h"
|
||||||
#include "ardour/send.h"
|
#include "ardour/send.h"
|
||||||
|
|
@ -42,6 +43,8 @@ Send::Send (Session& s, boost::shared_ptr<Pannable> p, boost::shared_ptr<MuteMas
|
||||||
: Delivery (s, p, mm, string_compose (_("send %1"), (_bitslot = s.next_send_id()) + 1), r)
|
: Delivery (s, p, mm, string_compose (_("send %1"), (_bitslot = s.next_send_id()) + 1), r)
|
||||||
, _metering (false)
|
, _metering (false)
|
||||||
{
|
{
|
||||||
|
boost_debug_shared_ptr_mark_interesting (this, "send");
|
||||||
|
|
||||||
_amp.reset (new Amp (_session));
|
_amp.reset (new Amp (_session));
|
||||||
_meter.reset (new PeakMeter (_session));
|
_meter.reset (new PeakMeter (_session));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue