@lloydstellar/la2l
v0.1.0
Published
Send sounds from your app to Ableton Live with LA2L (Lloyd's App2Live).
Maintainers
Readme
@lloydstellar/la2l
Send sounds from your app to Ableton Live with LA2L (Lloyd's App2Live). The user pairs your app once with the code LA2L shows in Live. After that, every send becomes new audio tracks in Live when they click Import: named, coloured, and warped to your tempo.
npm install @lloydstellar/la2limport { LA2L, wavFromAudioBuffer } from '@lloydstellar/la2l';
const la2l = new LA2L({ appName: 'Web808' });
if (!la2l.paired) await la2l.pair(codeFromUser); // "K7P 42Q", from LA2L in Live
const delivery = await la2l.send({
title: 'Treinbeat',
bpm: 92,
sounds: [
{ name: 'Kick', audio: wavFromAudioBuffer(kickBuffer), kind: 'loop', role: 'drums' },
{ name: 'Robot hallo', audio: robotWavBlob, kind: 'oneshot', role: 'vocal' },
],
onProgress: (share) => (bar.value = share),
});
await delivery.imported(); // when the user clicks Import in LiveOr a ready-made button, without a build step:
<script type="module" src="https://cdn.jsdelivr.net/npm/@lloydstellar/[email protected]/dist/button.min.js"
integrity="sha384-A/Nu56J/Oh1+eLYYZgGeFUEk9dgZSWIanzPgaba1I1IjsXk2135KwQ4TYD940D0C" crossorigin="anonymous"></script>
<la2l-send-button app-name="Web808"></la2l-send-button>From a script in any language:
npx @lloydstellar/la2l pair K7P42Q
npx @lloydstellar/la2l send kick.wav --loop --bpm 92 --role drumsWhat is in it
@lloydstellar/la2l: the client (LA2L,Delivery,La2lError), WAV files from Web Audio (wavFromAudioBuffer,wavFromSamples,toWav), and the checks of LA2L itself (checkWav,checkManifest,planSound,sha256), with the same texts.@lloydstellar/la2l/button:<la2l-send-button>, for a browser.@lloydstellar/la2l/testing:startTestReceiver(), an LA2L server in memory that imports what you send as Live would, for tests without Ableton or internet. Node.js only.npx @lloydstellar/la2l: pair, send, status, unpair,test-receiver, andagents-md, which writes an index of these docs into your project'sAGENTS.mdandCLAUDE.mdfor AI coding agents.
ESM with type definitions, for browsers, Node.js 22.12 and newer, Deno and Bun. No dependencies.
Docs
In node_modules/@lloydstellar/la2l/docs, for the version you installed: getting started, the API, Web Audio, the button, testing, errors.
The HTTP API itself, for any language: https://github.com/lloydstellar/Lloyds-app2live/blob/main/docs/server-api.md and its OpenAPI file.
Apache License 2.0. Ableton and Live are trademarks of Ableton AG; LA2L is not made by Ableton.
