Page 1 of 1

Many interfaces, just the current loaded shall send out sth

Posted: 05 Feb 2016 10:57
by Gass n Klang
Hey guys,
I've got an interface per song. Some controls are remote controlled by a midi device. I use the same device with the same commands for different things depending on the current song thats played. At the moment all Interfaces react to my midi device. So Knob1 (remotecontrolled by MidiCC 1, Channel 1) controls cutoff-frequency in one song and decay in another. How can I ensure that only the recently loaded Interface reacts to incoming Midi and OSC commands?

Re: Many interfaces, just the current loaded shall send out

Posted: 05 Feb 2016 12:09
by MrCorba
You can use the built-in function current_interface. This returns the current_interface number.

Re: Many interfaces, just the current loaded shall send out

Posted: 06 Feb 2016 16:48
by Gass n Klang
Thanks! How to turn that on? Sorry for my newbie questions :(

Re: Many interfaces, just the current loaded shall send out

Posted: 07 Feb 2016 21:38
by MrCorba
If I remember correctly you translate all incoming midi via a script. So just put in the script:

Code: Select all

if(current_interface == 1) {
//anything you want to do
}
It should then only trigger when the selected interface equals the one in the script.

Re: Many interfaces, just the current loaded shall send out

Posted: 07 Feb 2016 22:16
by Gass n Klang
ok thanks. Isn't there a more simple solution to just turn on the current interface? If I understand right I have to put everything that's controlled in the current Interface to the if condition. Can't I just disable all interfaces that are not "on top"/loaded?

Re: Many interfaces, just the current loaded shall send out

Posted: 09 Feb 2016 12:40
by Gass n Klang
well If this doesn't work that easy, is it possible to load a lemur project by receiving a midi program

Re: Many interfaces, just the current loaded shall send out

Posted: 09 Feb 2016 15:10
by MrCorba
I don't think either of those options is possible. And I can't really think of a easy way to get this thing done.

Re: Many interfaces, just the current loaded shall send out

Posted: 09 Feb 2016 15:44
by Gass n Klang
Alright. Then: Is there a way to name the interfaces, use the if(current_interface == NAME OF THE INTERFACE) and combine it with "else block all incoming Midi and OSC data"?

Re: Many interfaces, just the current loaded shall send out

Posted: 14 Feb 2016 21:59
by Gass n Klang
As I found out, "current_interface" does not help. It only transmits the number, not the name of the interface. So if you create 2 interfaces named "A" (=0) and "C" (=1 because of alphabetical order) and create a third interface "B" then A=0 B=1 and C=2. So if I call my interfaces after the songnames I use them for, this will not work.