Many interfaces, just the current loaded shall send out sth

Discuss Lemur and share techniques.
Post Reply
Gass n Klang
Newbie
Posts:42
Joined:01 Jan 2016 20:45
Many interfaces, just the current loaded shall send out sth

Post by Gass n Klang » 05 Feb 2016 10:57

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?

MrCorba
Regular
Posts:143
Joined:02 Sep 2013 20:17
Location:Netherlands

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

Post by MrCorba » 05 Feb 2016 12:09

You can use the built-in function current_interface. This returns the current_interface number.
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba

Gass n Klang
Newbie
Posts:42
Joined:01 Jan 2016 20:45

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

Post by Gass n Klang » 06 Feb 2016 16:48

Thanks! How to turn that on? Sorry for my newbie questions :(

MrCorba
Regular
Posts:143
Joined:02 Sep 2013 20:17
Location:Netherlands

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

Post by MrCorba » 07 Feb 2016 21:38

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.
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba

Gass n Klang
Newbie
Posts:42
Joined:01 Jan 2016 20:45

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

Post by Gass n Klang » 07 Feb 2016 22:16

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?
Last edited by Gass n Klang on 09 Feb 2016 12:41, edited 1 time in total.

Gass n Klang
Newbie
Posts:42
Joined:01 Jan 2016 20:45

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

Post by Gass n Klang » 09 Feb 2016 12:40

well If this doesn't work that easy, is it possible to load a lemur project by receiving a midi program

MrCorba
Regular
Posts:143
Joined:02 Sep 2013 20:17
Location:Netherlands

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

Post by MrCorba » 09 Feb 2016 15:10

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.
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba

Gass n Klang
Newbie
Posts:42
Joined:01 Jan 2016 20:45

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

Post by Gass n Klang » 09 Feb 2016 15:44

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"?

Gass n Klang
Newbie
Posts:42
Joined:01 Jan 2016 20:45

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

Post by Gass n Klang » 14 Feb 2016 21:59

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.

Post Reply