Recognising Double click/ Long click on footcontroller

Image_Engine

2008-06-05 01:33:12

Hi All
I have Live7 (lite) and FCB1010 and want to do the usual Kid Beyond type setup (I use Guitar with midi controller, plus a moveable mic on a percussion rack for the content) with a couple of other musicians. The 'Kid Beyond Style' rig by Chelfyn is a brilliant starting point but I need to add just one feature; I would like to be able to have a long press (or less preferably, a double click) on the footswitch, tell Live to delete the current track and rerecord on the next bar ie a single click (quick) will operate as currently implemented but a longer click and release will delete current slot and rerecord. Its a bit of a composite of some of the setups I have seen on the forum I know but the abovementioned would be perfect if it just had this ability as sometimes the first recorded progression isnt the best, as the ideas formulate a bit as you repeat etc. Im not really using the resample but I may as I mature using it.
Any help greatly appreciated. I have not as yet programmed the FCB so a note of within a certain time or whatever would be fine but Im a bit unsure of how to achieve this; with a timer?
Regs
Mark

metastatik

2008-06-05 21:43:00

Here’s one way it could be done:

Code: Select all

Translator 1: PedalDown
Options: stop=false
Incoming: MIDI 90 3c 7f 
Rules: 
  ga=1
Outgoing: One-shot timer "PressTimer": 350 ms delay

Translator 2: PedalUp
Options: stop=false
Incoming: MIDI 80 3c 00 
Rules: 
  ga=0
Outgoing: (none)

Translator 3: DefaultAction
Options: stop=false
Incoming: On timer "PressTimer"
Rules: 
  if ga!=0 then exit rules, skip Outgoing Action
Outgoing: Keystroke: D E F A U L T 

Translator 4: DeleteAction
Options: stop=false
Incoming: On timer "PressTimer"
Rules: 
  if ga!=1 then exit rules, skip Outgoing Action
Outgoing: Keystroke: Delete
So pressing the pedal down sets a global variable to 1 and triggers a timer that will execute after 350 ms.

Releasing the pedal sets the global variable back to 0.

The default and delete action are both triggered by the 350 ms timer.

The Default Action will only be processed if you are NOT still holding the pedal down after 350 ms.

The Delete Action will only be processed if you are still holding the pedal down after 350 ms.

The only drawback to this is that there will be a 350 ms delay on the default action. You can lower that interval (to say 100 ms), but that would mean you have to press and release the pedal VERY quickly to trigger the default action. But you can mess around with the delay to find something comfortable for you.

Image_Engine

2008-06-05 23:38:17

Thanks Metastik
That helps my understanding of the timer event a lot. I think I would still want the default action to be executed regardless as the worst it will do is relaunch (which would be in the same time pos as a rerecord anyway). Ill have a go and see what happens. I cant believe that there arent any templates that have this feature. Im sure Kid beyond must have a rerecord cos otherwise if you rec a mistake its going to loop and not be a real good look.
Cheers
Mark
BTW How is the best way to group this coding, otherwise there be so many translators.

metastatik

2008-06-06 00:26:27

In that case…

Code: Select all

Translator 1: PedalDown
Options: stop=false
Incoming: MIDI 90 3c 7f
Rules:
  ga=1
Outgoing: One-shot timer "PressTimer": 350 ms delay

Translator 2: Launch
Options: stop=false
Incoming: MIDI 90 3c 7f
Rules:
  ga=1
Outgoing: Keystroke: D E F A U L T

Translator 3: PedalUp
Options: stop=false
Incoming: MIDI 80 3c 00
Rules:
  ga=0
Outgoing: (none)

Translator 4: DeleteAction
Options: stop=false
Incoming: On timer "PressTimer"
Rules:
  if ga!=1 then exit rules, skip Outgoing Action
Outgoing: Keystroke: Delete
So the default action happens anytime you press the pedal. The delete action only happens if you’re still holding the pedal after 350 ms.

As far as grouping, really the only thing I could suggest is putting like translators near each other and using a good naming system.

Image_Engine

2008-06-06 00:52:03

Thanks again.
Can I import txt files exported from MT back in again? ie can I paste your code in a text base version of the editor? I wanted a simple way to handle making translators in a text based form. Also can you add more info ie more than 1 outgoing action if scripting it?
Regs
M

metastatik

2008-06-06 01:46:08

Yes, I was just using those outgoing actions as an example. One outgoing action can delete, relaunch and do whatever else you need (as long as they’re all keystrokes, which seems to be the case with the setup you’re using).

I don’t know of a way of importing text files. It would be really nice if that were possible though.

Image_Engine

2008-06-06 01:48:45

I was thinking more the case of 'Launch' is redundant. If more than 1 outgoing were applied to PedalDown you could just timer+keystroke.
Cheers
M

Image_Engine

2008-06-06 02:51:22

Ok...worked great. I owe you a beer (although I dont drink) Has to be a line drawn in the sand at some stage I suppose. BUT...I would also like to have;
1) Quick click sends enter (Done and working) ie record/trigger
2) A 1 second hold rerecords last track (Done and working) CtrlZ

AND

