Assign "select" to S4 button

Hello zynthian friends!

I recently got zynthian (v4.1 I believe)

So far it’s been great, but one thing I’m struggling with is assigning S4 button to select action via wiring in web config

I tried assigning “select” and setting it to midi note 57 or 65 and it didn’t work.

I’m a bit lost in the docs and forum topics and probably doing something wrong.

Using latest ORAM version.

Any help appreciated!

Here’s my midi note setting:


And UI Action Release:

In essence I’m just trying replicate actions performed by encoder 4 press with S4 button instead since I find encoder buttons inconvenient

Hi @sacred.goose. A warm welcome to our community.

This may be one of the most reported issues with CUIA. Select is not what you are looking for. You can assign the button to zynswitch 3 then it will act exactly like the 4th encoder, including bold and long press. (3 because it is zero-based.)

Thanks for the reply,
Yes, I tried that as well:


Maybe it’s the wrong way to do it?

What ever number of zynswitch I tried, it doesn’t work

UI Action Push - does nothing with zynswitches either

When UI Action Release is set to Zynswitch 3, in UI log I see :
ERROR:zynthian_gui.cuia_zynswitch: zynswitch requires 2 parameters: index, delta, not {params}

Seems like I’m missing some parameters here and I’m not sure where to lookup the correct values

UPD: I figured! The params for short switch should be Zynswitch 3,S
And it works

According to some deep forum digging:

ZYNSWITCH index, action_type

index => integer number, starting from 0
action_type =>
    P => Push
    R => Release
    S => Short
    B => Bold
    L => Long

So I guess for bold press I should put Zynswitch 3,B and for long Zynswitch 3,L

I don’t think this all was mentioned before in the forums in the context of S1-4 action buttons at least. Phew!

1 Like

Well done for figuring that out. Many may have failed our little initiation test. :smile: I sometimes forget the exact syntax because we have different configuration for hardware (wiring) binding, keybinding and MIDI binding. I feel that keybinding is better implemented and want to consolidate all of these to use similar methods. (I would say that though - I implemented keybinding! :blush:)

2 Likes

Thanks, didn’t realise there was a test! :sweat_smile:

Finding UI Log was really helpful.

But yeah, some streamlining would be beneficial for future generations :slightly_smiling_face:

Thanks for pointing to the right direction, I can proceed with more musical adventures now, cheers!

Didn’t want to create another post, but having zynswitch troubles again, this time with macropad keybindings.

It seems like both default and custom keybindigs do not work with zynswitches.

Example : Enter - > zynswitch 3 : nothing happens

The only working command that sort of works is, for example :
Enter -> zynswitch 3,S

But it has an issue, I think it sends double impulse, when I press Enter on ZunthPad it starts playing a clip but immediately arms it to stop after single loop

Any feedback welcome

This is no valid. You need to specify the action type: P, S, B or L. Try “P” with the zynpad.

Regards

OK, so default values are indeed outdated which is just zynswitch 3

I tried P and R - for release, both seem to do nothing as well :person_shrugging:

Please, check the UI logs in debug mode. You will see there the flow of CUIA calls. Perhaps this help us to understand the problem.

Regards

For each keypress I always see 2 events firing immediately one after another, for zynswitch 3,S:

Sep 15 00:24:38 zynthian startx[1448]: DEBUG:zynthian_gui_keybinding.get_key_action: Get keybinding function name for keycode: 46, modifier: 0
Sep 15 00:24:38 zynthian startx[1448]: DEBUG:zynthian_gui.zynswitch_short: Short Switch 3
Sep 15 00:24:38 zynthian startx[1448]: DEBUG:zynthian_gui_keybinding.get_key_action: Get keybinding function name for keycode: 46, modifier: 0
Sep 15 00:24:38 zynthian startx[1448]: DEBUG:zynthian_gui.zynswitch_short: Short Switch 3

for zynswitch 3,P:

Sep 15 00:27:25 zynthian startx[1448]: DEBUG:zynthian_gui_keybinding.get_key_action: Get keybinding function name for keycode: 46, modifier: 0
Sep 15 00:27:25 zynthian startx[1448]: DEBUG:zynthian_gui_keybinding.get_key_action: Get keybinding function name for keycode: 46, modifier: 0

So for P the keybinding is working but it doesn’t call any zynswitch actions, for S it calls it twice in a row

Is the macropad sending the key press event twice?

I tried with regular keyboards as well, all showing the same behavior. Investigated further and I see that one event is sent on key press, and second on key release.

A more specific events like arrow keys, screen_audio_mixer etc. - works as expected when assigned to any key.

For example UP key:

Sep 15 11:25:39 zynthian startx[1426]: DEBUG:zynthian_gui_keybinding.get_key_action: Get keybinding function name for keycode: 111, modifier: 0
Sep 15 11:25:39 zynthian startx[1426]: DEBUG:zynthian_gui.callable_ui_action: CUIA 'arrow_up' => None
Sep 15 11:25:43 zynthian startx[1426]: DEBUG:zynthian_gui_keybinding.get_key_action: Get keybinding function name for keycode: 111, modifier: 0

CUIA 'arrow_up' => None is fired on key press and nothing is called on key release which is correct behavior. But zynswitches either not calling anything (P,R) or calling same event both on press and release (S).

I thought I had fixed this but maybe it is in a Dev branch. I am not home this week so can’t check.

That would be really nice if it worked. The workflow feels so much faster and smoother with a small macropad, so less force is needed compared to rubber buttons and encoder pushing. Looking forwards to the fix :sloth:

Did you have time to look into this issue? :eyes: I’ve setup a workaround keyboardings to access stuff directly but it’s not as effective without zynswithes acting as expected.