zynthian / zynthian-issue-tracking

Centralized Issue Tracking for Zynthian Project
https://github.com/orgs/zynthian/projects/1
11 stars 3 forks source link

SooperLooper mute/pause state gets muddled when overwriting preset #793

Open polluxsynth opened 2 years ago

polluxsynth commented 2 years ago

Describe the bug When overwriting SooperLooper preset, the mute and pause state gets muddled

To Reproduce Steps to reproduce the behavior:

  1. Add SooperLooper to main out and record 6 loops image
  2. Go to Save Preset menu, and enter the same name (i.e. remove COPY from the end of the suggested name), and press Enter.
  3. The mute and erase states will now have been changed image
  4. When retrieving the saved preset, the mute/pause state is different still: image

This does not happen when saving to a new preset, only when overwriting an existing one.

Expected behavior State of mute and pause should be unchanged.

Setup:

polluxsynth commented 2 years ago

If I understand correctly, the behavior when retrieving the saved preset is as expected, with all tracks muted and paused; however, I still find it odd that the mute button isn't in red for track 6.

riban-bw commented 2 years ago

I am not seeing this behaviour. Will you please provide a snapshot that demonstrates the issue?

polluxsynth commented 2 years ago

Here's the snapshot, but perhaps you need the SooperLooper preset file too?

snapshot.zip

polluxsynth commented 2 years ago

Sooperlooper preset file (the .wav files are a total of 48 MB; I'm not sure if they're too big for github, otherwise I can host them somewhere else if you need them).

Loop test 1.zip

riban-bw commented 2 years ago

I still don't see this with the same preset. Can you capture logs when this happens?

polluxsynth commented 2 years ago

Do you mean just turn on the logging in webconf and capture the output?

riban-bw commented 2 years ago

You can use webconf INTERFACE->UI Log to see the messages logged by Zynthian. First try that to see if it logs anything during the save preset process and if not, you could enable debug mode which will restart the zynthian software. Remember to disable debug (also restarts zynthian) afterwards.

polluxsynth commented 2 years ago

Looking at the UI log there's nothing related to this issue there, however, there are continually messages of the following type being printed out (several times per second):

Nov 04 20:07:28 zynthian startx[515]: ERROR:zynthian_gui.control_thread_task: list index out of range

as long as the Sooper Looper screen is shown.

During the save operation I get 20 or so messages like so:

Nov 04 20:07:42 zynthian startx[515]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 4052.0us

which I wouldn't consider harmful in themselves.

With debug logging enabled, I captured the following when overwriting the preset:

