Adding Tracks from LOM into Dict Object

Paul Quirie's icon

Paul Quirie

2月 11 2024 | 8:12 午後

Hi,

I'm trying to create a dictionary that contains all Audio & Midi track names in an Ableton project.

I'm able to get the track name which I can print to the console, however I'm struggling to push them all into a dictionary, only able to push the last one at the moment

Any suggestions ?

addToDict.maxpat
Max Patch

Thanks

TFL's icon

TFL

2月 11 2024 | 10:45 午後

It's because you bang [dict.group] for every new name it receives, replacing the previous one each time.

You want to bang it only when all the names are received, in order to send them all as one dictionnary.

As you have a list of all your track ids, you can bang [dict.group] once that list has been entirely iterated, for example.

Paul Quirie's icon

Paul Quirie

2月 12 2024 | 4:24 午後

I've removed the connections from the button to the band on the trigger but still only getting the last entry.

Do I need to create a list?

Cheers

TFL's icon

TFL

2月 12 2024 | 6:24 午後

It's a bit trickier than that. You need to give unique names to each key. Or create an array.

But basically yes, you end up creating a list at some point

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