Ardour  9.0-pre0-582-g084a23a80d
ArdourSurface::NS_MCU::Surface Class Reference

#include <surface.h>

Inheritance diagram for ArdourSurface::NS_MCU::Surface:
[legend]

Public Types

enum  XTouchColors {
  Off , Red , Green , Yellow ,
  Blue , Purple , Cyan , White
}
 
typedef std::vector< Control * > Controls
 
typedef std::vector< Strip * > Strips
 The collection of all numbered strips. More...
 
typedef std::map< std::string, Group * > Groups
 This collection owns the groups. More...
 

Public Member Functions

 Surface (MackieControlProtocol &, const std::string &name, uint32_t number, surface_type_t stype)
 
virtual ~Surface ()
 
surface_type_t type () const
 
uint32_t number () const
 
const std::string & name ()
 
void connected ()
 
bool active () const
 
NS_MCU ::JogWheeljog_wheel () const
 
Fadermaster_fader () const
 
uint32_t n_strips (bool with_locked_strips=true) const
 
Stripnth_strip (uint32_t n) const
 
bool stripable_is_locked_to_strip (std::shared_ptr< ARDOUR::Stripable >) const
 
bool stripable_is_mapped (std::shared_ptr< ARDOUR::Stripable >) const
 
SurfacePortport () const
 
void map_stripables (const std::vector< std::shared_ptr< ARDOUR::Stripable > > &)
 
void update_strip_selection ()
 
const MidiByteArraysysex_hdr () const
 
void periodic (PBD::microseconds_t now_usecs)
 
void redisplay (PBD::microseconds_t now_usecs, bool force)
 
void hui_heartbeat ()
 
void handle_midi_pitchbend_message (MIDI::Parser &, MIDI::pitchbend_t, uint32_t channel_id)
 
void handle_midi_controller_message (MIDI::Parser &, MIDI::EventTwoBytes *)
 
void handle_midi_note_on_message (MIDI::Parser &, MIDI::EventTwoBytes *)
 
void connect_to_signals ()
 
void write_sysex (const MidiByteArray &mba)
 write a sysex message More...
 
void write_sysex (MIDI::byte msg)
 
void write (const MidiByteArray &)
 proxy write for port More...
 
void display_bank_start (uint32_t)
 display an indicator of the first switched-in Route. Do nothing by default. More...
 
void zero_all ()
 called from MackieControlProtocol::zero_all to turn things off More...
 
void zero_controls ()
 
void blank_jog_ring ()
 
void display_timecode (const std::string &, const std::string &)
 
void reset ()
 sends MCP "reset" message to surface More...
 
void recalibrate_faders ()
 
void toggle_backlight ()
 
void set_touch_sensitivity (int)
 
float scrub_scaling_factor () const
 
float scaled_delta (float delta, float current_speed)
 
void show_two_char_display (const std::string &msg, const std::string &dots=" ")
 
void show_two_char_display (unsigned int value, const std::string &dots=" ")
 
void update_view_mode_display (bool with_helpful_text)
 
void update_flip_mode_display ()
 
void subview_mode_changed ()
 
MackieControlProtocolmcp () const
 
void next_jog_mode ()
 
void set_jog_mode (NS_MCU ::JogWheel::Mode)
 
void notify_metering_state_changed ()
 
void turn_it_on ()
 
void display_message_for (std::string const &msg, uint64_t msecs)
 
bool connection_handler (std::weak_ptr< ARDOUR::Port >, std::string name1, std::weak_ptr< ARDOUR::Port >, std::string name2, bool)
 
void master_monitor_may_have_changed ()
 
XMLNodeget_state () const
 
int set_state (const XMLNode &, int version)
 
bool get_qcon_flag ()
 
void toggle_master_monitor ()
 
bool master_stripable_is_master_monitor ()
 
- Public Member Functions inherited from PBD::ScopedConnectionList
 ScopedConnectionList ()
 
 ScopedConnectionList (const ScopedConnectionList &)=delete
 
ScopedConnectionListoperator= (const ScopedConnectionList &)=delete
 
virtual ~ScopedConnectionList ()
 
void add_connection (const UnscopedConnection &c)
 
void drop_connections ()
 

Public Attributes

Controls controls
 
std::map< int, Fader * > faders
 
std::map< int, Pot * > pots
 
std::map< int, Button * > buttons
 
std::map< int, Led * > leds
 
std::map< int, Meter * > meters
 
