A Ruby implementation of the Ableton Live API
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
objects
LICENSE
README.md
live_api.rb
live_connection.rb
live_object.rb
live_set.rb
osc_bridge.amxd

README.md

Ruby 4 Live

A Ruby implementation of the Ableton Live API. The current version connects to an included Max For Live patch via OSC to interact with the API.

Author

Peter Marks (petertmarks [at] gmail [dot] com)

Status

This is a young library (first commit 11/24/2009) and the API is subject to change. Currently, I'm modeling it after my own needs. If you are using it and have requests or questions, I am happy to listen and respond.

Dependancies

Usage

Establish a connection to the a LiveSet running the included max patch by creating a LiveConnection object:

>  connection = LiveConnection.new('localhost', 7402, 7403)
=> <LiveConnection>

Once connected, you can create a LiveSet object to scan for every Track, Device, DeviceParameter, ClipSlot and Clip 'LiveObject':

>  require 'live_api'
=> true
>  set = LiveSet.new(connection)
   Scan Complete
=> LiveSet: 7 tracks, 10 devices, 37 parameters, 60 clip slots, 21 clips

The initial scan also fetches object attributes as specified in config/settings.yaml. It may take a few seconds to load everything. If you're having trouble, try increasing the SLEEP_INTERVAL constant. The LiveSet object stores all children LiveObjects in its 'objects' attribute to allow for easy serialization of the set.

Once the set is initialized, you can get all its objects of a particular kind by calling that kind pluralized:

>  set.tracks
=> [#<Track @order=0, @id=2, @name="1-Audio">, #<Track @order=1, @id=3, @name="2-Audio">]

LiveObject properties act as accessor methods:

>  set.tracks[0].name
=> "1-Audio"

My To-Do List

  • Implement functionality for LiveSet, Scene and other objects.
  • Improved error handling for set scanning.
  • Transport listeners
  • Test suite
  • Make gem version