live.text toggles causing "Live API is not initialized" warning at startup

spin lud's icon

I have 12 live.text toggle buttons. At startup I have excatly 12 warnings like the following:

live.object: Live API is not initialized, use live.thisdevice to determine when initialization is complete

If I remove the toggles the warnings go away. I am already using live.thisdevice. Is there any fix to get rid of these warnings?

Source Audio's icon

post what this toggles do
you perform something on device load that asks too fast for non existing
id's, states or whatever.

spin lud's icon

This is the device. Basically I am trying to build a Traktor-style dj looper, with midi mappable buttons that switch on/off clip looping on the fly with different lengths. Any advice is appreciated, it's my first patch! 😄

dj-looper v3.amxd
amxd 113.05 KB

Source Audio's icon

you call clip properties on empty slots, initialise that many text buttons
and so on.
I am not using live, but from the patch one would expect some errors to pop up.

spin lud's icon

But I have placed a gate to block any signal coming from live.text buttons until the live.objects are initialized. What should I add?

Source Audio's icon

no, that is not enough.
you are depending on loaded clip for you device to function.
otherwise you will get errors from live.object.
means - insert gates to prevent live.objects from receiving get or set messages till
you have all conditions ok.
and conditions are:
this device is active and clip is loaded into a slot.
---
nothing to do with that, but avoid using send and receive objects without need.
this is a single s/r pair in you device, few points apart from each other ???

then that 12 buttons ? that many sends / returns / wires ?

here is simplified buttons example

Max Patch
Copy patch and select New From Clipboard in Max.

spin lud's icon

Ehy there, thank you very much for the helpful review!

Why do you say that the gate there doesn't make sense? It should prevent the buttons to output anything before the Live object is initialized, isn't it?

Regarding the wires mess, basically I was trying to do what have been suggested here https://cycling74.com/forums/mutually-exclusive-livetext-buttons.

Maybe I can substitute the sends/receives with direct wires? Basically the logis is that whenever a button is pressed as active, it should send a "set 0" to all the other buttons (so there is only one active button at time).

Thank you for the suggestion for addind another gate, I'll try that and let you know!

Sébastien Gay's icon

Side question (apologies) :
Do you make any difference between :

and

Because I don't.

Source Audio's icon

there are many ways to bang specified item, being int, float, whatever.
but it you have a bunch of them to trigger and later have a need to insert anther bang or whatever before it triggers, it is handy to have it allready there, instead to repace it,
or add more objects.
in that case above it would even make more sense to pack it into
single trigger object, depending on wished order of execution

t 512. 1
t 1 512.

Sébastien Gay's icon

Thanks S.A.