std::map< int, Control * > controls_by_device_independent_id
 
Strips strips
 
Groups groups
 
GSource * input_source
 

Private Types

enum  ConnectionState { InputConnected = 0x1 , OutputConnected = 0x2 }
 

Private Member Functions

void handle_midi_sysex (MIDI::Parser &, MIDI::byte *, size_t count)
 
MidiByteArray host_connection_query (MidiByteArray &bytes)
 
MidiByteArray host_connection_confirmation (const MidiByteArray &bytes)
 
void say_hello ()
 
void init_controls ()
 
void init_strips (uint32_t n)
 
void setup_master ()
 
void master_gain_changed ()
 
void master_property_changed (const PBD::PropertyChange &)
 
void master_meter_changed ()
 
void show_master_name ()
 
MidiByteArray master_display (uint32_t line_number, const std::string &)
 
MidiByteArray blank_master_display (uint32_t line_number)
 
MidiByteArray display_line (std::string const &msg, int line_num)
 
MidiByteArray display_colors_on_xtouch (const XTouchColors color_values[]) const
 
uint8_t convert_color_to_xtouch_value (uint32_t color) const
 

Private Attributes

MackieControlProtocol_mcp
 
SurfacePort_port
 
surface_type_t _stype
 
uint32_t _number
 
std::string _name
 
bool _active
 
bool _connected
 
NS_MCU ::JogWheel_jog_wheel
 
Fader_master_fader
 
float _last_master_gain_written
 
PBD::ScopedConnection master_connection
 
bool _has_master_display
 
bool _has_master_meter
 
std::shared_ptr< ARDOUR::Stripable_master_stripable
 
std::string pending_display [2]
 
std::string current_display [2]
 
int connection_state
 
bool is_qcon
 

Detailed Description

Definition at line 64 of file mackie/surface.h.

Member Typedef Documentation

◆ Controls

Definition at line 89 of file mackie/surface.h.

◆ Groups

typedef std::map<std::string,Group*> ArdourSurface::NS_MCU::Surface::Groups

This collection owns the groups.

Definition at line 113 of file mackie/surface.h.

◆ Strips

The collection of all numbered strips.

Definition at line 103 of file mackie/surface.h.

Member Enumeration Documentation

◆ ConnectionState

Enumerator
InputConnected 
OutputConnected 

Definition at line 245 of file mackie/surface.h.

◆ XTouchColors

Enumerator
Off 
Red 
Green 
Yellow 
Blue 
Purple 
Cyan 
White 

Definition at line 67 of file mackie/surface.h.

Constructor & Destructor Documentation

◆ Surface()

ArdourSurface::NS_MCU::Surface::Surface ( MackieControlProtocol ,
const std::string &  name,
uint32_t  number,
surface_type_t  stype 
)

◆ ~Surface()

virtual ArdourSurface::NS_MCU::Surface::~Surface ( )
virtual

Member Function Documentation

◆ active()

bool ArdourSurface::NS_MCU::Surface::active ( ) const
inline

Definition at line 87 of file mackie/surface.h.

◆ blank_jog_ring()

void ArdourSurface::NS_MCU::Surface::blank_jog_ring ( )

turn off leds around the jog wheel. This is for surfaces that use a pot pretending to be a jog wheel.

◆ blank_master_display()

MidiByteArray ArdourSurface::NS_MCU::Surface::blank_master_display ( uint32_t  line_number)
private

◆ connect_to_signals()

void ArdourSurface::NS_MCU::Surface::connect_to_signals ( )

Connect the any signal from the parser to handle_midi_any unless it's already connected

◆ connected()

void ArdourSurface::NS_MCU::Surface::connected ( )

◆ connection_handler()

bool ArdourSurface::NS_MCU::Surface::connection_handler ( std::weak_ptr< ARDOUR::Port ,
std::string  name1,
std::weak_ptr< ARDOUR::Port ,
std::string  name2,
bool   
)

◆ convert_color_to_xtouch_value()

uint8_t ArdourSurface::NS_MCU::Surface::convert_color_to_xtouch_value ( uint32_t  color) const
private

◆ display_bank_start()

void ArdourSurface::NS_MCU::Surface::display_bank_start ( uint32_t  )

display an indicator of the first switched-in Route. Do nothing by default.

◆ display_colors_on_xtouch()

MidiByteArray ArdourSurface::NS_MCU::Surface::display_colors_on_xtouch ( const XTouchColors  color_values[]) const
private

