MLIDbrowser MultiLevelIdentityDictionary browser

A simple gui to browse through the contents of the Library.

*new(name1,name2 ... nameN , onSelect)

name1,name2 ... nameN -

the name of the node you wish to start browsing at.

the default if nil is to browse from the top of Library.

onSelect -

the function that is executed when you click on a leaf node.

the default if nil is to gui the item

(

// what exactly is in Library right now ?

MLIDbrowser.new;

)

(

// put in something to library

Library.put(\test,\hello, {"contents of hello".postln});

Library.put(\test,\goodbye,{"contents of goodbye".postln});

MLIDbrowser.new(\test,{ |contents| contents.value });

)

(

// browse all currently loaded instruments

// if you have no Instr loaded, then Library.at(Instr) will return nil

Instr.loadAll;

// let's make sure there is at least one

Instr("help-MLIDbrowser",{ arg freq=440,phase=0.0,amp=0.2;

SinOsc.ar(freq,phase,amp);

});

//make a Patch when you select an instr

MLIDbrowser(Instr,{ arg instr; Patch(instr.name).topGui });

)