Track.create_midi_clip function doesn't return correct clip ID

Drum Stix's icon

Today I tried the new Track.create_midi_clip function which is available as of 12.1.10. I noticed that after calling the function, the clip is created correctly, but the return ID (returned by live.object) is 0 instead of the ID of the clip that was created. I double checked with other similar functions like song.create_scene, clip_slot.create_clip etc. On these functions live.object returns the ID of the newly created item. See attached patch.

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

So Track.create_midi_clip doesn't. That sounds like a bug right?

Is there an alternative way to find out which clip I just created?

Loukas Perreault's icon

Hey!

I'm not sure if it's efficient but if you get the highest value of the ids from the get arrangement_clips then you will have the id of the latest clip created.

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

Drum Stix's icon

that's a smart workaround.

I got answer from Ableton support that this indeed is a bug that needs to be solved. Didn't say when though.

Loukas Perreault's icon

It’s also returns id 0 when using create_audio_clip from the track class

Loukas Perreault's icon

It’s should now work on the beta 12.2.13