◆ display_line()

MidiByteArray ArdourSurface::NS_MCU::Surface::display_line ( std::string const &  msg,
int  line_num 
)
private

◆ display_message_for()

void ArdourSurface::NS_MCU::Surface::display_message_for ( std::string const &  msg,
uint64_t  msecs 
)

◆ display_timecode()

void ArdourSurface::NS_MCU::Surface::display_timecode ( const std::string &  ,
const std::string &   
)

◆ get_qcon_flag()

bool ArdourSurface::NS_MCU::Surface::get_qcon_flag ( )
inline

Definition at line 206 of file mackie/surface.h.

◆ get_state()

XMLNode& ArdourSurface::NS_MCU::Surface::get_state ( ) const

◆ handle_midi_controller_message()

void ArdourSurface::NS_MCU::Surface::handle_midi_controller_message ( MIDI::Parser ,
MIDI::EventTwoBytes  
)

◆ handle_midi_note_on_message()

void ArdourSurface::NS_MCU::Surface::handle_midi_note_on_message ( MIDI::Parser ,
MIDI::EventTwoBytes  
)

◆ handle_midi_pitchbend_message()

void ArdourSurface::NS_MCU::Surface::handle_midi_pitchbend_message ( MIDI::Parser ,
MIDI::pitchbend_t  ,
uint32_t  channel_id 
)

◆ handle_midi_sysex()

void ArdourSurface::NS_MCU::Surface::handle_midi_sysex ( MIDI::Parser ,
MIDI::byte ,
size_t  count 
)
private

◆ host_connection_confirmation()

MidiByteArray ArdourSurface::NS_MCU::Surface::host_connection_confirmation ( const MidiByteArray bytes)
private

◆ host_connection_query()

MidiByteArray ArdourSurface::NS_MCU::Surface::host_connection_query ( MidiByteArray bytes)
private

◆ hui_heartbeat()

void ArdourSurface::NS_MCU::Surface::hui_heartbeat ( )

◆ init_controls()

void ArdourSurface::NS_MCU::Surface::init_controls ( )
private

◆ init_strips()

void ArdourSurface::NS_MCU::Surface::init_strips ( uint32_t  n)
private

◆ jog_wheel()

NS_MCU ::JogWheel* ArdourSurface::NS_MCU::Surface::jog_wheel ( ) const
inline

Definition at line 99 of file mackie/surface.h.

◆ map_stripables()

void ArdourSurface::NS_MCU::Surface::map_stripables ( const std::vector< std::shared_ptr< ARDOUR::Stripable > > &  )

◆ master_display()

MidiByteArray ArdourSurface::NS_MCU::Surface::master_display ( uint32_t  line_number,
const std::string &   
)
private

◆ master_fader()

Fader* ArdourSurface::NS_MCU::Surface::master_fader ( ) const
inline

Definition at line 100 of file mackie/surface.h.

◆ master_gain_changed()

void ArdourSurface::NS_MCU::Surface::master_gain_changed ( )
private

◆ master_meter_changed()

void ArdourSurface::NS_MCU::Surface::master_meter_changed ( )
private

◆ master_monitor_may_have_changed()

void ArdourSurface::NS_MCU::Surface::master_monitor_may_have_changed ( )

◆ master_property_changed()

void ArdourSurface::NS_MCU::Surface::master_property_changed ( const PBD::PropertyChange )
private

◆ master_stripable_is_master_monitor()

bool ArdourSurface::NS_MCU::Surface::master_stripable_is_master_monitor ( )

◆ mcp()

MackieControlProtocol& ArdourSurface::NS_MCU::Surface::mcp ( ) const
inline

Definition at line 189 of file mackie/surface.h.

◆ n_strips()

uint32_t ArdourSurface::NS_MCU::Surface::n_strips ( bool  with_locked_strips = true) const

◆ name()

const std::string& ArdourSurface::NS_MCU::Surface::name ( )
inline

Definition at line 83 of file mackie/surface.h.

◆ next_jog_mode()

void ArdourSurface::NS_MCU::Surface::next_jog_mode ( )

◆ notify_metering_state_changed()

void ArdourSurface::NS_MCU::Surface::notify_metering_state_changed ( )

◆ nth_strip()

Strip* ArdourSurface::NS_MCU::Surface::nth_strip ( uint32_t  n) const

◆ number()

uint32_t ArdourSurface::NS_MCU::Surface::number ( ) const
inline