3) a 3 second hold will trigger a master (or subgroup Ctrl nn) fadeout over a certain length?
???
Mark

Tuur

2008-06-06 09:58:45

metastatik wrote:The only drawback to this is that there will be a 350 ms delay on the default action.
Timers are fun aren't they? :D

FWIW: You could work around the delay with another global or extra timer.

Tuur

2008-06-06 10:01:08

Image_Engine wrote:3) a 3 second hold will trigger a master (or subgroup Ctrl nn) fadeout over a certain length?
I'm not with my stuff right now, but a certain length of time is no problem. Just use another timer which decreases a global on every interval...

Image_Engine

2008-06-06 10:55:04

Hi All
Look I have to be thankful. Its taken me all day but now have a very happy setup.
Footswitch 1 starts with a tap tempo (essential for integrating into the moment).
FS2 starts record on current track (if its empty), a 1.5 sec hold stops the track, a 2.5 deletes.
FS3+4 move prev/next track.
FS5-8 are instant guitar presets.
Footpedal A controls current track fader. Footpedal B controls master.
Would like Footpedal A to still be controlling input level for guitar but setting up FS9+10 to be incremental is proving a bit above my head. Cant figure out how to get the current fader out of live back into MT and then do the delta. Thought I could use a general inc/dec controller 96+97 but info seems slim. Anyone dealt with these before?
Havent done the fade yet but in general the master will always be from a val of 100.

Tuur

2008-06-06 11:29:42

Image_Engine wrote:Cant figure out how to get the current fader out of live back into MT and then do the delta. Thought I could use a general inc/dec controller 96+97 but info seems slim. Anyone dealt with these before?
I'm not sure what you mean with this... Could you please explain it some more?

Image_Engine

2008-06-06 11:36:33

Hi Tuur
The end goal is to have footswitch1 and footswitch2, increment and decrement a controller. The controller is controlling a fader in Live. I was thinking if i could feed the value out of Live into MT, I could store it and do the delta maths in MT. However apparently in the midi spec there is a dedicated increment/decrement controller which somehow intrinsically inc/decs. However there is not multiple in so forget it and multiple instances is just too complex. I was hoping someone could shed some light on 96+97. Alternatively I could just init globals that are placeholders for the faders. The only prob is that when I load a new set, how do I get MT to reset globals?
There must be some way. Soft takeover doesnt seem to work for linked controllers.
Cheers
Mark

Tuur

2008-06-06 11:58:00

Well, you can initialize globals on load of your preset (there's a special action in MT).

Also, if you map a CC/note to a fader (or a slot) in Live, Live sends out every movement (also when you're mousing around). So you can read these values back in MT too. I use this e.g. when I trigger a clip in Live I read the status by looking at incoming midi. This way the leds on my controller respond the correct way no matter how I trigger a clip (mouse, keyboard or midi).

Depending on your midi routing: make sure you're using a different channel (feedback problems!).

Hope this helps a bit...

Image_Engine

2008-06-06 12:08:10

Hi Tuur
Yes but the prob is that MT only allows 1 midi in. Currently thats mapped to the hardware in that the FCB is connected to (which also soft thrus the midi guitar). Otherwise it would be a good solution. The feedback loop should be stopped by a 'stop processing' shouldnt it? (if it allowed multi midi in)
Cheers
Mark

Tuur

2008-06-06 13:36:19

Correct.

And i forgot about that, as my version of MT can handle multiple ins/outs. :oops:

If you ask Florian nicely, he probably will send you the beta of the next version too...

metastatik

2008-06-06 18:29:43

Image_Engine wrote:The end goal is to have footswitch1 and footswitch2, increment and decrement a controller. The controller is controlling a fader in Live. I was thinking if i could feed the value out of Live into MT, I could store it and do the delta maths in MT.
Couldn’t you instead just change the type of mapping used for that fader from Absolute to Relative? If it’s relative, then your increase/decrease switches will inc/dec the fader relative to its current position. This way, there’s no values to store/initialize.

To make that happen, you need the switches to send out the same CC, just with different values. One should be “01”, the other should be “41” (those are hex values). In MIDI mapping mode in Live, click on the fader in question and the type of mapping will show up on the bottom of the screen. Just change that to Relative (signed bit).

Image_Engine

2008-06-06 23:03:09

Thanks again Metastik
I stayed up way late creating a global variable table blah blah and it all works well but DOH! when I could have done it so simply. I hadnt heard of that before but I will investigate (Ive used vst/sx for since 89'; Live is newly acquired).
Cheers guys
Mark

BTW its all but finished. It is so impressive for improvisation. I am going to have v2 link in other players ie K88s etc and I get to become 'conductor' on the fly!

Image_Engine

2008-06-06 23:34:54

Hi Metastik
I setup to use controller 73 (for a test fader) and have FS1 send out 01 and FS2 send 41 (65). However the Live manual is scant on the function of this and there seems to be no right click etc. I have clicked LLL RRR (fs's as if they were rotary etc) and doesnt seem to make any dif. Any clues? Sorry for the newbiness of my q's.
Cheers
Mark

STOP PRESS! All is well.