Add midi Trigger

This is a place for people to chare the custom macros they have written.

Moderator: Moderators

User avatar
kimwida
Posts: 250
Joined: 05 Aug 2016, 16:26
Location: Seoul

Add midi Trigger

Postby kimwida » 20 May 2018, 07:29

Hi.
After install v.11, I can't save my launch Pad MK2 midi trigger settings.
Even I can't see two factory triggers, there's nothing trigger.
After recording my 80 midi triggers and save show when I restart Titan, there's nothing trigger they all gone.
When I start new show, then there are two factory triggers. And it does save.
I think there was some problems in my show file when I upgraded v.11.
It's best if I rewrite my show file from new. But my show file has so many song cuelists so I can't do that.
So I want to write trigger macro. But I need to know the parameters of the two methods.
Please help me.

Code: Select all

Void Triggers.SetPendingTargetHardware(String keyClass, MenuEventTypes eventType, String keyGroup, Int32 keyIndex, String keyName)

Code: Select all

Void Triggers.AddMidiTrigger(Int32 mappingId, TriggerTargetData targetData, Int32 channel, PanelMidiCommands panelCommand, Int32 value, Int32 min, Int32 max, Int32 threshold, Boolean useLevelMatching)


Or if someone let me know how to save trigger settings, it will be best.
icke_siegen
Posts: 1087
Joined: 02 Jul 2010, 10:29
Location: Siegen, Germany
Contact:

Re: Add midi Trigger

Postby icke_siegen » 21 May 2018, 12:50

I don't have a solution, hence someone from the software dept. is asked to help. At least I managed to create some macros which do not throw an error - but they don't run. Maybe this is better to explain with these examples:

This is expected to add an item trigger:

Code: Select all

   <macro id="Avolites.Macros.AddMidi01" name="Add Midi Trigger 01">
      <sequence>
         <step pause="0.01">Triggers.SetPendingTargetHandle("Location=Playbacks,1,1")</step>
         <step pause="0.01">Triggers.AddMidiTrigger(1, Triggers.PendingTriggerTarget, 1, Note, 0, 0, 127, 0, false)</step>
      </sequence>
  </macro>


And this is expected to add a hardware trigger:

Code: Select all

     <macro id="Avolites.Macros.AddMidi02" name="Add Midi Trigger 02">
      <sequence>
         <step pause="0.01">Triggers.SetPendingTargetHardware("PlaybackSelect", OnButtonDown, "Playbacks", 1, "")</step>
         <step pause="0.01">Triggers.AddMidiTrigger(1, Triggers.PendingTriggerTarget, 1, Note, 0, 0, 127, 0, false)</step>
      </sequence>
  </macro>


Again, neither works for me - maybe Olie, Peter or Gregory can help.
User avatar
Gregory
Posts: 1300
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom
Contact:

Re: Add midi Trigger

Postby Gregory » 21 May 2018, 12:52

It sounds like there may be a problem with your show file which is preventing your trigger mappings from loading in version 11. After loading your v10 show file in version 11 can you check in Log Viewer Pro to see if there any errors reported. Alternatively you could consider reporting a support ticket to get your issue looked into.

It terms of writing a macro the following will add a MIDI trigger for the first playback swop button (Hardware) for note 11 (Note On, After Touch and Note Off):

Code: Select all

Triggers.SelectMappingByName("Your Mapping Name")
Triggers.SetPendingTargetHardware("PlaybackSelect", Math.ToEnum("", "Avolites.Menus.MenuEventTypes", "OnSelect"), "Playbacks", 0, "Swop")
Triggers.AddMidiTrigger(Triggers.SelectedMappingId, Triggers.PendingTriggerTarget, 0, Math.ToEnum("Avolites.Titan.Controllers.Console", "Avolites.Titan.Controllers.Console.PanelMidiCommands", "Note"), 11, 0, 127, 0, false)


Example 2: Add a MIDI trigger for the first preset fader (Hardware) for Control Change 1:

Code: Select all

