< Back to IRCAM Forum

creating function via graphical interface

Hi,
I am building a function via graphic interface as shown in OM tutorial 42 & 43. As this tutorials are quite old, I have some additional questions:
a) How can I achieve optional inputs, so that optional outputs are shown only after I press “>”?
b) How can I add pop-up menu for certain inputs (such there are pop-up menus on the third inputs in functions list-filter, band-filter and many others)?
c) Can different methods of the same function have different number of inputs? (In my case two methods of four should have 2 inputs and two other 4 inputs, whereby in the last case two additional inputs should be optional inputs.)
d) Is there a particular order in creating methods?
e) What for are the buttons on a New Method patch: primary/before/after/around?

I know it may be to much questions, but I am sure, I am not the only one interested in answers to these questions!

Many greetings!

Aliser

Hello
here are a few answers…
a) How can I achieve optional inputs, so that optional outputs are shown only after I press “>”?
b) How can I add pop-up menu for certain inputs (such there are pop-up menus on the third inputs in functions list-filter, band-filter and many others)?
=> this is not possible with graphical generic-functions

c) Can different methods of the same function have different number of inputs? (In my case two methods of four should have 2 inputs and two other 4 inputs, whereby in the last case two additional inputs should be optional inputs.)
=> no (but this is forbidden also in “standard” Common Lisp)

d) Is there a particular order in creating methods?
=> not sure I understand your question, but there is no specific “order” that I can think of

e) What for are the buttons on a New Method patch: primary/before/after/around?
=> These are different type of methods as described in the Common Lisp Object System’s “standard method combination”. “Primary” is the “normal” method, while before, after and around are qualifiers for defining “auxiliary methods”. See for instance here for more explainations : https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node285.html or in the numerous resources you can find online about CLOS:)

Jean