mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 09:06:33 +01:00
start marker implemented, along with GotoZero command for old behaviour; R binding for global rec-enable now works (menu item added)
git-svn-id: svn://localhost/trunk/ardour2@376 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
b6f309bb85
commit
ddfc8d2185
10 changed files with 70 additions and 8 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
(gtk_accel_path "<Actions>/Transport/ToggleRollForgetCapture" "<control>space")
|
(gtk_accel_path "<Actions>/Transport/ToggleRollForgetCapture" "<control>space")
|
||||||
(gtk_accel_path "<Actions>/Transport/Forward" "<control>Right")
|
(gtk_accel_path "<Actions>/Transport/Forward" "<control>Right")
|
||||||
(gtk_accel_path "<Actions>/Transport/Rewind" "<control>Left")
|
(gtk_accel_path "<Actions>/Transport/Rewind" "<control>Left")
|
||||||
|
(gtk_accel_path "<Actions>/Transport/GotoZero" "KP_Insert")
|
||||||
(gtk_accel_path "<Actions>/Transport/GotoStart" "Home")
|
(gtk_accel_path "<Actions>/Transport/GotoStart" "Home")
|
||||||
(gtk_accel_path "<Actions>/Transport/GotoEnd" "End")
|
(gtk_accel_path "<Actions>/Transport/GotoEnd" "End")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,12 @@
|
||||||
<menuitem action='PlaySelection'/>
|
<menuitem action='PlaySelection'/>
|
||||||
<menuitem action='Forward'/>
|
<menuitem action='Forward'/>
|
||||||
<menuitem action='Rewind'/>
|
<menuitem action='Rewind'/>
|
||||||
|
<menuitem action='GotoZero'/>
|
||||||
<menuitem action='GotoStart'/>
|
<menuitem action='GotoStart'/>
|
||||||
<menuitem action='GotoEnd'/>
|
<menuitem action='GotoEnd'/>
|
||||||
<separator/>
|
<separator/>
|
||||||
|
<menuitem action='Record'/>
|
||||||
|
<separator/>
|
||||||
<menuitem action='jump-forward-to-mark'/>
|
<menuitem action='jump-forward-to-mark'/>
|
||||||
<menuitem action='jump-backward-to-mark'/>
|
<menuitem action='jump-backward-to-mark'/>
|
||||||
<menuitem action='add-location-from-playhead'/>
|
<menuitem action='add-location-from-playhead'/>
|
||||||
|
|
|
||||||
|
|
@ -973,6 +973,23 @@ ARDOUR_UI::do_transport_locate (jack_nframes_t new_position)
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::transport_goto_start ()
|
ARDOUR_UI::transport_goto_start ()
|
||||||
|
{
|
||||||
|
if (session) {
|
||||||
|
session->goto_start();
|
||||||
|
|
||||||
|
|
||||||
|
/* force displayed area in editor to start no matter
|
||||||
|
what "follow playhead" setting is.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (editor) {
|
||||||
|
editor->reposition_x_origin (session->current_start_frame());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ARDOUR_UI::transport_goto_zero ()
|
||||||
{
|
{
|
||||||
if (session) {
|
if (session) {
|
||||||
session->request_locate (0);
|
session->request_locate (0);
|
||||||
|
|
|
||||||
|
|
@ -540,6 +540,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
||||||
|
|
||||||
void remove_last_capture ();
|
void remove_last_capture ();
|
||||||
|
|
||||||
|
void transport_goto_zero ();
|
||||||
void transport_goto_start ();
|
void transport_goto_start ();
|
||||||
void transport_goto_end ();
|
void transport_goto_end ();
|
||||||
void transport_stop ();
|
void transport_stop ();
|
||||||
|
|
|
||||||
|
|
@ -245,6 +245,9 @@ ARDOUR_UI::install_actions ()
|
||||||
act = ActionManager::register_action (transport_actions, X_("ForwardFast"), _("Forward (Fast)"), bind (mem_fun(*this, &ARDOUR_UI::transport_forward), 1));
|
act = ActionManager::register_action (transport_actions, X_("ForwardFast"), _("Forward (Fast)"), bind (mem_fun(*this, &ARDOUR_UI::transport_forward), 1));
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
ActionManager::transport_sensitive_actions.push_back (act);
|
ActionManager::transport_sensitive_actions.push_back (act);
|
||||||
|
act = ActionManager::register_action (transport_actions, X_("GotoZero"), _("Goto Zero"), mem_fun(*this, &ARDOUR_UI::transport_goto_zero));
|
||||||
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
|
ActionManager::transport_sensitive_actions.push_back (act);
|
||||||
act = ActionManager::register_action (transport_actions, X_("GotoStart"), _("Goto Start"), mem_fun(*this, &ARDOUR_UI::transport_goto_start));
|
act = ActionManager::register_action (transport_actions, X_("GotoStart"), _("Goto Start"), mem_fun(*this, &ARDOUR_UI::transport_goto_start));
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
ActionManager::transport_sensitive_actions.push_back (act);
|
ActionManager::transport_sensitive_actions.push_back (act);
|
||||||
|
|
|
||||||
|
|
@ -398,7 +398,7 @@ Editor::nudge_backward (bool next)
|
||||||
if (playhead_cursor->current_frame > distance) {
|
if (playhead_cursor->current_frame > distance) {
|
||||||
session->request_locate (playhead_cursor->current_frame - distance);
|
session->request_locate (playhead_cursor->current_frame - distance);
|
||||||
} else {
|
} else {
|
||||||
session->request_locate (0);
|
session->goto_start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -464,7 +464,7 @@ Editor::nudge_backward_capture_offset ()
|
||||||
void
|
void
|
||||||
Editor::move_to_start ()
|
Editor::move_to_start ()
|
||||||
{
|
{
|
||||||
session->request_locate (0);
|
session->goto_start ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -1528,7 +1528,7 @@ Editor::jump_backward_to_mark ()
|
||||||
if (location) {
|
if (location) {
|
||||||
session->request_locate (location->start(), session->transport_rolling());
|
session->request_locate (location->start(), session->transport_rolling());
|
||||||
} else {
|
} else {
|
||||||
session->request_locate (0);
|
session->goto_start ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1732,7 +1732,7 @@ Editor::toggle_playback (bool with_abort)
|
||||||
void
|
void
|
||||||
Editor::play_from_start ()
|
Editor::play_from_start ()
|
||||||
{
|
{
|
||||||
session->request_locate (0, true);
|
session->request_locate (session->current_start_frame(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,8 @@ class Location : public Stateful, public sigc::trackable
|
||||||
IsHidden = 0x8,
|
IsHidden = 0x8,
|
||||||
IsCDMarker = 0x10,
|
IsCDMarker = 0x10,
|
||||||
IsEnd = 0x20,
|
IsEnd = 0x20,
|
||||||
IsRangeMarker = 0x40
|
IsRangeMarker = 0x40,
|
||||||
|
IsStart = 0x80
|
||||||
};
|
};
|
||||||
|
|
||||||
Location (jack_nframes_t sample_start,
|
Location (jack_nframes_t sample_start,
|
||||||
|
|
@ -89,6 +90,7 @@ class Location : public Stateful, public sigc::trackable
|
||||||
void set_hidden (bool yn, void *src);
|
void set_hidden (bool yn, void *src);
|
||||||
void set_cd (bool yn, void *src);
|
void set_cd (bool yn, void *src);
|
||||||
void set_is_end (bool yn, void* src);
|
void set_is_end (bool yn, void* src);
|
||||||
|
void set_is_start (bool yn, void* src);
|
||||||
|
|
||||||
bool is_auto_punch () { return _flags & IsAutoPunch; }
|
bool is_auto_punch () { return _flags & IsAutoPunch; }
|
||||||
bool is_auto_loop () { return _flags & IsAutoLoop; }
|
bool is_auto_loop () { return _flags & IsAutoLoop; }
|
||||||
|
|
@ -96,6 +98,7 @@ class Location : public Stateful, public sigc::trackable
|
||||||
bool is_hidden () { return _flags & IsHidden; }
|
bool is_hidden () { return _flags & IsHidden; }
|
||||||
bool is_cd_marker () { return _flags & IsCDMarker; }
|
bool is_cd_marker () { return _flags & IsCDMarker; }
|
||||||
bool is_end() { return _flags & IsEnd; }
|
bool is_end() { return _flags & IsEnd; }
|
||||||
|
bool is_start() { return _flags & IsStart; }
|
||||||
bool is_range_marker() { return _flags & IsRangeMarker; }
|
bool is_range_marker() { return _flags & IsRangeMarker; }
|
||||||
|
|
||||||
sigc::signal<void,Location*> name_changed;
|
sigc::signal<void,Location*> name_changed;
|
||||||
|
|
@ -146,6 +149,7 @@ class Locations : public Stateful, public StateManager
|
||||||
Location* auto_loop_location () const;
|
Location* auto_loop_location () const;
|
||||||
Location* auto_punch_location () const;
|
Location* auto_punch_location () const;
|
||||||
Location* end_location() const;
|
Location* end_location() const;
|
||||||
|
Location* start_location() const;
|
||||||
|
|
||||||
uint32_t num_range_markers() const;
|
uint32_t num_range_markers() const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -353,7 +353,7 @@ class Session : public sigc::trackable, public Stateful
|
||||||
void request_auto_loop (bool yn);
|
void request_auto_loop (bool yn);
|
||||||
jack_nframes_t last_transport_start() const { return _last_roll_location; }
|
jack_nframes_t last_transport_start() const { return _last_roll_location; }
|
||||||
void goto_end () { request_locate (end_location->start(), false);}
|
void goto_end () { request_locate (end_location->start(), false);}
|
||||||
void goto_start () { request_locate (0, false); }
|
void goto_start () { request_locate (start_location->start(), false); }
|
||||||
void use_rf_shuttle_speed ();
|
void use_rf_shuttle_speed ();
|
||||||
void request_transport_speed (float speed);
|
void request_transport_speed (float speed);
|
||||||
void request_overwrite_buffer (DiskStream*);
|
void request_overwrite_buffer (DiskStream*);
|
||||||
|
|
@ -366,6 +366,7 @@ class Session : public sigc::trackable, public Stateful
|
||||||
int remove_region_from_region_list (Region&);
|
int remove_region_from_region_list (Region&);
|
||||||
|
|
||||||
jack_nframes_t current_end_frame() const { return end_location->start(); }
|
jack_nframes_t current_end_frame() const { return end_location->start(); }
|
||||||
|
jack_nframes_t current_start_frame() const { return start_location->start(); }
|
||||||
jack_nframes_t frame_rate() const { return _current_frame_rate; }
|
jack_nframes_t frame_rate() const { return _current_frame_rate; }
|
||||||
double frames_per_smpte_frame() const { return _frames_per_smpte_frame; }
|
double frames_per_smpte_frame() const { return _frames_per_smpte_frame; }
|
||||||
jack_nframes_t frames_per_hour() const { return _frames_per_hour; }
|
jack_nframes_t frames_per_hour() const { return _frames_per_hour; }
|
||||||
|
|
@ -1002,6 +1003,7 @@ class Session : public sigc::trackable, public Stateful
|
||||||
atomic_t _record_status;
|
atomic_t _record_status;
|
||||||
jack_nframes_t _transport_frame;
|
jack_nframes_t _transport_frame;
|
||||||
Location* end_location;
|
Location* end_location;
|
||||||
|
Location* start_location;
|
||||||
Slave *_slave;
|
Slave *_slave;
|
||||||
SlaveSource _slave_type;
|
SlaveSource _slave_type;
|
||||||
volatile float _transport_speed;
|
volatile float _transport_speed;
|
||||||
|
|
|
||||||
|
|
@ -154,6 +154,14 @@ Location::set_is_end (bool yn, void *src)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Location::set_is_start (bool yn, void *src)
|
||||||
|
{
|
||||||
|
if (set_flag_internal (yn, IsStart)) {
|
||||||
|
FlagsChanged (this, src); /* EMIT SIGNAL */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Location::set_auto_punch (bool yn, void *src)
|
Location::set_auto_punch (bool yn, void *src)
|
||||||
{
|
{
|
||||||
|
|
@ -659,6 +667,17 @@ Locations::end_location () const
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Location*
|
||||||
|
Locations::start_location () const
|
||||||
|
{
|
||||||
|
for (LocationList::const_iterator i = locations.begin(); i != locations.end(); ++i) {
|
||||||
|
if ((*i)->is_start()) {
|
||||||
|
return const_cast<Location*> (*i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
Location*
|
Location*
|
||||||
Locations::auto_loop_location () const
|
Locations::auto_loop_location () const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,7 @@ Session::first_stage_init (string fullpath, string snapshot_name)
|
||||||
_transport_frame = 0;
|
_transport_frame = 0;
|
||||||
last_stop_frame = 0;
|
last_stop_frame = 0;
|
||||||
end_location = new Location (0, 0, _("end"), Location::Flags ((Location::IsMark|Location::IsEnd)));
|
end_location = new Location (0, 0, _("end"), Location::Flags ((Location::IsMark|Location::IsEnd)));
|
||||||
|
start_location = new Location (0, 0, _("start"), Location::Flags ((Location::IsMark|Location::IsStart)));
|
||||||
_end_location_is_free = true;
|
_end_location_is_free = true;
|
||||||
atomic_set (&_record_status, Disabled);
|
atomic_set (&_record_status, Disabled);
|
||||||
auto_play = false;
|
auto_play = false;
|
||||||
|
|
@ -560,7 +561,10 @@ Session::create (bool& new_session, string* mix_template, jack_nframes_t initial
|
||||||
|
|
||||||
if (new_session) {
|
if (new_session) {
|
||||||
|
|
||||||
/* set an initial end point */
|
/* set initial start + end point */
|
||||||
|
|
||||||
|
start_location->set_end (0);
|
||||||
|
_locations.add (start_location);
|
||||||
|
|
||||||
end_location->set_end (initial_length);
|
end_location->set_end (initial_length);
|
||||||
_locations.add (end_location);
|
_locations.add (end_location);
|
||||||
|
|
@ -1551,9 +1555,17 @@ Session::set_state (const XMLNode& node)
|
||||||
if ((location = _locations.end_location()) == 0) {
|
if ((location = _locations.end_location()) == 0) {
|
||||||
_locations.add (end_location);
|
_locations.add (end_location);
|
||||||
} else {
|
} else {
|
||||||
|
delete end_location;
|
||||||
end_location = location;
|
end_location = location;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((location = _locations.start_location()) == 0) {
|
||||||
|
_locations.add (start_location);
|
||||||
|
} else {
|
||||||
|
delete start_location;
|
||||||
|
start_location = location;
|
||||||
|
}
|
||||||
|
|
||||||
_locations.save_state (_("initial state"));
|
_locations.save_state (_("initial state"));
|
||||||
|
|
||||||
if ((child = find_named_node (node, "EditGroups")) == 0) {
|
if ((child = find_named_node (node, "EditGroups")) == 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue