summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/ardour.menus.in6
-rw-r--r--gtk2_ardour/ardour_ui.cc2
-rw-r--r--gtk2_ardour/ardour_ui_options.cc2
-rw-r--r--gtk2_ardour/audio_clock.cc576
-rw-r--r--gtk2_ardour/audio_clock.h28
-rw-r--r--gtk2_ardour/editing_syms.h6
-rw-r--r--gtk2_ardour/editor.cc138
-rw-r--r--gtk2_ardour/editor.h39
-rw-r--r--gtk2_ardour/editor_actions.cc40
-rw-r--r--gtk2_ardour/editor_mouse.cc16
-rw-r--r--gtk2_ardour/editor_regions.cc30
-rw-r--r--gtk2_ardour/editor_rulers.cc284
-rw-r--r--gtk2_ardour/enums.cc2
-rw-r--r--gtk2_ardour/export_format_dialog.cc16
-rw-r--r--gtk2_ardour/export_timespan_selector.cc14
-rw-r--r--gtk2_ardour/export_timespan_selector.h2
-rw-r--r--gtk2_ardour/session_option_editor.cc26
-rw-r--r--gtk2_ardour/sfdb_ui.cc2
18 files changed, 622 insertions, 607 deletions
diff --git a/gtk2_ardour/ardour.menus.in b/gtk2_ardour/ardour.menus.in
index 3234bb2fa3..afbbf196f9 100644
--- a/gtk2_ardour/ardour.menus.in
+++ b/gtk2_ardour/ardour.menus.in
@@ -316,9 +316,9 @@
</menu>
<menu name='SnapTo' action='SnapTo'>
<menuitem action='snap-to-cd-frame'/>
- <menuitem action='snap-to-smpte-frame'/>
- <menuitem action='snap-to-smpte-seconds'/>
- <menuitem action='snap-to-smpte-minutes'/>
+ <menuitem action='snap-to-timecode-frame'/>
+ <menuitem action='snap-to-timecode-seconds'/>
+ <menuitem action='snap-to-timecode-minutes'/>
<menuitem action='snap-to-seconds'/>
<menuitem action='snap-to-minutes'/>
<menuitem action='snap-to-thirtyseconds'/>
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 0a019408ac..f10f287ef8 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -382,7 +382,7 @@ ARDOUR_UI::post_engine ()
primary_clock.set_mode (AudioClock::BBT);
secondary_clock.set_mode (AudioClock::MinSec);
} else {
- primary_clock.set_mode (AudioClock::SMPTE);
+ primary_clock.set_mode (AudioClock::Timecode);
secondary_clock.set_mode (AudioClock::BBT);
}
diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc
index 29c7c3cc6c..9370315a8f 100644
--- a/gtk2_ardour/ardour_ui_options.cc
+++ b/gtk2_ardour/ardour_ui_options.cc
@@ -416,7 +416,7 @@ ARDOUR_UI::parameter_changed (std::string p)
shuttle_units_button.set_label(_("ST"));
break;
}
- } else if (p == "video-pullup" || p == "smpte-format") {
+ } else if (p == "video-pullup" || p == "timecode-format") {
if (session) {
primary_clock.set (session->audible_frame(), true);
secondary_clock.set (session->audible_frame(), true);
diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc
index 42531732fa..361ee252bc 100644
--- a/gtk2_ardour/audio_clock.cc
+++ b/gtk2_ardour/audio_clock.cc
@@ -50,10 +50,10 @@ sigc::signal<void> AudioClock::ModeChanged;
vector<AudioClock*> AudioClock::clocks;
const uint32_t AudioClock::field_length[(int) AudioClock::AudioFrames+1] = {
- 2, /* SMPTE_Hours */
- 2, /* SMPTE_Minutes */
- 2, /* SMPTE_Seconds */
- 2, /* SMPTE_Frames */
+ 2, /* Timecode_Hours */
+ 2, /* Timecode_Minutes */
+ 2, /* Timecode_Seconds */
+ 2, /* Timecode_Frames */
2, /* MS_Hours */
2, /* MS_Minutes */
5, /* MS_Seconds */
@@ -89,36 +89,36 @@ AudioClock::AudioClock (std::string clock_name, bool transient, std::string widg
if (with_info) {
frames_upper_info_label = manage (new Label);
frames_lower_info_label = manage (new Label);
- smpte_upper_info_label = manage (new Label);
- smpte_lower_info_label = manage (new Label);
+ timecode_upper_info_label = manage (new Label);
+ timecode_lower_info_label = manage (new Label);
bbt_upper_info_label = manage (new Label);
bbt_lower_info_label = manage (new Label);
frames_upper_info_label->set_name ("AudioClockFramesUpperInfo");
frames_lower_info_label->set_name ("AudioClockFramesLowerInfo");
- smpte_upper_info_label->set_name ("AudioClockSMPTEUpperInfo");
- smpte_lower_info_label->set_name ("AudioClockSMPTELowerInfo");
+ timecode_upper_info_label->set_name ("AudioClockTimecodeUpperInfo");
+ timecode_lower_info_label->set_name ("AudioClockTimecodeLowerInfo");
bbt_upper_info_label->set_name ("AudioClockBBTUpperInfo");
bbt_lower_info_label->set_name ("AudioClockBBTLowerInfo");
- Gtkmm2ext::set_size_request_to_display_given_text(*smpte_upper_info_label, "23.98",0,0);
- Gtkmm2ext::set_size_request_to_display_given_text(*smpte_lower_info_label, "NDF",0,0);
+ Gtkmm2ext::set_size_request_to_display_given_text(*timecode_upper_info_label, "23.98",0,0);
+ Gtkmm2ext::set_size_request_to_display_given_text(*timecode_lower_info_label, "NDF",0,0);
Gtkmm2ext::set_size_request_to_display_given_text(*bbt_upper_info_label, "88|88",0,0);
Gtkmm2ext::set_size_request_to_display_given_text(*bbt_lower_info_label, "888.88",0,0);
frames_info_box.pack_start (*frames_upper_info_label, true, true);
frames_info_box.pack_start (*frames_lower_info_label, true, true);
- smpte_info_box.pack_start (*smpte_upper_info_label, true, true);
- smpte_info_box.pack_start (*smpte_lower_info_label, true, true);
+ timecode_info_box.pack_start (*timecode_upper_info_label, true, true);
+ timecode_info_box.pack_start (*timecode_lower_info_label, true, true);
bbt_info_box.pack_start (*bbt_upper_info_label, true, true);
bbt_info_box.pack_start (*bbt_lower_info_label, true, true);
} else {
frames_upper_info_label = 0;
frames_lower_info_label = 0;
- smpte_upper_info_label = 0;
- smpte_lower_info_label = 0;
+ timecode_upper_info_label = 0;
+ timecode_lower_info_label = 0;
bbt_upper_info_label = 0;
bbt_lower_info_label = 0;
}
@@ -146,21 +146,21 @@ AudioClock::AudioClock (std::string clock_name, bool transient, std::string widg
ms_minutes_ebox.add (ms_minutes_label);
ms_seconds_ebox.add (ms_seconds_label);
- smpte_packer.set_homogeneous (false);
- smpte_packer.set_border_width (2);
- smpte_packer.pack_start (hours_ebox, false, false);
- smpte_packer.pack_start (colon1, false, false);
- smpte_packer.pack_start (minutes_ebox, false, false);
- smpte_packer.pack_start (colon2, false, false);
- smpte_packer.pack_start (seconds_ebox, false, false);
- smpte_packer.pack_start (colon3, false, false);
- smpte_packer.pack_start (frames_ebox, false, false);
+ timecode_packer.set_homogeneous (false);
+ timecode_packer.set_border_width (2);
+ timecode_packer.pack_start (hours_ebox, false, false);
+ timecode_packer.pack_start (colon1, false, false);
+ timecode_packer.pack_start (minutes_ebox, false, false);
+ timecode_packer.pack_start (colon2, false, false);
+ timecode_packer.pack_start (seconds_ebox, false, false);
+ timecode_packer.pack_start (colon3, false, false);
+ timecode_packer.pack_start (frames_ebox, false, false);
if (with_info) {
- smpte_packer.pack_start (smpte_info_box, false, false, 5);
+ timecode_packer.pack_start (timecode_info_box, false, false, 5);
}
- smpte_packer_hbox.pack_start (smpte_packer, true, false);
+ timecode_packer_hbox.pack_start (timecode_packer, true, false);
bbt_packer.set_homogeneous (false);
bbt_packer.set_border_width (2);
@@ -194,7 +194,7 @@ AudioClock::AudioClock (std::string clock_name, bool transient, std::string widg
set_widget_name (widget_name);
_mode = BBT; /* lie to force mode switch */
- set_mode (SMPTE);
+ set_mode (Timecode);
pack_start (clock_frame, true, true);
@@ -210,9 +210,9 @@ AudioClock::AudioClock (std::string clock_name, bool transient, std::string widg
*/
clock_base.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::SCROLL_MASK);
- clock_base.signal_button_release_event().connect (bind (mem_fun (*this, &AudioClock::field_button_release_event), SMPTE_Hours));
+ clock_base.signal_button_release_event().connect (bind (mem_fun (*this, &AudioClock::field_button_release_event), Timecode_Hours));
- Session::SMPTEOffsetChanged.connect (mem_fun (*this, &AudioClock::smpte_offset_changed));
+ Session::TimecodeOffsetChanged.connect (mem_fun (*this, &AudioClock::timecode_offset_changed));
if (editable) {
setup_events ();
@@ -295,10 +295,10 @@ AudioClock::setup_events ()
ms_minutes_ebox.set_flags (Gtk::CAN_FOCUS);
ms_seconds_ebox.set_flags (Gtk::CAN_FOCUS);
- hours_ebox.signal_motion_notify_event().connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), SMPTE_Hours));
- minutes_ebox.signal_motion_notify_event().connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), SMPTE_Minutes));
- seconds_ebox.signal_motion_notify_event().connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), SMPTE_Seconds));
- frames_ebox.signal_motion_notify_event().connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), SMPTE_Frames));
+ hours_ebox.signal_motion_notify_event().connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), Timecode_Hours));
+ minutes_ebox.signal_motion_notify_event().connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), Timecode_Minutes));
+ seconds_ebox.signal_motion_notify_event().connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), Timecode_Seconds));
+ frames_ebox.signal_motion_notify_event().connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), Timecode_Frames));
audio_frames_ebox.signal_motion_notify_event().connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), AudioFrames));
bars_ebox.signal_motion_notify_event().connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), Bars));
beats_ebox.signal_motion_notify_event().connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), Beats));
@@ -307,10 +307,10 @@ AudioClock::setup_events ()
ms_minutes_ebox.signal_motion_notify_event().connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), MS_Minutes));
ms_seconds_ebox.signal_motion_notify_event().connect (bind (mem_fun(*this, &AudioClock::field_motion_notify_event), MS_Seconds));
- hours_ebox.signal_button_press_event().connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), SMPTE_Hours));
- minutes_ebox.signal_button_press_event().connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), SMPTE_Minutes));
- seconds_ebox.signal_button_press_event().connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), SMPTE_Seconds));
- frames_ebox.signal_button_press_event().connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), SMPTE_Frames));
+ hours_ebox.signal_button_press_event().connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), Timecode_Hours));
+ minutes_ebox.signal_button_press_event().connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), Timecode_Minutes));
+ seconds_ebox.signal_button_press_event().connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), Timecode_Seconds));
+ frames_ebox.signal_button_press_event().connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), Timecode_Frames));
audio_frames_ebox.signal_button_press_event().connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), AudioFrames));
bars_ebox.signal_button_press_event().connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), Bars));
beats_ebox.signal_button_press_event().connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), Beats));
@@ -319,10 +319,10 @@ AudioClock::setup_events ()
ms_minutes_ebox.signal_button_press_event().connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), MS_Minutes));
ms_seconds_ebox.signal_button_press_event().connect (bind (mem_fun(*this, &AudioClock::field_button_press_event), MS_Seconds));
- hours_ebox.signal_button_release_event().connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), SMPTE_Hours));
- minutes_ebox.signal_button_release_event().connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), SMPTE_Minutes));
- seconds_ebox.signal_button_release_event().connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), SMPTE_Seconds));
- frames_ebox.signal_button_release_event().connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), SMPTE_Frames));
+ hours_ebox.signal_button_release_event().connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), Timecode_Hours));
+ minutes_ebox.signal_button_release_event().connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), Timecode_Minutes));
+ seconds_ebox.signal_button_release_event().connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), Timecode_Seconds));
+ frames_ebox.signal_button_release_event().connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), Timecode_Frames));
audio_frames_ebox.signal_button_release_event().connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), AudioFrames));
bars_ebox.signal_button_release_event().connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), Bars));
beats_ebox.signal_button_release_event().connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), Beats));
@@ -331,10 +331,10 @@ AudioClock::setup_events ()
ms_minutes_ebox.signal_button_release_event().connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), MS_Minutes));
ms_seconds_ebox.signal_button_release_event().connect (bind (mem_fun(*this, &AudioClock::field_button_release_event), MS_Seconds));
- hours_ebox.signal_scroll_event().connect (bind (mem_fun(*this, &AudioClock::field_button_scroll_event), SMPTE_Hours));
- minutes_ebox.signal_scroll_event().connect (bind (mem_fun(*this, &AudioClock::field_button_scroll_event), SMPTE_Minutes));
- seconds_ebox.signal_scroll_event().connect (bind (mem_fun(*this, &AudioClock::field_button_scroll_event), SMPTE_Seconds));
- frames_ebox.signal_scroll_event().connect (bind (mem_fun(*this, &AudioClock::field_button_scroll_event), SMPTE_Frames));
+ hours_ebox.signal_scroll_event().connect (bind (mem_fun(*this, &AudioClock::field_button_scroll_event), Timecode_Hours));
+ minutes_ebox.signal_scroll_event().connect (bind (mem_fun(*this, &AudioClock::field_button_scroll_event), Timecode_Minutes));
+ seconds_ebox.signal_scroll_event().connect (bind (mem_fun(*this, &AudioClock::field_button_scroll_event), Timecode_Seconds));
+ frames_ebox.signal_scroll_event().connect (bind (mem_fun(*this, &AudioClock::field_button_scroll_event), Timecode_Frames));
audio_frames_ebox.signal_scroll_event().connect (bind (mem_fun(*this, &AudioClock::field_button_scroll_event), AudioFrames));
bars_ebox.signal_scroll_event().connect (bind (mem_fun(*this, &AudioClock::field_button_scroll_event), Bars));
beats_ebox.signal_scroll_event().connect (bind (mem_fun(*this, &AudioClock::field_button_scroll_event), Beats));
@@ -343,10 +343,10 @@ AudioClock::setup_events ()
ms_minutes_ebox.signal_scroll_event().connect (bind (mem_fun(*this, &AudioClock::field_button_scroll_event), MS_Minutes));
ms_seconds_ebox.signal_scroll_event().connect (bind (mem_fun(*this, &AudioClock::field_button_scroll_event), MS_Seconds));
- hours_ebox.signal_key_press_event().connect (bind (mem_fun(*this, &AudioClock::field_key_press_event), SMPTE_Hours));
- minutes_ebox.signal_key_press_event().connect (bind (mem_fun(*this, &AudioClock::field_key_press_event), SMPTE_Minutes));
- seconds_ebox.signal_key_press_event().connect (bind (mem_fun(*this, &AudioClock::field_key_press_event), SMPTE_Seconds));
- frames_ebox.signal_key_press_event().connect (bind (mem_fun(*this, &AudioClock::field_key_press_event), SMPTE_Frames));
+ hours_ebox.signal_key_press_event().connect (bind (mem_fun(*this, &AudioClock::field_key_press_event), Timecode_Hours));
+ minutes_ebox.signal_key_press_event().connect (bind (mem_fun(*this, &AudioClock::field_key_press_event), Timecode_Minutes));
+ seconds_ebox.signal_key_press_event().connect (bind (mem_fun(*this, &AudioClock::field_key_press_event), Timecode_Seconds));
+ frames_ebox.signal_key_press_event().connect (bind (mem_fun(*this, &AudioClock::field_key_press_event), Timecode_Frames));
audio_frames_ebox.signal_key_press_event().connect (bind (mem_fun(*this, &AudioClock::field_key_press_event), AudioFrames));
bars_ebox.signal_key_press_event().connect (bind (mem_fun(*this, &AudioClock::field_key_press_event), Bars));
beats_ebox.signal_key_press_event().connect (bind (mem_fun(*this, &AudioClock::field_key_press_event), Beats));
@@ -355,10 +355,10 @@ AudioClock::setup_events ()
ms_minutes_ebox.signal_key_press_event().connect (bind (mem_fun(*this, &AudioClock::field_key_press_event), MS_Minutes));
ms_seconds_ebox.signal_key_press_event().connect (bind (mem_fun(*this, &AudioClock::field_key_press_event), MS_Seconds));
- hours_ebox.signal_key_release_event().connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), SMPTE_Hours));
- minutes_ebox.signal_key_release_event().connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), SMPTE_Minutes));
- seconds_ebox.signal_key_release_event().connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), SMPTE_Seconds));
- frames_ebox.signal_key_release_event().connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), SMPTE_Frames));
+ hours_ebox.signal_key_release_event().connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), Timecode_Hours));
+ minutes_ebox.signal_key_release_event().connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), Timecode_Minutes));
+ seconds_ebox.signal_key_release_event().connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), Timecode_Seconds));
+ frames_ebox.signal_key_release_event().connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), Timecode_Frames));
audio_frames_ebox.signal_key_release_event().connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), AudioFrames));
bars_ebox.signal_key_release_event().connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), Bars));
beats_ebox.signal_key_release_event().connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), Beats));
@@ -367,10 +367,10 @@ AudioClock::setup_events ()
ms_minutes_ebox.signal_key_release_event().connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), MS_Minutes));
ms_seconds_ebox.signal_key_release_event().connect (bind (mem_fun(*this, &AudioClock::field_key_release_event), MS_Seconds));
- hours_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), SMPTE_Hours));
- minutes_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), SMPTE_Minutes));
- seconds_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), SMPTE_Seconds));
- frames_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), SMPTE_Frames));
+ hours_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), Timecode_Hours));
+ minutes_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), Timecode_Minutes));
+ seconds_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), Timecode_Seconds));
+ frames_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), Timecode_Frames));
audio_frames_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), AudioFrames));
bars_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), Bars));
beats_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), Beats));
@@ -379,10 +379,10 @@ AudioClock::setup_events ()
ms_minutes_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), MS_Minutes));
ms_seconds_ebox.signal_focus_in_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_in_event), MS_Seconds));
- hours_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), SMPTE_Hours));
- minutes_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), SMPTE_Minutes));
- seconds_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), SMPTE_Seconds));
- frames_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), SMPTE_Frames));
+ hours_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), Timecode_Hours));
+ minutes_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), Timecode_Minutes));
+ seconds_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), Timecode_Seconds));
+ frames_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), Timecode_Frames));
audio_frames_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), AudioFrames));
bars_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), Bars));
beats_ebox.signal_focus_out_event().connect (bind (mem_fun(*this, &AudioClock::field_focus_out_event), Beats));
@@ -447,8 +447,8 @@ AudioClock::set (nframes_t when, bool force, nframes_t offset, char which)
}
switch (_mode) {
- case SMPTE:
- set_smpte (when, force);
+ case Timecode:
+ set_timecode (when, force);
break;
case BBT:
@@ -471,12 +471,12 @@ AudioClock::set (nframes_t when, bool force, nframes_t offset, char which)
}
void
-AudioClock::smpte_offset_changed ()
+AudioClock::timecode_offset_changed ()
{
nframes_t current;
switch (_mode) {
- case SMPTE:
+ case Timecode:
if (is_duration) {
current = current_duration();
} else {
@@ -560,61 +560,61 @@ AudioClock::set_minsec (nframes_t when, bool force)
}
void
-AudioClock::set_smpte (nframes_t when, bool force)
+AudioClock::set_timecode (nframes_t when, bool force)
{
char buf[32];
- SMPTE::Time smpte;
+ Timecode::Time timecode;
if (is_duration) {
- session->smpte_duration (when, smpte);
+ session->timecode_duration (when, timecode);
} else {
- session->smpte_time (when, smpte);
+ session->timecode_time (when, timecode);
}
- if (force || smpte.hours != last_hrs || smpte.negative != last_negative) {
- if (smpte.negative) {
- sprintf (buf, "-%02" PRIu32, smpte.hours);
+ if (force || timecode.hours != last_hrs || timecode.negative != last_negative) {
+ if (timecode.negative) {
+ sprintf (buf, "-%02" PRIu32, timecode.hours);
} else {
- sprintf (buf, " %02" PRIu32, smpte.hours);
+ sprintf (buf, " %02" PRIu32, timecode.hours);
}
hours_label.set_text (buf);
- last_hrs = smpte.hours;
- last_negative = smpte.negative;
+ last_hrs = timecode.hours;
+ last_negative = timecode.negative;
}
- if (force || smpte.minutes != last_mins) {
- sprintf (buf, "%02" PRIu32, smpte.minutes);
+ if (force || timecode.minutes != last_mins) {
+ sprintf (buf, "%02" PRIu32, timecode.minutes);
minutes_label.set_text (buf);
- last_mins = smpte.minutes;
+ last_mins = timecode.minutes;
}
- if (force || smpte.seconds != last_secs) {
- sprintf (buf, "%02" PRIu32, smpte.seconds);
+ if (force || timecode.seconds != last_secs) {
+ sprintf (buf, "%02" PRIu32, timecode.seconds);
seconds_label.set_text (buf);
- last_secs = smpte.seconds;
+ last_secs = timecode.seconds;
}
- if (force || smpte.frames != last_frames) {
- sprintf (buf, "%02" PRIu32, smpte.frames);
+ if (force || timecode.frames != last_frames) {
+ sprintf (buf, "%02" PRIu32, timecode.frames);
frames_label.set_text (buf);
- last_frames = smpte.frames;
+ last_frames = timecode.frames;
}
- if (smpte_upper_info_label) {
- double smpte_frames = session->smpte_frames_per_second();
+ if (timecode_upper_info_label) {
+ double timecode_frames = session->timecode_frames_per_second();
- if ( fmod(smpte_frames, 1.0) == 0.0) {
- sprintf (buf, "%u", int (smpte_frames));
+ if ( fmod(timecode_frames, 1.0) == 0.0) {
+ sprintf (buf, "%u", int (timecode_frames));
} else {
- sprintf (buf, "%.2f", smpte_frames);
+ sprintf (buf, "%.2f", timecode_frames);
}
- if (smpte_upper_info_label->get_text() != buf) {
- smpte_upper_info_label->set_text (buf);
+ if (timecode_upper_info_label->get_text() != buf) {
+ timecode_upper_info_label->set_text (buf);
}
- if ((fabs(smpte_frames - 29.97) < 0.0001) || smpte_frames == 30) {
- if (session->smpte_drop_frames()) {
+ if ((fabs(timecode_frames - 29.97) < 0.0001) || timecode_frames == 30) {
+ if (session->timecode_drop_frames()) {
sprintf (buf, "DF");
} else {
sprintf (buf, "NDF");
@@ -624,8 +624,8 @@ AudioClock::set_smpte (nframes_t when, bool force)
buf[0] = '\0';
}
- if (smpte_lower_info_label->get_text() != buf) {
- smpte_lower_info_label->set_text (buf);
+ if (timecode_lower_info_label->get_text() != buf) {
+ timecode_lower_info_label->set_text (buf);
}
}
}
@@ -712,7 +712,7 @@ void
AudioClock::focus ()
{
switch (_mode) {
- case SMPTE:
+ case Timecode:
hours_ebox.grab_focus ();
break;
@@ -750,16 +750,16 @@ AudioClock::field_key_release_event (GdkEventKey *ev, Field field)
bool move_on = false;
switch (field) {
- case SMPTE_Hours:
+ case Timecode_Hours:
label = &hours_label;
break;
- case SMPTE_Minutes:
+ case Timecode_Minutes:
label = &minutes_label;
break;
- case SMPTE_Seconds:
+ case Timecode_Seconds:
label = &seconds_label;
break;
- case SMPTE_Frames:
+ case Timecode_Frames:
label = &frames_label;
break;
@@ -895,12 +895,12 @@ AudioClock::field_key_release_event (GdkEventKey *ev, Field field)
if (key_entry_state) {
switch (field) {
- case SMPTE_Hours:
- case SMPTE_Minutes:
- case SMPTE_Seconds:
- case SMPTE_Frames:
- // Check SMPTE fields for sanity (may also adjust fields)
- smpte_sanitize_display();
+ case Timecode_Hours:
+ case Timecode_Minutes:
+ case Timecode_Seconds:
+ case Timecode_Frames:
+ // Check Timecode fields for sanity (may also adjust fields)
+ timecode_sanitize_display();
break;
case Bars:
case Beats:
@@ -926,18 +926,18 @@ AudioClock::field_key_release_event (GdkEventKey *ev, Field field)
switch (field) {
- /* SMPTE */
+ /* Timecode */
- case SMPTE_Hours:
+ case Timecode_Hours:
minutes_ebox.grab_focus ();
break;
- case SMPTE_Minutes:
+ case Timecode_Minutes:
seconds_ebox.grab_focus ();
break;
- case SMPTE_Seconds:
+ case Timecode_Seconds:
frames_ebox.grab_focus ();
break;
- case SMPTE_Frames:
+ case Timecode_Frames:
clock_base.grab_focus ();
break;
@@ -994,19 +994,19 @@ AudioClock::field_focus_in_event (GdkEventFocus */*ev*/, Field field)
Keyboard::magic_widget_grab_focus ();
switch (field) {
- case SMPTE_Hours:
+ case Timecode_Hours:
hours_ebox.set_flags (Gtk::HAS_FOCUS);
hours_ebox.set_state (Gtk::STATE_ACTIVE);
break;
- case SMPTE_Minutes:
+ case Timecode_Minutes:
minutes_ebox.set_flags (Gtk::HAS_FOCUS);
minutes_ebox.set_state (Gtk::STATE_ACTIVE);
break;
- case SMPTE_Seconds:
+ case Timecode_Seconds:
seconds_ebox.set_flags (Gtk::HAS_FOCUS);
seconds_ebox.set_state (Gtk::STATE_ACTIVE);
break;
- case SMPTE_Frames:
+ case Timecode_Frames:
frames_ebox.set_flags (Gtk::HAS_FOCUS);
frames_ebox.set_state (Gtk::STATE_ACTIVE);
break;
@@ -1050,19 +1050,19 @@ AudioClock::field_focus_out_event (GdkEventFocus */*ev*/, Field field)
{
switch (field) {
- case SMPTE_Hours:
+ case Timecode_Hours:
hours_ebox.unset_flags (Gtk::HAS_FOCUS);
hours_ebox.set_state (Gtk::STATE_NORMAL);
break;
- case SMPTE_Minutes:
+ case Timecode_Minutes:
minutes_ebox.unset_flags (Gtk::HAS_FOCUS);
minutes_ebox.set_state (Gtk::STATE_NORMAL);
break;
- case SMPTE_Seconds:
+ case Timecode_Seconds:
seconds_ebox.unset_flags (Gtk::HAS_FOCUS);
seconds_ebox.set_state (Gtk::STATE_NORMAL);
break;
- case SMPTE_Frames:
+ case Timecode_Frames:
frames_ebox.unset_flags (Gtk::HAS_FOCUS);
frames_ebox.set_state (Gtk::STATE_NORMAL);
break;
@@ -1135,16 +1135,16 @@ AudioClock::field_button_release_event (GdkEventButton *ev, Field field)
switch (ev->button) {
case 1:
switch (field) {
- case SMPTE_Hours:
+ case Timecode_Hours:
hours_ebox.grab_focus();
break;
- case SMPTE_Minutes:
+ case Timecode_Minutes:
minutes_ebox.grab_focus();
break;
- case SMPTE_Seconds:
+ case Timecode_Seconds:
seconds_ebox.grab_focus();
break;
- case SMPTE_Frames:
+ case Timecode_Frames:
frames_ebox.grab_focus();
break;
@@ -1335,17 +1335,17 @@ AudioClock::get_frames (Field field,nframes_t pos,int dir)
nframes_t frames = 0;
BBT_Time bbt;
switch (field) {
- case SMPTE_Hours:
+ case Timecode_Hours:
frames = (nframes_t) floor (3600.0 * session->frame_rate());
break;
- case SMPTE_Minutes:
+ case Timecode_Minutes:
frames = (nframes_t) floor (60.0 * session->frame_rate());
break;
- case SMPTE_Seconds:
+ case Timecode_Seconds:
frames = session->frame_rate();
break;
- case SMPTE_Frames:
- frames = (nframes_t) floor (session->frame_rate() / session->smpte_frames_per_second());
+ case Timecode_Frames:
+ frames = (nframes_t) floor (session->frame_rate() / session->timecode_frames_per_second());
break;
case AudioFrames:
@@ -1391,8 +1391,8 @@ AudioClock::current_time (nframes_t pos) const
nframes_t ret = 0;
switch (_mode) {
- case SMPTE:
- ret = smpte_frame_from_display ();
+ case Timecode:
+ ret = timecode_frame_from_display ();
break;
case BBT:
ret = bbt_frame_from_display (pos);
@@ -1419,8 +1419,8 @@ AudioClock::current_duration (nframes_t pos) const
nframes_t ret = 0;
switch (_mode) {
- case SMPTE:
- ret = smpte_frame_from_display ();
+ case Timecode:
+ ret = timecode_frame_from_display ();
break;
case BBT:
ret = bbt_frame_duration_from_display (pos);
@@ -1442,9 +1442,9 @@ AudioClock::current_duration (nframes_t pos) const
}
void
-AudioClock::smpte_sanitize_display()
+AudioClock::timecode_sanitize_display()
{
- // Check SMPTE fields for sanity, possibly adjusting values
+ // Check Timecode fields for sanity, possibly adjusting values
if (atoi(minutes_label.get_text()) > 59) {
minutes_label.set_text("59");
}
@@ -1453,7 +1453,7 @@ AudioClock::smpte_sanitize_display()
seconds_label.set_text("59");
}
- switch ((long)rint(session->smpte_frames_per_second())) {
+ switch ((long)rint(session->timecode_frames_per_second())) {
case 24:
if (atoi(frames_label.get_text()) > 23) {
frames_label.set_text("23");
@@ -1473,7 +1473,7 @@ AudioClock::smpte_sanitize_display()
break;
}
- if (session->smpte_drop_frames()) {
+ if (session->timecode_drop_frames()) {
if ((atoi(minutes_label.get_text()) % 10) && (atoi(seconds_label.get_text()) == 0) && (atoi(frames_label.get_text()) < 2)) {
frames_label.set_text("02");
}
@@ -1481,272 +1481,272 @@ AudioClock::smpte_sanitize_display()
}
nframes_t
-AudioClock::smpte_frame_from_display () const
+AudioClock::timecode_frame_from_display () const
{
if (session == 0) {
return 0;
}
- SMPTE::Time smpte;
+ Timecode::Time timecode;
nframes_t sample;
- smpte.hours = atoi (hours_label.get_text());
- smpte.minutes = atoi (minutes_label.get_text());
- smpte.seconds = atoi (seconds_label.get_text());
- smpte.frames = atoi (frames_label.get_text());
- smpte.rate = session->smpte_frames_per_second();
- smpte.drop= session->smpte_drop_frames();
+ timecode.hours = atoi (hours_label.get_text());
+ timecode.minutes = atoi (minutes_label.get_text());
+ timecode.seconds = atoi (seconds_label.get_text());
+ timecode.frames = atoi (frames_label.get_text());
+ timecode.rate = session->timecode_frames_per_second();
+ timecode.drop= session->timecode_drop_frames();
- session->smpte_to_sample( smpte, sample, false /* use_offset */, false /* use_subframes */ );
+ session->timecode_to_sample( timecode, sample, false /* use_offset */, false /* use_subframes */ );
#if 0
-#define SMPTE_SAMPLE_TEST_1
-#define SMPTE_SAMPLE_TEST_2
-#define SMPTE_SAMPLE_TEST_3
-#define SMPTE_SAMPLE_TEST_4
-#define SMPTE_SAMPLE_TEST_5
-#define SMPTE_SAMPLE_TEST_6
-#define SMPTE_SAMPLE_TEST_7
-
- // Testcode for smpte<->sample conversions (P.S.)
- SMPTE::Time smpte1;
+#define Timecode_SAMPLE_TEST_1
+#define Timecode_SAMPLE_TEST_2
+#define Timecode_SAMPLE_TEST_3
+#define Timecode_SAMPLE_TEST_4
+#define Timecode_SAMPLE_TEST_5
+#define Timecode_SAMPLE_TEST_6
+#define Timecode_SAMPLE_TEST_7
+
+ // Testcode for timecode<->sample conversions (P.S.)
+ Timecode::Time timecode1;
nframes_t sample1;
nframes_t oldsample = 0;
- SMPTE::Time smpte2;
+ Timecode::Time timecode2;
nframes_t sample_increment;
- sample_increment = (long)rint(session->frame_rate() / session->smpte_frames_per_second);
+ sample_increment = (long)rint(session->frame_rate() / session->timecode_frames_per_second);
-#ifdef SMPTE_SAMPLE_TEST_1
+#ifdef Timecode_SAMPLE_TEST_1
// Test 1: use_offset = false, use_subframes = false
cout << "use_offset = false, use_subframes = false" << endl;
for (int i = 0; i < 108003; i++) {
- session->smpte_to_sample( smpte1, sample1, false /* use_offset */, false /* use_subframes */ );
- session->sample_to_smpte( sample1, smpte2, false /* use_offset */, false /* use_subframes */ );
+ session->timecode_to_sample( timecode1, sample1, false /* use_offset */, false /* use_subframes */ );
+ session->sample_to_timecode( sample1, timecode2, false /* use_offset */, false /* use_subframes */ );
if ((i > 0) && ( ((sample1 - oldsample) != sample_increment) && ((sample1 - oldsample) != (sample_increment + 1)) && ((sample1 - oldsample) != (sample_increment - 1)))) {
cout << "ERROR: sample increment not right: " << (sample1 - oldsample) << " != " << sample_increment << endl;
- cout << "smpte1: " << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
+ cout << "timecode1: " << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << " -> ";
cout << "sample: " << sample1 << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte2: " << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode2: " << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
break;
}
- if (smpte2.hours != smpte1.hours || smpte2.minutes != smpte1.minutes || smpte2.seconds != smpte2.seconds || smpte2.frames != smpte1.frames) {
- cout << "ERROR: smpte2 not equal smpte1" << endl;
- cout << "smpte1: " << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
+ if (timecode2.hours != timecode1.hours || timecode2.minutes != timecode1.minutes || timecode2.seconds != timecode2.seconds || timecode2.frames != timecode1.frames) {
+ cout << "ERROR: timecode2 not equal timecode1" << endl;
+ cout << "timecode1: " << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << " -> ";
cout << "sample: " << sample1 << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte2: " << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode2: " << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
break;
}
oldsample = sample1;
- session->smpte_increment( smpte1 );
+ session->timecode_increment( timecode1 );
}
cout << "sample_increment: " << sample_increment << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte: " << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode: " << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
#endif
-#ifdef SMPTE_SAMPLE_TEST_2
+#ifdef Timecode_SAMPLE_TEST_2
// Test 2: use_offset = true, use_subframes = false
cout << "use_offset = true, use_subframes = false" << endl;
- smpte1.hours = 0;
- smpte1.minutes = 0;
- smpte1.seconds = 0;
- smpte1.frames = 0;
- smpte1.subframes = 0;
+ timecode1.hours = 0;
+ timecode1.minutes = 0;
+ timecode1.seconds = 0;
+ timecode1.frames = 0;
+ timecode1.subframes = 0;
sample1 = oldsample = 0;
- session->sample_to_smpte( sample1, smpte1, true /* use_offset */, false /* use_subframes */ );
+ session->sample_to_timecode( sample1, timecode1, true /* use_offset */, false /* use_subframes */ );
cout << "Starting at sample: " << sample1 << " -> ";
- cout << "smpte: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << endl;
+ cout << "timecode: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << endl;
for (int i = 0; i < 108003; i++) {
- session->smpte_to_sample( smpte1, sample1, true /* use_offset */, false /* use_subframes */ );
- session->sample_to_smpte( sample1, smpte2, true /* use_offset */, false /* use_subframes */ );
+ session->timecode_to_sample( timecode1, sample1, true /* use_offset */, false /* use_subframes */ );
+ session->sample_to_timecode( sample1, timecode2, true /* use_offset */, false /* use_subframes */ );
-// cout << "smpte: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
+// cout << "timecode: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << " -> ";
// cout << "sample: " << sample1 << endl;
// cout << "sample: " << sample1 << " -> ";
-// cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+// cout << "timecode: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
if ((i > 0) && ( ((sample1 - oldsample) != sample_increment) && ((sample1 - oldsample) != (sample_increment + 1)) && ((sample1 - oldsample) != (sample_increment - 1)))) {
cout << "ERROR: sample increment not right: " << (sample1 - oldsample) << " != " << sample_increment << endl;
- cout << "smpte1: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
+ cout << "timecode1: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << " -> ";
cout << "sample: " << sample1 << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte2: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode2: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
break;
}
- if (smpte2.hours != smpte1.hours || smpte2.minutes != smpte1.minutes || smpte2.seconds != smpte2.seconds || smpte2.frames != smpte1.frames) {
- cout << "ERROR: smpte2 not equal smpte1" << endl;
- cout << "smpte1: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
+ if (timecode2.hours != timecode1.hours || timecode2.minutes != timecode1.minutes || timecode2.seconds != timecode2.seconds || timecode2.frames != timecode1.frames) {
+ cout << "ERROR: timecode2 not equal timecode1" << endl;
+ cout << "timecode1: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << " -> ";
cout << "sample: " << sample1 << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte2: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode2: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
break;
}
oldsample = sample1;
- session->smpte_increment( smpte1 );
+ session->timecode_increment( timecode1 );
}
cout << "sample_increment: " << sample_increment << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
#endif
-#ifdef SMPTE_SAMPLE_TEST_3
+#ifdef Timecode_SAMPLE_TEST_3
// Test 3: use_offset = true, use_subframes = false, decrement
cout << "use_offset = true, use_subframes = false, decrement" << endl;
- session->sample_to_smpte( sample1, smpte1, true /* use_offset */, false /* use_subframes */ );
+ session->sample_to_timecode( sample1, timecode1, true /* use_offset */, false /* use_subframes */ );
cout << "Starting at sample: " << sample1 << " -> ";
- cout << "smpte: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << endl;
+ cout << "timecode: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << endl;
for (int i = 0; i < 108003; i++) {
- session->smpte_to_sample( smpte1, sample1, true /* use_offset */, false /* use_subframes */ );
- session->sample_to_smpte( sample1, smpte2, true /* use_offset */, false /* use_subframes */ );
+ session->timecode_to_sample( timecode1, sample1, true /* use_offset */, false /* use_subframes */ );
+ session->sample_to_timecode( sample1, timecode2, true /* use_offset */, false /* use_subframes */ );
-// cout << "smpte: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
+// cout << "timecode: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << " -> ";
// cout << "sample: " << sample1 << endl;
// cout << "sample: " << sample1 << " -> ";
-// cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+// cout << "timecode: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
if ((i > 0) && ( ((oldsample - sample1) != sample_increment) && ((oldsample - sample1) != (sample_increment + 1)) && ((oldsample - sample1) != (sample_increment - 1)))) {
cout << "ERROR: sample increment not right: " << (oldsample - sample1) << " != " << sample_increment << endl;
- cout << "smpte1: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
+ cout << "timecode1: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << " -> ";
cout << "sample: " << sample1 << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte2: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode2: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
break;
}
- if (smpte2.hours != smpte1.hours || smpte2.minutes != smpte1.minutes || smpte2.seconds != smpte2.seconds || smpte2.frames != smpte1.frames) {
- cout << "ERROR: smpte2 not equal smpte1" << endl;
- cout << "smpte1: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
+ if (timecode2.hours != timecode1.hours || timecode2.minutes != timecode1.minutes || timecode2.seconds != timecode2.seconds || timecode2.frames != timecode1.frames) {
+ cout << "ERROR: timecode2 not equal timecode1" << endl;
+ cout << "timecode1: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << " -> ";
cout << "sample: " << sample1 << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte2: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode2: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
break;
}
oldsample = sample1;
- session->smpte_decrement( smpte1 );
+ session->timecode_decrement( timecode1 );
}
cout << "sample_decrement: " << sample_increment << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
#endif
-#ifdef SMPTE_SAMPLE_TEST_4
+#ifdef Timecode_SAMPLE_TEST_4
// Test 4: use_offset = true, use_subframes = true
cout << "use_offset = true, use_subframes = true" << endl;
for (long sub = 5; sub < 80; sub += 5) {
- smpte1.hours = 0;
- smpte1.minutes = 0;
- smpte1.seconds = 0;
- smpte1.frames = 0;
- smpte1.subframes = 0;
+ timecode1.hours = 0;
+ timecode1.minutes = 0;
+ timecode1.seconds = 0;
+ timecode1.frames = 0;
+ timecode1.subframes = 0;
sample1 = oldsample = (sample_increment * sub) / 80;
- session->sample_to_smpte( sample1, smpte1, true /* use_offset */, true /* use_subframes */ );
+ session->sample_to_timecode( sample1, timecode1, true /* use_offset */, true /* use_subframes */ );
cout << "starting at sample: " << sample1 << " -> ";
- cout << "smpte: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << endl;
+ cout << "timecode: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << endl;
for (int i = 0; i < 108003; i++) {
- session->smpte_to_sample( smpte1, sample1, true /* use_offset */, true /* use_subframes */ );
- session->sample_to_smpte( sample1, smpte2, true /* use_offset */, true /* use_subframes */ );
+ session->timecode_to_sample( timecode1, sample1, true /* use_offset */, true /* use_subframes */ );
+ session->sample_to_timecode( sample1, timecode2, true /* use_offset */, true /* use_subframes */ );
if ((i > 0) && ( ((sample1 - oldsample) != sample_increment) && ((sample1 - oldsample) != (sample_increment + 1)) && ((sample1 - oldsample) != (sample_increment - 1)))) {
cout << "ERROR: sample increment not right: " << (sample1 - oldsample) << " != " << sample_increment << endl;
- cout << "smpte1: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
+ cout << "timecode1: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << " -> ";
cout << "sample: " << sample1 << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte2: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode2: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
//break;
}
- if (smpte2.hours != smpte1.hours || smpte2.minutes != smpte1.minutes || smpte2.seconds != smpte2.seconds || smpte2.frames != smpte1.frames || smpte2.subframes != smpte1.subframes) {
- cout << "ERROR: smpte2 not equal smpte1" << endl;
- cout << "smpte1: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
+ if (timecode2.hours != timecode1.hours || timecode2.minutes != timecode1.minutes || timecode2.seconds != timecode2.seconds || timecode2.frames != timecode1.frames || timecode2.subframes != timecode1.subframes) {
+ cout << "ERROR: timecode2 not equal timecode1" << endl;
+ cout << "timecode1: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << " -> ";
cout << "sample: " << sample1 << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte2: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode2: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
break;
}
oldsample = sample1;
- session->smpte_increment( smpte1 );
+ session->timecode_increment( timecode1 );
}
cout << "sample_increment: " << sample_increment << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
for (int i = 0; i < 108003; i++) {
- session->smpte_to_sample( smpte1, sample1, true /* use_offset */, true /* use_subframes */ );
- session->sample_to_smpte( sample1, smpte2, true /* use_offset */, true /* use_subframes */ );
+ session->timecode_to_sample( timecode1, sample1, true /* use_offset */, true /* use_subframes */ );
+ session->sample_to_timecode( sample1, timecode2, true /* use_offset */, true /* use_subframes */ );
if ((i > 0) && ( ((oldsample - sample1) != sample_increment) && ((oldsample - sample1) != (sample_increment + 1)) && ((oldsample - sample1) != (sample_increment - 1)))) {
cout << "ERROR: sample increment not right: " << (oldsample - sample1) << " != " << sample_increment << endl;
- cout << "smpte1: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
+ cout << "timecode1: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << " -> ";
cout << "sample: " << sample1 << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte2: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode2: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
//break;
}
- if (smpte2.hours != smpte1.hours || smpte2.minutes != smpte1.minutes || smpte2.seconds != smpte2.seconds || smpte2.frames != smpte1.frames || smpte2.subframes != smpte1.subframes) {
- cout << "ERROR: smpte2 not equal smpte1" << endl;
- cout << "smpte1: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
+ if (timecode2.hours != timecode1.hours || timecode2.minutes != timecode1.minutes || timecode2.seconds != timecode2.seconds || timecode2.frames != timecode1.frames || timecode2.subframes != timecode1.subframes) {
+ cout << "ERROR: timecode2 not equal timecode1" << endl;
+ cout << "timecode1: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << " -> ";
cout << "sample: " << sample1 << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte2: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode2: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
break;
}
oldsample = sample1;
- session->smpte_decrement( smpte1 );
+ session->timecode_decrement( timecode1 );
}
cout << "sample_decrement: " << sample_increment << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
}
#endif
-#ifdef SMPTE_SAMPLE_TEST_5
+#ifdef Timecode_SAMPLE_TEST_5
// Test 5: use_offset = true, use_subframes = false, increment seconds
cout << "use_offset = true, use_subframes = false, increment seconds" << endl;
- smpte1.hours = 0;
- smpte1.minutes = 0;
- smpte1.seconds = 0;
- smpte1.frames = 0;
- smpte1.subframes = 0;
+ timecode1.hours = 0;
+ timecode1.minutes = 0;
+ timecode1.seconds = 0;
+ timecode1.frames = 0;
+ timecode1.subframes = 0;
sample1 = oldsample = 0;
sample_increment = session->frame_rate();
- session->sample_to_smpte( sample1, smpte1, true /* use_offset */, false /* use_subframes */ );
+ session->sample_to_timecode( sample1, timecode1, true /* use_offset */, false /* use_subframes */ );
cout << "Starting at sample: " << sample1 << " -> ";
- cout << "smpte: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << endl;
+ cout << "timecode: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << endl;
for (int i = 0; i < 3600; i++) {
- session->smpte_to_sample( smpte1, sample1, true /* use_offset */, false /* use_subframes */ );
- session->sample_to_smpte( sample1, smpte2, true /* use_offset */, false /* use_subframes */ );
+ session->timecode_to_sample( timecode1, sample1, true /* use_offset */, false /* use_subframes */ );
+ session->sample_to_timecode( sample1, timecode2, true /* use_offset */, false /* use_subframes */ );
-// cout << "smpte: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
+// cout << "timecode: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << " -> ";
// cout << "sample: " << sample1 << endl;
// cout << "sample: " << sample1 << " -> ";
-// cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+// cout << "timecode: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
// if ((i > 0) && ( ((sample1 - oldsample) != sample_increment) && ((sample1 - oldsample) != (sample_increment + 1)) && ((sample1 - oldsample) != (sample_increment - 1))))
// {
@@ -1754,48 +1754,48 @@ AudioClock::smpte_frame_from_display () const
// break;
// }
- if (smpte2.hours != smpte1.hours || smpte2.minutes != smpte1.minutes || smpte2.seconds != smpte2.seconds || smpte2.frames != smpte1.frames) {
- cout << "ERROR: smpte2 not equal smpte1" << endl;
- cout << "smpte: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
+ if (timecode2.hours != timecode1.hours || timecode2.minutes != timecode1.minutes || timecode2.seconds != timecode2.seconds || timecode2.frames != timecode1.frames) {
+ cout << "ERROR: timecode2 not equal timecode1" << endl;
+ cout << "timecode: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << " -> ";
cout << "sample: " << sample1 << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
break;
}
oldsample = sample1;
- session->smpte_increment_seconds( smpte1 );
+ session->timecode_increment_seconds( timecode1 );
}
cout << "sample_increment: " << sample_increment << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
#endif
-#ifdef SMPTE_SAMPLE_TEST_6
+#ifdef Timecode_SAMPLE_TEST_6
// Test 6: use_offset = true, use_subframes = false, increment minutes
cout << "use_offset = true, use_subframes = false, increment minutes" << endl;
- smpte1.hours = 0;
- smpte1.minutes = 0;
- smpte1.seconds = 0;
- smpte1.frames = 0;
- smpte1.subframes = 0;
+ timecode1.hours = 0;
+ timecode1.minutes = 0;
+ timecode1.seconds = 0;
+ timecode1.frames = 0;
+ timecode1.subframes = 0;
sample1 = oldsample = 0;
sample_increment = session->frame_rate() * 60;
- session->sample_to_smpte( sample1, smpte1, true /* use_offset */, false /* use_subframes */ );
+ session->sample_to_timecode( sample1, timecode1, true /* use_offset */, false /* use_subframes */ );
cout << "Starting at sample: " << sample1 << " -> ";
- cout << "smpte: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << endl;
+ cout << "timecode: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << endl;
for (int i = 0; i < 60; i++) {
- session->smpte_to_sample( smpte1, sample1, true /* use_offset */, false /* use_subframes */ );
- session->sample_to_smpte( sample1, smpte2, true /* use_offset */, false /* use_subframes */ );
+ session->timecode_to_sample( timecode1, sample1, true /* use_offset */, false /* use_subframes */ );
+ session->sample_to_timecode( sample1, timecode2, true /* use_offset */, false /* use_subframes */ );
-// cout << "smpte: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
+// cout << "timecode: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << " -> ";
// cout << "sample: " << sample1 << endl;
// cout << "sample: " << sample1 << " -> ";
-// cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+// cout << "timecode: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
// if ((i > 0) && ( ((sample1 - oldsample) != sample_increment) && ((sample1 - oldsample) != (sample_increment + 1)) && ((sample1 - oldsample) != (sample_increment - 1))))
// {
@@ -1803,47 +1803,47 @@ AudioClock::smpte_frame_from_display () const
// break;
// }
- if (smpte2.hours != smpte1.hours || smpte2.minutes != smpte1.minutes || smpte2.seconds != smpte2.seconds || smpte2.frames != smpte1.frames) {
- cout << "ERROR: smpte2 not equal smpte1" << endl;
- cout << "smpte: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
+ if (timecode2.hours != timecode1.hours || timecode2.minutes != timecode1.minutes || timecode2.seconds != timecode2.seconds || timecode2.frames != timecode1.frames) {
+ cout << "ERROR: timecode2 not equal timecode1" << endl;
+ cout << "timecode: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << " -> ";
cout << "sample: " << sample1 << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
break;
}
oldsample = sample1;
- session->smpte_increment_minutes( smpte1 );
+ session->timecode_increment_minutes( timecode1 );
}
cout << "sample_increment: " << sample_increment << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
#endif
-#ifdef SMPTE_SAMPLE_TEST_7
+#ifdef Timecode_SAMPLE_TEST_7
// Test 7: use_offset = true, use_subframes = false, increment hours
cout << "use_offset = true, use_subframes = false, increment hours" << endl;
- smpte1.hours = 0;
- smpte1.minutes = 0;
- smpte1.seconds = 0;
- smpte1.frames = 0;
- smpte1.subframes = 0;
+ timecode1.hours = 0;
+ timecode1.minutes = 0;
+ timecode1.seconds = 0;
+ timecode1.frames = 0;
+ timecode1.subframes = 0;
sample1 = oldsample = 0;
sample_increment = session->frame_rate() * 60 * 60;
- session->sample_to_smpte( sample1, smpte1, true /* use_offset */, false /* use_subframes */ );
+ session->sample_to_timecode( sample1, timecode1, true /* use_offset */, false /* use_subframes */ );
cout << "Starting at sample: " << sample1 << " -> ";
- cout << "smpte: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << endl;
+ cout << "timecode: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << endl;
for (int i = 0; i < 10; i++) {
- session->smpte_to_sample( smpte1, sample1, true /* use_offset */, false /* use_subframes */ );
- session->sample_to_smpte( sample1, smpte2, true /* use_offset */, false /* use_subframes */ );
+ session->timecode_to_sample( timecode1, sample1, true /* use_offset */, false /* use_subframes */ );
+ session->sample_to_timecode( sample1, timecode2, true /* use_offset */, false /* use_subframes */ );
-// cout << "smpte: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
+// cout << "timecode: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << " -> ";
// cout << "sample: " << sample1 << endl;
// cout << "sample: " << sample1 << " -> ";
-// cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+// cout << "timecode: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
// if ((i > 0) && ( ((sample1 - oldsample) != sample_increment) && ((sample1 - oldsample) != (sample_increment + 1)) && ((sample1 - oldsample) != (sample_increment - 1))))
// {
@@ -1851,21 +1851,21 @@ AudioClock::smpte_frame_from_display () const
// break;
// }
- if (smpte2.hours != smpte1.hours || smpte2.minutes != smpte1.minutes || smpte2.seconds != smpte2.seconds || smpte2.frames != smpte1.frames) {
- cout << "ERROR: smpte2 not equal smpte1" << endl;
- cout << "smpte: " << (smpte1.negative ? "-" : "") << smpte1.hours << ":" << smpte1.minutes << ":" << smpte1.seconds << ":" << smpte1.frames << "::" << smpte1.subframes << " -> ";
+ if (timecode2.hours != timecode1.hours || timecode2.minutes != timecode1.minutes || timecode2.seconds != timecode2.seconds || timecode2.frames != timecode1.frames) {
+ cout << "ERROR: timecode2 not equal timecode1" << endl;
+ cout << "timecode: " << (timecode1.negative ? "-" : "") << timecode1.hours << ":" << timecode1.minutes << ":" << timecode1.seconds << ":" << timecode1.frames << "::" << timecode1.subframes << " -> ";
cout << "sample: " << sample1 << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
break;
}
oldsample = sample1;
- session->smpte_increment_hours( smpte1 );
+ session->timecode_increment_hours( timecode1 );
}
cout << "sample_increment: " << sample_increment << endl;
cout << "sample: " << sample1 << " -> ";
- cout << "smpte: " << (smpte2.negative ? "-" : "") << smpte2.hours << ":" << smpte2.minutes << ":" << smpte2.seconds << ":" << smpte2.frames << "::" << smpte2.subframes << endl;
+ cout << "timecode: " << (timecode2.negative ? "-" : "") << timecode2.hours << ":" << timecode2.minutes << ":" << timecode2.seconds << ":" << timecode2.frames << "::" << timecode2.subframes << endl;
#endif
#endif
@@ -1948,7 +1948,7 @@ AudioClock::build_ops_menu ()
ops_menu->set_name ("ArdourContextMenu");
if (!Profile->get_sae()) {
- ops_items.push_back (MenuElem (_("Timecode"), bind (mem_fun(*this, &AudioClock::set_mode), SMPTE)));
+ ops_items.push_back (MenuElem (_("Timecode"), bind (mem_fun(*this, &AudioClock::set_mode), Timecode)));
}
ops_items.push_back (MenuElem (_("Bars:Beats"), bind (mem_fun(*this, &AudioClock::set_mode), BBT)));
ops_items.push_back (MenuElem (_("Minutes:Seconds"), bind (mem_fun(*this, &AudioClock::set_mode), MinSec)));
@@ -1977,8 +1977,8 @@ AudioClock::set_mode (Mode m)
_mode = m;
switch (_mode) {
- case SMPTE:
- clock_base.add (smpte_packer_hbox);
+ case Timecode:
+ clock_base.add (timecode_packer_hbox);
break;
case BBT:
@@ -2016,7 +2016,7 @@ AudioClock::set_size_requests ()
/* note that in some fonts, "88" is narrower than "00", hence the 2 pixel padding */
switch (_mode) {
- case SMPTE:
+ case Timecode:
Gtkmm2ext::set_size_request_to_display_given_text (hours_label, "-00", 5, 5);
Gtkmm2ext::set_size_request_to_display_given_text (minutes_label, "00", 5, 5);
Gtkmm2ext::set_size_request_to_display_given_text (seconds_label, "00", 5, 5);
diff --git a/gtk2_ardour/audio_clock.h b/gtk2_ardour/audio_clock.h
index 2de4cee3eb..d8083e1c73 100644
--- a/gtk2_ardour/audio_clock.h
+++ b/gtk2_ardour/audio_clock.h
@@ -35,7 +35,7 @@ class AudioClock : public Gtk::HBox
{
public:
enum Mode {
- SMPTE,
+ Timecode,
BBT,
MinSec,
Frames,
@@ -80,8 +80,8 @@ class AudioClock : public Gtk::HBox
Gtk::Menu *ops_menu;
- Gtk::HBox smpte_packer_hbox;
- Gtk::HBox smpte_packer;
+ Gtk::HBox timecode_packer_hbox;
+ Gtk::HBox timecode_packer;
Gtk::HBox minsec_packer_hbox;
Gtk::HBox minsec_packer;
@@ -93,10 +93,10 @@ class AudioClock : public Gtk::HBox
Gtk::HBox frames_packer;
enum Field {
- SMPTE_Hours,
- SMPTE_Minutes,
- SMPTE_Seconds,
- SMPTE_Frames,
+ Timecode_Hours,
+ Timecode_Minutes,
+ Timecode_Seconds,
+ Timecode_Frames,
MS_Hours,
MS_Minutes,
MS_Seconds,
@@ -144,14 +144,14 @@ class AudioClock : public Gtk::HBox
Gtk::Label* frames_upper_info_label;
Gtk::Label* frames_lower_info_label;
- Gtk::Label* smpte_upper_info_label;
- Gtk::Label* smpte_lower_info_label;
+ Gtk::Label* timecode_upper_info_label;
+ Gtk::Label* timecode_lower_info_label;
Gtk::Label* bbt_upper_info_label;
Gtk::Label* bbt_lower_info_label;
Gtk::VBox frames_info_box;
- Gtk::VBox smpte_info_box;
+ Gtk::VBox timecode_info_box;
Gtk::VBox bbt_info_box;
Gtk::EventBox clock_base;
@@ -189,15 +189,15 @@ class AudioClock : public Gtk::HBox
bool field_focus_out_event (GdkEventFocus *, Field);
bool drop_focus_handler (GdkEventFocus*);
- void set_smpte (nframes_t, bool);
+ void set_timecode (nframes_t, bool);
void set_bbt (nframes_t, bool);
void set_minsec (nframes_t, bool);
void set_frames (nframes_t, bool);
nframes_t get_frames (Field,nframes_t pos = 0,int dir=1);
- void smpte_sanitize_display();
- nframes_t smpte_frame_from_display () const;
+ void timecode_sanitize_display();
+ nframes_t timecode_frame_from_display () const;
nframes_t bbt_frame_from_display (nframes_t) const;
nframes_t bbt_frame_duration_from_display (nframes_t) const;
nframes_t minsec_frame_from_display () const;
@@ -206,7 +206,7 @@ class AudioClock : public Gtk::HBox
void build_ops_menu ();
void setup_events ();
- void smpte_offset_changed ();
+ void timecode_offset_changed ();
void set_size_requests ();
static const uint32_t field_length[(int)AudioFrames+1];
diff --git a/gtk2_ardour/editing_syms.h b/gtk2_ardour/editing_syms.h
index 56cd91f691..7cabe999e1 100644
--- a/gtk2_ardour/editing_syms.h
+++ b/gtk2_ardour/editing_syms.h
@@ -19,9 +19,9 @@
/* Changing this order will break the menu */
SNAPTYPE(SnapToCDFrame)
-SNAPTYPE(SnapToSMPTEFrame)
-SNAPTYPE(SnapToSMPTESeconds)
-SNAPTYPE(SnapToSMPTEMinutes)
+SNAPTYPE(SnapToTimecodeFrame)
+SNAPTYPE(SnapToTimecodeSeconds)
+SNAPTYPE(SnapToTimecodeMinutes)
SNAPTYPE(SnapToSeconds)
SNAPTYPE(SnapToMinutes)
SNAPTYPE(SnapToAThirtysecondBeat)
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 72997a9ad0..07ccff2ae1 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -129,9 +129,9 @@ const double Editor::timebar_height = 15.0;
static const gchar *_snap_type_strings[] = {
N_("CD Frames"),
- N_("SMPTE Frames"),
- N_("SMPTE Seconds"),
- N_("SMPTE Minutes"),
+ N_("Timecode Frames"),
+ N_("Timecode Seconds"),
+ N_("Timecode Minutes"),
N_("Seconds"),
N_("Minutes"),
N_("Beats/32"),
@@ -214,7 +214,7 @@ Editor::Editor ()
/* time display buttons */
: minsec_label (_("Mins:Secs"))
, bbt_label (_("Bars:Beats"))
- , smpte_label (_("Timecode"))
+ , timecode_label (_("Timecode"))
, frame_label (_("Samples"))
, tempo_label (_("Tempo"))
, meter_label (_("Meter"))
@@ -380,12 +380,12 @@ Editor::Editor ()
minsec_label.set_padding (5,0);
minsec_label.hide ();
minsec_label.set_no_show_all();
- smpte_label.set_name ("EditorTimeButton");
- smpte_label.set_size_request (-1, (int)timebar_height);
- smpte_label.set_alignment (1.0, 0.5);
- smpte_label.set_padding (5,0);
- smpte_label.hide ();
- smpte_label.set_no_show_all();
+ timecode_label.set_name ("EditorTimeButton");
+ timecode_label.set_size_request (-1, (int)timebar_height);
+ timecode_label.set_alignment (1.0, 0.5);
+ timecode_label.set_padding (5,0);
+ timecode_label.hide ();
+ timecode_label.set_no_show_all();
frame_label.set_name ("EditorTimeButton");
frame_label.set_size_request (-1, (int)timebar_height);
frame_label.set_alignment (1.0, 0.5);
@@ -1086,7 +1086,7 @@ Editor::connect_to_session (Session *t)
session_connections.push_back (session->StateSaved.connect (mem_fun(*this, &Editor::update_title_s)));
session_connections.push_back (session->AskAboutPlaylistDeletion.connect (mem_fun(*this, &Editor::playlist_deletion_dialog)));
- session_connections.push_back (session->SMPTEOffsetChanged.connect (mem_fun(*this, &Editor::update_just_smpte)));
+ session_connections.push_back (session->TimecodeOffsetChanged.connect (mem_fun(*this, &Editor::update_just_timecode)));
session_connections.push_back (session->tempo_map().StateChanged.connect (mem_fun(*this, &Editor::tempo_map_changed)));
@@ -1108,7 +1108,7 @@ Editor::connect_to_session (Session *t)
nudge_clock.set (pos, true, 0, AudioClock::BBT);
} else {
- nudge_clock.set (session->frame_rate() * 5, true, 0, AudioClock::SMPTE); // default of 5 seconds
+ nudge_clock.set (session->frame_rate() * 5, true, 0, AudioClock::Timecode); // default of 5 seconds
}
playhead_cursor->canvas_item.show ();
@@ -2564,72 +2564,86 @@ Editor::snap_to (nframes64_t& start, int32_t direction, bool for_mark)
}
void
-Editor::snap_to_internal (nframes64_t& start, int32_t direction, bool for_mark)
+Editor::timecode_snap_to_internal (nframes64_t& start, int32_t direction, bool for_mark)
{
- nframes64_t before;
- nframes64_t after;
-
- const nframes64_t one_second = session->frame_rate();
- const nframes64_t one_minute = session->frame_rate() * 60;
- const nframes64_t one_smpte_second = (nframes64_t)(rint(session->smpte_frames_per_second()) * session->frames_per_smpte_frame());
- nframes64_t one_smpte_minute = (nframes64_t)(rint(session->smpte_frames_per_second()) * session->frames_per_smpte_frame() * 60);
- nframes64_t presnap = start;
+ const nframes64_t one_timecode_second = (nframes64_t)(rint(session->timecode_frames_per_second()) * session->frames_per_timecode_frame());
+ nframes64_t one_timecode_minute = (nframes64_t)(rint(session->timecode_frames_per_second()) * session->frames_per_timecode_frame() * 60);
switch (snap_type) {
- case SnapToCDFrame:
- if (((direction == 0) && (start % (one_second/75) > (one_second/75) / 2)) || (direction > 0)) {
- start = (nframes64_t) ceil ((double) start / (one_second / 75)) * (one_second / 75);
+ case SnapToTimecodeFrame:
+ if (((direction == 0) && (fmod((double)start, (double)session->frames_per_timecode_frame()) > (session->frames_per_timecode_frame() / 2))) || (direction > 0)) {
+ start = (nframes64_t) (ceil ((double) start / session->frames_per_timecode_frame()) * session->frames_per_timecode_frame());
} else {
- start = (nframes64_t) floor ((double) start / (one_second / 75)) * (one_second / 75);
- }
- break;
-
- case SnapToSMPTEFrame:
- if (((direction == 0) && (fmod((double)start, (double)session->frames_per_smpte_frame()) > (session->frames_per_smpte_frame() / 2))) || (direction > 0)) {
- start = (nframes64_t) (ceil ((double) start / session->frames_per_smpte_frame()) * session->frames_per_smpte_frame());
- } else {
- start = (nframes64_t) (floor ((double) start / session->frames_per_smpte_frame()) * session->frames_per_smpte_frame());
+ start = (nframes64_t) (floor ((double) start / session->frames_per_timecode_frame()) * session->frames_per_timecode_frame());
}
break;
- case SnapToSMPTESeconds:
- if (session->smpte_offset_negative())
+ case SnapToTimecodeSeconds:
+ if (session->timecode_offset_negative())
{
- start += session->smpte_offset ();
+ start += session->timecode_offset ();
} else {
- start -= session->smpte_offset ();
+ start -= session->timecode_offset ();
}
- if (((direction == 0) && (start % one_smpte_second > one_smpte_second / 2)) || direction > 0) {
- start = (nframes64_t) ceil ((double) start / one_smpte_second) * one_smpte_second;
+ if (((direction == 0) && (start % one_timecode_second > one_timecode_second / 2)) || direction > 0) {
+ start = (nframes64_t) ceil ((double) start / one_timecode_second) * one_timecode_second;
} else {
- start = (nframes64_t) floor ((double) start / one_smpte_second) * one_smpte_second;
+ start = (nframes64_t) floor ((double) start / one_timecode_second) * one_timecode_second;
}
- if (session->smpte_offset_negative())
+ if (session->timecode_offset_negative())
{
- start -= session->smpte_offset ();
+ start -= session->timecode_offset ();
} else {
- start += session->smpte_offset ();
+ start += session->timecode_offset ();
}
break;
- case SnapToSMPTEMinutes:
- if (session->smpte_offset_negative())
+ case SnapToTimecodeMinutes:
+ if (session->timecode_offset_negative())
{
- start += session->smpte_offset ();
+ start += session->timecode_offset ();
} else {
- start -= session->smpte_offset ();
+ start -= session->timecode_offset ();
}
- if (((direction == 0) && (start % one_smpte_minute > one_smpte_minute / 2)) || direction > 0) {
- start = (nframes64_t) ceil ((double) start / one_smpte_minute) * one_smpte_minute;
+ if (((direction == 0) && (start % one_timecode_minute > one_timecode_minute / 2)) || direction > 0) {
+ start = (nframes64_t) ceil ((double) start / one_timecode_minute) * one_timecode_minute;
} else {
- start = (nframes64_t) floor ((double) start / one_smpte_minute) * one_smpte_minute;
+ start = (nframes64_t) floor ((double) start / one_timecode_minute) * one_timecode_minute;
}
- if (session->smpte_offset_negative())
+ if (session->timecode_offset_negative())
{
- start -= session->smpte_offset ();
+ start -= session->timecode_offset ();
+ } else {
+ start += session->timecode_offset ();
+ }
+ break;
+ default:
+ fatal << "Editor::smpte_snap_to_internal() called with non-timecode snap type!" << endmsg;
+ /*NOTREACHED*/
+ }
+}
+
+void
+Editor::snap_to_internal (nframes64_t& start, int32_t direction, bool for_mark)
+{
+ const nframes64_t one_second = session->frame_rate();
+ const nframes64_t one_minute = session->frame_rate() * 60;
+ nframes64_t presnap = start;
+ nframes64_t before;
+ nframes64_t after;
+
+ switch (snap_type) {
+ case SnapToTimecodeFrame:
+ case SnapToTimecodeSeconds:
+ case SnapToTimecodeMinutes:
+ return timecode_snap_to_internal (start, direction, for_mark);
+
+ case SnapToCDFrame:
+ if (((direction == 0) && (start % (one_second/75) > (one_second/75) / 2)) || (direction > 0)) {
+ start = (nframes64_t) ceil ((double) start / (one_second / 75)) * (one_second / 75);
} else {
- start += session->smpte_offset ();
+ start = (nframes64_t) floor ((double) start / (one_second / 75)) * (one_second / 75);
}
break;
@@ -3463,12 +3477,12 @@ Editor::snap_type_selection_done ()
snaptype = SnapToRegionSync;
} else if (choice == _("CD Frames")) {
snaptype = SnapToCDFrame;
- } else if (choice == _("SMPTE Frames")) {
- snaptype = SnapToSMPTEFrame;
- } else if (choice == _("SMPTE Seconds")) {
- snaptype = SnapToSMPTESeconds;
- } else if (choice == _("SMPTE Minutes")) {
- snaptype = SnapToSMPTEMinutes;
+ } else if (choice == _("Timecode Frames")) {
+ snaptype = SnapToTimecodeFrame;
+ } else if (choice == _("Timecode Seconds")) {
+ snaptype = SnapToTimecodeSeconds;
+ } else if (choice == _("Timecode Minutes")) {
+ snaptype = SnapToTimecodeMinutes;
} else if (choice == _("Seconds")) {
snaptype = SnapToSeconds;
} else if (choice == _("Minutes")) {
@@ -3853,9 +3867,9 @@ Editor::get_grid_type_as_beats (bool& success, nframes64_t position)
break;
case SnapToCDFrame:
- case SnapToSMPTEFrame:
- case SnapToSMPTESeconds:
- case SnapToSMPTEMinutes:
+ case SnapToTimecodeFrame:
+ case SnapToTimecodeSeconds:
+ case SnapToTimecodeMinutes:
case SnapToSeconds:
case SnapToMinutes:
case SnapToRegionStart:
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index c4f2d9f887..e4cb5ec57d 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -642,7 +642,7 @@ class Editor : public PublicEditor
ArdourCanvas::Group *minsec_group;
ArdourCanvas::Pixbuf *logo_item;
ArdourCanvas::Group *bbt_group;
- ArdourCanvas::Group *smpte_group;
+ ArdourCanvas::Group *timecode_group;
ArdourCanvas::Group *frame_group;
ArdourCanvas::Group *tempo_group;
ArdourCanvas::Group *meter_group;
@@ -678,7 +678,7 @@ class Editor : public PublicEditor
ArdourCanvas::Group* _region_motion_group;
enum RulerType {
- ruler_metric_smpte = 0,
+ ruler_metric_timecode = 0,
ruler_metric_bbt = 1,
ruler_metric_frames = 2,
ruler_metric_minsec = 3,
@@ -712,7 +712,7 @@ class Editor : public PublicEditor
Gtk::Widget * ruler_grabbed_widget;
void initialize_rulers ();
- void update_just_smpte ();
+ void update_just_timecode ();
void compute_fixed_ruler_scale (); //calculates the RulerScale of the fixed rulers
void update_fixed_rulers ();
void update_tempo_based_rulers ();
@@ -725,7 +725,7 @@ class Editor : public PublicEditor
void store_ruler_visibility ();
void restore_ruler_visibility ();
- static gint _metric_get_smpte (GtkCustomRulerMark **, gdouble, gdouble, gint);
+ static gint _metric_get_timecode (GtkCustomRulerMark **, gdouble, gdouble, gint);
static gint _metric_get_bbt (GtkCustomRulerMark **, gdouble, gdouble, gint);
static gint _metric_get_frames (GtkCustomRulerMark **, gdouble, gdouble, gint);
static gint _metric_get_minsec (GtkCustomRulerMark **, gdouble, gdouble, gint);
@@ -744,20 +744,20 @@ class Editor : public PublicEditor
gint minsec_nmarks;
void set_minsec_ruler_scale (gdouble lower, gdouble upper);
- enum SMPTERulerScale {
- smpte_show_bits,
- smpte_show_frames,
- smpte_show_seconds,
- smpte_show_minutes,
- smpte_show_hours
+ enum TimecodeRulerScale {
+ timecode_show_bits,
+ timecode_show_frames,
+ timecode_show_seconds,
+ timecode_show_minutes,
+ timecode_show_hours
};
- SMPTERulerScale smpte_ruler_scale;
+ TimecodeRulerScale timecode_ruler_scale;
- nframes_t smpte_mark_interval;
- gint smpte_mark_modulo;
- gint smpte_nmarks;
- void set_smpte_ruler_scale (gdouble lower, gdouble upper);
+ nframes_t timecode_mark_interval;
+ gint timecode_mark_modulo;
+ gint timecode_nmarks;
+ void set_timecode_ruler_scale (gdouble lower, gdouble upper);
enum BBTRulerScale {
bbt_over,
@@ -779,17 +779,17 @@ class Editor : public PublicEditor
uint32_t bbt_accent_modulo;
void compute_bbt_ruler_scale (nframes64_t lower, nframes64_t upper);
- gint metric_get_smpte (GtkCustomRulerMark **, gdouble, gdouble, gint);
+ gint metric_get_timecode (GtkCustomRulerMark **, gdouble, gdouble, gint);
gint metric_get_bbt (GtkCustomRulerMark **, gdouble, gdouble, gint);
gint metric_get_frames (GtkCustomRulerMark **, gdouble, gdouble, gint);
gint metric_get_minsec (GtkCustomRulerMark **, gdouble, gdouble, gint);
Gtk::Widget *_ruler_separator;
- GtkWidget *_smpte_ruler;
+ GtkWidget *_timecode_ruler;
GtkWidget *_bbt_ruler;
GtkWidget *_frames_ruler;
GtkWidget *_minsec_ruler;
- Gtk::Widget *smpte_ruler;
+ Gtk::Widget *timecode_ruler;
Gtk::Widget *bbt_ruler;
Gtk::Widget *frames_ruler;
Gtk::Widget *minsec_ruler;
@@ -810,7 +810,7 @@ class Editor : public PublicEditor
Gtk::Label minsec_label;
Gtk::Label bbt_label;
- Gtk::Label smpte_label;
+ Gtk::Label timecode_label;
Gtk::Label frame_label;
Gtk::Label tempo_label;
Gtk::Label meter_label;
@@ -2000,6 +2000,7 @@ public:
void select_prev_route ();
void snap_to_internal (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
+ void timecode_snap_to_internal (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
RhythmFerret* rhythm_ferret;
BundleManager* _bundle_manager;
diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc
index 3a0045b6f7..f059c740fb 100644
--- a/gtk2_ardour/editor_actions.cc
+++ b/gtk2_ardour/editor_actions.cc
@@ -753,9 +753,9 @@ Editor::register_actions ()
RadioAction::Group snap_choice_group;
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-cd-frame"), _("Snap to CD Frame"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToCDFrame)));
- ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-smpte-frame"), _("Snap to SMPTE frame"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToSMPTEFrame)));
- ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-smpte-seconds"), _("Snap to SMPTE seconds"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToSMPTESeconds)));
- ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-smpte-minutes"), _("Snap to SMPTE minutes"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToSMPTEMinutes)));
+ ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-timecode-frame"), _("Snap to Timecode frame"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToTimecodeFrame)));
+ ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-timecode-seconds"), _("Snap to Timecode seconds"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToTimecodeSeconds)));
+ ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-timecode-minutes"), _("Snap to Timecode minutes"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToTimecodeMinutes)));
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-seconds"), _("Snap to Seconds"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToSeconds)));
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-minutes"), _("Snap to Minutes"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToMinutes)));
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirtyseconds"), _("Snap to Thirtyseconds"), (bind (mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToAThirtysecondBeat)));
@@ -782,7 +782,7 @@ Editor::register_actions ()
ruler_loop_punch_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-loop-punch-ruler"), _("Loop/Punch"), bind (mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_time_transport_marker)));
ruler_bbt_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-bbt-ruler"), _("Bars & Beats"), bind (mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_metric_frames)));
ruler_samples_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-samples-ruler"), _("Samples"), bind (mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_metric_bbt)));
- ruler_timecode_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-timecode-ruler"), _("Timecode"), bind (mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_metric_smpte)));
+ ruler_timecode_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-timecode-ruler"), _("Timecode"), bind (mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_metric_timecode)));
ruler_minsec_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-minsec-ruler"), _("Min:Sec"), bind (mem_fun(*this, &Editor::toggle_ruler_visibility), ruler_metric_minsec)));
/* set defaults here */
@@ -904,7 +904,7 @@ Editor::toggle_ruler_visibility (RulerType rt)
}
switch (rt) {
- case ruler_metric_smpte:
+ case ruler_metric_timecode:
action = "toggle-timecode-ruler";
break;
case ruler_metric_bbt:
@@ -1012,14 +1012,14 @@ Editor::snap_type_action (SnapType type)
case Editing::SnapToCDFrame:
action = "snap-to-cd-frame";
break;
- case Editing::SnapToSMPTEFrame:
- action = "snap-to-smpte-frame";
+ case Editing::SnapToTimecodeFrame:
+ action = "snap-to-timecode-frame";
break;
- case Editing::SnapToSMPTESeconds:
- action = "snap-to-smpte-seconds";
+ case Editing::SnapToTimecodeSeconds:
+ action = "snap-to-timecode-seconds";
break;
- case Editing::SnapToSMPTEMinutes:
- action = "snap-to-smpte-minutes";
+ case Editing::SnapToTimecodeMinutes:
+ action = "snap-to-timecode-minutes";
break;
case Editing::SnapToSeconds:
action = "snap-to-seconds";
@@ -1085,15 +1085,15 @@ Editor::cycle_snap_choice()
{
switch (snap_type) {
case Editing::SnapToCDFrame:
- set_snap_to (Editing::SnapToSMPTEFrame);
+ set_snap_to (Editing::SnapToTimecodeFrame);
break;
- case Editing::SnapToSMPTEFrame:
- set_snap_to (Editing::SnapToSMPTESeconds);
+ case Editing::SnapToTimecodeFrame:
+ set_snap_to (Editing::SnapToTimecodeSeconds);
break;
- case Editing::SnapToSMPTESeconds:
- set_snap_to (Editing::SnapToSMPTEMinutes);
+ case Editing::SnapToTimecodeSeconds:
+ set_snap_to (Editing::SnapToTimecodeMinutes);
break;
- case Editing::SnapToSMPTEMinutes:
+ case Editing::SnapToTimecodeMinutes:
set_snap_to (Editing::SnapToSeconds);
break;
case Editing::SnapToSeconds:
@@ -1340,8 +1340,8 @@ Editor::parameter_changed (std::string p)
update_punch_range_view (true);
} else if (p == "punch-out") {
update_punch_range_view (true);
- } else if (p == "smpte-format") {
- update_just_smpte ();
+ } else if (p == "timecode-format") {
+ update_just_timecode ();
} else if (p == "xfades-visible") {
update_xfade_visibility ();
} else if (p == "show-region-fades") {
@@ -1349,7 +1349,7 @@ Editor::parameter_changed (std::string p)
} else if (p == "edit-mode") {
edit_mode_selector.set_active_text (edit_mode_to_string (Config->get_edit_mode()));
} else if (p == "subframes-per-frame") {
- update_just_smpte ();
+ update_just_timecode ();
} else if (p == "show-track-meters") {
toggle_meter_updating();
} else if (p == "show-summary") {
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index a93cfdfb03..f4e5a7d03c 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -1913,7 +1913,7 @@ void
Editor::show_verbose_time_cursor (nframes64_t frame, double offset, double xpos, double ypos)
{
char buf[128];
- SMPTE::Time smpte;
+ Timecode::Time timecode;
BBT_Time bbt;
int hours, mins;
nframes64_t frame_rate;
@@ -1937,9 +1937,9 @@ Editor::show_verbose_time_cursor (nframes64_t frame, double offset, double xpos,
snprintf (buf, sizeof (buf), "%02" PRIu32 "|%02" PRIu32 "|%02" PRIu32, bbt.bars, bbt.beats, bbt.ticks);
break;
- case AudioClock::SMPTE:
- session->smpte_time (frame, smpte);
- snprintf (buf, sizeof (buf), "%02" PRId32 ":%02" PRId32 ":%02" PRId32 ":%02" PRId32, smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
+ case AudioClock::Timecode:
+ session->timecode_time (frame, timecode);
+ snprintf (buf, sizeof (buf), "%02" PRId32 ":%02" PRId32 ":%02" PRId32 ":%02" PRId32, timecode.hours, timecode.minutes, timecode.seconds, timecode.frames);
break;
case AudioClock::MinSec:
@@ -1971,7 +1971,7 @@ void
Editor::show_verbose_duration_cursor (nframes64_t start, nframes64_t end, double offset, double xpos, double ypos)
{
char buf[128];
- SMPTE::Time smpte;
+ Timecode::Time timecode;
BBT_Time sbbt;
BBT_Time ebbt;
int hours, mins;
@@ -2018,9 +2018,9 @@ Editor::show_verbose_duration_cursor (nframes64_t start, nframes64_t end, double
snprintf (buf, sizeof (buf), "%02" PRIu32 "|%02" PRIu32 "|%02" PRIu32, ebbt.bars, ebbt.beats, ebbt.ticks);
break;
- case AudioClock::SMPTE:
- session->smpte_duration (end - start, smpte);
- snprintf (buf, sizeof (buf), "%02" PRId32 ":%02" PRId32 ":%02" PRId32 ":%02" PRId32, smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
+ case AudioClock::Timecode:
+ session->timecode_duration (end - start, timecode);
+ snprintf (buf, sizeof (buf), "%02" PRId32 ":%02" PRId32 ":%02" PRId32 ":%02" PRId32, timecode.hours, timecode.minutes, timecode.seconds, timecode.frames);
break;
case AudioClock::MinSec:
diff --git a/gtk2_ardour/editor_regions.cc b/gtk2_ardour/editor_regions.cc
index 91cde8fcbb..0b3d01b7d8 100644
--- a/gtk2_ardour/editor_regions.cc
+++ b/gtk2_ardour/editor_regions.cc
@@ -618,7 +618,7 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
char used_str[8];
int used;
BBT_Time bbt;
- SMPTE::Time smpte;
+ Timecode::Time timecode;
bool missing_source = boost::dynamic_pointer_cast<SilentFileSource>(region->source());
@@ -638,22 +638,22 @@ EditorRegions::populate_row (boost::shared_ptr<Region> region, TreeModel::Row co
sprintf (used_str, "%4d" , used);
switch (ARDOUR_UI::instance()->secondary_clock.mode ()) {
- case AudioClock::SMPTE:
- case AudioClock::Off: /* If the secondary clock is off, default to SMPTE */
- _session->smpte_time (region->position(), smpte);
- sprintf (start_str, "%02d:%02d:%02d:%02d", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
- _session->smpte_time (region->position() + region->length() - 1, smpte);
- sprintf (end_str, "%02d:%02d:%02d:%02d", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
- _session->smpte_time (region->length(), smpte);
- sprintf (length_str, "%02d:%02d:%02d:%02d", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
- _session->smpte_time (region->sync_position() + region->position(), smpte);
- sprintf (sync_str, "%02d:%02d:%02d:%02d", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
+ case AudioClock::Timecode:
+ case AudioClock::Off: /* If the secondary clock is off, default to Timecode */
+ _session->timecode_time (region->position(), timecode);
+ sprintf (start_str, "%02d:%02d:%02d:%02d", timecode.hours, timecode.minutes, timecode.seconds, timecode.frames);
+ _session->timecode_time (region->position() + region->length() - 1, timecode);
+ sprintf (end_str, "%02d:%02d:%02d:%02d", timecode.hours, timecode.minutes, timecode.seconds, timecode.frames);
+ _session->timecode_time (region->length(), timecode);
+ sprintf (length_str, "%02d:%02d:%02d:%02d", timecode.hours, timecode.minutes, timecode.seconds, timecode.frames);
+ _session->timecode_time (region->sync_position() + region->position(), timecode);
+ sprintf (sync_str, "%02d:%02d:%02d:%02d", timecode.hours, timecode.minutes, timecode.seconds, timecode.frames);
if (audioRegion && !fades_in_seconds) {
- _session->smpte_time (audioRegion->fade_in()->back()->when, smpte);
- sprintf (fadein_str, "%02d:%02d:%02d:%02d", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
- _session->smpte_time (audioRegion->fade_out()->back()->when, smpte);
- sprintf (fadeout_str, "%02d:%02d:%02d:%02d", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
+ _session->timecode_time (audioRegion->fade_in()->back()->when, timecode);
+ sprintf (fadein_str, "%02d:%02d:%02d:%02d", timecode.hours, timecode.minutes, timecode.seconds, timecode.frames);
+ _session->timecode_time (audioRegion->fade_out()->back()->when, timecode);
+ sprintf (fadeout_str, "%02d:%02d:%02d:%02d", timecode.hours, timecode.minutes, timecode.seconds, timecode.frames);
}
break;
diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc
index f21c996598..e044487274 100644
--- a/gtk2_ardour/editor_rulers.cc
+++ b/gtk2_ardour/editor_rulers.cc
@@ -49,7 +49,7 @@ Editor *Editor::ruler_editor;
/* the order here must match the "metric" enums in editor.h */
GtkCustomMetric Editor::ruler_metrics[4] = {
- {1, Editor::_metric_get_smpte },
+ {1, Editor::_metric_get_timecode },
{1, Editor::_metric_get_bbt },
{1, Editor::_metric_get_frames },
{1, Editor::_metric_get_minsec }
@@ -74,14 +74,14 @@ Editor::initialize_rulers ()
minsec_ruler->hide ();
minsec_ruler->set_no_show_all();
- _smpte_ruler = gtk_custom_hruler_new ();
- smpte_ruler = Glib::wrap (_smpte_ruler);
- smpte_ruler->set_name ("SMPTERuler");
- smpte_ruler->set_size_request (-1, (int)timebar_height);
- gtk_custom_ruler_set_metric (GTK_CUSTOM_RULER(_smpte_ruler), &ruler_metrics[ruler_metric_smpte]);
- smpte_ruler->hide ();
- smpte_ruler->set_no_show_all();
- smpte_nmarks = 0;
+ _timecode_ruler = gtk_custom_hruler_new ();
+ timecode_ruler = Glib::wrap (_timecode_ruler);
+ timecode_ruler->set_name ("TimecodeRuler");
+ timecode_ruler->set_size_request (-1, (int)timebar_height);
+ gtk_custom_ruler_set_metric (GTK_CUSTOM_RULER(_timecode_ruler), &ruler_metrics[ruler_metric_timecode]);
+ timecode_ruler->hide ();
+ timecode_ruler->set_no_show_all();
+ timecode_nmarks = 0;
_bbt_ruler = gtk_custom_hruler_new ();
bbt_ruler = Glib::wrap (_bbt_ruler);
@@ -127,34 +127,34 @@ Editor::initialize_rulers ()
ruler_lab_children.push_back (Element(minsec_label, PACK_SHRINK, PACK_START));
ruler_children.insert (canvaspos, Element(*minsec_ruler, PACK_SHRINK, PACK_START));
- ruler_lab_children.push_back (Element(smpte_label, PACK_SHRINK, PACK_START));
- ruler_children.insert (canvaspos, Element(*smpte_ruler, PACK_SHRINK, PACK_START));
+ ruler_lab_children.push_back (Element(timecode_label, PACK_SHRINK, PACK_START));
+ ruler_children.insert (canvaspos, Element(*timecode_ruler, PACK_SHRINK, PACK_START));
ruler_lab_children.push_back (Element(frame_label, PACK_SHRINK, PACK_START));
ruler_children.insert (canvaspos, Element(*frames_ruler, PACK_SHRINK, PACK_START));
ruler_lab_children.push_back (Element(bbt_label, PACK_SHRINK, PACK_START));
ruler_children.insert (canvaspos, Element(*bbt_ruler, PACK_SHRINK, PACK_START));
- smpte_ruler->add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::SCROLL_MASK);
+ timecode_ruler->add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::SCROLL_MASK);
bbt_ruler->add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::SCROLL_MASK);
frames_ruler->add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::SCROLL_MASK);
minsec_ruler->add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::SCROLL_MASK);
- smpte_ruler->signal_button_release_event().connect (mem_fun(*this, &Editor::ruler_button_release));
+ timecode_ruler->signal_button_release_event().connect (mem_fun(*this, &Editor::ruler_button_release));
bbt_ruler->signal_button_release_event().connect (mem_fun(*this, &Editor::ruler_button_release));
frames_ruler->signal_button_release_event().connect (mem_fun(*this, &Editor::ruler_button_release));
minsec_ruler->signal_button_release_event().connect (mem_fun(*this, &Editor::ruler_button_release));
- smpte_ruler->signal_button_press_event().connect (mem_fun(*this, &Editor::ruler_button_press));
+ timecode_ruler->signal_button_press_event().connect (mem_fun(*this, &Editor::ruler_button_press));
bbt_ruler->signal_button_press_event().connect (mem_fun(*this, &Editor::ruler_button_press));
frames_ruler->signal_button_press_event().connect (mem_fun(*this, &Editor::ruler_button_press));
minsec_ruler->signal_button_press_event().connect (mem_fun(*this, &Editor::ruler_button_press));
- smpte_ruler->signal_motion_notify_event().connect (mem_fun(*this, &Editor::ruler_mouse_motion));
+ timecode_ruler->signal_motion_notify_event().connect (mem_fun(*this, &Editor::ruler_mouse_motion));
bbt_ruler->signal_motion_notify_event().connect (mem_fun(*this, &Editor::ruler_mouse_motion));
frames_ruler->signal_motion_notify_event().connect (mem_fun(*this, &Editor::ruler_mouse_motion));
minsec_ruler->signal_motion_notify_event().connect (mem_fun(*this, &Editor::ruler_mouse_motion));
- smpte_ruler->signal_scroll_event().connect (mem_fun(*this, &Editor::ruler_scroll));
+ timecode_ruler->signal_scroll_event().connect (mem_fun(*this, &Editor::ruler_scroll));
bbt_ruler->signal_scroll_event().connect (mem_fun(*this, &Editor::ruler_scroll));
frames_ruler->signal_scroll_event().connect (mem_fun(*this, &Editor::ruler_scroll));
minsec_ruler->signal_scroll_event().connect (mem_fun(*this, &Editor::ruler_scroll));
@@ -221,8 +221,8 @@ Editor::ruler_button_press (GdkEventButton* ev)
//Gtk::Main::grab_add (*minsec_ruler);
Widget * grab_widget = 0;
- if (smpte_ruler->is_realized() && ev->window == smpte_ruler->get_window()->gobj()) {
- grab_widget = smpte_ruler;
+ if (timecode_ruler->is_realized() && ev->window == timecode_ruler->get_window()->gobj()) {
+ grab_widget = timecode_ruler;
} else if (bbt_ruler->is_realized() && ev->window == bbt_ruler->get_window()->gobj()) {
grab_widget = bbt_ruler;
} else if (frames_ruler->is_realized() && ev->window == frames_ruler->get_window()->gobj()) {
@@ -430,7 +430,7 @@ Editor::store_ruler_visibility ()
{
XMLNode* node = new XMLNode(X_("RulerVisibility"));
- node->add_property (X_("smpte"), ruler_timecode_action->get_active() ? "yes": "no");
+ node->add_property (X_("timecode"), ruler_timecode_action->get_active() ? "yes": "no");
node->add_property (X_("bbt"), ruler_bbt_action->get_active() ? "yes": "no");
node->add_property (X_("frames"), ruler_samples_action->get_active() ? "yes": "no");
node->add_property (X_("minsec"), ruler_minsec_action->get_active() ? "yes": "no");
@@ -454,7 +454,7 @@ Editor::restore_ruler_visibility ()
no_ruler_shown_update = true;
if (node) {
- if ((prop = node->property ("smpte")) != 0) {
+ if ((prop = node->property ("timecode")) != 0) {
if (string_is_affirmative (prop->value())) {
ruler_timecode_action->set_active (true);
} else {
@@ -568,11 +568,11 @@ Editor::update_ruler_visibility ()
if (ruler_timecode_action->get_active()) {
visible_rulers++;
- smpte_label.show ();
- smpte_ruler->show ();
+ timecode_label.show ();
+ timecode_ruler->show ();
} else {
- smpte_label.hide ();
- smpte_ruler->hide ();
+ timecode_label.hide ();
+ timecode_ruler->hide ();
}
if (ruler_samples_action->get_active()) {
@@ -768,9 +768,9 @@ Editor::update_ruler_visibility ()
}
void
-Editor::update_just_smpte ()
+Editor::update_just_timecode ()
{
- ENSURE_GUI_THREAD(mem_fun(*this, &Editor::update_just_smpte));
+ ENSURE_GUI_THREAD(mem_fun(*this, &Editor::update_just_timecode));
if (session == 0) {
return;
@@ -779,7 +779,7 @@ Editor::update_just_smpte ()
nframes64_t rightmost_frame = leftmost_frame + current_page_frames();
if (ruler_timecode_action->get_active()) {
- gtk_custom_ruler_set_range (GTK_CUSTOM_RULER(_smpte_ruler), leftmost_frame, rightmost_frame,
+ gtk_custom_ruler_set_range (GTK_CUSTOM_RULER(_timecode_ruler), leftmost_frame, rightmost_frame,
leftmost_frame, session->current_end_frame());
}
}
@@ -792,7 +792,7 @@ Editor::compute_fixed_ruler_scale ()
}
if (ruler_timecode_action->get_active()) {
- set_smpte_ruler_scale (leftmost_frame, leftmost_frame + current_page_frames() );
+ set_timecode_ruler_scale (leftmost_frame, leftmost_frame + current_page_frames() );
}
if (ruler_minsec_action->get_active()) {
@@ -809,7 +809,7 @@ Editor::update_fixed_rulers ()
return;
}
- ruler_metrics[ruler_metric_smpte].units_per_pixel = frames_per_unit;
+ ruler_metrics[ruler_metric_timecode].units_per_pixel = frames_per_unit;
ruler_metrics[ruler_metric_frames].units_per_pixel = frames_per_unit;
ruler_metrics[ruler_metric_minsec].units_per_pixel = frames_per_unit;
@@ -820,7 +820,7 @@ Editor::update_fixed_rulers ()
*/
if (ruler_timecode_action->get_active()) {
- gtk_custom_ruler_set_range (GTK_CUSTOM_RULER(_smpte_ruler), leftmost_frame, rightmost_frame,
+ gtk_custom_ruler_set_range (GTK_CUSTOM_RULER(_timecode_ruler), leftmost_frame, rightmost_frame,
leftmost_frame, session->current_end_frame());
}
@@ -853,9 +853,9 @@ Editor::update_tempo_based_rulers ()
/* Mark generation */
gint
-Editor::_metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble upper, gint maxchars)
+Editor::_metric_get_timecode (GtkCustomRulerMark **marks, gdouble lower, gdouble upper, gint maxchars)
{
- return ruler_editor->metric_get_smpte (marks, lower, upper, maxchars);
+ return ruler_editor->metric_get_timecode (marks, lower, upper, maxchars);
}
gint
@@ -877,7 +877,7 @@ Editor::_metric_get_minsec (GtkCustomRulerMark **marks, gdouble lower, gdouble u
}
void
-Editor::set_smpte_ruler_scale (gdouble lower, gdouble upper)
+Editor::set_timecode_ruler_scale (gdouble lower, gdouble upper)
{
nframes64_t range;
nframes64_t spacer;
@@ -897,91 +897,91 @@ Editor::set_smpte_ruler_scale (gdouble lower, gdouble upper)
upper = upper + spacer;
range = (nframes64_t) floor (upper - lower);
- if (range < (2 * session->frames_per_smpte_frame())) { /* 0 - 2 frames */
- smpte_ruler_scale = smpte_show_bits;
- smpte_mark_modulo = 20;
- smpte_nmarks = 2 + (2 * session->config.get_subframes_per_frame());
+ if (range < (2 * session->frames_per_timecode_frame())) { /* 0 - 2 frames */
+ timecode_ruler_scale = timecode_show_bits;
+ timecode_mark_modulo = 20;
+ timecode_nmarks = 2 + (2 * session->config.get_subframes_per_frame());
} else if (range <= (fr / 4)) { /* 2 frames - 0.250 second */
- smpte_ruler_scale = smpte_show_frames;
- smpte_mark_modulo = 1;
- smpte_nmarks = 2 + (range / (nframes64_t)session->frames_per_smpte_frame());
+ timecode_ruler_scale = timecode_show_frames;
+ timecode_mark_modulo = 1;
+ timecode_nmarks = 2 + (range / (nframes64_t)session->frames_per_timecode_frame());
} else if (range <= (fr / 2)) { /* 0.25-0.5 second */
- smpte_ruler_scale = smpte_show_frames;
- smpte_mark_modulo = 2;
- smpte_nmarks = 2 + (range / (nframes64_t)session->frames_per_smpte_frame());
+ timecode_ruler_scale = timecode_show_frames;
+ timecode_mark_modulo = 2;
+ timecode_nmarks = 2 + (range / (nframes64_t)session->frames_per_timecode_frame());
} else if (range <= fr) { /* 0.5-1 second */
- smpte_ruler_scale = smpte_show_frames;
- smpte_mark_modulo = 5;
- smpte_nmarks = 2 + (range / (nframes64_t)session->frames_per_smpte_frame());
+ timecode_ruler_scale = timecode_show_frames;
+ timecode_mark_modulo = 5;
+ timecode_nmarks = 2 + (range / (nframes64_t)session->frames_per_timecode_frame());
} else if (range <= 2 * fr) { /* 1-2 seconds */
- smpte_ruler_scale = smpte_show_frames;
- smpte_mark_modulo = 10;
- smpte_nmarks = 2 + (range / (nframes64_t)session->frames_per_smpte_frame());
+ timecode_ruler_scale = timecode_show_frames;
+ timecode_mark_modulo = 10;
+ timecode_nmarks = 2 + (range / (nframes64_t)session->frames_per_timecode_frame());
} else if (range <= 8 * fr) { /* 2-8 seconds */
- smpte_ruler_scale = smpte_show_seconds;
- smpte_mark_modulo = 1;
- smpte_nmarks = 2 + (range / fr);
+ timecode_ruler_scale = timecode_show_seconds;
+ timecode_mark_modulo = 1;
+ timecode_nmarks = 2 + (range / fr);
} else if (range <= 16 * fr) { /* 8-16 seconds */
- smpte_ruler_scale = smpte_show_seconds;
- smpte_mark_modulo = 2;
- smpte_nmarks = 2 + (range / fr);
+ timecode_ruler_scale = timecode_show_seconds;
+ timecode_mark_modulo = 2;
+ timecode_nmarks = 2 + (range / fr);
} else if (range <= 30 * fr) { /* 16-30 seconds */
- smpte_ruler_scale = smpte_show_seconds;
- smpte_mark_modulo = 5;
- smpte_nmarks = 2 + (range / fr);
+ timecode_ruler_scale = timecode_show_seconds;
+ timecode_mark_modulo = 5;
+ timecode_nmarks = 2 + (range / fr);
} else if (range <= 60 * fr) { /* 30-60 seconds */
- smpte_ruler_scale = smpte_show_seconds;
- smpte_mark_modulo = 5;
- smpte_nmarks = 2 + (range / fr);
+ timecode_ruler_scale = timecode_show_seconds;
+ timecode_mark_modulo = 5;
+ timecode_nmarks = 2 + (range / fr);
} else if (range <= 2 * 60 * fr) { /* 1-2 minutes */
- smpte_ruler_scale = smpte_show_seconds;
- smpte_mark_modulo = 15;
- smpte_nmarks = 2 + (range / fr);
+ timecode_ruler_scale = timecode_show_seconds;
+ timecode_mark_modulo = 15;
+ timecode_nmarks = 2 + (range / fr);
} else if (range <= 4 * 60 * fr) { /* 2-4 minutes */
- smpte_ruler_scale = smpte_show_seconds;
- smpte_mark_modulo = 30;
- smpte_nmarks = 2 + (range / fr);
+ timecode_ruler_scale = timecode_show_seconds;
+ timecode_mark_modulo = 30;
+ timecode_nmarks = 2 + (range / fr);
} else if (range <= 10 * 60 * fr) { /* 4-10 minutes */
- smpte_ruler_scale = smpte_show_minutes;
- smpte_mark_modulo = 2;
- smpte_nmarks = 2 + 10;
+ timecode_ruler_scale = timecode_show_minutes;
+ timecode_mark_modulo = 2;
+ timecode_nmarks = 2 + 10;
} else if (range <= 30 * 60 * fr) { /* 10-30 minutes */
- smpte_ruler_scale = smpte_show_minutes;
- smpte_mark_modulo = 5;
- smpte_nmarks = 2 + 30;
+ timecode_ruler_scale = timecode_show_minutes;
+ timecode_mark_modulo = 5;
+ timecode_nmarks = 2 + 30;
} else if (range <= 60 * 60 * fr) { /* 30 minutes - 1hr */
- smpte_ruler_scale = smpte_show_minutes;
- smpte_mark_modulo = 10;
- smpte_nmarks = 2 + 60;
+ timecode_ruler_scale = timecode_show_minutes;
+ timecode_mark_modulo = 10;
+ timecode_nmarks = 2 + 60;
} else if (range <= 4 * 60 * 60 * fr) { /* 1 - 4 hrs*/
- smpte_ruler_scale = smpte_show_minutes;
- smpte_mark_modulo = 30;
- smpte_nmarks = 2 + (60 * 4);
+ timecode_ruler_scale = timecode_show_minutes;
+ timecode_mark_modulo = 30;
+ timecode_nmarks = 2 + (60 * 4);
} else if (range <= 8 * 60 * 60 * fr) { /* 4 - 8 hrs*/
- smpte_ruler_scale = smpte_show_hours;
- smpte_mark_modulo = 1;
- smpte_nmarks = 2 + 8;
+ timecode_ruler_scale = timecode_show_hours;
+ timecode_mark_modulo = 1;
+ timecode_nmarks = 2 + 8;
} else if (range <= 16 * 60 * 60 * fr) { /* 16-24 hrs*/
- smpte_ruler_scale = smpte_show_hours;
- smpte_mark_modulo = 1;
- smpte_nmarks = 2 + 24;
+ timecode_ruler_scale = timecode_show_hours;
+ timecode_mark_modulo = 1;
+ timecode_nmarks = 2 + 24;
} else {
/* not possible if nframes64_t is a 32 bit quantity */
- smpte_ruler_scale = smpte_show_hours;
- smpte_mark_modulo = 4;
- smpte_nmarks = 2 + 24;
+ timecode_ruler_scale = timecode_show_hours;
+ timecode_mark_modulo = 4;
+ timecode_nmarks = 2 + 24;
}
}
gint
-Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upper*/, gint /*maxchars*/)
+Editor::metric_get_timecode (GtkCustomRulerMark **marks, gdouble lower, gdouble /*upper*/, gint /*maxchars*/)
{
nframes_t pos;
nframes64_t spacer;
- SMPTE::Time smpte;
+ Timecode::Time timecode;
gchar buf[16];
gint n;
@@ -997,22 +997,22 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble /*u
pos = (nframes_t) floor (lower);
- *marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * smpte_nmarks);
- switch (smpte_ruler_scale) {
- case smpte_show_bits:
+ *marks = (GtkCustomRulerMark *) g_malloc (sizeof(GtkCustomRulerMark) * timecode_nmarks);
+ switch (timecode_ruler_scale) {
+ case timecode_show_bits:
- // Find smpte time of this sample (pos) with subframe accuracy
- session->sample_to_smpte(pos, smpte, true /* use_offset */, true /* use_subframes */ );
+ // Find timecode time of this sample (pos) with subframe accuracy
+ session->sample_to_timecode(pos, timecode, true /* use_offset */, true /* use_subframes */ );
- for (n = 0; n < smpte_nmarks; n++) {
- session->smpte_to_sample(smpte, pos, true /* use_offset */, true /* use_subframes */ );
- if ((smpte.subframes % smpte_mark_modulo) == 0) {
- if (smpte.subframes == 0) {
+ for (n = 0; n < timecode_nmarks; n++) {
+ session->timecode_to_sample(timecode, pos, true /* use_offset */, true /* use_subframes */ );
+ if ((timecode.subframes % timecode_mark_modulo) == 0) {
+ if (timecode.subframes == 0) {
(*marks)[n].style = GtkCustomRulerMarkMajor;
- snprintf (buf, sizeof(buf), "%s%02u:%02u:%02u:%02u", smpte.negative ? "-" : "", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
+ snprintf (buf, sizeof(buf), "%s%02u:%02u:%02u:%02u", timecode.negative ? "-" : "", timecode.hours, timecode.minutes, timecode.seconds, timecode.frames);
} else {
(*marks)[n].style = GtkCustomRulerMarkMinor;
- snprintf (buf, sizeof(buf), ".%02u", smpte.subframes);
+ snprintf (buf, sizeof(buf), ".%02u", timecode.subframes);
}
} else {
snprintf (buf, sizeof(buf)," ");
@@ -1023,26 +1023,26 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble /*u
(*marks)[n].position = pos;
// Increment subframes by one
- SMPTE::increment_subframes( smpte, session->config.get_subframes_per_frame() );
+ Timecode::increment_subframes( timecode, session->config.get_subframes_per_frame() );
}
break;
- case smpte_show_seconds:
- // Find smpte time of this sample (pos)
- session->sample_to_smpte(pos, smpte, true /* use_offset */, false /* use_subframes */ );
+ case timecode_show_seconds:
+ // Find timecode time of this sample (pos)
+ session->sample_to_timecode(pos, timecode, true /* use_offset */, false /* use_subframes */ );
// Go to next whole second down
- SMPTE::seconds_floor( smpte );
+ Timecode::seconds_floor( timecode );
- for (n = 0; n < smpte_nmarks; n++) {
- session->smpte_to_sample(smpte, pos, true /* use_offset */, false /* use_subframes */ );
- if ((smpte.seconds % smpte_mark_modulo) == 0) {
- if (smpte.seconds == 0) {
+ for (n = 0; n < timecode_nmarks; n++) {
+ session->timecode_to_sample(timecode, pos, true /* use_offset */, false /* use_subframes */ );
+ if ((timecode.seconds % timecode_mark_modulo) == 0) {
+ if (timecode.seconds == 0) {
(*marks)[n].style = GtkCustomRulerMarkMajor;
(*marks)[n].position = pos;
} else {
(*marks)[n].style = GtkCustomRulerMarkMinor;
(*marks)[n].position = pos;
}
- snprintf (buf, sizeof(buf), "%s%02u:%02u:%02u:%02u", smpte.negative ? "-" : "", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
+ snprintf (buf, sizeof(buf), "%s%02u:%02u:%02u:%02u", timecode.negative ? "-" : "", timecode.hours, timecode.minutes, timecode.seconds, timecode.frames);
} else {
snprintf (buf, sizeof(buf)," ");
(*marks)[n].style = GtkCustomRulerMarkMicro;
@@ -1050,24 +1050,24 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble /*u
}
(*marks)[n].label = g_strdup (buf);
- SMPTE::increment_seconds( smpte, session->config.get_subframes_per_frame() );
+ Timecode::increment_seconds( timecode, session->config.get_subframes_per_frame() );
}
break;
- case smpte_show_minutes:
- // Find smpte time of this sample (pos)
- session->sample_to_smpte(pos, smpte, true /* use_offset */, false /* use_subframes */ );
+ case timecode_show_minutes:
+ // Find timecode time of this sample (pos)
+ session->sample_to_timecode(pos, timecode, true /* use_offset */, false /* use_subframes */ );
// Go to next whole minute down
- SMPTE::minutes_floor( smpte );
+ Timecode::minutes_floor( timecode );
- for (n = 0; n < smpte_nmarks; n++) {
- session->smpte_to_sample(smpte, pos, true /* use_offset */, false /* use_subframes */ );
- if ((smpte.minutes % smpte_mark_modulo) == 0) {
- if (smpte.minutes == 0) {
+ for (n = 0; n < timecode_nmarks; n++) {
+ session->timecode_to_sample(timecode, pos, true /* use_offset */, false /* use_subframes */ );
+ if ((timecode.minutes % timecode_mark_modulo) == 0) {
+ if (timecode.minutes == 0) {
(*marks)[n].style = GtkCustomRulerMarkMajor;
} else {
(*marks)[n].style = GtkCustomRulerMarkMinor;
}
- snprintf (buf, sizeof(buf), "%s%02u:%02u:%02u:%02u", smpte.negative ? "-" : "", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
+ snprintf (buf, sizeof(buf), "%s%02u:%02u:%02u:%02u", timecode.negative ? "-" : "", timecode.hours, timecode.minutes, timecode.seconds, timecode.frames);
} else {
snprintf (buf, sizeof(buf)," ");
(*marks)[n].style = GtkCustomRulerMarkMicro;
@@ -1075,21 +1075,21 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble /*u
}
(*marks)[n].label = g_strdup (buf);
(*marks)[n].position = pos;
- SMPTE::increment_minutes( smpte, session->config.get_subframes_per_frame() );
+ Timecode::increment_minutes( timecode, session->config.get_subframes_per_frame() );
}
break;
- case smpte_show_hours:
- // Find smpte time of this sample (pos)
- session->sample_to_smpte(pos, smpte, true /* use_offset */, false /* use_subframes */ );
+ case timecode_show_hours:
+ // Find timecode time of this sample (pos)
+ session->sample_to_timecode(pos, timecode, true /* use_offset */, false /* use_subframes */ );
// Go to next whole hour down
- SMPTE::hours_floor( smpte );
+ Timecode::hours_floor( timecode );
- for (n = 0; n < smpte_nmarks; n++) {
- session->smpte_to_sample(smpte, pos, true /* use_offset */, false /* use_subframes */ );
- if ((smpte.hours % smpte_mark_modulo) == 0) {
+ for (n = 0; n < timecode_nmarks; n++) {
+ session->timecode_to_sample(timecode, pos, true /* use_offset */, false /* use_subframes */ );
+ if ((timecode.hours % timecode_mark_modulo) == 0) {
(*marks)[n].style = GtkCustomRulerMarkMajor;
- snprintf (buf, sizeof(buf), "%s%02u:%02u:%02u:%02u", smpte.negative ? "-" : "", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
+ snprintf (buf, sizeof(buf), "%s%02u:%02u:%02u:%02u", timecode.negative ? "-" : "", timecode.hours, timecode.minutes, timecode.seconds, timecode.frames);
} else {
snprintf (buf, sizeof(buf)," ");
(*marks)[n].style = GtkCustomRulerMarkMicro;
@@ -1098,25 +1098,25 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble /*u
(*marks)[n].label = g_strdup (buf);
(*marks)[n].position = pos;
- SMPTE::increment_hours( smpte, session->config.get_subframes_per_frame() );
+ Timecode::increment_hours( timecode, session->config.get_subframes_per_frame() );
}
break;
- case smpte_show_frames:
- // Find smpte time of this sample (pos)
- session->sample_to_smpte(pos, smpte, true /* use_offset */, false /* use_subframes */ );
+ case timecode_show_frames:
+ // Find timecode time of this sample (pos)
+ session->sample_to_timecode(pos, timecode, true /* use_offset */, false /* use_subframes */ );
// Go to next whole frame down
- SMPTE::frames_floor( smpte );
+ Timecode::frames_floor( timecode );
- for (n = 0; n < smpte_nmarks; n++) {
- session->smpte_to_sample(smpte, pos, true /* use_offset */, false /* use_subframes */ );
- if ((smpte.frames % smpte_mark_modulo) == 0) {
- if (smpte.frames == 0) {
+ for (n = 0; n < timecode_nmarks; n++) {
+ session->timecode_to_sample(timecode, pos, true /* use_offset */, false /* use_subframes */ );
+ if ((timecode.frames % timecode_mark_modulo) == 0) {
+ if (timecode.frames == 0) {
(*marks)[n].style = GtkCustomRulerMarkMajor;
} else {
(*marks)[n].style = GtkCustomRulerMarkMinor;
}
(*marks)[n].position = pos;
- snprintf (buf, sizeof(buf), "%s%02u:%02u:%02u:%02u", smpte.negative ? "-" : "", smpte.hours, smpte.minutes, smpte.seconds, smpte.frames);
+ snprintf (buf, sizeof(buf), "%s%02u:%02u:%02u:%02u", timecode.negative ? "-" : "", timecode.hours, timecode.minutes, timecode.seconds, timecode.frames);
} else {
snprintf (buf, sizeof(buf)," ");
(*marks)[n].style = GtkCustomRulerMarkMicro;
@@ -1124,13 +1124,13 @@ Editor::metric_get_smpte (GtkCustomRulerMark **marks, gdouble lower, gdouble /*u
}
(*marks)[n].label = g_strdup (buf);
- SMPTE::increment( smpte, session->config.get_subframes_per_frame() );
+ Timecode::increment( timecode, session->config.get_subframes_per_frame() );
}
break;
}
- return smpte_nmarks;
+ return timecode_nmarks;
}
diff --git a/gtk2_ardour/enums.cc b/gtk2_ardour/enums.cc
index bec134a73c..4820a930ac 100644
--- a/gtk2_ardour/enums.cc
+++ b/gtk2_ardour/enums.cc
@@ -46,7 +46,7 @@ setup_gtk_ardour_enums ()
#define REGISTER_ENUM(e) i.push_back (e); s.push_back (#e)
#define REGISTER_CLASS_ENUM(t,e) i.push_back (t::e); s.push_back (#e)
- REGISTER_CLASS_ENUM (AudioClock, SMPTE);
+ REGISTER_CLASS_ENUM (AudioClock, Timecode);
REGISTER_CLASS_ENUM (AudioClock, BBT);
REGISTER_CLASS_ENUM (AudioClock, MinSec);
REGISTER_CLASS_ENUM (AudioClock, Frames);
diff --git a/gtk2_ardour/export_format_dialog.cc b/gtk2_ardour/export_format_dialog.cc
index 593f16ec58..2e9f20d120 100644
--- a/gtk2_ardour/export_format_dialog.cc
+++ b/gtk2_ardour/export_format_dialog.cc
@@ -711,7 +711,7 @@ ExportFormatDialog::update_silence_start_selection ()
{
update_time (silence_start, silence_start_clock);
AnyTime zero;
- zero.type = AnyTime::SMPTE;
+ zero.type = AnyTime::Timecode;
manager.select_silence_beginning (silence_start_checkbox.get_active() ? silence_start : zero);
}
@@ -720,7 +720,7 @@ ExportFormatDialog::update_silence_end_selection ()
{
update_time (silence_end, silence_end_clock);
AnyTime zero;
- zero.type = AnyTime::SMPTE;
+ zero.type = AnyTime::Timecode;
manager.select_silence_end (silence_end_checkbox.get_active() ? silence_end : zero);
}
@@ -730,11 +730,11 @@ ExportFormatDialog::update_clock (AudioClock & clock, ARDOUR::AnyTime const & ti
// TODO position
clock.set (session->convert_to_frames_at (0, time), true);
- AudioClock::Mode mode(AudioClock::SMPTE);
+ AudioClock::Mode mode(AudioClock::Timecode);
switch (time.type) {
- case AnyTime::SMPTE:
- mode = AudioClock::SMPTE;
+ case AnyTime::Timecode:
+ mode = AudioClock::Timecode;
break;
case AnyTime::BBT:
mode = AudioClock::BBT;
@@ -760,9 +760,9 @@ ExportFormatDialog::update_time (AnyTime & time, AudioClock const & clock)
nframes_t frames = clock.current_duration();
switch (clock.mode()) {
- case AudioClock::SMPTE:
- time.type = AnyTime::SMPTE;
- session->smpte_time (frames, time.smpte);
+ case AudioClock::Timecode:
+ time.type = AnyTime::Timecode;
+ session->timecode_time (frames, time.timecode);
break;
case AudioClock::BBT:
time.type = AnyTime::BBT;
diff --git a/gtk2_ardour/export_timespan_selector.cc b/gtk2_ardour/export_timespan_selector.cc
index b11169b214..30515d45fd 100644
--- a/gtk2_ardour/export_timespan_selector.cc
+++ b/gtk2_ardour/export_timespan_selector.cc
@@ -67,7 +67,7 @@ ExportTimespanSelector::ExportTimespanSelector (ARDOUR::Session * session, Profi
iter = time_format_list->append();
row = *iter;
- row[time_format_cols.format] = ExportProfileManager::SMPTE;
+ row[time_format_cols.format] = ExportProfileManager::Timecode;
row[time_format_cols.label] = X_("Timecode");
iter = time_format_list->append();
@@ -163,9 +163,9 @@ ExportTimespanSelector::construct_label (ARDOUR::Location const * location) cons
end = bbt_str (end_frame);
break;
- case AudioClock::SMPTE:
- start = smpte_str (start_frame);
- end = smpte_str (end_frame);
+ case AudioClock::Timecode:
+ start = timecode_str (start_frame);
+ end = timecode_str (end_frame);
break;
case AudioClock::MinSec:
@@ -222,16 +222,16 @@ ExportTimespanSelector::bbt_str (nframes_t frames) const
}
Glib::ustring
-ExportTimespanSelector::smpte_str (nframes_t frames) const
+ExportTimespanSelector::timecode_str (nframes_t frames) const
{
if (!session) {
return "Error!";
}
std::ostringstream oss;
- SMPTE::Time time;
+ Timecode::Time time;
- session->smpte_time (frames, time);
+ session->timecode_time (frames, time);
oss << std::setfill('0') << std::right <<
std::setw(2) <<
diff --git a/gtk2_ardour/export_timespan_selector.h b/gtk2_ardour/export_timespan_selector.h
index 72d5990422..ad57aac344 100644
--- a/gtk2_ardour/export_timespan_selector.h
+++ b/gtk2_ardour/export_timespan_selector.h
@@ -78,7 +78,7 @@ class ExportTimespanSelector : public Gtk::VBox {
Glib::ustring construct_label (ARDOUR::Location const * location) const;
Glib::ustring bbt_str (nframes_t frames) const;
- Glib::ustring smpte_str (nframes_t frames) const;
+ Glib::ustring timecode_str (nframes_t frames) const;
Glib::ustring ms_str (nframes_t frames) const;
void update_range_name (Glib::ustring const & path, Glib::ustring const & new_text);
diff --git a/gtk2_ardour/session_option_editor.cc b/gtk2_ardour/session_option_editor.cc
index 29051fe09a..6c2bd856c6 100644
--- a/gtk2_ardour/session_option_editor.cc
+++ b/gtk2_ardour/session_option_editor.cc
@@ -223,22 +223,22 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
add_option (_("Sync"), spf);
ComboOption<SmpteFormat>* smf = new ComboOption<SmpteFormat> (
- "smpte-format",
+ "timecode-format",
_("Timecode frames-per-second"),
- mem_fun (*_session_config, &SessionConfiguration::get_smpte_format),
- mem_fun (*_session_config, &SessionConfiguration::set_smpte_format)
+ mem_fun (*_session_config, &SessionConfiguration::get_timecode_format),
+ mem_fun (*_session_config, &SessionConfiguration::set_timecode_format)
);
- smf->add (smpte_23976, _("23.976"));
- smf->add (smpte_24, _("24"));
- smf->add (smpte_24976, _("24.976"));
- smf->add (smpte_25, _("25"));
- smf->add (smpte_2997, _("29.97"));
- smf->add (smpte_2997drop, _("29.97 drop"));
- smf->add (smpte_30, _("30"));
- smf->add (smpte_30drop, _("30 drop"));
- smf->add (smpte_5994, _("59.94"));
- smf->add (smpte_60, _("60"));
+ smf->add (timecode_23976, _("23.976"));
+ smf->add (timecode_24, _("24"));
+ smf->add (timecode_24976, _("24.976"));
+ smf->add (timecode_25, _("25"));
+ smf->add (timecode_2997, _("29.97"));
+ smf->add (timecode_2997drop, _("29.97 drop"));
+ smf->add (timecode_30, _("30"));
+ smf->add (timecode_30drop, _("30 drop"));
+ smf->add (timecode_5994, _("59.94"));
+ smf->add (timecode_60, _("60"));
add_option (_("Sync"), smf);
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index 7a7fad030f..d4c294ae29 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -166,7 +166,7 @@ SoundFileBox::SoundFileBox (bool persistent)
table.attach (timecode_clock, 1, 2, 5, 6, FILL, FILL);
length_clock.set_mode (ARDOUR_UI::instance()->secondary_clock.mode());
- timecode_clock.set_mode (AudioClock::SMPTE);
+ timecode_clock.set_mode (AudioClock::Timecode);
main_box.pack_start (table, false, false);