Class: MusaLCEServer::Live::Live
Overview
Transport controls (play, stop, etc.) are not implemented for Live as the MIDI Remote Script API doesn't support them.
DAW controller for Ableton Live.
Implements the Daw interface for Ableton Live, providing track management and MIDI routing through the MusaLCE for Live MIDI Remote Script.
Instance Method Summary collapse
- #daw_initialize(midi_devices:, clock:, osc_server:, osc_client:, logger:) ⇒ Object private
-
#midi_sync(midi_device_name, manufacturer: nil, model: nil, name: nil) ⇒ void
Sets the MIDI device to use for clock synchronization.
-
#track(name, all: false) ⇒ Track+
Retrieves track(s) by name.
Constructor Details
This class inherits a constructor from MusaLCEServer::Daw
Instance Method Details
#daw_initialize(midi_devices:, clock:, osc_server:, osc_client:, logger:) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
28 29 30 31 32 33 34 35 36 |
# File 'lib/live/live.rb', line 28 def daw_initialize(midi_devices:, clock:, osc_server:, osc_client:, logger:) super tracks = Tracks.new(midi_devices, logger: logger) handler = Handler.new(osc_server, osc_client, tracks, logger: logger) logger.info('Loaded Ableton Live driver') return tracks, handler end |
#midi_sync(midi_device_name, manufacturer: nil, model: nil, name: nil) ⇒ void
This method returns an undefined value.
Sets the MIDI device to use for clock synchronization.
63 64 65 66 67 68 69 70 71 |
# File 'lib/live/live.rb', line 63 def midi_sync(midi_device_name, manufacturer: nil, model: nil, name: nil) name ||= midi_device_name @clock.input = MIDICommunications::Input.all.find do |_| (_.manufacturer == manufacturer || manufacturer.nil?) && (_.model == model || model.nil?) && (_.name == name || name.nil?) end end |
#track(name, all: false) ⇒ Track+
Retrieves track(s) by name.
Unlike Bitwig, Live can have multiple tracks with the same name.
45 46 47 48 49 50 51 |
# File 'lib/live/live.rb', line 45 def track(name, all: false) if all @tracks.find_by_name(name) else @tracks.find_by_name(name).first end end |