### Example: Connecting and Retrieving Notes Source: https://github.com/ricardomatias/ableton-live/blob/master/README.md Demonstrates how to connect to Ableton Live, retrieve tracks, get clips from the first track, get notes from the first clip, and log the pitch of each note. ```javascript 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(); ``` -------------------------------- ### Installing ableton-live via npm Source: https://github.com/ricardomatias/ableton-live/blob/master/README.md Installs the ableton-live library as a project dependency using the npm package manager. ```bash npm install --save ableton-live ``` -------------------------------- ### Node.js WebSocket Polyfill Source: https://github.com/ricardomatias/ableton-live/blob/master/README.md Provides a polyfill for the browser-compatible WebSocket API when running the ableton-live library in a Node.js environment. ```javascript if (process) { global.WebSocket = require('ws'); } ``` -------------------------------- ### Importing AbletonLive in Browser Source: https://github.com/ricardomatias/ableton-live/blob/master/README.md Imports the AbletonLive class from the ableton-live library for use in a browser environment. ```javascript import { AbletonLive } from 'ableton-live'; ``` -------------------------------- ### Importing AbletonLive in Node.js Source: https://github.com/ricardomatias/ableton-live/blob/master/README.md Imports the AbletonLive class from the ableton-live library for use in a Node.js environment, showing both ES Module and CommonJS syntax. ```javascript import { AbletonLive } from 'ableton-live'; // or const { AbletonLive } = require('ableton-live'); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.