Ndef, How To Include Extra Associations In Preset Morphing


Hello All,

I’m doing something with morphing Ndef presets. A NdefPreset will create a preset from an Ndef, and NdefPresetGUI will present it in a GUI and allows for morphing.

If I then add an extra association in the Ndef used, controls are added for its arguments in the GUI, but these are not then morphable or included in the presets settings. I’ve tried adding the new arguments to the preset in various ways but can’t get them to be included in the preset system of the GUI. I wonder if anybody knows how to get these associations included in the preset system? Below should demonstrate the problem, as the filter associations arguments are added to the GUI but don’t work with its preset system.

w = Window.new.front;
Ndef(\test, { arg amp = 1; SoundIn.ar(0!2, amp); });
~thisPreset = NdefPreset(Ndef(\test));
NdefPresetGui(~thisPreset, 8, parent: w, options: NdefGui.full, bounds: Rect(0, 0, ~width, 500));
Ndef(\test)[1] = \filter -> { arg in, freq = 100, amp2 = 0.1; in*SinOsc.ar(freq)*amp2!2 };

Thanks very much,