Definition at line 82 of file mackie/surface.h.

◆ periodic()

void ArdourSurface::NS_MCU::Surface::periodic ( PBD::microseconds_t  now_usecs)

◆ port()

SurfacePort& ArdourSurface::NS_MCU::Surface::port ( ) const
inline

Definition at line 116 of file mackie/surface.h.

◆ recalibrate_faders()

void ArdourSurface::NS_MCU::Surface::recalibrate_faders ( )

◆ redisplay()

void ArdourSurface::NS_MCU::Surface::redisplay ( PBD::microseconds_t  now_usecs,
bool  force 
)

◆ reset()

void ArdourSurface::NS_MCU::Surface::reset ( )

sends MCP "reset" message to surface

◆ say_hello()

void ArdourSurface::NS_MCU::Surface::say_hello ( )
private

◆ scaled_delta()

float ArdourSurface::NS_MCU::Surface::scaled_delta ( float  delta,
float  current_speed 
)

The scaling factor function for speed increase and decrease. At low transport speeds this should return a small value, for high transport speeds, this should return an exponentially larger value. This provides high definition control at low speeds and quick speed changes to/from higher speeds.

◆ scrub_scaling_factor()

float ArdourSurface::NS_MCU::Surface::scrub_scaling_factor ( ) const

This is used to calculate the clicks per second that define a transport speed of 1.0 for the jog wheel. 100.0 is 10 clicks per second, 50.5 is 5 clicks per second.

◆ set_jog_mode()

void ArdourSurface::NS_MCU::Surface::set_jog_mode ( NS_MCU ::JogWheel::Mode  )

◆ set_state()

int ArdourSurface::NS_MCU::Surface::set_state ( const XMLNode ,
int  version 
)

◆ set_touch_sensitivity()

void ArdourSurface::NS_MCU::Surface::set_touch_sensitivity ( int  )

◆ setup_master()

void ArdourSurface::NS_MCU::Surface::setup_master ( )
private

◆ show_master_name()

void ArdourSurface::NS_MCU::Surface::show_master_name ( )
private

◆ show_two_char_display() [1/2]

void ArdourSurface::NS_MCU::Surface::show_two_char_display ( const std::string &  msg,
const std::string &  dots = "  " 
)

◆ show_two_char_display() [2/2]

void ArdourSurface::NS_MCU::Surface::show_two_char_display ( unsigned int  value,
const std::string &  dots = "  " 
)

◆ stripable_is_locked_to_strip()

bool ArdourSurface::NS_MCU::Surface::stripable_is_locked_to_strip ( std::shared_ptr< ARDOUR::Stripable ) const

◆ stripable_is_mapped()

bool ArdourSurface::NS_MCU::Surface::stripable_is_mapped ( std::shared_ptr< ARDOUR::Stripable ) const

◆ subview_mode_changed()

void ArdourSurface::NS_MCU::Surface::subview_mode_changed ( )

◆ sysex_hdr()

const MidiByteArray& ArdourSurface::NS_MCU::Surface::sysex_hdr ( ) const

◆ toggle_backlight()

void ArdourSurface::NS_MCU::Surface::toggle_backlight ( )

◆ toggle_master_monitor()

void ArdourSurface::NS_MCU::Surface::toggle_master_monitor ( )

◆ turn_it_on()

void ArdourSurface::NS_MCU::Surface::turn_it_on ( )

◆ type()

surface_type_t ArdourSurface::NS_MCU::Surface::type ( ) const
inline

Definition at line 81 of file mackie/surface.h.

◆ update_flip_mode_display()

void ArdourSurface::NS_MCU::Surface::update_flip_mode_display ( )

◆ update_strip_selection()

void ArdourSurface::NS_MCU::Surface::update_strip_selection ( )

◆ update_view_mode_display()

void ArdourSurface::NS_MCU::Surface::update_view_mode_display ( bool  with_helpful_text)

◆ write()

void ArdourSurface::NS_MCU::Surface::write ( const MidiByteArray )

proxy write for port

◆ write_sysex() [1/2]

void ArdourSurface::NS_MCU::Surface::write_sysex ( const MidiByteArray mba)

write a sysex message

◆ write_sysex() [2/2]

void ArdourSurface::NS_MCU::Surface::write_sysex ( MIDI::byte  msg)

◆ zero_all()

void ArdourSurface::NS_MCU::Surface::zero_all ( )

