< Back to IRCAM Forum

User input

I want to bind a function or a value to a key. For example, press a key and select a note duration. Or press a key and select an action like sum.

What I’m talking about is user input or keyboard input.

I haven’t found such thing in the reference pages.

So is it possible to have user input using custom Lisp code inside a patch?

Hi archiduke,

Yes of course it is possible, but it is not available under visual programing. The reason is, that there are so many “reserved action keys” when inside a patch that this might conflict with the general behavior of OM. And yes you can customize this with lisp code.

Can you state a concrete example. The ones you are mentioning are somehow vague. For example, what do you mean by "press a key and select a note duration? This for instance implies not a patch, but rather a SCORE object which therefore requires expert programming.

Best
K

In a voice object, choose an action (add, remove) on a type of note. Shortcuts for the action and for the type of note.

Ok, you say it could be done with lisp code. Maybe I could get a list of all reserved action keys to avoid them or override them with another “keyboard input mode”.

Since you will do this using lisp, you can for the score objects look in this file:
/code/projects/musicproject/editor/scoreeditor/scoreeditors.lisp

Have a look on the handle-key-event method.

If you need to check reserved keys for a patch:
/code/kernel/ommodele/omframes/containereditors/algortimecontainer/patchcontainer.lisp

Look for the same method.

Best
K

1 Like