diff options
Diffstat (limited to 'libs/surfaces')
-rw-r--r-- | libs/surfaces/control_protocol/basic_ui.cc | 16 | ||||
-rw-r--r-- | libs/surfaces/control_protocol/control_protocol/basic_ui.h | 10 | ||||
-rw-r--r-- | libs/surfaces/control_protocol/control_protocol/timecode.h (renamed from libs/surfaces/control_protocol/control_protocol/smpte.h) | 36 | ||||
-rw-r--r-- | libs/surfaces/control_protocol/smpte.cc | 302 | ||||
-rw-r--r-- | libs/surfaces/mackie/bcf_surface_generated.cc | 14 | ||||
-rw-r--r-- | libs/surfaces/mackie/mackie_button_handler.cc | 4 | ||||
-rw-r--r-- | libs/surfaces/mackie/mackie_button_handler.h | 4 | ||||
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.cc | 42 | ||||
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.h | 12 | ||||
-rw-r--r-- | libs/surfaces/mackie/mackie_surface_generated.cc | 14 | ||||
-rw-r--r-- | libs/surfaces/tranzport/show.cc | 18 | ||||
-rw-r--r-- | libs/surfaces/tranzport/tranzport_control_protocol.h | 2 |
12 files changed, 237 insertions, 237 deletions
diff --git a/libs/surfaces/control_protocol/basic_ui.cc b/libs/surfaces/control_protocol/basic_ui.cc index 2eda08acf7..c0ead577d7 100644 --- a/libs/surfaces/control_protocol/basic_ui.cc +++ b/libs/surfaces/control_protocol/basic_ui.cc @@ -270,25 +270,25 @@ BasicUI::locked () } nframes_t -BasicUI::smpte_frames_per_hour () +BasicUI::timecode_frames_per_hour () { - return session->smpte_frames_per_hour (); + return session->timecode_frames_per_hour (); } void -BasicUI::smpte_time (nframes_t where, SMPTE::Time& smpte) +BasicUI::timecode_time (nframes_t where, Timecode::Time& timecode) { - session->smpte_time (where, *((SMPTE::Time *) &smpte)); + session->timecode_time (where, *((Timecode::Time *) &timecode)); } void -BasicUI::smpte_to_sample (SMPTE::Time& smpte, nframes_t& sample, bool use_offset, bool use_subframes) const +BasicUI::timecode_to_sample (Timecode::Time& timecode, nframes_t& sample, bool use_offset, bool use_subframes) const { - session->smpte_to_sample (*((SMPTE::Time*)&smpte), sample, use_offset, use_subframes); + session->timecode_to_sample (*((Timecode::Time*)&timecode), sample, use_offset, use_subframes); } void -BasicUI::sample_to_smpte (nframes_t sample, SMPTE::Time& smpte, bool use_offset, bool use_subframes) const +BasicUI::sample_to_timecode (nframes_t sample, Timecode::Time& timecode, bool use_offset, bool use_subframes) const { - session->sample_to_smpte (sample, *((SMPTE::Time*)&smpte), use_offset, use_subframes); + session->sample_to_timecode (sample, *((Timecode::Time*)&timecode), use_offset, use_subframes); } diff --git a/libs/surfaces/control_protocol/control_protocol/basic_ui.h b/libs/surfaces/control_protocol/control_protocol/basic_ui.h index 279d1c6394..c907b6f301 100644 --- a/libs/surfaces/control_protocol/control_protocol/basic_ui.h +++ b/libs/surfaces/control_protocol/control_protocol/basic_ui.h @@ -24,7 +24,7 @@ #include <string> #include <jack/types.h> -#include <control_protocol/smpte.h> +#include <control_protocol/timecode.h> namespace ARDOUR { class Session; @@ -72,11 +72,11 @@ class BasicUI { void rec_enable_toggle (); void toggle_all_rec_enables (); - jack_nframes_t smpte_frames_per_hour (); + jack_nframes_t timecode_frames_per_hour (); - void smpte_time (jack_nframes_t where, SMPTE::Time&); - void smpte_to_sample (SMPTE::Time& smpte, jack_nframes_t& sample, bool use_offset, bool use_subframes) const; - void sample_to_smpte (jack_nframes_t sample, SMPTE::Time& smpte, bool use_offset, bool use_subframes) const; + void timecode_time (jack_nframes_t where, Timecode::Time&); + void timecode_to_sample (Timecode::Time& timecode, jack_nframes_t& sample, bool use_offset, bool use_subframes) const; + void sample_to_timecode (jack_nframes_t sample, Timecode::Time& timecode, bool use_offset, bool use_subframes) const; protected: BasicUI (); diff --git a/libs/surfaces/control_protocol/control_protocol/smpte.h b/libs/surfaces/control_protocol/control_protocol/timecode.h index 7493ccf85f..f30234b248 100644 --- a/libs/surfaces/control_protocol/control_protocol/smpte.h +++ b/libs/surfaces/control_protocol/control_protocol/timecode.h @@ -16,12 +16,12 @@ 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef __ardour_smpte_h__ -#define __ardour_smpte_h__ +#ifndef __ardour_timecode_h__ +#define __ardour_timecode_h__ #include <inttypes.h> -namespace SMPTE { +namespace Timecode { enum Wrap { NONE = 0, @@ -36,11 +36,11 @@ struct Time { uint32_t hours; uint32_t minutes; uint32_t seconds; - uint32_t frames; ///< SMPTE frames (not audio samples) + uint32_t frames; ///< Timecode frames (not audio samples) uint32_t subframes; ///< Typically unused float rate; ///< Frame rate of this Time static float default_rate;///< Rate to use for default constructor - bool drop; ///< Whether this Time uses dropframe SMPTE + bool drop; ///< Whether this Time uses dropframe Timecode Time(float a_rate = default_rate) { negative = false; @@ -53,18 +53,18 @@ struct Time { } }; -Wrap increment( Time& smpte, uint32_t ); -Wrap decrement( Time& smpte, uint32_t ); -Wrap increment_subframes( Time& smpte, uint32_t ); -Wrap decrement_subframes( Time& smpte, uint32_t ); -Wrap increment_seconds( Time& smpte, uint32_t ); -Wrap increment_minutes( Time& smpte, uint32_t ); -Wrap increment_hours( Time& smpte, uint32_t ); -void frames_floor( Time& smpte ); -void seconds_floor( Time& smpte ); -void minutes_floor( Time& smpte ); -void hours_floor( Time& smpte ); +Wrap increment( Time& timecode, uint32_t ); +Wrap decrement( Time& timecode, uint32_t ); +Wrap increment_subframes( Time& timecode, uint32_t ); +Wrap decrement_subframes( Time& timecode, uint32_t ); +Wrap increment_seconds( Time& timecode, uint32_t ); +Wrap increment_minutes( Time& timecode, uint32_t ); +Wrap increment_hours( Time& timecode, uint32_t ); +void frames_floor( Time& timecode ); +void seconds_floor( Time& timecode ); +void minutes_floor( Time& timecode ); +void hours_floor( Time& timecode ); -} // namespace SMPTE +} // namespace Timecode -#endif // __ardour_smpte_h__ +#endif // __ardour_timecode_h__ diff --git a/libs/surfaces/control_protocol/smpte.cc b/libs/surfaces/control_protocol/smpte.cc index 969c3385bc..555dc86d38 100644 --- a/libs/surfaces/control_protocol/smpte.cc +++ b/libs/surfaces/control_protocol/smpte.cc @@ -16,186 +16,186 @@ 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define SMPTE_IS_AROUND_ZERO( sm ) (!(sm).frames && !(sm).seconds && !(sm).minutes && !(sm).hours) -#define SMPTE_IS_ZERO( sm ) (!(sm).frames && !(sm).seconds && !(sm).minutes && !(sm).hours && !(sm.subframes)) +#define Timecode_IS_AROUND_ZERO( sm ) (!(sm).frames && !(sm).seconds && !(sm).minutes && !(sm).hours) +#define Timecode_IS_ZERO( sm ) (!(sm).frames && !(sm).seconds && !(sm).minutes && !(sm).hours && !(sm.subframes)) -#include "control_protocol/smpte.h" +#include "control_protocol/timecode.h" #include "ardour/rc_configuration.h" -namespace SMPTE { +namespace Timecode { float Time::default_rate = 30.0; -/** Increment @a smpte by exactly one frame (keep subframes value). +/** Increment @a timecode by exactly one frame (keep subframes value). * Realtime safe. * @return true if seconds wrap. */ Wrap -increment( Time& smpte, uint32_t subframes_per_frame ) +increment( Time& timecode, uint32_t subframes_per_frame ) { Wrap wrap = NONE; - if (smpte.negative) { - if (SMPTE_IS_AROUND_ZERO(smpte) && smpte.subframes) { + if (timecode.negative) { + if (Timecode_IS_AROUND_ZERO(timecode) && timecode.subframes) { // We have a zero transition involving only subframes - smpte.subframes = subframes_per_frame - smpte.subframes; - smpte.negative = false; + timecode.subframes = subframes_per_frame - timecode.subframes; + timecode.negative = false; return SECONDS; } - smpte.negative = false; - wrap = decrement( smpte, subframes_per_frame ); - if (!SMPTE_IS_ZERO( smpte )) { - smpte.negative = true; + timecode.negative = false; + wrap = decrement( timecode, subframes_per_frame ); + if (!Timecode_IS_ZERO( timecode )) { + timecode.negative = true; } return wrap; } - switch ((int)ceil(smpte.rate)) { + switch ((int)ceil(timecode.rate)) { case 24: - if (smpte.frames == 23) { - smpte.frames = 0; + if (timecode.frames == 23) { + timecode.frames = 0; wrap = SECONDS; } break; case 25: - if (smpte.frames == 24) { - smpte.frames = 0; + if (timecode.frames == 24) { + timecode.frames = 0; wrap = SECONDS; } break; case 30: - if (smpte.drop) { - if (smpte.frames == 29) { - if ( ((smpte.minutes + 1) % 10) && (smpte.seconds == 59) ) { - smpte.frames = 2; + if (timecode.drop) { + if (timecode.frames == 29) { + if ( ((timecode.minutes + 1) % 10) && (timecode.seconds == 59) ) { + timecode.frames = 2; } else { - smpte.frames = 0; + timecode.frames = 0; } wrap = SECONDS; } } else { - if (smpte.frames == 29) { - smpte.frames = 0; + if (timecode.frames == 29) { + timecode.frames = 0; wrap = SECONDS; } } break; case 60: - if (smpte.frames == 59) { - smpte.frames = 0; + if (timecode.frames == 59) { + timecode.frames = 0; wrap = SECONDS; } break; } if (wrap == SECONDS) { - if (smpte.seconds == 59) { - smpte.seconds = 0; + if (timecode.seconds == 59) { + timecode.seconds = 0; wrap = MINUTES; - if (smpte.minutes == 59) { - smpte.minutes = 0; + if (timecode.minutes == 59) { + timecode.minutes = 0; wrap = HOURS; - smpte.hours++; + timecode.hours++; } else { - smpte.minutes++; + timecode.minutes++; } } else { - smpte.seconds++; + timecode.seconds++; } } else { - smpte.frames++; + timecode.frames++; } return wrap; } -/** Decrement @a smpte by exactly one frame (keep subframes value) +/** Decrement @a timecode by exactly one frame (keep subframes value) * Realtime safe. * @return true if seconds wrap. */ Wrap -decrement( Time& smpte, uint32_t subframes_per_frame ) +decrement( Time& timecode, uint32_t subframes_per_frame ) { Wrap wrap = NONE; - if (smpte.negative || SMPTE_IS_ZERO(smpte)) { - smpte.negative = false; - wrap = increment( smpte, subframes_per_frame ); - smpte.negative = true; + if (timecode.negative || Timecode_IS_ZERO(timecode)) { + timecode.negative = false; + wrap = increment( timecode, subframes_per_frame ); + timecode.negative = true; return wrap; - } else if (SMPTE_IS_AROUND_ZERO(smpte) && smpte.subframes) { + } else if (Timecode_IS_AROUND_ZERO(timecode) && timecode.subframes) { // We have a zero transition involving only subframes - smpte.subframes = subframes_per_frame - smpte.subframes; - smpte.negative = true; + timecode.subframes = subframes_per_frame - timecode.subframes; + timecode.negative = true; return SECONDS; } - switch ((int)ceil(smpte.rate)) { + switch ((int)ceil(timecode.rate)) { case 24: - if (smpte.frames == 0) { - smpte.frames = 23; + if (timecode.frames == 0) { + timecode.frames = 23; wrap = SECONDS; } break; case 25: - if (smpte.frames == 0) { - smpte.frames = 24; + if (timecode.frames == 0) { + timecode.frames = 24; wrap = SECONDS; } break; case 30: - if (smpte.drop) { - if ((smpte.minutes % 10) && (smpte.seconds == 0)) { - if (smpte.frames <= 2) { - smpte.frames = 29; + if (timecode.drop) { + if ((timecode.minutes % 10) && (timecode.seconds == 0)) { + if (timecode.frames <= 2) { + timecode.frames = 29; wrap = SECONDS; } - } else if (smpte.frames == 0) { - smpte.frames = 29; + } else if (timecode.frames == 0) { + timecode.frames = 29; wrap = SECONDS; } } else { - if (smpte.frames == 0) { - smpte.frames = 29; + if (timecode.frames == 0) { + timecode.frames = 29; wrap = SECONDS; } } break; case 60: - if (smpte.frames == 0) { - smpte.frames = 59; + if (timecode.frames == 0) { + timecode.frames = 59; wrap = SECONDS; } break; } if (wrap == SECONDS) { - if (smpte.seconds == 0) { - smpte.seconds = 59; + if (timecode.seconds == 0) { + timecode.seconds = 59; wrap = MINUTES; - if (smpte.minutes == 0) { - smpte.minutes = 59; + if (timecode.minutes == 0) { + timecode.minutes = 59; wrap = HOURS; - smpte.hours--; + timecode.hours--; } else { - smpte.minutes--; + timecode.minutes--; } } else { - smpte.seconds--; + timecode.seconds--; } } else { - smpte.frames--; + timecode.frames--; } - if (SMPTE_IS_ZERO( smpte )) { - smpte.negative = false; + if (Timecode_IS_ZERO( timecode )) { + timecode.negative = false; } return wrap; @@ -204,68 +204,68 @@ decrement( Time& smpte, uint32_t subframes_per_frame ) /** Go to lowest absolute subframe value in this frame (set to 0 :-) ) */ void -frames_floor( Time& smpte ) +frames_floor( Time& timecode ) { - smpte.subframes = 0; - if (SMPTE_IS_ZERO(smpte)) { - smpte.negative = false; + timecode.subframes = 0; + if (Timecode_IS_ZERO(timecode)) { + timecode.negative = false; } } -/** Increment @a smpte by one subframe */ +/** Increment @a timecode by one subframe */ Wrap -increment_subframes( Time& smpte, uint32_t subframes_per_frame ) +increment_subframes( Time& timecode, uint32_t subframes_per_frame ) { Wrap wrap = NONE; - if (smpte.negative) { - smpte.negative = false; - wrap = decrement_subframes( smpte, subframes_per_frame ); - if (!SMPTE_IS_ZERO(smpte)) { - smpte.negative = true; + if (timecode.negative) { + timecode.negative = false; + wrap = decrement_subframes( timecode, subframes_per_frame ); + if (!Timecode_IS_ZERO(timecode)) { + timecode.negative = true; } return wrap; } - smpte.subframes++; - if (smpte.subframes >= subframes_per_frame) { - smpte.subframes = 0; - increment( smpte, subframes_per_frame ); + timecode.subframes++; + if (timecode.subframes >= subframes_per_frame) { + timecode.subframes = 0; + increment( timecode, subframes_per_frame ); return FRAMES; } return NONE; } -/** Decrement @a smpte by one subframe */ +/** Decrement @a timecode by one subframe */ Wrap -decrement_subframes( Time& smpte, uint32_t subframes_per_frame ) +decrement_subframes( Time& timecode, uint32_t subframes_per_frame ) { Wrap wrap = NONE; - if (smpte.negative) { - smpte.negative = false; - wrap = increment_subframes( smpte, subframes_per_frame ); - smpte.negative = true; + if (timecode.negative) { + timecode.negative = false; + wrap = increment_subframes( timecode, subframes_per_frame ); + timecode.negative = true; return wrap; } - if (smpte.subframes <= 0) { - smpte.subframes = 0; - if (SMPTE_IS_ZERO(smpte)) { - smpte.negative = true; - smpte.subframes = 1; + if (timecode.subframes <= 0) { + timecode.subframes = 0; + if (Timecode_IS_ZERO(timecode)) { + timecode.negative = true; + timecode.subframes = 1; return FRAMES; } else { - decrement( smpte, subframes_per_frame ); - smpte.subframes = 79; + decrement( timecode, subframes_per_frame ); + timecode.subframes = 79; return FRAMES; } } else { - smpte.subframes--; - if (SMPTE_IS_ZERO(smpte)) { - smpte.negative = false; + timecode.subframes--; + if (Timecode_IS_ZERO(timecode)) { + timecode.negative = false; } return NONE; } @@ -274,40 +274,40 @@ decrement_subframes( Time& smpte, uint32_t subframes_per_frame ) /** Go to next whole second (frames == 0 or frames == 2) */ Wrap -increment_seconds( Time& smpte, uint32_t subframes_per_frame ) +increment_seconds( Time& timecode, uint32_t subframes_per_frame ) { Wrap wrap = NONE; // Clear subframes - frames_floor( smpte ); + frames_floor( timecode ); - if (smpte.negative) { + if (timecode.negative) { // Wrap second if on second boundary - wrap = increment(smpte, subframes_per_frame); + wrap = increment(timecode, subframes_per_frame); // Go to lowest absolute frame value - seconds_floor( smpte ); - if (SMPTE_IS_ZERO(smpte)) { - smpte.negative = false; + seconds_floor( timecode ); + if (Timecode_IS_ZERO(timecode)) { + timecode.negative = false; } } else { // Go to highest possible frame in this second - switch ((int)ceil(smpte.rate)) { + switch ((int)ceil(timecode.rate)) { case 24: - smpte.frames = 23; + timecode.frames = 23; break; case 25: - smpte.frames = 24; + timecode.frames = 24; break; case 30: - smpte.frames = 29; + timecode.frames = 29; break; case 60: - smpte.frames = 59; + timecode.frames = 59; break; } // Increment by one frame - wrap = increment( smpte, subframes_per_frame ); + wrap = increment( timecode, subframes_per_frame ); } return wrap; @@ -317,55 +317,55 @@ increment_seconds( Time& smpte, uint32_t subframes_per_frame ) /** Go to lowest (absolute) frame value in this second * Doesn't care about positive/negative */ void -seconds_floor( Time& smpte ) +seconds_floor( Time& timecode ) { // Clear subframes - frames_floor( smpte ); + frames_floor( timecode ); // Go to lowest possible frame in this second - switch ((int)ceil(smpte.rate)) { + switch ((int)ceil(timecode.rate)) { case 24: case 25: case 30: case 60: - if (!(smpte.drop)) { - smpte.frames = 0; + if (!(timecode.drop)) { + timecode.frames = 0; } else { - if ((smpte.minutes % 10) && (smpte.seconds == 0)) { - smpte.frames = 2; + if ((timecode.minutes % 10) && (timecode.seconds == 0)) { + timecode.frames = 2; } else { - smpte.frames = 0; + timecode.frames = 0; } } break; } - if (SMPTE_IS_ZERO(smpte)) { - smpte.negative = false; + if (Timecode_IS_ZERO(timecode)) { + timecode.negative = false; } } /** Go to next whole minute (seconds == 0, frames == 0 or frames == 2) */ Wrap -increment_minutes( Time& smpte, uint32_t subframes_per_frame ) +increment_minutes( Time& timecode, uint32_t subframes_per_frame ) { Wrap wrap = NONE; // Clear subframes - frames_floor( smpte ); + frames_floor( timecode ); - if (smpte.negative) { + if (timecode.negative) { // Wrap if on minute boundary - wrap = increment_seconds( smpte, subframes_per_frame ); + wrap = increment_seconds( timecode, subframes_per_frame ); // Go to lowest possible value in this minute - minutes_floor( smpte ); + minutes_floor( timecode ); } else { // Go to highest possible second - smpte.seconds = 59; + timecode.seconds = 59; // Wrap minute by incrementing second - wrap = increment_seconds( smpte, subframes_per_frame ); + wrap = increment_seconds( timecode, subframes_per_frame ); } return wrap; @@ -374,36 +374,36 @@ increment_minutes( Time& smpte, uint32_t subframes_per_frame ) /** Go to lowest absolute value in this minute */ void -minutes_floor( Time& smpte ) +minutes_floor( Time& timecode ) { // Go to lowest possible second - smpte.seconds = 0; + timecode.seconds = 0; // Go to lowest possible frame - seconds_floor( smpte ); + seconds_floor( timecode ); - if (SMPTE_IS_ZERO(smpte)) { - smpte.negative = false; + if (Timecode_IS_ZERO(timecode)) { + timecode.negative = false; } } /** Go to next whole hour (minute = 0, second = 0, frame = 0) */ Wrap -increment_hours( Time& smpte, uint32_t subframes_per_frame ) +increment_hours( Time& timecode, uint32_t subframes_per_frame ) { Wrap wrap = NONE; // Clear subframes - frames_floor(smpte); + frames_floor(timecode); - if (smpte.negative) { + if (timecode.negative) { // Wrap if on hour boundary - wrap = increment_minutes( smpte, subframes_per_frame ); + wrap = increment_minutes( timecode, subframes_per_frame ); // Go to lowest possible value in this hour - hours_floor( smpte ); + hours_floor( timecode ); } else { - smpte.minutes = 59; - wrap = increment_minutes( smpte, subframes_per_frame ); + timecode.minutes = 59; + wrap = increment_minutes( timecode, subframes_per_frame ); } return wrap; @@ -412,17 +412,17 @@ increment_hours( Time& smpte, uint32_t subframes_per_frame ) /** Go to lowest absolute value in this hour */ void -hours_floor( Time& smpte ) +hours_floor( Time& timecode ) { - smpte.minutes = 0; - smpte.seconds = 0; - smpte.frames = 0; - smpte.subframes = 0; + timecode.minutes = 0; + timecode.seconds = 0; + timecode.frames = 0; + timecode.subframes = 0; - if (SMPTE_IS_ZERO(smpte)) { - smpte.negative = false; + if (Timecode_IS_ZERO(timecode)) { + timecode.negative = false; } } -} // namespace SMPTE +} // namespace Timecode diff --git a/libs/surfaces/mackie/bcf_surface_generated.cc b/libs/surfaces/mackie/bcf_surface_generated.cc index f1d8d7ab7b..8d68313b7b 100644 --- a/libs/surfaces/mackie/bcf_surface_generated.cc +++ b/libs/surfaces/mackie/bcf_surface_generated.cc @@ -492,10 +492,10 @@ void Mackie::BcfSurface::init_controls() group->add( *button ); group = groups["display"]; - button = new Button ( 53, 1, "smpte_beats", *group ); + button = new Button ( 53, 1, "timecode_beats", *group ); buttons[0x35] = button; controls.push_back( button ); - controls_by_name["smpte_beats"] = button; + controls_by_name["timecode_beats"] = button; group->add( *button ); group = groups["none"]; @@ -903,10 +903,10 @@ void Mackie::BcfSurface::init_controls() group->add( *button ); group = groups["none"]; - led = new Led ( 113, 1, "smpte", *group ); + led = new Led ( 113, 1, "timecode", *group ); leds[0x71] = led; controls.push_back( led ); - controls_by_name["smpte"] = led; + controls_by_name["timecode"] = led; group->add( *led ); group = groups["none"]; @@ -1048,10 +1048,10 @@ void Mackie::BcfSurface::handle_button( MackieButtonHandler & mbh, ButtonState b } break; - case 0x9035: // smpte_beats + case 0x9035: // timecode_beats switch ( bs ) { - case press: ls = mbh.smpte_beats_press( button ); break; - case release: ls = mbh.smpte_beats_release( button ); break; + case press: ls = mbh.timecode_beats_press( button ); break; + case release: ls = mbh.timecode_beats_release( button ); break; case neither: break; } break; diff --git a/libs/surfaces/mackie/mackie_button_handler.cc b/libs/surfaces/mackie/mackie_button_handler.cc index 2db07beabd..04f2e8e20b 100644 --- a/libs/surfaces/mackie/mackie_button_handler.cc +++ b/libs/surfaces/mackie/mackie_button_handler.cc @@ -150,12 +150,12 @@ LedState MackieButtonHandler::name_value_release( Button & button ) return default_button_release( button ); } -LedState MackieButtonHandler::smpte_beats_press( Button & button ) +LedState MackieButtonHandler::timecode_beats_press( Button & button ) { return default_button_press( button ); } -LedState MackieButtonHandler::smpte_beats_release( Button & button ) +LedState MackieButtonHandler::timecode_beats_release( Button & button ) { return default_button_release( button ); } diff --git a/libs/surfaces/mackie/mackie_button_handler.h b/libs/surfaces/mackie/mackie_button_handler.h index 2e8bc649be..a41c7778cc 100644 --- a/libs/surfaces/mackie/mackie_button_handler.h +++ b/libs/surfaces/mackie/mackie_button_handler.h @@ -59,8 +59,8 @@ public: virtual LedState name_value_press( Button & ); virtual LedState name_value_release( Button & ); - virtual LedState smpte_beats_press( Button & ); - virtual LedState smpte_beats_release( Button & ); + virtual LedState timecode_beats_press( Button & ); + virtual LedState timecode_beats_release( Button & ); virtual LedState F1_press( Button & ); virtual LedState F1_release( Button & ); diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index cc33585b62..1a147b84bf 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -316,7 +316,7 @@ void MackieControlProtocol::switch_banks( int initial ) void MackieControlProtocol::zero_all() { - // TODO turn off SMPTE displays + // TODO turn off Timecode displays // zero all strips for ( Surface::Strips::iterator it = surface().strips.begin(); it != surface().strips.end(); ++it ) @@ -484,16 +484,16 @@ void MackieControlProtocol::update_led( Mackie::Button & button, Mackie::LedStat } } -void MackieControlProtocol::update_smpte_beats_led() +void MackieControlProtocol::update_timecode_beats_led() { switch ( _timecode_type ) { case ARDOUR::AnyTime::BBT: update_global_led( "beats", on ); - update_global_led( "smpte", off ); + update_global_led( "timecode", off ); break; - case ARDOUR::AnyTime::SMPTE: - update_global_led( "smpte", on ); + case ARDOUR::AnyTime::Timecode: + update_global_led( "timecode", on ); update_global_led( "beats", off ); break; default: @@ -557,7 +557,7 @@ void MackieControlProtocol::update_surface() // update global buttons and displays notify_record_state_changed(); notify_transport_state_changed(); - update_smpte_beats_led(); + update_timecode_beats_led(); } } @@ -1146,19 +1146,19 @@ string MackieControlProtocol::format_bbt_timecode( nframes_t now_frame ) return os.str(); } -string MackieControlProtocol::format_smpte_timecode( nframes_t now_frame ) +string MackieControlProtocol::format_timecode_timecode( nframes_t now_frame ) { - SMPTE::Time smpte; - session->smpte_time( now_frame, smpte ); + Timecode::Time timecode; + session->timecode_time( now_frame, timecode ); // According to the Logic docs // digits: 888/88/88/888 - // SMPTE mode: Hours/Minutes/Seconds/Frames + // Timecode mode: Hours/Minutes/Seconds/Frames ostringstream os; - os << setw(3) << setfill('0') << smpte.hours; - os << setw(2) << setfill('0') << smpte.minutes; - os << setw(2) << setfill('0') << smpte.seconds; - os << setw(3) << setfill('0') << smpte.frames; + os << setw(3) << setfill('0') << timecode.hours; + os << setw(2) << setfill('0') << timecode.minutes; + os << setw(2) << setfill('0') << timecode.seconds; + os << setw(3) << setfill('0') << timecode.frames; return os.str(); } @@ -1176,8 +1176,8 @@ void MackieControlProtocol::update_timecode_display() case ARDOUR::AnyTime::BBT: timecode = format_bbt_timecode( current_frame ); break; - case ARDOUR::AnyTime::SMPTE: - timecode = format_smpte_timecode( current_frame ); + case ARDOUR::AnyTime::Timecode: + timecode = format_timecode_timecode( current_frame ); break; default: ostringstream os; @@ -1712,14 +1712,14 @@ LedState MackieControlProtocol::save_release (Button &) return off; } -LedState MackieControlProtocol::smpte_beats_press (Button &) +LedState MackieControlProtocol::timecode_beats_press (Button &) { switch ( _timecode_type ) { case ARDOUR::AnyTime::BBT: - _timecode_type = ARDOUR::AnyTime::SMPTE; + _timecode_type = ARDOUR::AnyTime::Timecode; break; - case ARDOUR::AnyTime::SMPTE: + case ARDOUR::AnyTime::Timecode: _timecode_type = ARDOUR::AnyTime::BBT; break; default: @@ -1727,11 +1727,11 @@ LedState MackieControlProtocol::smpte_beats_press (Button &) os << "Unknown Anytime::Type " << _timecode_type; throw runtime_error( os.str() ); } - update_smpte_beats_led(); + update_timecode_beats_led(); return on; } -LedState MackieControlProtocol::smpte_beats_release( Button & ) +LedState MackieControlProtocol::timecode_beats_release( Button & ) { return off; } diff --git a/libs/surfaces/mackie/mackie_control_protocol.h b/libs/surfaces/mackie/mackie_control_protocol.h index 12aea1c0ae..b77be7d230 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.h +++ b/libs/surfaces/mackie/mackie_control_protocol.h @@ -121,9 +121,9 @@ class MackieControlProtocol void notify_parameter_changed( std::string const & ); void notify_solo_active_changed( bool ); - /// Turn smpte on and beats off, or vice versa, depending + /// Turn timecode on and beats off, or vice versa, depending /// on state of _timecode_type - void update_smpte_beats_led(); + void update_timecode_beats_led(); /// this is called to generate the midi to send in response to a button press. void update_led( Mackie::Button & button, Mackie::LedState ); @@ -197,8 +197,8 @@ class MackieControlProtocol virtual Mackie::LedState save_press( Mackie::Button & ); virtual Mackie::LedState save_release( Mackie::Button & ); - virtual Mackie::LedState smpte_beats_press( Mackie::Button & ); - virtual Mackie::LedState smpte_beats_release( Mackie::Button & ); + virtual Mackie::LedState timecode_beats_press( Mackie::Button & ); + virtual Mackie::LedState timecode_beats_release( Mackie::Button & ); // jog wheel states virtual Mackie::LedState zoom_press( Mackie::Button & ); @@ -295,7 +295,7 @@ class MackieControlProtocol void update_timecode_display(); std::string format_bbt_timecode( nframes_t now_frame ); - std::string format_smpte_timecode( nframes_t now_frame ); + std::string format_timecode_timecode( nframes_t now_frame ); /** notification that the port is about to start it's init sequence. @@ -365,7 +365,7 @@ class MackieControlProtocol // last written timecode string std::string _timecode_last; - // Which timecode are we displaying? BBT or SMPTE + // Which timecode are we displaying? BBT or Timecode ARDOUR::AnyTime::Type _timecode_type; }; diff --git a/libs/surfaces/mackie/mackie_surface_generated.cc b/libs/surfaces/mackie/mackie_surface_generated.cc index f284a05142..f991d2a972 100644 --- a/libs/surfaces/mackie/mackie_surface_generated.cc +++ b/libs/surfaces/mackie/mackie_surface_generated.cc @@ -538,10 +538,10 @@ void Mackie::MackieSurface::init_controls() group->add( *button ); group = groups["display"]; - button = new Button ( 53, 1, "smpte_beats", *group ); + button = new Button ( 53, 1, "timecode_beats", *group ); buttons[0x35] = button; controls.push_back( button ); - controls_by_name["smpte_beats"] = button; + controls_by_name["timecode_beats"] = button; group->add( *button ); group = groups["none"]; @@ -949,10 +949,10 @@ void Mackie::MackieSurface::init_controls() group->add( *button ); group = groups["none"]; - led = new Led ( 113, 1, "smpte", *group ); + led = new Led ( 113, 1, "timecode", *group ); leds[0x71] = led; controls.push_back( led ); - controls_by_name["smpte"] = led; + controls_by_name["timecode"] = led; group->add( *led ); group = groups["none"]; @@ -1094,10 +1094,10 @@ void Mackie::MackieSurface::handle_button( MackieButtonHandler & mbh, ButtonStat } break; - case 0x9035: // smpte_beats + case 0x9035: // timecode_beats switch ( bs ) { - case press: ls = mbh.smpte_beats_press( button ); break; - case release: ls = mbh.smpte_beats_release( button ); break; + case press: ls = mbh.timecode_beats_press( button ); break; + case release: ls = mbh.timecode_beats_release( button ); break; case neither: break; } break; diff --git a/libs/surfaces/tranzport/show.cc b/libs/surfaces/tranzport/show.cc index 30f4de3b57..2df6191ead 100644 --- a/libs/surfaces/tranzport/show.cc +++ b/libs/surfaces/tranzport/show.cc @@ -353,29 +353,29 @@ TranzportControlProtocol::show_transport_time () } void -TranzportControlProtocol::show_smpte (nframes_t where) +TranzportControlProtocol::show_timecode (nframes_t where) { if ((where != last_where) || lcd_isdamaged(1,9,10)) { char buf[5]; - SMPTE::Time smpte; + Timecode::Time timecode; - session->smpte_time (where, smpte); + session->timecode_time (where, timecode); - if (smpte.negative) { - sprintf (buf, "-%02" PRIu32 ":", smpte.hours); + if (timecode.negative) { + sprintf (buf, "-%02" PRIu32 ":", timecode.hours); } else { - sprintf (buf, " %02" PRIu32 ":", smpte.hours); + sprintf (buf, " %02" PRIu32 ":", timecode.hours); } print (1, 8, buf); - sprintf (buf, "%02" PRIu32 ":", smpte.minutes); + sprintf (buf, "%02" PRIu32 ":", timecode.minutes); print (1, 12, buf); - sprintf (buf, "%02" PRIu32 ":", smpte.seconds); + sprintf (buf, "%02" PRIu32 ":", timecode.seconds); print (1, 15, buf); - sprintf (buf, "%02" PRIu32, smpte.frames); + sprintf (buf, "%02" PRIu32, timecode.frames); print_noretry (1, 18, buf); last_where = where; diff --git a/libs/surfaces/tranzport/tranzport_control_protocol.h b/libs/surfaces/tranzport/tranzport_control_protocol.h index 929cca3e2b..6d231dd778 100644 --- a/libs/surfaces/tranzport/tranzport_control_protocol.h +++ b/libs/surfaces/tranzport/tranzport_control_protocol.h @@ -308,7 +308,7 @@ private: void show_track_gain (); void show_transport_time (); void show_bbt (nframes_t where); - void show_smpte (nframes_t where); + void show_timecode (nframes_t where); void show_wheel_mode (); void show_gain (); void show_pan (); |