zynthian / zynthian-issue-tracking

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

CC binding broken #1277

Closed riban-bw closed 1 week ago

riban-bw commented 2 weeks ago

Describe the issue

CC binding (MIDI learn) is broken. The most obvious indication is that sustain pedal does not work and cannot be functionally learned.

To Reproduce

Steps to reproduce the behavior:

  1. Add an engine, e.g. MDA JX10.
  2. Show control view and observe CC64 is mapped to sustain.
  3. Press sustain pedal.

    Expected behaviour

    Sustain is asserted.

    Actual behaviour

    Sustain is not asserted.

    Additional context

    You can relearn CC64 to sustain parameter but it still doesn't work.

Configuration

Hardware

Raspberry Pi 5 Model B Rev 1.0
Audio: Behringer UMC1820
Display: MIPI DSI 800x480
Wiring: DUMMIES
I2C: Not detected
Profile: 

System

Debian GNU/Linux 12 (bookworm)
Build Date: 2024-10-02
Memory: 20% (1612M/8052M)
SD Card: NA (NA/NA)
Temperature: 52.7ºC
Overclock: Maximum

MIDI & UI

Tuning: 440 Hz
Master Channel: 16
Preload Presets: Off
ZS3 (SubSnapShots): On
Power Save: 10 minutes
Audio Levels on Snapshots: On

Software

zyncoder: vangelis (c1b7cb1) 
zynthian-ui: vangelis (c26cff2)
zynthian-sys: vangelis (92b7246)
zynthian-data: vangelis (305b301)
zynthian-webconf: vangelis (76265bb)
riban-bw commented 2 weeks ago

This is the auto-detect of CC (relative) mode. The sustain pedal triggers zynthian_controller::midi_control_change which has self.midi_cc_mode = -1 and hence tries to detect mode. This fails then self.set_value(value, send) causes an exception because value is not defined.

THIS IS URGENT!!!

jofemodo commented 1 week ago

OK! It’s “almost fixed”. I pushed an update that mitigates the issue in vangelis. Probably it could be considered solved for most use-cases but there are still some edge cases that could be problematic.

jofemodo commented 1 week ago

I would close this. There is probably some edge case, but let's allow users to discover it ;-)