Skip to content

step-button handling for ParHoverMIDI_VSN1 - general midi controller #38

@cfletch111

Description

@cfletch111

I hope I'm not causing more confusion if this is already handled. Very green at TD. This is a very useful tool!
Hi — I tracked down a step-button issue in ParHoverMIDI_VSN1 and wanted to share what I found.

My setup clarification:

  • Knob is sending CC
  • Step buttons are sending MIDI notes

What seemed to be going wrong:

  1. The step CHOP Execute path needed to trigger on button press (Off to On), not release (On to Off).

  2. The step callback needed the original indexed channel name like ch1n125, ch1n126, etc., not a renamed generic channel like step.

  3. Even after fixing those two things, the internal step handler still appeared broken:

    • onReceiveStep(channel_name, value) was definitely being called
    • midi_handler.handle_step_message(index, value) returned True
    • but currStep / _currStep did not update

So the MIDI routing itself seemed fine, but the built-in step handling reported success without actually changing the selected step.

For reference, this chopexec2 workaround fixed it for me:

def onOffToOn(channel, sampleIndex, val, prev):
    ch_name = op('null_step1')[0].name

    ext_obj = ext.HoveredMidiRelativeExt
    step_lookup = {}

    for block in ext_obj.seqSteps:
        idx = int(float(block.par.Index.eval()))
        step_val = float(block.par.Step.eval())

        # keep the incoming channel prefix, only swap the note/index part
        prefix = ch_name.split('n')[0]
        step_lookup[f'{prefix}n{idx}'] = step_val

    if ch_name in step_lookup:
        step_val = step_lookup[ch_name]
        ext_obj.currStep = step_val
        ext_obj._currStep = step_val
        print('STEP SET TO:', ch_name, step_val)

    return

def whileOn(channel, sampleIndex, val, prev):
    return

def onOnToOff(channel, sampleIndex, val, prev):
    return

def whileOff(channel, sampleIndex, val, prev):
    return

def onValueChange(channel, sampleIndex, val, prev):
    return

This workaround:

  • uses note buttons for step selection
  • reads the indexed channel from null_step1
  • matches against the configured step rows dynamically
  • updates currStep and _currStep directly
  • survives MIDI channel changes because it preserves the incoming ch<n> prefix

So the likely real fixes in the component would be:

  • make sure the step CHOP Execute path triggers on press, not release
  • preserve the original indexed step channel name
  • fix handle_step_message() so that when a configured step index matches, it actually updates currStep / _currStep

In short:

  • knob = CC
  • step buttons = notes
  • routing was working
  • built-in step selection seemed not to update internal state
  • direct assignment in chopexec2 fixed it immediately

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions