ardour
Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
ARDOUR::MIDISceneChanger Class Reference

#include <midi_scene_changer.h>

Inheritance diagram for ARDOUR::MIDISceneChanger:
ARDOUR::SceneChanger ARDOUR::SessionHandleRef PBD::ScopedConnectionList

Public Member Functions

 MIDISceneChanger (Session &)
 
 ~MIDISceneChanger ()
 
void run (framepos_t start, framepos_t end)
 
void set_input_port (MIDI::Port *)
 
void set_output_port (boost::shared_ptr< MidiPort >)
 
uint8_t bank_at (framepos_t, uint8_t channel)
 
uint8_t program_at (framepos_t, uint8_t channel)
 
void set_recording (bool)
 
void locate (framepos_t)
 
- Public Member Functions inherited from ARDOUR::SceneChanger
 SceneChanger (Session &s)
 
virtual ~SceneChanger ()
 
- Public Member Functions inherited from ARDOUR::SessionHandleRef
 SessionHandleRef (ARDOUR::Session &s)
 
virtual ~SessionHandleRef ()
 
- Public Member Functions inherited from PBD::ScopedConnectionList
 ScopedConnectionList ()
 
virtual ~ScopedConnectionList ()
 
void add_connection (const UnscopedConnection &c)
 
void drop_connections ()
 

Public Attributes

PBD::Signal0< void > MIDIInputActivity
 
PBD::Signal0< void > MIDIOutputActivity
 

Private Types

typedef std::multimap
< framepos_t,
boost::shared_ptr
< MIDISceneChange > > 
Scenes
 

Private Member Functions

void gather (const Locations::LocationList &)
 
bool recording () const
 
void jump_to (int bank, int program)
 
void rt_deliver (MidiBuffer &, framepos_t, boost::shared_ptr< MIDISceneChange >)
 
void non_rt_deliver (boost::shared_ptr< MIDISceneChange >)
 
void bank_change_input (MIDI::Parser &, unsigned short, int channel)
 
void program_change_input (MIDI::Parser &, MIDI::byte, int channel)
 
void locations_changed ()
 

Private Attributes

MIDI::Port * input_port
 
boost::shared_ptr< MidiPortoutput_port
 
Glib::Threads::RWLock scene_lock
 
Scenes scenes
 
bool _recording
 
bool have_seen_bank_changes
 
framepos_t last_program_message_time
 
unsigned short current_bank
 
int last_delivered_program
 
int last_delivered_bank
 
PBD::ScopedConnectionList incoming_connections
 

Additional Inherited Members

- Protected Member Functions inherited from ARDOUR::SessionHandleRef
virtual void session_going_away ()
 
virtual void insanity_check ()
 
- Protected Attributes inherited from ARDOUR::SessionHandleRef
ARDOUR::Session_session
 

Detailed Description

Definition at line 32 of file midi_scene_changer.h.

Member Typedef Documentation

Definition at line 57 of file midi_scene_changer.h.

Constructor & Destructor Documentation

MIDISceneChanger::MIDISceneChanger ( Session s)

Definition at line 37 of file midi_scene_changer.cc.

MIDISceneChanger::~MIDISceneChanger ( )

Definition at line 55 of file midi_scene_changer.cc.

Member Function Documentation

uint8_t ARDOUR::MIDISceneChanger::bank_at ( framepos_t  ,
uint8_t  channel 
)
void MIDISceneChanger::bank_change_input ( MIDI::Parser &  ,
unsigned  short,
int  channel 
)
private

Definition at line 260 of file midi_scene_changer.cc.

void MIDISceneChanger::gather ( const Locations::LocationList locations)
private

Use the session's list of locations to collect all patch changes.

This is called whenever the locations change in anyway.

Definition at line 70 of file midi_scene_changer.cc.

void MIDISceneChanger::jump_to ( int  bank,
int  program 
)
private

Definition at line 341 of file midi_scene_changer.cc.

void MIDISceneChanger::locate ( framepos_t  pos)
virtual

Implements ARDOUR::SceneChanger.

Definition at line 182 of file midi_scene_changer.cc.

void MIDISceneChanger::locations_changed ( )
private

Definition at line 60 of file midi_scene_changer.cc.

void MIDISceneChanger::non_rt_deliver ( boost::shared_ptr< MIDISceneChange msc)
private

Definition at line 122 of file midi_scene_changer.cc.

uint8_t ARDOUR::MIDISceneChanger::program_at ( framepos_t  ,
uint8_t  channel 
)
void MIDISceneChanger::program_change_input ( MIDI::Parser &  parser,
MIDI::byte  program,
int  channel 
)
private

Definition at line 269 of file midi_scene_changer.cc.

bool MIDISceneChanger::recording ( ) const
private

Definition at line 254 of file midi_scene_changer.cc.

void MIDISceneChanger::rt_deliver ( MidiBuffer mbuf,
framepos_t  when,
boost::shared_ptr< MIDISceneChange msc 
)
private

Definition at line 97 of file midi_scene_changer.cc.

void MIDISceneChanger::run ( framepos_t  start,
framepos_t  end 
)
virtual

Implements ARDOUR::SceneChanger.

Definition at line 152 of file midi_scene_changer.cc.

void MIDISceneChanger::set_input_port ( MIDI::Port *  mp)

Definition at line 221 of file midi_scene_changer.cc.

void MIDISceneChanger::set_output_port ( boost::shared_ptr< MidiPort mp)

Definition at line 242 of file midi_scene_changer.cc.

void MIDISceneChanger::set_recording ( bool  yn)

Definition at line 248 of file midi_scene_changer.cc.

Member Data Documentation

bool ARDOUR::MIDISceneChanger::_recording
private

Definition at line 63 of file midi_scene_changer.h.

unsigned short ARDOUR::MIDISceneChanger::current_bank
private

Definition at line 66 of file midi_scene_changer.h.

bool ARDOUR::MIDISceneChanger::have_seen_bank_changes
private

Definition at line 64 of file midi_scene_changer.h.

PBD::ScopedConnectionList ARDOUR::MIDISceneChanger::incoming_connections
private

Definition at line 80 of file midi_scene_changer.h.

MIDI::Port* ARDOUR::MIDISceneChanger::input_port
private

Definition at line 59 of file midi_scene_changer.h.

int ARDOUR::MIDISceneChanger::last_delivered_bank
private

Definition at line 68 of file midi_scene_changer.h.

int ARDOUR::MIDISceneChanger::last_delivered_program
private

Definition at line 67 of file midi_scene_changer.h.

framepos_t ARDOUR::MIDISceneChanger::last_program_message_time
private

Definition at line 65 of file midi_scene_changer.h.

PBD::Signal0<void> ARDOUR::MIDISceneChanger::MIDIInputActivity

Signal emitted whenever any relevant MIDI input is detected.

Definition at line 50 of file midi_scene_changer.h.

PBD::Signal0<void> ARDOUR::MIDISceneChanger::MIDIOutputActivity

Signal emitted whenever any relevant MIDI output is sent.

Definition at line 54 of file midi_scene_changer.h.

boost::shared_ptr<MidiPort> ARDOUR::MIDISceneChanger::output_port
private

Definition at line 60 of file midi_scene_changer.h.

Glib::Threads::RWLock ARDOUR::MIDISceneChanger::scene_lock
private

Definition at line 61 of file midi_scene_changer.h.

Scenes ARDOUR::MIDISceneChanger::scenes
private

Definition at line 62 of file midi_scene_changer.h.


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