Triggers.SelectMappingByName("Your Mapping Name")
Triggers.SetPendingTargetHardware("PresetFader", Math.ToEnum("", "Avolites.Menus.MenuEventTypes", "OnValueChanged"), "Presets", 0, "")
Triggers.AddMidiTrigger(Triggers.SelectedMappingId, Triggers.PendingTriggerTarget, 1, Math.ToEnum("Avolites.Titan.Controllers.Console", "Avolites.Titan.Controllers.Console.PanelMidiCommands", "Continuous"), 1, 0, 127, 0, false)
User avatar
kimwida
Posts: 250
Joined: 05 Aug 2016, 16:26
Location: Seoul

Re: Add midi Trigger

Postby kimwida » 21 May 2018, 13:53

Thank you so much!!!

Could you explain "KeyClass" and "KeyName" in detail??
I want to add trigger playback on my playback window.
I usually use my launchPad mk2 to trigger playbacks in playback window.

Code: Select all

<step pause="0.01">Triggers.SetPendingTargetHardware("playbackselect", Math.ToEnum("", "Avolites.Menus.MenuEventTypes", "OnSelect"), "PlaybackWindow", 0, "Touch")</step>


This add trigger but not work. I think Keyclass or keyname is wrong.
icke_siegen
Posts: 1087
Joined: 02 Jul 2010, 10:29
Location: Siegen, Germany
Contact:

Re: Add midi Trigger

Postby icke_siegen » 21 May 2018, 14:05

I like coincidences :) - with Gregory's example I found some working examples:

Code: Select all

    <macro id="Avolites.Macros.AddMidi12" name="Add Midi Trigger 12">
      <sequence>
         <step pause="0.01">Triggers.SelectMappingByName("4")</step>
         <step pause="0.01">Triggers.SetPendingTargetHardware("PlaybackSelect", OnButtonDown, "Playbacks", 1, "")</step>
         <step pause="0.01">Triggers.AddMidiTrigger(Triggers.SelectedMappingId, Triggers.PendingTriggerTarget, 1, Math.ToEnum("Avolites.Titan.Controllers.Console", "Avolites.Titan.Controllers.Console.PanelMidiCommands", "Continuous"), 17, 0, 127, 0, false)</step>
      </sequenc  e>
  </macro>



Code: Select all

     <macro id="Avolites.Macros.AddMidi13" name="Add Midi Trigger 13">
      <sequence>
         <step pause="0.01">Triggers.SelectMappingByName("4")</step>
         <step pause="0.01">Triggers.SetPendingTargetHandle("Location=Playbacks,1,1")</step>
         <step pause="0.01">Triggers.SetPendingTargetAction("Flash")</step>
         <step pause="0.01">Triggers.AddMidiTrigger(Triggers.SelectedMappingId, Triggers.PendingTriggerTarget, 1, Math.ToEnum("Avolites.Titan.Controllers.Console", "Avolites.Titan.Controllers.Console.PanelMidiCommands", "Continuous"), 12, 0, 127, 0, false)</step>
      </sequence>
  </macro>
User avatar
Gregory
Posts: 1300
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom
Contact:

Re: Add midi Trigger

Postby Gregory » 21 May 2018, 14:16

The keyClass is the name of the physical button or group of buttons, group is the virtual area on the console that the button maps to and keyName is a name for the button (e.g. Swop, Flash, Touch, Black) which in this case is not really used.

You were almost correct, for the Playbacks window you need the following:

Code: Select all

Triggers.SetPendingTargetHardware("PlaybackTouch", Math.ToEnum("", "Avolites.Menus.MenuEventTypes", "OnSelect"), "PlaybackWindow", 0, "Touch")
User avatar
kimwida
Posts: 250
Joined: 05 Aug 2016, 16:26
Location: Seoul

Re: Add midi Trigger

Postby kimwida » 21 May 2018, 14:31

Wow!! It works perfect!!
You make my life so much easier!!
I really appreciate it.

Anyway, I found the KeyClass is case-sensitive. So only "PlaybackTouch" works.
User avatar
kimwida
Posts: 250
Joined: 05 Aug 2016, 16:26
Location: Seoul