called from MackieControlProtocol::zero_all to turn things off

◆ zero_controls()

void ArdourSurface::NS_MCU::Surface::zero_controls ( )

Member Data Documentation

◆ _active

bool ArdourSurface::NS_MCU::Surface::_active
private

Definition at line 217 of file mackie/surface.h.

◆ _connected

bool ArdourSurface::NS_MCU::Surface::_connected
private

Definition at line 218 of file mackie/surface.h.

◆ _has_master_display

bool ArdourSurface::NS_MCU::Surface::_has_master_display
private

Definition at line 223 of file mackie/surface.h.

◆ _has_master_meter

bool ArdourSurface::NS_MCU::Surface::_has_master_meter
private

Definition at line 224 of file mackie/surface.h.

◆ _jog_wheel

NS_MCU ::JogWheel* ArdourSurface::NS_MCU::Surface::_jog_wheel
private

Definition at line 219 of file mackie/surface.h.

◆ _last_master_gain_written

float ArdourSurface::NS_MCU::Surface::_last_master_gain_written
private

Definition at line 221 of file mackie/surface.h.

◆ _master_fader

Fader* ArdourSurface::NS_MCU::Surface::_master_fader
private

Definition at line 220 of file mackie/surface.h.

◆ _master_stripable

std::shared_ptr<ARDOUR::Stripable> ArdourSurface::NS_MCU::Surface::_master_stripable
private

Definition at line 225 of file mackie/surface.h.

◆ _mcp

MackieControlProtocol& ArdourSurface::NS_MCU::Surface::_mcp
private

Definition at line 212 of file mackie/surface.h.

◆ _name

std::string ArdourSurface::NS_MCU::Surface::_name
private

Definition at line 216 of file mackie/surface.h.

◆ _number

uint32_t ArdourSurface::NS_MCU::Surface::_number
private

Definition at line 215 of file mackie/surface.h.

◆ _port

SurfacePort* ArdourSurface::NS_MCU::Surface::_port
private

Definition at line 213 of file mackie/surface.h.

◆ _stype

surface_type_t ArdourSurface::NS_MCU::Surface::_stype
private

Definition at line 214 of file mackie/surface.h.

◆ buttons

std::map<int,Button*> ArdourSurface::NS_MCU::Surface::buttons

Definition at line 94 of file mackie/surface.h.

◆ connection_state

int ArdourSurface::NS_MCU::Surface::connection_state
private

Definition at line 250 of file mackie/surface.h.

◆ controls

Controls ArdourSurface::NS_MCU::Surface::controls

Definition at line 90 of file mackie/surface.h.

◆ controls_by_device_independent_id

std::map<int,Control*> ArdourSurface::NS_MCU::Surface::controls_by_device_independent_id

Definition at line 97 of file mackie/surface.h.

◆ current_display

std::string ArdourSurface::NS_MCU::Surface::current_display[2]
private

Definition at line 228 of file mackie/surface.h.

◆ faders

std::map<int,Fader*> ArdourSurface::NS_MCU::Surface::faders

Definition at line 92 of file mackie/surface.h.

◆ groups

Groups ArdourSurface::NS_MCU::Surface::groups

Definition at line 114 of file mackie/surface.h.

◆ input_source

GSource* ArdourSurface::NS_MCU::Surface::input_source

Definition at line 261 of file mackie/surface.h.

◆ is_qcon

bool ArdourSurface::NS_MCU::Surface::is_qcon
private

Definition at line 253 of file mackie/surface.h.

◆ leds

std::map<int,Led*> ArdourSurface::NS_MCU::Surface::leds

Definition at line 95 of file mackie/surface.h.

◆ master_connection

PBD::ScopedConnection ArdourSurface::NS_MCU::Surface::master_connection
private

Definition at line 222 of file mackie/surface.h.

◆ meters

std::map<int,Meter*> ArdourSurface::NS_MCU::Surface::meters

Definition at line 96 of file mackie/surface.h.

◆ pending_display

std::string ArdourSurface::NS_MCU::Surface::pending_display[2]
private

Definition at line 227 of file mackie/surface.h.

◆ pots

std::map<int,Pot*> ArdourSurface::NS_MCU::Surface::pots

Definition at line 93 of file mackie/surface.h.

◆ strips

Strips ArdourSurface::NS_MCU::Surface::strips

Definition at line 104 of file mackie/surface.h.


The documentation for this class was generated from the following file: