leolabs / ableton-js

Control Ableton Live with Node.js
MIT License
368 stars 46 forks source link

Message too long #8

Closed jBernz closed 4 years ago

jBernz commented 4 years ago

So I have a lot of tracks/scenes in my set. When I go to get clip_slots from a scene I get this message:

Error: error: (40, 'Message too long') at Ableton.handleIncoming (/Users/justin/My Files/Code/Music/Ableton/ableton-js/index.js:131:45)

any ways you can think of to trim down message size?

leolabs commented 4 years ago

I have an idea that could at least mitigate the problem a bit. I'll try to gzip the messages before sending them. Because there are a lot of repeating keys in the JSON, this should reduce the size pretty well. Other than that, it might be necessary to split the messages into multiple parts. I have to see, however, if UDP can keep the package order intact, otherwise, this might get a bit messy.

leolabs commented 4 years ago

This should be fixed now, could you try it out in v1.8.0?