Jump to content

Configuration of toggle-switch for AINSER


FantomXR
 Share

Recommended Posts

Hey,

 

here is the situation:
I've a keyboard which has a AINSER8 inside. I soldered a jack to it for a switch. The switch works flawlessly. I configured ain_mode=switch. So it sends 127 when pressed and 0 when depressed.

What I want to achieve is, to send 127 when I press it the first time.... release it... press again and it should send 0. 

 

I tried various things with NGR-commands... but I didn't get it to work.

 

Any suggestions here?

 

Thanks,

Chris

Link to comment
Share on other sites

Hi Thorsten,

 

I tried this:

 

EVENT_AINSER   id=65     ain_mode=Switch fwd_id=BUTTON:1001

EVENT_BUTTON id=1001 button_mode=Toggle    type=cc cc=1

 

without success. MIOS doesn't monitor anything.

You already wrote in this thread:

that only a value is forwarded with fwd_id but it won't trigger a midi event. Maybe that's there is the problem?

Edited by FantomXR
Link to comment
Share on other sites

You are right, looking into the source code I can confirm that I even commented this behaviour ;-)

 

Seems that we've finally found a use case where it makes sense to think about a generic way to trigger the MIDI event during forwarding.

However, as always it will take some time until such a new feature will be available.

 

Until then you could just execute a .NGR section with the AINSER event in addition, and from there you can send the current button value (which toggles between min and max) with the "TRIGGER BUTTON:<button-id>" command.

 

Best Regards, Thorsten.

Link to comment
Share on other sites

Hey Thorsten,

 

I tried the following NGR:

 

 

### Leslie Switch ###
if ^section == 6
 if AINSER:67 == 127
 trigger BUTTON:17
endif
endif

 

and NGC:

 

EVENT_BUTTON id=17 button_mode=Toggle fwd_id=LED:17 type=cc cc=1

EVENT_AINSER id=67 ain_mode=Switch type=meta meta=runsection:6

 

If I now press the sustain switch, it just sends out CC 1 with value 0. But not 127.

Where is my mistake?

Edited by FantomXR
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...