mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-19 21:26:26 +01:00
add crossfade and layering options to menu system; add missing crossfade editor curve image; add control for destructive recording xfade; remove dead options from options editor
git-svn-id: svn://localhost/trunk/ardour2@411 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
a873bbb14e
commit
eb3fc0d966
16 changed files with 312 additions and 197 deletions
|
|
@ -135,7 +135,6 @@ ActionManager::register_radio_action (RefPtr<ActionGroup> group, RadioAction::Gr
|
||||||
return act;
|
return act;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
RefPtr<Action>
|
RefPtr<Action>
|
||||||
ActionManager::register_toggle_action (RefPtr<ActionGroup> group, const char * name, const char * label, slot<void> sl, guint key, Gdk::ModifierType mods)
|
ActionManager::register_toggle_action (RefPtr<ActionGroup> group, const char * name, const char * label, slot<void> sl, guint key, Gdk::ModifierType mods)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
<menuitem action='ToggleAutoPlay'/>
|
<menuitem action='ToggleAutoPlay'/>
|
||||||
<menuitem action='ToggleAutoReturn'/>
|
<menuitem action='ToggleAutoReturn'/>
|
||||||
<menuitem action='ToggleClick'/>
|
<menuitem action='ToggleClick'/>
|
||||||
<menuitem action='ToggleFollowPlayhead'/>
|
<menuitem action='toggle-follow-playhead'/>
|
||||||
</menu>
|
</menu>
|
||||||
</menu>
|
</menu>
|
||||||
<menu name='Edit' action='Edit'>
|
<menu name='Edit' action='Edit'>
|
||||||
|
|
@ -204,6 +204,19 @@
|
||||||
<menuitem action='SoloInPlace'/>
|
<menuitem action='SoloInPlace'/>
|
||||||
<menuitem action='SoloViaBus'/>
|
<menuitem action='SoloViaBus'/>
|
||||||
</menu>
|
</menu>
|
||||||
|
<menu action='Crossfades'>
|
||||||
|
<menuitem action='toggle-xfades-active'/>
|
||||||
|
<menuitem action='toggle-xfades-visible'/>
|
||||||
|
<menuitem action='toggle-auto-xfades'/>
|
||||||
|
<separator/>
|
||||||
|
<menuitem action='CrossfadesFull'/>
|
||||||
|
<menuitem action='CrossfadesShort'/>
|
||||||
|
</menu>
|
||||||
|
<menu action='Layering'>
|
||||||
|
<menuitem action='LayerLaterHigher'/>
|
||||||
|
<menuitem action='LayerMoveAddHigher'/>
|
||||||
|
<menuitem action='LayerAddHigher'/>
|
||||||
|
</menu>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menuitem action='SendMTC'/>
|
<menuitem action='SendMTC'/>
|
||||||
<menuitem action='SendMMC'/>
|
<menuitem action='SendMMC'/>
|
||||||
|
|
|
||||||
|
|
@ -212,6 +212,8 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m
|
||||||
|
|
||||||
for (list<Preset*>::iterator i = fade_out_presets->begin(); i != fade_out_presets->end(); ++i) {
|
for (list<Preset*>::iterator i = fade_out_presets->begin(); i != fade_out_presets->end(); ++i) {
|
||||||
|
|
||||||
|
cerr << "looking for xpm " << (*i)->xpm << endl;
|
||||||
|
|
||||||
pxmap = manage (new Image (get_xpm((*i)->xpm)));
|
pxmap = manage (new Image (get_xpm((*i)->xpm)));
|
||||||
pbutton = manage (new Button);
|
pbutton = manage (new Button);
|
||||||
pbutton->add (*pxmap);
|
pbutton->add (*pxmap);
|
||||||
|
|
|
||||||
|
|
@ -1000,7 +1000,7 @@ Editor::queue_session_control_changed (Session::ControlType t)
|
||||||
void
|
void
|
||||||
Editor::session_control_changed (Session::ControlType t)
|
Editor::session_control_changed (Session::ControlType t)
|
||||||
{
|
{
|
||||||
// right now we're only tracking the loop and punch state
|
// right now we're only tracking some state here
|
||||||
|
|
||||||
switch (t) {
|
switch (t) {
|
||||||
case Session::AutoLoop:
|
case Session::AutoLoop:
|
||||||
|
|
@ -1011,6 +1011,10 @@ Editor::session_control_changed (Session::ControlType t)
|
||||||
update_punch_range_view (true);
|
update_punch_range_view (true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Session::LayeringModel:
|
||||||
|
update_layering_model ();
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -1242,6 +1246,32 @@ Editor::connect_to_session (Session *t)
|
||||||
session->locations()->StateChanged.connect (mem_fun(*this, &Editor::refresh_location_display_s));
|
session->locations()->StateChanged.connect (mem_fun(*this, &Editor::refresh_location_display_s));
|
||||||
session->locations()->end_location()->changed.connect (mem_fun(*this, &Editor::end_location_changed));
|
session->locations()->end_location()->changed.connect (mem_fun(*this, &Editor::end_location_changed));
|
||||||
|
|
||||||
|
bool yn;
|
||||||
|
RefPtr<Action> act;
|
||||||
|
|
||||||
|
act = ActionManager::get_action (X_("Editor"), X_("toggle-xfades-active"));
|
||||||
|
if (act) {
|
||||||
|
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
|
/* do it twice to force the change */
|
||||||
|
yn = session->get_crossfades_active();
|
||||||
|
tact->set_active (!yn);
|
||||||
|
tact->set_active (yn);
|
||||||
|
}
|
||||||
|
|
||||||
|
act = ActionManager::get_action (X_("Editor"), X_("toggle-auto-xfades"));
|
||||||
|
if (act) {
|
||||||
|
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
|
/* do it twice to force the change */
|
||||||
|
yn = Config->get_auto_xfade ();
|
||||||
|
tact->set_active (!yn);
|
||||||
|
tact->set_active (yn);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* xfade visibility state set from editor::set_state() */
|
||||||
|
|
||||||
|
update_crossfade_model ();
|
||||||
|
update_layering_model ();
|
||||||
|
|
||||||
reset_scrolling_region ();
|
reset_scrolling_region ();
|
||||||
|
|
||||||
redisplay_regions ();
|
redisplay_regions ();
|
||||||
|
|
@ -2198,7 +2228,7 @@ Editor::set_state (const XMLNode& node)
|
||||||
|
|
||||||
if ((prop = node.property ("follow-playhead"))) {
|
if ((prop = node.property ("follow-playhead"))) {
|
||||||
bool yn = (prop->value() == "yes");
|
bool yn = (prop->value() == "yes");
|
||||||
RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleFollowPlayhead"));
|
RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-follow-playhead"));
|
||||||
if (act) {
|
if (act) {
|
||||||
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
|
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
/* do it twice to force the change */
|
/* do it twice to force the change */
|
||||||
|
|
@ -2216,7 +2246,7 @@ Editor::set_state (const XMLNode& node)
|
||||||
if ((prop = node.property ("xfades-visible"))) {
|
if ((prop = node.property ("xfades-visible"))) {
|
||||||
bool yn = (prop->value() == "yes");
|
bool yn = (prop->value() == "yes");
|
||||||
_xfade_visibility = !yn;
|
_xfade_visibility = !yn;
|
||||||
set_xfade_visibility (yn);
|
// set_xfade_visibility (yn);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((prop = node.property ("show-editor-mixer"))) {
|
if ((prop = node.property ("show-editor-mixer"))) {
|
||||||
|
|
@ -3003,7 +3033,6 @@ Editor::restore_state (State *state)
|
||||||
|
|
||||||
*selection = *state->selection;
|
*selection = *state->selection;
|
||||||
time_selection_changed ();
|
time_selection_changed ();
|
||||||
cerr << "RS: RSC\n";
|
|
||||||
region_selection_changed ();
|
region_selection_changed ();
|
||||||
|
|
||||||
/* XXX other selection change handlers? */
|
/* XXX other selection change handlers? */
|
||||||
|
|
@ -3861,7 +3890,7 @@ Editor::set_show_measures (bool yn)
|
||||||
void
|
void
|
||||||
Editor::toggle_follow_playhead ()
|
Editor::toggle_follow_playhead ()
|
||||||
{
|
{
|
||||||
RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("ToggleFollowPlayhead"));
|
RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-follow-playhead"));
|
||||||
if (act) {
|
if (act) {
|
||||||
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
|
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
set_follow_playhead (tact->get_active());
|
set_follow_playhead (tact->get_active());
|
||||||
|
|
@ -4161,3 +4190,51 @@ Editor::on_key_press_event (GdkEventKey* ev)
|
||||||
return key_press_focus_accelerator_handler (*this, ev);
|
return key_press_focus_accelerator_handler (*this, ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Editor::update_layering_model ()
|
||||||
|
{
|
||||||
|
RefPtr<Action> act;
|
||||||
|
|
||||||
|
switch (session->get_layer_model()) {
|
||||||
|
case Session::LaterHigher:
|
||||||
|
act = ActionManager::get_action (X_("Editor"), X_("LayerLaterHigher"));
|
||||||
|
break;
|
||||||
|
case Session::MoveAddHigher:
|
||||||
|
act = ActionManager::get_action (X_("Editor"), X_("LayerMoveAddHigher"));
|
||||||
|
break;
|
||||||
|
case Session::AddHigher:
|
||||||
|
act = ActionManager::get_action (X_("Editor"), X_("LayerAddHigher"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (act) {
|
||||||
|
RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
|
||||||
|
if (ract && !ract->get_active()) {
|
||||||
|
ract->set_active (true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
Editor::update_crossfade_model ()
|
||||||
|
{
|
||||||
|
RefPtr<Action> act;
|
||||||
|
|
||||||
|
switch (session->get_xfade_model()) {
|
||||||
|
case FullCrossfade:
|
||||||
|
act = ActionManager::get_action (X_("Editor"), X_("CrossfadesFull"));
|
||||||
|
break;
|
||||||
|
case ShortCrossfade:
|
||||||
|
act = ActionManager::get_action (X_("Editor"), X_("CrossfadesShort"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (act) {
|
||||||
|
RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
|
||||||
|
if (ract && !ract->get_active()) {
|
||||||
|
ract->set_active (true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -300,10 +300,17 @@ class Editor : public PublicEditor
|
||||||
|
|
||||||
/* xfades */
|
/* xfades */
|
||||||
|
|
||||||
|
void toggle_auto_xfade ();
|
||||||
void toggle_xfades_active ();
|
void toggle_xfades_active ();
|
||||||
void toggle_xfade_visibility ();
|
void toggle_xfade_visibility ();
|
||||||
void set_xfade_visibility (bool yn);
|
|
||||||
bool xfade_visibility() const { return _xfade_visibility; }
|
bool xfade_visibility() const { return _xfade_visibility; }
|
||||||
|
void update_crossfade_model ();
|
||||||
|
void set_crossfade_model (ARDOUR::CrossfadeModel);
|
||||||
|
|
||||||
|
/* layers */
|
||||||
|
|
||||||
|
void set_layer_model (ARDOUR::Session::LayerModel);
|
||||||
|
void update_layering_model ();
|
||||||
|
|
||||||
/* redirect shared ops menu. caller must free returned menu */
|
/* redirect shared ops menu. caller must free returned menu */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,15 +33,29 @@ Editor::register_actions ()
|
||||||
ActionManager::register_action (editor_actions, X_("MeterHold"), _("Meter hold"));
|
ActionManager::register_action (editor_actions, X_("MeterHold"), _("Meter hold"));
|
||||||
ActionManager::register_action (editor_actions, X_("MeterFalloff"), _("Meter falloff"));
|
ActionManager::register_action (editor_actions, X_("MeterFalloff"), _("Meter falloff"));
|
||||||
ActionManager::register_action (editor_actions, X_("Solo"), _("Solo"));
|
ActionManager::register_action (editor_actions, X_("Solo"), _("Solo"));
|
||||||
|
ActionManager::register_action (editor_actions, X_("Crossfades"), _("Crossfades"));
|
||||||
ActionManager::register_action (editor_actions, X_("Monitoring"), _("Monitoring"));
|
ActionManager::register_action (editor_actions, X_("Monitoring"), _("Monitoring"));
|
||||||
ActionManager::register_action (editor_actions, X_("Autoconnect"), _("Autoconnect"));
|
ActionManager::register_action (editor_actions, X_("Autoconnect"), _("Autoconnect"));
|
||||||
|
ActionManager::register_action (editor_actions, X_("Layering"), _("Layering"));
|
||||||
|
|
||||||
/* add named actions for the editor */
|
/* add named actions for the editor */
|
||||||
|
|
||||||
|
|
||||||
act = ActionManager::register_toggle_action (editor_actions, "show-editor-mixer", _("Show Editor Mixer"), mem_fun (*this, &Editor::editor_mixer_button_toggled));
|
act = ActionManager::register_toggle_action (editor_actions, "show-editor-mixer", _("Show Editor Mixer"), mem_fun (*this, &Editor::editor_mixer_button_toggled));
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
|
|
||||||
act = ActionManager::register_action (editor_actions, "toggle-xfades-active", _("Toggle Xfades Active"), mem_fun(*this, &Editor::toggle_xfades_active));
|
RadioAction::Group crossfade_model_group;
|
||||||
|
|
||||||
|
act = ActionManager::register_radio_action (editor_actions, crossfade_model_group, "CrossfadesFull", _("Span Entire Overlap"), bind (mem_fun(*this, &Editor::set_crossfade_model), FullCrossfade));
|
||||||
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
|
act = ActionManager::register_radio_action (editor_actions, crossfade_model_group, "CrossfadesShort", _("Short"), bind (mem_fun(*this, &Editor::set_crossfade_model), ShortCrossfade));
|
||||||
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
|
|
||||||
|
act = ActionManager::register_toggle_action (editor_actions, "toggle-xfades-active", _("Active"), mem_fun(*this, &Editor::toggle_xfades_active));
|
||||||
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
|
act = ActionManager::register_toggle_action (editor_actions, "toggle-xfades-visible", _("Visible"), mem_fun(*this, &Editor::toggle_xfade_visibility));
|
||||||
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
|
act = ActionManager::register_toggle_action (editor_actions, "toggle-auto-xfades", _("Created Automatically"), mem_fun(*this, &Editor::toggle_auto_xfade));
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
|
|
||||||
act = ActionManager::register_action (editor_actions, "playhead-to-next-region-start", _("Playhead to Next Region Start"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), playhead_cursor, RegionPoint (Start)));
|
act = ActionManager::register_action (editor_actions, "playhead-to-next-region-start", _("Playhead to Next Region Start"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), playhead_cursor, RegionPoint (Start)));
|
||||||
|
|
@ -228,7 +242,7 @@ Editor::register_actions ()
|
||||||
act = ActionManager::register_action (editor_actions, "extend-range-to-start-of-region", _("Extend Range to Start of Region"), bind (mem_fun(*this, &Editor::extend_selection_to_start_of_region), false));
|
act = ActionManager::register_action (editor_actions, "extend-range-to-start-of-region", _("Extend Range to Start of Region"), bind (mem_fun(*this, &Editor::extend_selection_to_start_of_region), false));
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
|
|
||||||
act = ActionManager::register_toggle_action (editor_actions, "ToggleFollowPlayhead", _("Follow Playhead"), (mem_fun(*this, &Editor::toggle_follow_playhead)));
|
act = ActionManager::register_toggle_action (editor_actions, "toggle-follow-playhead", _("Follow Playhead"), (mem_fun(*this, &Editor::toggle_follow_playhead)));
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
act = ActionManager::register_action (editor_actions, "remove-last-capture", _("Remove Last Capture"), (mem_fun(*this, &Editor::remove_last_capture)));
|
act = ActionManager::register_action (editor_actions, "remove-last-capture", _("Remove Last Capture"), (mem_fun(*this, &Editor::remove_last_capture)));
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
|
|
@ -356,6 +370,12 @@ Editor::register_actions ()
|
||||||
ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldMedium"), _("Medium"), bind (mem_fun (*this, &Editor::set_meter_hold), 100));
|
ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldMedium"), _("Medium"), bind (mem_fun (*this, &Editor::set_meter_hold), 100));
|
||||||
ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldLong"), _("Long"), bind (mem_fun (*this, &Editor::set_meter_hold), 200));
|
ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldLong"), _("Long"), bind (mem_fun (*this, &Editor::set_meter_hold), 200));
|
||||||
|
|
||||||
|
RadioAction::Group layer_model_group;
|
||||||
|
|
||||||
|
ActionManager::register_radio_action (editor_actions, layer_model_group, X_("LayerLaterHigher"), _("Later is Higher"), bind (mem_fun (*this, &Editor::set_layer_model), Session::LaterHigher));
|
||||||
|
ActionManager::register_radio_action (editor_actions, layer_model_group, X_("LayerMoveAddHigher"), _("Most Recently Moved/Added is Higher"), bind (mem_fun (*this, &Editor::set_layer_model), Session::MoveAddHigher));
|
||||||
|
ActionManager::register_radio_action (editor_actions, layer_model_group, X_("LayerAddHigher"), _("Most Recently Added is Higher"), bind (mem_fun (*this, &Editor::set_layer_model), Session::AddHigher));
|
||||||
|
|
||||||
ActionManager::add_action_group (rl_actions);
|
ActionManager::add_action_group (rl_actions);
|
||||||
ActionManager::add_action_group (zoom_actions);
|
ActionManager::add_action_group (zoom_actions);
|
||||||
ActionManager::add_action_group (mouse_mode_actions);
|
ActionManager::add_action_group (mouse_mode_actions);
|
||||||
|
|
@ -393,3 +413,93 @@ Editor::toggle_measure_visibility ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Editor::toggle_auto_xfade ()
|
||||||
|
{
|
||||||
|
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-auto-xfades"));
|
||||||
|
if (act) {
|
||||||
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
|
Config->set_auto_xfade (tact->get_active());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Editor::toggle_xfades_active ()
|
||||||
|
{
|
||||||
|
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-xfades-active"));
|
||||||
|
if (session && act) {
|
||||||
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
|
session->set_crossfades_active (tact->get_active());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Editor::toggle_xfade_visibility ()
|
||||||
|
{
|
||||||
|
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-xfades-visible"));
|
||||||
|
if (session && act) {
|
||||||
|
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
|
||||||
|
// set_xfade_visibility (tact->get_active());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Editor::set_layer_model (Session::LayerModel model)
|
||||||
|
{
|
||||||
|
/* this is driven by a toggle on a radio group, and so is invoked twice,
|
||||||
|
once for the item that became inactive and once for the one that became
|
||||||
|
active.
|
||||||
|
*/
|
||||||
|
|
||||||
|
RefPtr<Action> act;
|
||||||
|
|
||||||
|
if (session) {
|
||||||
|
switch (model) {
|
||||||
|
case Session::LaterHigher:
|
||||||
|
act = ActionManager::get_action (X_("Editor"), X_("LayerLaterHigher"));
|
||||||
|
break;
|
||||||
|
case Session::MoveAddHigher:
|
||||||
|
act = ActionManager::get_action (X_("Editor"), X_("LayerMoveAddHigher"));
|
||||||
|
break;
|
||||||
|
case Session::AddHigher:
|
||||||
|
act = ActionManager::get_action (X_("Editor"), X_("LayerAddHigher"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (act) {
|
||||||
|
RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
|
||||||
|
if (ract && ract->get_active()) {
|
||||||
|
session->set_layer_model (model);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Editor::set_crossfade_model (CrossfadeModel model)
|
||||||
|
{
|
||||||
|
RefPtr<Action> act;
|
||||||
|
|
||||||
|
/* this is driven by a toggle on a radio group, and so is invoked twice,
|
||||||
|
once for the item that became inactive and once for the one that became
|
||||||
|
active.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (session) {
|
||||||
|
switch (model) {
|
||||||
|
case FullCrossfade:
|
||||||
|
act = ActionManager::get_action (X_("Editor"), X_("CrossfadesFull"));
|
||||||
|
break;
|
||||||
|
case ShortCrossfade:
|
||||||
|
act = ActionManager::get_action (X_("Editor"), X_("CrossfadesShort"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (act) {
|
||||||
|
RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act);
|
||||||
|
if (ract && ract->get_active()) {
|
||||||
|
session->set_xfade_model (model);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -3528,26 +3528,6 @@ Editor::nudge_track (bool use_edit_cursor, bool forwards)
|
||||||
commit_reversible_command ();
|
commit_reversible_command ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
Editor::toggle_xfades_active ()
|
|
||||||
{
|
|
||||||
if (session) {
|
|
||||||
session->set_crossfades_active (!session->get_crossfades_active());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
Editor::set_xfade_visibility (bool yn)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
Editor::toggle_xfade_visibility ()
|
|
||||||
{
|
|
||||||
set_xfade_visibility (!xfade_visibility());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::remove_last_capture ()
|
Editor::remove_last_capture ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -47,22 +47,7 @@ using namespace Editing;
|
||||||
using namespace Gtkmm2ext;
|
using namespace Gtkmm2ext;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
static const gchar *lmode_strings[] = {
|
|
||||||
N_("Later regions are higher"),
|
|
||||||
N_("Most recently added/moved/trimmed regions are higher"),
|
|
||||||
N_("Most recently added regions are higher"),
|
|
||||||
0
|
|
||||||
};
|
|
||||||
|
|
||||||
static const gchar *xfl_strings[] = {
|
|
||||||
N_("Span entire region overlap"),
|
|
||||||
N_("Short fades at the start of the overlap"),
|
|
||||||
0
|
|
||||||
};
|
|
||||||
|
|
||||||
static vector<string> positional_sync_strings;
|
static vector<string> positional_sync_strings;
|
||||||
static vector<string> layer_mode_strings;
|
|
||||||
static vector<string> xfade_model_strings;
|
|
||||||
|
|
||||||
OptionEditor::OptionEditor (ARDOUR_UI& uip, PublicEditor& ed, Mixer_UI& mixui)
|
OptionEditor::OptionEditor (ARDOUR_UI& uip, PublicEditor& ed, Mixer_UI& mixui)
|
||||||
: Dialog ("option editor"),
|
: Dialog ("option editor"),
|
||||||
|
|
@ -78,12 +63,10 @@ OptionEditor::OptionEditor (ARDOUR_UI& uip, PublicEditor& ed, Mixer_UI& mixui)
|
||||||
|
|
||||||
/* Fades */
|
/* Fades */
|
||||||
|
|
||||||
auto_xfade_button (_("Automatically create crossfades")),
|
|
||||||
xfade_active_button (_("New full-overlap crossfades are unmuted")),
|
|
||||||
layer_mode_label (_("Region layering mode")),
|
|
||||||
xfade_model_label (_("Crossfade model")),
|
|
||||||
short_xfade_adjustment (0, 1.0, 500.0, 5.0, 100.0),
|
short_xfade_adjustment (0, 1.0, 500.0, 5.0, 100.0),
|
||||||
short_xfade_slider (short_xfade_adjustment),
|
short_xfade_slider (short_xfade_adjustment),
|
||||||
|
destructo_xfade_adjustment (0, 1.0, 500.0, 5.0, 100.0),
|
||||||
|
destructo_xfade_slider (destructo_xfade_adjustment),
|
||||||
|
|
||||||
/* Sync */
|
/* Sync */
|
||||||
|
|
||||||
|
|
@ -119,9 +102,6 @@ OptionEditor::OptionEditor (ARDOUR_UI& uip, PublicEditor& ed, Mixer_UI& mixui)
|
||||||
set_name ("OptionsWindow");
|
set_name ("OptionsWindow");
|
||||||
add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK);
|
add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK);
|
||||||
|
|
||||||
layer_mode_label.set_name ("OptionsLabel");
|
|
||||||
xfade_model_label.set_name ("OptionsLabel");
|
|
||||||
|
|
||||||
VBox *vbox = get_vbox();
|
VBox *vbox = get_vbox();
|
||||||
set_border_width (3);
|
set_border_width (3);
|
||||||
|
|
||||||
|
|
@ -171,7 +151,6 @@ OptionEditor::set_session (Session *s)
|
||||||
session_raid_entry.set_sensitive (false);
|
session_raid_entry.set_sensitive (false);
|
||||||
|
|
||||||
smpte_fps_combo.set_sensitive (false);
|
smpte_fps_combo.set_sensitive (false);
|
||||||
layer_mode_combo.set_sensitive (false);
|
|
||||||
short_xfade_slider.set_sensitive (false);
|
short_xfade_slider.set_sensitive (false);
|
||||||
smpte_offset_negative_button.set_sensitive (false);
|
smpte_offset_negative_button.set_sensitive (false);
|
||||||
|
|
||||||
|
|
@ -186,7 +165,6 @@ OptionEditor::set_session (Session *s)
|
||||||
click_emphasis_path_entry.set_sensitive (true);
|
click_emphasis_path_entry.set_sensitive (true);
|
||||||
session_raid_entry.set_sensitive (true);
|
session_raid_entry.set_sensitive (true);
|
||||||
smpte_fps_combo.set_sensitive (true);
|
smpte_fps_combo.set_sensitive (true);
|
||||||
layer_mode_combo.set_sensitive (true);
|
|
||||||
short_xfade_slider.set_sensitive (true);
|
short_xfade_slider.set_sensitive (true);
|
||||||
smpte_offset_negative_button.set_sensitive (true);
|
smpte_offset_negative_button.set_sensitive (true);
|
||||||
|
|
||||||
|
|
@ -238,9 +216,6 @@ OptionEditor::set_session (Session *s)
|
||||||
setup_click_editor ();
|
setup_click_editor ();
|
||||||
connect_audition_editor ();
|
connect_audition_editor ();
|
||||||
|
|
||||||
layer_mode_combo.set_active_text (layer_mode_strings[session->get_layer_model()]);
|
|
||||||
xfade_model_combo.set_active_text (xfade_model_strings[session->get_xfade_model()]);
|
|
||||||
|
|
||||||
short_xfade_adjustment.set_value ((Crossfade::short_xfade_length() / (float) session->frame_rate()) * 1000.0);
|
short_xfade_adjustment.set_value ((Crossfade::short_xfade_length() / (float) session->frame_rate()) * 1000.0);
|
||||||
|
|
||||||
add_session_paths ();
|
add_session_paths ();
|
||||||
|
|
@ -329,75 +304,31 @@ void
|
||||||
OptionEditor::setup_fade_options ()
|
OptionEditor::setup_fade_options ()
|
||||||
{
|
{
|
||||||
Gtk::HBox* hbox;
|
Gtk::HBox* hbox;
|
||||||
vector<string> dumb;
|
|
||||||
|
|
||||||
auto_xfade_button.set_name ("OptionEditorToggleButton");
|
Label* label = manage (new Label (_("Short crossfade length (msecs)")));
|
||||||
xfade_active_button.set_name ("OptionEditorToggleButton");
|
label->set_name ("OptionsLabel");
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (12);
|
|
||||||
hbox->pack_start (auto_xfade_button, false, false);
|
|
||||||
fade_packer.pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (12);
|
|
||||||
hbox->pack_start (xfade_active_button, false, false);
|
|
||||||
fade_packer.pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
layer_mode_strings = internationalize (lmode_strings);
|
|
||||||
|
|
||||||
dumb.push_back (lmode_strings[Session::LaterHigher]);
|
|
||||||
dumb.push_back (lmode_strings[Session::MoveAddHigher]);
|
|
||||||
dumb.push_back (lmode_strings[Session::AddHigher]);
|
|
||||||
set_popdown_strings (layer_mode_combo, dumb);
|
|
||||||
|
|
||||||
layer_mode_combo.signal_changed ().connect (mem_fun(*this, &OptionEditor::layer_mode_chosen));
|
|
||||||
|
|
||||||
fixup_combo_size (layer_mode_combo, layer_mode_strings);
|
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
hbox = manage (new HBox);
|
||||||
hbox->set_border_width (5);
|
hbox->set_border_width (5);
|
||||||
hbox->set_spacing (10);
|
hbox->set_spacing (10);
|
||||||
hbox->pack_start (layer_mode_label, false, false);
|
hbox->pack_start (*label, false, false);
|
||||||
hbox->pack_start (layer_mode_combo, false, false);
|
|
||||||
fade_packer.pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
xfade_model_strings = internationalize (xfl_strings);
|
|
||||||
|
|
||||||
dumb.clear ();
|
|
||||||
dumb.push_back (xfade_model_strings[FullCrossfade]);
|
|
||||||
dumb.push_back (xfade_model_strings[ShortCrossfade]);
|
|
||||||
set_popdown_strings (xfade_model_combo, dumb);
|
|
||||||
|
|
||||||
xfade_model_combo.signal_changed().connect (mem_fun(*this, &OptionEditor::xfade_model_chosen));
|
|
||||||
|
|
||||||
fixup_combo_size (xfade_model_combo, xfade_model_strings);
|
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (5);
|
|
||||||
hbox->set_spacing (10);
|
|
||||||
hbox->pack_start (xfade_model_label, false, false);
|
|
||||||
hbox->pack_start (xfade_model_combo, false, false);
|
|
||||||
fade_packer.pack_start (*hbox, false, false);
|
|
||||||
|
|
||||||
auto_xfade_button.set_active (Config->get_auto_xfade());
|
|
||||||
/* xfade and layer mode active requires session */
|
|
||||||
|
|
||||||
auto_xfade_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::auto_xfade_clicked));
|
|
||||||
xfade_active_button.signal_clicked().connect (mem_fun(*this, &OptionEditor::xfade_active_clicked));
|
|
||||||
|
|
||||||
Label* short_xfade_label = manage (new Label (_("Short crossfade length (msecs)")));
|
|
||||||
short_xfade_label->set_name ("OptionsLabel");
|
|
||||||
|
|
||||||
hbox = manage (new HBox);
|
|
||||||
hbox->set_border_width (5);
|
|
||||||
hbox->set_spacing (10);
|
|
||||||
hbox->pack_start (*short_xfade_label, false, false);
|
|
||||||
hbox->pack_start (short_xfade_slider, true, true);
|
hbox->pack_start (short_xfade_slider, true, true);
|
||||||
fade_packer.pack_start (*hbox, false, false);
|
fade_packer.pack_start (*hbox, false, false);
|
||||||
|
|
||||||
short_xfade_adjustment.signal_value_changed().connect (mem_fun(*this, &OptionEditor::short_xfade_adjustment_changed));
|
short_xfade_adjustment.signal_value_changed().connect (mem_fun(*this, &OptionEditor::short_xfade_adjustment_changed));
|
||||||
|
|
||||||
|
label = manage (new Label (_("Destructive crossfade length (msecs)")));
|
||||||
|
label->set_name ("OptionsLabel");
|
||||||
|
|
||||||
|
hbox = manage (new HBox);
|
||||||
|
hbox->set_border_width (5);
|
||||||
|
hbox->set_spacing (10);
|
||||||
|
hbox->pack_start (*label, false, false);
|
||||||
|
hbox->pack_start (destructo_xfade_slider, true, true);
|
||||||
|
fade_packer.pack_start (*hbox, false, false);
|
||||||
|
|
||||||
|
destructo_xfade_adjustment.signal_value_changed().connect (mem_fun(*this, &OptionEditor::destructo_xfade_adjustment_changed));
|
||||||
|
|
||||||
fade_packer.show_all ();
|
fade_packer.show_all ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -414,50 +345,16 @@ OptionEditor::short_xfade_adjustment_changed ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
OptionEditor::layer_mode_chosen ()
|
OptionEditor::destructo_xfade_adjustment_changed ()
|
||||||
{
|
{
|
||||||
if (!session) {
|
float val = destructo_xfade_adjustment.get_value();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
string which = layer_mode_combo.get_active_text ();
|
/* val is in msecs */
|
||||||
|
|
||||||
if (which == layer_mode_strings[Session::LaterHigher]) {
|
|
||||||
session->set_layer_model (Session::LaterHigher);
|
|
||||||
} else if (which == layer_mode_strings[Session::MoveAddHigher]) {
|
|
||||||
session->set_layer_model (Session::MoveAddHigher);
|
|
||||||
} else if (which == layer_mode_strings[Session::AddHigher]) {
|
|
||||||
session->set_layer_model (Session::AddHigher);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::xfade_model_chosen ()
|
|
||||||
{
|
|
||||||
if (!session) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
string which = xfade_model_combo.get_active_text ();
|
|
||||||
|
|
||||||
if (which == xfade_model_strings[FullCrossfade]) {
|
|
||||||
session->set_xfade_model (FullCrossfade);
|
|
||||||
} else if (which == xfade_model_strings[ShortCrossfade]) {
|
|
||||||
session->set_xfade_model (ShortCrossfade);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::auto_xfade_clicked ()
|
|
||||||
{
|
|
||||||
Config->set_auto_xfade (auto_xfade_button.get_active());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
OptionEditor::xfade_active_clicked ()
|
|
||||||
{
|
|
||||||
if (session) {
|
if (session) {
|
||||||
session->set_crossfades_active (xfade_active_button.get_active());
|
Config->set_destructive_xfade_msecs ((uint32_t) floor (val), session->frame_rate());
|
||||||
|
} else {
|
||||||
|
Config->set_destructive_xfade_msecs ((uint32_t) floor (val), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -94,21 +94,14 @@ class OptionEditor : public Gtk::Dialog
|
||||||
/* fades */
|
/* fades */
|
||||||
|
|
||||||
Gtk::VBox fade_packer;
|
Gtk::VBox fade_packer;
|
||||||
Gtk::CheckButton auto_xfade_button;
|
|
||||||
Gtk::CheckButton xfade_active_button;
|
|
||||||
Gtk::Label layer_mode_label;
|
|
||||||
Gtk::ComboBoxText layer_mode_combo;
|
|
||||||
Gtk::Label xfade_model_label;
|
|
||||||
Gtk::ComboBoxText xfade_model_combo;
|
|
||||||
Gtk::Adjustment short_xfade_adjustment;
|
Gtk::Adjustment short_xfade_adjustment;
|
||||||
Gtk::HScale short_xfade_slider;
|
Gtk::HScale short_xfade_slider;
|
||||||
|
Gtk::Adjustment destructo_xfade_adjustment;
|
||||||
|
Gtk::HScale destructo_xfade_slider;
|
||||||
|
|
||||||
void auto_xfade_clicked ();
|
|
||||||
void xfade_active_clicked ();
|
|
||||||
void layer_mode_chosen ();
|
|
||||||
void xfade_model_chosen ();
|
|
||||||
void setup_fade_options();
|
void setup_fade_options();
|
||||||
void short_xfade_adjustment_changed ();
|
void short_xfade_adjustment_changed ();
|
||||||
|
void destructo_xfade_adjustment_changed ();
|
||||||
|
|
||||||
/* Sync */
|
/* Sync */
|
||||||
|
|
||||||
|
|
|
||||||
31
gtk2_ardour/pixmaps/regout2.xpm
Normal file
31
gtk2_ardour/pixmaps/regout2.xpm
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
/* XPM */
|
||||||
|
static const gchar * regout2_xpm[] = {
|
||||||
|
"25 25 3 1",
|
||||||
|
" c None",
|
||||||
|
". c #FDFD00",
|
||||||
|
"+ c #FEFE00",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" .+. ",
|
||||||
|
" +++ ",
|
||||||
|
" +++ ",
|
||||||
|
" +++ ",
|
||||||
|
" .++ ",
|
||||||
|
" ++ ",
|
||||||
|
" ++. ",
|
||||||
|
" +++ ",
|
||||||
|
" .++ ",
|
||||||
|
" +++ ",
|
||||||
|
" +++ ",
|
||||||
|
" .+++ ",
|
||||||
|
" ++++ ",
|
||||||
|
" ++++ ",
|
||||||
|
" +++++. ",
|
||||||
|
" .+++++. ",
|
||||||
|
" .++++++. ",
|
||||||
|
" .+++++ ",
|
||||||
|
" .+. ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" "};
|
||||||
|
|
@ -111,9 +111,6 @@ class PublicEditor : public Gtk::Window, public Stateful {
|
||||||
virtual void set_follow_playhead (bool yn) = 0;
|
virtual void set_follow_playhead (bool yn) = 0;
|
||||||
virtual void toggle_follow_playhead () = 0;
|
virtual void toggle_follow_playhead () = 0;
|
||||||
virtual bool follow_playhead() const = 0;
|
virtual bool follow_playhead() const = 0;
|
||||||
virtual void toggle_xfade_visibility () = 0;
|
|
||||||
virtual void set_xfade_visibility (bool yn) = 0;
|
|
||||||
virtual bool xfade_visibility() const = 0;
|
|
||||||
virtual void ensure_float (Gtk::Window&) = 0;
|
virtual void ensure_float (Gtk::Window&) = 0;
|
||||||
virtual void show_window () = 0;
|
virtual void show_window () = 0;
|
||||||
virtual TrackViewList* get_valid_views (TimeAxisView*, ARDOUR::RouteGroup* grp = 0) = 0;
|
virtual TrackViewList* get_valid_views (TimeAxisView*, ARDOUR::RouteGroup* grp = 0) = 0;
|
||||||
|
|
|
||||||
|
|
@ -164,8 +164,8 @@ class Configuration : public Stateful
|
||||||
gain_t get_quieten_at_speed ();
|
gain_t get_quieten_at_speed ();
|
||||||
void set_quieten_at_speed (gain_t);
|
void set_quieten_at_speed (gain_t);
|
||||||
|
|
||||||
std::string get_tape_dir ();
|
uint32_t get_destructive_xfade_msecs ();
|
||||||
void set_tape_dir (std::string);
|
void set_destructive_xfade_msecs (uint32_t, jack_nframes_t sample_rate = 0);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void set_defaults ();
|
void set_defaults ();
|
||||||
|
|
@ -246,8 +246,8 @@ class Configuration : public Stateful
|
||||||
bool midi_feedback_interval_ms_is_user;
|
bool midi_feedback_interval_ms_is_user;
|
||||||
bool latched_record_enable;
|
bool latched_record_enable;
|
||||||
bool latched_record_enable_is_user;
|
bool latched_record_enable_is_user;
|
||||||
std::string tape_dir;
|
uint32_t destructive_xfade_msecs;
|
||||||
bool tape_dir_is_user;
|
bool destructive_xfade_msecs_is_user;
|
||||||
|
|
||||||
XMLNode *key_node;
|
XMLNode *key_node;
|
||||||
bool user_configuration;
|
bool user_configuration;
|
||||||
|
|
|
||||||
|
|
@ -45,11 +45,12 @@ class DestructiveFileSource : public FileSource {
|
||||||
|
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
|
|
||||||
|
static void setup_standard_crossfades (jack_nframes_t sample_rate);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static jack_nframes_t xfade_frames;
|
static jack_nframes_t xfade_frames;
|
||||||
static gain_t* out_coefficient;
|
static gain_t* out_coefficient;
|
||||||
static gain_t* in_coefficient;
|
static gain_t* in_coefficient;
|
||||||
static void setup_standard_crossfades (jack_nframes_t sample_rate);
|
|
||||||
|
|
||||||
bool _capture_start;
|
bool _capture_start;
|
||||||
bool _capture_end;
|
bool _capture_end;
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
#include <ardour/ardour.h>
|
#include <ardour/ardour.h>
|
||||||
#include <ardour/configuration.h>
|
#include <ardour/configuration.h>
|
||||||
#include <ardour/diskstream.h>
|
#include <ardour/diskstream.h>
|
||||||
|
#include <ardour/destructive_filesource.h>
|
||||||
|
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
|
|
||||||
|
|
@ -262,10 +263,9 @@ Configuration::state (bool user_only)
|
||||||
if (!user_only || latched_record_enable_is_user) {
|
if (!user_only || latched_record_enable_is_user) {
|
||||||
node->add_child_nocopy(option_node("latched-record-enable", latched_record_enable?"yes":"no"));
|
node->add_child_nocopy(option_node("latched-record-enable", latched_record_enable?"yes":"no"));
|
||||||
}
|
}
|
||||||
if (!user_only || tape_dir_is_user) {
|
if (!user_only || destructive_xfade_msecs_is_user) {
|
||||||
if (!tape_dir.empty()) {
|
snprintf(buf, sizeof(buf), "%" PRIu32, destructive_xfade_msecs);
|
||||||
node->add_child_nocopy(option_node("tape-dir", tape_dir));
|
node->add_child_nocopy(option_node("destructive_xfade_msecs", string(buf)));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* use-vst is always per-user */
|
/* use-vst is always per-user */
|
||||||
|
|
@ -409,8 +409,11 @@ Configuration::set_state (const XMLNode& root)
|
||||||
set_midi_feedback_interval_ms (atoi (option_value.c_str()));
|
set_midi_feedback_interval_ms (atoi (option_value.c_str()));
|
||||||
} else if (option_name == "latched-record-enable") {
|
} else if (option_name == "latched-record-enable") {
|
||||||
set_latched_record_enable (option_value == "yes");
|
set_latched_record_enable (option_value == "yes");
|
||||||
} else if (option_name == "tape-dir") {
|
} else if (option_name == "destructive_xfade_msecs") {
|
||||||
set_tape_dir (option_value);
|
uint32_t v;
|
||||||
|
if (sscanf (option_value.c_str(), "%u", &v) == 1) {
|
||||||
|
set_destructive_xfade_msecs (v);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -467,7 +470,7 @@ Configuration::set_defaults ()
|
||||||
timecode_source_is_synced = true;
|
timecode_source_is_synced = true;
|
||||||
use_vst = true; /* if we build with VST_SUPPORT, otherwise no effect */
|
use_vst = true; /* if we build with VST_SUPPORT, otherwise no effect */
|
||||||
quieten_at_speed = true;
|
quieten_at_speed = true;
|
||||||
tape_dir = "";
|
destructive_xfade_msecs = 2;
|
||||||
|
|
||||||
midi_feedback_interval_ms = 100;
|
midi_feedback_interval_ms = 100;
|
||||||
|
|
||||||
|
|
@ -508,7 +511,7 @@ Configuration::set_defaults ()
|
||||||
quieten_at_speed_is_user = false;
|
quieten_at_speed_is_user = false;
|
||||||
midi_feedback_interval_ms_is_user = false;
|
midi_feedback_interval_ms_is_user = false;
|
||||||
latched_record_enable_is_user = false;
|
latched_record_enable_is_user = false;
|
||||||
tape_dir_is_user = false;
|
destructive_xfade_msecs_is_user = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Configuration::MidiPortDescriptor::MidiPortDescriptor (const XMLNode& node)
|
Configuration::MidiPortDescriptor::MidiPortDescriptor (const XMLNode& node)
|
||||||
|
|
@ -1094,14 +1097,17 @@ Configuration::get_latched_record_enable ()
|
||||||
return latched_record_enable;
|
return latched_record_enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
string
|
uint32_t
|
||||||
Configuration::get_tape_dir ()
|
Configuration::get_destructive_xfade_msecs ()
|
||||||
{
|
{
|
||||||
return tape_dir;
|
return destructive_xfade_msecs;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Configuration::set_tape_dir (string path)
|
Configuration::set_destructive_xfade_msecs (uint32_t msecs, jack_nframes_t rate)
|
||||||
{
|
{
|
||||||
tape_dir = path;
|
destructive_xfade_msecs = msecs;
|
||||||
|
if (rate) {
|
||||||
|
DestructiveFileSource::setup_standard_crossfades (rate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,15 @@ DestructiveFileSource::~DestructiveFileSource()
|
||||||
void
|
void
|
||||||
DestructiveFileSource::setup_standard_crossfades (jack_nframes_t rate)
|
DestructiveFileSource::setup_standard_crossfades (jack_nframes_t rate)
|
||||||
{
|
{
|
||||||
xfade_frames = (jack_nframes_t) floor ((/*Config->get_destructive_crossfade_msecs()*/ 64 / 1000.0) * rate);
|
xfade_frames = (jack_nframes_t) floor ((Config->get_destructive_xfade_msecs () / 1000.0) * rate);
|
||||||
|
|
||||||
|
if (out_coefficient) {
|
||||||
|
delete [] out_coefficient;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (in_coefficient) {
|
||||||
|
delete [] in_coefficient;
|
||||||
|
}
|
||||||
|
|
||||||
out_coefficient = new gain_t[xfade_frames];
|
out_coefficient = new gain_t[xfade_frames];
|
||||||
in_coefficient = new gain_t[xfade_frames];
|
in_coefficient = new gain_t[xfade_frames];
|
||||||
|
|
|
||||||
|
|
@ -2255,13 +2255,7 @@ Session::sound_dir () const
|
||||||
string
|
string
|
||||||
Session::tape_dir () const
|
Session::tape_dir () const
|
||||||
{
|
{
|
||||||
string res = Config->get_tape_dir();
|
string res = _path;
|
||||||
|
|
||||||
if (!res.empty()) {
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
res = _path;
|
|
||||||
res += tape_dir_name;
|
res += tape_dir_name;
|
||||||
res += '/';
|
res += '/';
|
||||||
return res;
|
return res;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue