Multi Switches - how to create "radio" effect with a script

Discuss problems and solutions.
szymonfortuna
Newbie
Posts: 15
Joined: 22 Oct 2015 13:39

Multi Switches - how to create "radio" effect with a script

Post by szymonfortuna »

Hello,
I need to create a radio effect for the Multi Switches using a script. I can't use the built in Radio function cause I need to be able to turn off the currently active switch...
I came up with this script on expression x, that works if I create each switch individually... I need 25 switches on each of my template...
With Multi switches the whole process is a lot simpler.

Here's my code for individually created switches. Is there a way to adjust the code so it gives the same effect in Multi Switches array?

Switch1:
if((x)==1)
{
(Switch2.x=0); (Switch3.x=0);
}

Switch2:
if((x)==1)
{
(Switch1.x=0); (Switch3.x=0);
}

Switch3:
if((x)==1)
{
(Switch1.x=0); (Switch2.x=0);
}
MrCorba
Regular
Posts: 142
Joined: 02 Sep 2013 20:17
Location: Netherlands

Re: Multi Switches - how to create "radio" effect with a scr

Post by MrCorba »

I've got a possible solution. It checks which pad was pressed and resets all others. Possibly there's a nicer way but this is one way to go, added comments to the script.

The only problem remaining is when you turn off a pad and then try to turn it on again. You need to press it a second time.

Cheers!
MrCorba
Attachments
CustomRadioSwitches.jzml
(2.75 KiB) Downloaded 98 times
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba
szymonfortuna
Newbie
Posts: 15
Joined: 22 Oct 2015 13:39

Re: Multi Switches - how to create "radio" effect with a scr

Post by szymonfortuna »

Hey! Thanks for the hint. Yeah it gives the radio effect. But I always get this issue when using with ableton locators…
I attached the ableton project and your template with assigned midi.
When you play a track in ableton it triggers locators and make them loop…
Do you know how to find a way around it?
Attachments
Custom Radio Switch test.zip
(14.99 KiB) Downloaded 91 times
ndivuyo
Regular
Posts: 278
Joined: 23 May 2014 00:24

Re: Multi Switches - how to create "radio" effect with a scr

Post by ndivuyo »

I don't quite understand your issue.
You don't want the switches to trigger the locators? If so, then why are they mapped to the corresponding notes of the switches? Just unmap them (they are currently mapped in the set you uploaded, that is why they are triggering the locators)
If not, then what is the problem exactly? The switches are triggering the locators fine.
szymonfortuna
Newbie
Posts: 15
Joined: 22 Oct 2015 13:39

Re: Multi Switches - how to create "radio" effect with a scr

Post by szymonfortuna »

Each locator reflects a different section of a song. (ex. verse, chorus, bridge).
Midi clips with a midi note are used to give the visual feedback on my iPad showing which section is currently being played.

I need to have the same midi notes mapped to locators to be able to switch between sections.
THe issue here is that somehow the midi note turns the pad on and that pad sends a message to retrigger the locator. I want the locator to be triggered only by pressing the pad on iPad and not from ableton.

Here's the working example (attachment) I managed to create but using switches separately.
I wanted to adapt it to multiswitches or pads so the mapping becomes easier and less opportunity for mistakes… and it's easier to work with a group of switches when you have to create 20 of them time 25 pads for each song etc...
Attachments
Separate Working Radio Switches.zip
(14.41 KiB) Downloaded 104 times
ndivuyo
Regular
Posts: 278
Joined: 23 May 2014 00:24

Re: Multi Switches - how to create "radio" effect with a scr

Post by ndivuyo »

Did you not see my other post to your other thread? I think they are the same questions no?
You need to use something other than the x variable to display the visual (like "light" variable or "colors" attribute). If you must use "x" variable, then you need code to prevent the MIDI feedback (but that will be difficult cuz pads and switches don't have a "z" variable)
szymonfortuna
Newbie
Posts: 15
Joined: 22 Oct 2015 13:39

Re: Multi Switches - how to create "radio" effect with a scr

Post by szymonfortuna »

Hey!
Yeah I saw your other post but after this one! Thank you for the hints!! I'll try to create some script and mess around with the colors!
MrCorba
Regular
Posts: 142
Joined: 02 Sep 2013 20:17
Location: Netherlands

Re: Multi Switches - how to create "radio" effect with a scr

Post by MrCorba »

I think this should do what you want, it's a bit different. It uses the notes 0-2 to listen from ableton which section is playing controlling the light attribute, but is using CC 0-2 to control the locators.
Attachments
Lemur Visual Feedback.jzml
(3 KiB) Downloaded 107 times
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba
szymonfortuna
Newbie
Posts: 15
Joined: 22 Oct 2015 13:39

Re: Multi Switches - how to create "radio" effect with a scr

Post by szymonfortuna »

Hey!!
Thank you for your solution. I'm sorry for the late replay but I don't have a regular internet connection at the moment!
The idea is great and does the job….but
…there's a bug somewhere and I spent hours trying to fix it and don't know how. When i press play in ableton some of the pads change to white and black…and stay that way.
I attached a lemur template with ableton test project…
I'd appreciate if you'd find a sec to have quick look on it.
Attachments
Visual Feedback 25Pads.zip
(15.34 KiB) Downloaded 89 times
MrCorba
Regular
Posts: 142
Joined: 02 Sep 2013 20:17
Location: Netherlands

Re: Multi Switches - how to create "radio" effect with a scr

Post by MrCorba »

I would like to take a look for you but unfortunately I'm still stuck on Ableton Live 8, so that's a bit of a hassle;)

There were two things I saw in the project that might be the problem:

- The light attribute of the pads was set to {0,0,0}, maybe that's messing with the script somehow. Try to remove that.
- The button with Song1 has the same midi address as one of the pads.

If that doesn't work someone with live 9 has to take a look, and I'll return to my cave....

Cheers!
MrCorba
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba
Post Reply