Request: Function to check 'event' status (or workaround to issue herein)

I am looking for a way to check if an element is generating events. It would be in a similar vein as event_trigger() function in that you’re interacting with a physical component without actually moving it.

event_status(element) would return the state of an element to see if it is generating events or not (idle). I don’t want the value being returned just the state.

My issue is that, when I use a Grid encoder to change the value of a parameter on a hardware device, that device sends the change back out. I am using midi_rx to have the encoder’s value stay in sync. The problem is that it gets wonky because of the feedback.

If I could check to see if an element is idle or generating events, I could have midi_rx ignore those incoming values.

In simpler terms:

IF encoder is generating events then, midi_rx does not translate/update values. ELSE translate/update values.

Without this type of function, is there another way to achieve this? The device cannot be set to only send data when locally updated. It just sends its values whenever they are changed regardless of the source.

EDIT: Thinking this through a little further, could a timer be set when an element generates an event (I’m sure it can)? If the timer is running, ignore incoming MIDI messages for that element. Something to that effect.

Hi,

I could be misunderstanding your use-case, but wouldn’t the elapsed_time (docs link here for encoder) type of function useful here?

It tells you the time elapsed since the encoder event was triggered.

1 Like

Yes. This might work.

The issue I am trying to overcome is undesirable MIDI feedback. I am trying to keep an encoder in sync with the hardware’s parameter value regardless of which device changes the value. The feedback issue comes from when I turn an EN16 encoder, it updates my hardware’s values but then the hardware sends those values back and makes things screwy.

My initial thought was to check if the EN16 encoder was being manipulated. If it was then, ignore incoming MIDI messages for that element.

However, a timer like the one you linked (I’ve not read it yet as I’m off to work) might also help me achieve the same results:

IF elapsed_time < X then, do not pass along MIDI to that element. ELSE, pass along MIDI to that element.

I"ll check this afternoon if I can achieve what I want. Thanks for the info!

1 Like