Comments (6)
My bad, I put the updated one inside the LiveAPI folder by mistake. Well spotted @allforabit!
from ableton-live.
It's to do with the event callback name not being entirely unique. I've got a workaround by changing the callback signature in live api:
callback(objectPath, objectId, property)
and I generate a unique name with this function and use in place of just the objectPath
:
function callbackName(path, id) {
if(id) {
return path + '-' + id;
}
return path;
}
from ableton-live.
I have a PR there if you want to try it out
from ableton-live.
Thanks for the thorough description of the problem and testable scenario!
from ableton-live.
Thanks very much for doing the update! I still seem to be having the same issue though after updating and using the latest device though I'm wondering if there was an issue updating it? Thanks again :-)
from ableton-live.
That's great, thanks for that. I did notice one other issue, there's always one :-) The removeObserver
function isn't using the proper callback name in all places. Here's the updated function that seems to do the trick:
function removeObserver(args) {
const res = JSON.parse(args);
// * Request UUID
var uuid = res.uuid;
var objectId = res.objectId;
var eventId = res.args.eventId;
var objectPath = res.args.objectPath;
var cbName = callbackName(objectPath, objectId)
if (callbackEvents[cbName] !== undefined) {
var listeners = callbackEvents[cbName].listeners;
var idx = listeners.indexOf(eventId);
listeners.splice(idx, 1);
if (!listeners.length) {
const api = callbackEvents[cbName].api;
api.id = 0;
delete callbackEvents[cbName];
}
}
onSuccess(uuid);
}
from ableton-live.
Related Issues (14)
- Migrate WebSockets server
- Add .clone to Note
- Re-factor Clip -> removeSelectedNotes
- Get the playing position efficiently HOT 2
- Send close frame to clients when server is closed HOT 5
- Expose Track.getClipSlots() HOT 2
- would you be able a way to observe the start of a clip playing? HOT 2
- Possible documentation and/or LiveAPI.amxd issue HOT 2
- is it possible to create a clip envelope? HOT 1
- Missing function (delete_clip): How to call? HOT 2
- Issues with Ableton 11.3.20 HOT 11
- LiveAPI.amxd crashes ableton 11.3.20 HOT 2
- Read info_text from a Clip HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ableton-live.