Ardour  9.0-pre0-380-gbbdb6b0e63
ArdourSurface::US2400::Surface Class Reference

#include <surface.h>

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

Public Types

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 (US2400Protocol &, 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
 
US2400::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 US2400Protocol::zero_all to turn things off More...
 
void zero_controls ()
 
void blank_jog_ring ()
 
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 subview_mode_changed ()
 
US2400Protocolmcp () const
 
void next_jog_mode ()
 
void set_jog_mode (US2400::JogWheel::Mode)
 
void notify_metering_state_changed ()
 
void turn_it_on ()
 
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)
 
- 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 ()
 

Private Attributes

US2400Protocol_mcp
 
SurfacePort_port
 
surface_type_t _stype
 
uint32_t _number
 
std::string _name
 
bool _active
 
bool _connected
 
US2400::JogWheel_jog_wheel
 
Fader_master_fader
 
float _last_master_gain_written
 
PBD::ScopedConnection master_connection
 
bool _joystick_active
 
int connection_state
 

Detailed Description

Definition at line 66 of file us2400/surface.h.

Member Typedef Documentation

◆ Controls

Definition at line 80 of file us2400/surface.h.

◆ Groups

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

This collection owns the groups.

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

◆ Strips

The collection of all numbered strips.

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

Member Enumeration Documentation

◆ ConnectionState

Enumerator
InputConnected 
OutputConnected 

Definition at line 208 of file us2400/surface.h.

Constructor & Destructor Documentation

◆ Surface()

ArdourSurface::US2400::Surface::Surface ( US2400Protocol ,
const std::string &  name,
uint32_t  number,
surface_type_t  stype 
)

◆ ~Surface()

virtual ArdourSurface::US2400::Surface::~Surface ( )
virtual

Member Function Documentation

◆ active()

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

Definition at line 78 of file us2400/surface.h.

◆ blank_jog_ring()

void ArdourSurface::US2400::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.

◆ connect_to_signals()

void ArdourSurface::US2400::Surface::connect_to_signals ( )

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

◆ connected()

void ArdourSurface::US2400::Surface::connected ( )

◆ connection_handler()

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

◆ display_bank_start()

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

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

◆ get_state()

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

◆ handle_midi_controller_message()

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

◆ handle_midi_note_on_message()

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

◆ handle_midi_pitchbend_message()

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

◆ handle_midi_sysex()

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

◆ host_connection_confirmation()

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

◆ host_connection_query()

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

◆ hui_heartbeat()

void ArdourSurface::US2400::Surface::hui_heartbeat ( )

◆ init_controls()

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

◆ init_strips()

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

◆ jog_wheel()

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

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

◆ map_stripables()

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

◆ master_fader()

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

Definition at line 91 of file us2400/surface.h.

◆ master_gain_changed()

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

◆ master_monitor_may_have_changed()

void ArdourSurface::US2400::Surface::master_monitor_may_have_changed ( )

◆ mcp()

US2400Protocol& ArdourSurface::US2400::Surface::mcp ( ) const
inline

Definition at line 169 of file us2400/surface.h.

◆ n_strips()

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

◆ name()

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

Definition at line 74 of file us2400/surface.h.

◆ next_jog_mode()

void ArdourSurface::US2400::Surface::next_jog_mode ( )

◆ notify_metering_state_changed()

void ArdourSurface::US2400::Surface::notify_metering_state_changed ( )

◆ nth_strip()

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

◆ number()

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

Definition at line 73 of file us2400/surface.h.

◆ periodic()

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

◆ port()

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

Definition at line 107 of file us2400/surface.h.

◆ recalibrate_faders()

void ArdourSurface::US2400::Surface::recalibrate_faders ( )

◆ redisplay()

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

◆ reset()

void ArdourSurface::US2400::Surface::reset ( )

sends MCP "reset" message to surface

◆ say_hello()

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

◆ scaled_delta()

float ArdourSurface::US2400::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::US2400::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::US2400::Surface::set_jog_mode ( US2400::JogWheel::Mode  )

◆ set_state()

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

◆ set_touch_sensitivity()

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

◆ setup_master()

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

◆ stripable_is_locked_to_strip()

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

◆ stripable_is_mapped()

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

◆ subview_mode_changed()

void ArdourSurface::US2400::Surface::subview_mode_changed ( )

◆ sysex_hdr()

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

◆ toggle_backlight()

void ArdourSurface::US2400::Surface::toggle_backlight ( )

◆ turn_it_on()

void ArdourSurface::US2400::Surface::turn_it_on ( )

◆ type()

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

Definition at line 72 of file us2400/surface.h.

◆ update_strip_selection()

void ArdourSurface::US2400::Surface::update_strip_selection ( )

◆ write()

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

proxy write for port

◆ write_sysex() [1/2]

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

write a sysex message

◆ write_sysex() [2/2]

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

◆ zero_all()

void ArdourSurface::US2400::Surface::zero_all ( )

called from US2400Protocol::zero_all to turn things off

◆ zero_controls()

void ArdourSurface::US2400::Surface::zero_controls ( )

Member Data Documentation

◆ _active

bool ArdourSurface::US2400::Surface::_active
private

Definition at line 190 of file us2400/surface.h.

◆ _connected

bool ArdourSurface::US2400::Surface::_connected
private

Definition at line 191 of file us2400/surface.h.

◆ _jog_wheel

US2400::JogWheel* ArdourSurface::US2400::Surface::_jog_wheel
private

Definition at line 192 of file us2400/surface.h.

◆ _joystick_active

bool ArdourSurface::US2400::Surface::_joystick_active
private

Definition at line 196 of file us2400/surface.h.

◆ _last_master_gain_written

float ArdourSurface::US2400::Surface::_last_master_gain_written
private

Definition at line 194 of file us2400/surface.h.

◆ _master_fader

Fader* ArdourSurface::US2400::Surface::_master_fader
private

Definition at line 193 of file us2400/surface.h.

◆ _mcp

US2400Protocol& ArdourSurface::US2400::Surface::_mcp
private

Definition at line 185 of file us2400/surface.h.

◆ _name

std::string ArdourSurface::US2400::Surface::_name
private

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

◆ _number

uint32_t ArdourSurface::US2400::Surface::_number
private

Definition at line 188 of file us2400/surface.h.

◆ _port

SurfacePort* ArdourSurface::US2400::Surface::_port
private

Definition at line 186 of file us2400/surface.h.

◆ _stype

surface_type_t ArdourSurface::US2400::Surface::_stype
private

Definition at line 187 of file us2400/surface.h.

◆ buttons

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

Definition at line 85 of file us2400/surface.h.

◆ connection_state

int ArdourSurface::US2400::Surface::connection_state
private

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

◆ controls

Controls ArdourSurface::US2400::Surface::controls

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

◆ controls_by_device_independent_id

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

Definition at line 88 of file us2400/surface.h.

◆ faders

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

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

◆ groups

Groups ArdourSurface::US2400::Surface::groups

Definition at line 105 of file us2400/surface.h.

◆ input_source

GSource* ArdourSurface::US2400::Surface::input_source

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

◆ leds

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

Definition at line 86 of file us2400/surface.h.

◆ master_connection

PBD::ScopedConnection ArdourSurface::US2400::Surface::master_connection
private

Definition at line 195 of file us2400/surface.h.

◆ meters

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

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

◆ pots

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

Definition at line 84 of file us2400/surface.h.

◆ strips

Strips ArdourSurface::US2400::Surface::strips

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


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