Sign in to follow this  
Followers 0
tomcc

Request: inverted option in EVENT_BUTTON

7 posts in this topic

Hello TK -

Using NG on a pipe organ.  Need all those inputs!  Keyboards are 1 line per key,  no matrix.  Keying is usually 12 volts on pipe organs,  and can be either active high or active low.  Ours is active high,  but running through ULN2803 to convert voltage,  which also inverts.  This would be a very common situation for someone trying to use NG on a pipe organ.  

Since there is no matrix,  I am just using one line per key into DIN,  and then EVENT_BUTTON for each key.  This works beautifully in bench testing and provides exactly what I need (Note_On when a key is pressed, and Note_Off when released)  for non-inverted input.   But of course my input is inverted.   Inverted inputs are not unusual.  

I have searched the docs and see inverted options in matrix and keyboard statements,  but not in EVENT_BUTTON.   Some work arounds have been suggested and I have tried them,  but none of them provide the elegant simplicity of EVENT_BUTTON.  (for example,  tried use type NOTE_OFF but only get Note_off msgs.  Likewise,  an option that only provides Note_On 0 and 127 is not a satisfying solution.  I need  to track MIDI messages and would like for them to be standard and make sense.  

What would solve all of this and enhance the capability of EVENT_BUTTON is an INVERTED yes/no option (default no).   

Would you please consider adding this feature?   It would be a life saver for me!

Thank you for considering this request,  and thank you for all your hard work in putting together this great system. 

Tom

Tacoma, WA USA

Share this post


Link to post
Share on other sites

Thank you so much, TK.   I will be downloading it and checking it out.   

You are amazing!

Have two busy work days ahead but plan to bench test it Tuesday night and will let you know. 

It would also be extremely helpful if EVENT_LED had an INVERTED option.  This might seem silly for LEDs but for pipe organs,  the EVENT_LED  would be the means to drive the key switch bus (which is typically not matrixed) for midi playback and might require either polarity.   In general,  it seems that for maximum flexibility that any input or output should allow for either polarity.  

I hope this would not be too much bother to implement.  

The following are just some musings,  and not nearly as important,  but also wonder if an INVERTED option might be helpful and perhaps more efficient at the chip level (all 8 bits of a chip inverted with a single instruction) and our DIN/DOUT board (32 bits at a time)  and/or the entire bus,  e.g.:  ALL DINS INVERTED  or ALL DOUTS INVERTED.  

The 256 possible inputs and outputs now available in NG opens up MIDIBOX to the pipe organ world.  128 was just not enough unless the person was a real wiz and able to wire their keyboards into a matrix,  and I know there are some of those smart people on this board.  But that kind of wizardry is beyond most pipe organ technicians.   They are looking for a system where they can wire one key to an input and/or ouput.  NG now gives them that capability.  

Thank you for all your great work in putting together this incredible system and for giving it away to the world!

Tom

 

Share this post


Link to post
Share on other sites

Hi Tom,

fortunately I also implemented the inverted option for EVENT_LED (I had the same use case in mind :)

For bulk-assignments, I've actually another idea: the possibility to set "attributes" from a .NGR script, and to provide some kind of iterator, such as "set_attribute BUTTON:{1-256} inverted 1"

But it will take some time until this will be available, because it requires some parser extensions.

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites

Hello Thorsten -

There is no project.hex in the LPC17 directory of this zip file.  Am I missing something? 

Thanks

Tom

 

Share this post


Link to post
Share on other sites

Look like a nice function !

can we have a short example and how to write it?

"event_button id=1 type=noteon chn=1 key=0x00 inverted=1"

will send note on button depresed and note off button pressed, for a momentary on button contact type, is that ok ?

Best

Zam

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0