Producing a list of Ndef keys

Hi all - I have a bunch of Ndefs running in a bit of code and I’d like to be able to quickly generate a list of all key names of active Ndefs. Is there a way to do that? I’m having a bit of trouble finding it in the documentation.
Thank you.

You can get a gui with this:

NdefMixer(Server.default)

You can get a list of Ndef keys with this:

Ndef.dictFor(Server.default).keys
1 Like

Thanks, @droptableuser -

One other small question:
I have a number of filters on different slots of a given node. Some of the filters use the same controlName. I’d like to be able to get a list of all the slots that are in use and I’d like to be able to refer to them specifically.

So for instance, if I had a filter on slot six of “~nodeDemo” - I’d like to be able to add slot 6 to a list and get the specific control names for slot six. Something like this doesn’t work as expected:
Ndef(~nodeDemo.asSymbol)[6].controlKeysValues;

If you have any ideas, it would be a great help. Thank you again.

the objects property is what you’re looking for

Ndef(~nodeDemo.asSymbol).objects[6] etc...

refer to this thread for a discussion of how to handle filters with the same control names

i do think you should be able to set parameters on each filter individually

Ndef(~nodeDemo.asSymbol).objects[6].set(\val, 0.5)
1 Like

Thanks! That definitely helps in getting the controlNames on a node - but is there a way to get a list of all of the active slots?
I suppose I could run something like

1000.do{|x| 
Ndef(~nodeDemo.asSymbol).objects[x] != nil
etc etc..

But I’m wondering if there is a better way…

the objects property is an Order object - take a look at the documentation to get a sense of how you can inspect it - Order | SuperCollider 3.12.2 Help -

a list of the occupied slots can be retrieved with this line:

Ndef(~nodeDemo.asSymbol).objects.indices
1 Like