Nov 04 20:14:20 zynthian startx[1939]: ERROR:zynthian_gui.control_thread_task: list index out of range Nov 04 20:14:20 zynthian startx[1939]: ERROR:zynthian_gui.control_thread_task: list index out of range Nov 04 20:14:20 zynthian startx[1939]: ERROR:zynthian_gui.control_thread_task: list index out of range Nov 04 20:14:20 zynthian startx[1939]: DEBUG:zynthian_gui.zynswitch_bold: Bold Switch 3 Nov 04 20:14:20 zynthian startx[1939]: DEBUG:zynthian_gui_controller.config: ZCTRL 'Option': 0 (0 -> 8), None, None Nov 04 20:14:23 zynthian startx[1939]: DEBUG:zynthian_gui.zynswitch_short: Short Switch 3 Nov 04 20:14:23 zynthian startx[1939]: DEBUG:zynthian_gui_controller.config: ZCTRL 'Option': 0 (0 -> 5), None, None Nov 04 20:14:24 zynthian startx[1939]: DEBUG:zynthian_gui.zynswitch_short: Short Switch 3 Nov 04 20:14:24 zynthian startx[1939]: DEBUG:zynthian_layer.load_bank_list: BANK LIST => Nov 04 20:14:24 zynthian startx[1939]: [('', None, '', None)] Nov 04 20:14:24 zynthian startx[1939]: DEBUG:zynthian_layer.load_bank_list: BANK MSB INFO => Nov 04 20:14:24 zynthian startx[1939]: [[0, 1], [0, 0], [0, 0]] Nov 04 20:14:30 zynthian startx[1939]: DEBUG:zynthian_gui.close_screen: SCREEN HISTORY => ['control', 'layer_options', 'sublayer_options'] Nov 04 20:14:30 zynthian startx[1939]: DEBUG:zynthian_gui.close_screen: CLOSE SCREEN 'keyboard' => Back to 'sublayer_options' Nov 04 20:14:30 zynthian startx[1939]: DEBUG:zynthian_gui_controller.config: ZCTRL 'Option': 1 (0 -> 5), None, None Nov 04 20:14:30 zynthian startx[1939]: DEBUG:zynthian_gui.zynswitch_short: Short Switch 3 Nov 04 20:14:30 zynthian startx[1939]: INFO:zynthian_gui_confirm.switch_select: callback Loop test 1 Nov 04 20:14:30 zynthian startx[1939]: DEBUG:zynthian_gui.close_screen: SCREEN HISTORY => ['control', 'layer_options', 'sublayer_options'] Nov 04 20:14:30 zynthian startx[1939]: DEBUG:zynthian_gui.close_screen: CLOSE SCREEN 'confirm' => Back to 'sublayer_options' Nov 04 20:14:30 zynthian startx[1939]: DEBUG:zynthian_gui_controller.config: ZCTRL 'Option': 1 (0 -> 5), None, None Nov 04 20:14:30 zynthian startx[1939]: DEBUG:zynthian_layer.load_presetlist: PRESET LIST => Nov 04 20:14:30 zynthian startx[1939]: [['/zynthian/zynthian-data/presets/sooperlooper/default.slsess', 0, 'default', '', 'default.slsess'], ['/zynthian/zynthian-data/presets/sooperlooper/sync2clock.slsess', 1, 'sync2clock', '', 'sync2clock.slsess'], ['/zynthian/zynthian-my-data/presets/sooperlooper/Loop test 1.slsess', 0, 'Loop test 1', '', 'Loop test 1.slsess']] Nov 04 20:14:30 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:30 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:30 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:31 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:31 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:31 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:31 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:31 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:31 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:31 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:31 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:31 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:31 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:31 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:31 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:31 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:31 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:31 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:31 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:31 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:31 zynthian startx[1939]: DEBUG:zynthian_gui.close_screen: SCREEN HISTORY => ['control', 'layer_options', 'sublayer_options'] Nov 04 20:14:31 zynthian startx[1939]: DEBUG:zynthian_gui.close_screen: CLOSE SCREEN 'sublayer_options' => Back to 'layer_options' Nov 04 20:14:31 zynthian startx[1939]: DEBUG:zynthian_gui_controller.config: ZCTRL 'Option': 5 (0 -> 8), None, None Nov 04 20:14:32 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:32 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:32 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:32 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:32 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:32 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:32 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:32 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:32 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:32 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:32 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5909.0us Nov 04 20:14:32 zynthian startx[1939]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 5690.0us Nov 04 20:14:36 zynthian startx[1939]: DEBUG:zynthian_gui.zynswitch_bold: Bold Switch 1 Nov 04 20:14:36 zynthian startx[1939]: INFO:zynthian_gui.zynswitches_midi_setup: CUSTOM I/O SETUP...

(The display is now back at the audio mixer screen).

riban-bw commented 1 week ago

The reason the state changes on save is beacause the core save-preset code reloads the preset afte save and zynthian mutes and starts loops on load in order to synchronise them. (Whether it should is open to debate!) I don't know why we load presets after saving. It seems like odd behaviour. Maybe @jofemodo can explain. I would prefer to remove this behaviour and implement per-engine as required.

The reason for the apparently random muting may be because zynthian asserts the saved state then waits 0.5s for the state to be applied then polls for current state. I wonder whether the displayed state is the actual state? It shouldn't really need to do this because it registers for and reacts to SL notifications of state change but maybe there are some channel/global settings that are not monitored and have to be polled. There is also a 0.5s wait for controls to be updated but I wonder if this actually works. It may be in the same thread as the UI update so may not be doing what is expected of it.