Re: Add midi Trigger

Postby kimwida » 22 Jun 2018, 18:30

Just curious.

Code: Select all

Triggers.SetPendingTargetHardware("PlaybackSelect", Math.ToEnum("", "Avolites.Menus.MenuEventTypes", "OnSelect"), "Playbacks", 1, "Swop")

It works.

Code: Select all

Triggers.SetPendingTargetHardware("PlaybackSelect", Math.ToEnum("", "Avolites.Menus.MenuEventTypes", "OnSelect"), "Playbacks", 1, "Flash")

But it doesn't work. Actually it works as "Swop".

And how do I add "Playback Page -1", "Playback Page +1" , "Go", "Connect", "Cuelist +1" and "Cuelist -1" to trigger??
User avatar
sideshowbond
Posts: 182
Joined: 18 Nov 2016, 20:58

Re: Add midi Trigger

Postby sideshowbond » 22 Jun 2018, 19:15

I know it doesn't solve your actual problem as such but with a launchpad mk2 you might wanna have a look at this little gem:
http://www.avolites.de/support-downloads/midi-to-web
User avatar
Gregory
Posts: 1300
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom
Contact:

Re: Add midi Trigger

Postby Gregory » 24 Jun 2018, 15:38

kimwida wrote:

Code: Select all

Triggers.SetPendingTargetHardware("PlaybackSelect", Math.ToEnum("", "Avolites.Menus.MenuEventTypes", "OnSelect"), "Playbacks", 1, "Flash")

But it doesn't work. Actually it works as "Swop".

This is because you have only changed the keyName parameter to Flash which as I mentioned above is not really used. The important parameter is the keyClass which should be changed from PlaybackSelect to PlaybackFlash (if I remember correctly).
User avatar
kimwida
Posts: 250
Joined: 05 Aug 2016, 16:26
Location: Seoul

Re: Add midi Trigger

Postby kimwida » 24 Jun 2018, 18:57

Hi, Gregory.
Thanks for the right answer!!!
Could you tell me the keyclass and keygroup of "Playback Page +1", "Playback Page -1", "Go", "Connect", "Cuelist +1" and "Cuelist -1" button??
It's kind of tiresome to add 6 triggers in every show. :D :D :D
User avatar
Gregory
Posts: 1300
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom
Contact:

Re: Add midi Trigger

Postby Gregory » 24 Jun 2018, 19:13

The keyClass values are as follows:
  • Playback Page +1: PlaybackPageUp
  • Playback Page -1: PlaybackPageDown
  • Go: Go
  • Connect: Connect
  • Cuelist +1: NextStep
  • Cuelist -1: PreviousStep
For all of these the group is NoGroup.
User avatar
kimwida
Posts: 250
Joined: 05 Aug 2016, 16:26
Location: Seoul

Re: Add midi Trigger

Postby kimwida » 01 Sep 2018, 23:39

I think I found what made my midi triggers gone.
If there is already trigger settings on a pc and load a show file which have another trigger settings on the pc, the gone things happen.
(Actually both trigger settings are same, because I upload my show file from my home to cloud and download it to my club.)
Titan doesn't save trigger settings in show file but in local pc or console somewhere.
So it looks like there is some conflicts with both trigger settings and gone when it load show file.
When I loaded the show file in new fresh PC, it showed my disappeared midi settings.
But after I loaded a show file which I downloaded from my cloud, they are all gone again.
User avatar
Gregory
Posts: 1300
Joined: 14 Dec 2007, 15:25
Location: London, United Kingdom
Contact:

Re: Add midi Trigger

Postby Gregory » 02 Sep 2018, 10:01

Prior to version 11 all trigger mappings are stored on a per console basis, meaning that if you use the same show file between multiple consoles each will have a separate set of mappings. If you load the show onto a new console the mappings from the first console will be loaded. In version 11 show files trigger mappings are now stored globally so you will get the same mappings on all consoles although at the point you upgrade a v10.1 show file to v11 it will load in the same way as previous versions.

Who is online

Users browsing this forum: No registered users and 16 guests