https://github.com/ricardomatias/ableton-live
A library for communicating with Live via WebSockets, works both in NodeJS and in the Browser.
https://github.com/ricardomatias/ableton-live
ableton ableton-live live max4live maxmsp music
Last synced: about 1 year ago
JSON representation
A library for communicating with Live via WebSockets, works both in NodeJS and in the Browser.
- Host: GitHub
- URL: https://github.com/ricardomatias/ableton-live
- Owner: ricardomatias
- Created: 2020-02-17T16:43:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-12T09:56:57.000Z (over 2 years ago)
- Last Synced: 2024-04-26T01:31:54.021Z (about 2 years ago)
- Topics: ableton, ableton-live, live, max4live, maxmsp, music
- Language: TypeScript
- Homepage: https://ricardomatias.net/ableton-live/
- Size: 101 MB
- Stars: 64
- Watchers: 3
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ableton Live
A library for communicating with Ableton Live via WebSockets, works both in Node and in the Browser.
## Requirements
* Ableton Live 11
* Max 4 Live
## Installation
1. Install package
```bash
npm install --save ableton-live
```
2. Drag and drop `external/LiveAPI.amxd` to any track in Ableton Live (f.ex, Master Track)
3. Done!
## Usage
### Browser
```js
import { AbletonLive } from 'ableton-live';
```
### NodeJS
```js
// polyfill for a browser API compatible WebSocket
if (process) {
global.WebSocket = require('ws');
}
```
```js
import { AbletonLive } from 'ableton-live';
// or
const { AbletonLive } = require('ableton-live');
```
## Example
```js
import { AbletonLive } from 'ableton-live';
const live = new AbletonLive();
const main = async () => {
try {
await live.connect();
const tracks = await live.song.children('tracks');
const clips = await tracks[0].getClips();
const notes = await clips[0].getNotes();
notes.forEach(note => console.log(note.pitch));
} catch (error) {
console.error(error);
}
};
main();
```
## Documentation
Found at [https://ricardomatias.net/ableton-live/](https://ricardomatias.net/ableton-live/)
## Credits
A loose fork of ableton-js, which was a great source of inspiration on how to approach handling Live's Object Model.
## Development
When not receiving try running `sudo lsof -i :send_port_number` and make sure only **Max** is using it.