LMMS / lmms

Cross-platform music production software
https://lmms.io
GNU General Public License v2.0
7.98k stars 995 forks source link

Delay problem with instruments that are connected through MIDI inputs/outputs #6701

Open Gregaras opened 1 year ago

Gregaras commented 1 year ago

Bug Summary

Instruments that are connected through MIDI inputs/outputs won't play at the exact same time.

Steps to reproduce

  1. Put two TripleOscillator instruments in Song Editor
  2. Enable MIDI output on the first instrument
  3. Enable MIDI input on the second instrument
  4. Connect second instrument to first one (through MIDI input, 128:0 LMMS:*Name of the first instrument*)
  5. Put inverter effect on either first or second instrument
  6. Play notes on the first instrument

Expected behavior

Silence.

Actual behavior

No silence, instruments won't cancel each other out.

Detailed bug information

First instrument seems to be playing at the correct time and second doesn't. Also, delay seems to be random.

Affected LMMS versions

LMMS 1.2.2 LMMS 1.3.0-alpha.1.102+g89fc6c9 Probably master as well

zonkmachine commented 4 months ago

Expected behavior

Silence.

Reproduced. If I export a project set up according to the 'methods to reproduce' above, it is dead silent on my machine.

Gregaras commented 2 months ago

Expected behavior

Silence.

Reproduced. If I export a project set up according to the 'methods to reproduce' above, it is dead silent on my machine.

Silence is expected behaviour though. Did you perform all the steps? There is 6th step that says to "play notes on the first instrument".

DomClark commented 2 months ago

The MIDI inputs/outputs are for interaction with external MIDI devices or software. LMMS has no control over what happens to the MIDI data between it leaving the output and arriving at the input (which typically happens on a different thread), so the latency can vary. As such, the MIDI inputs and outputs aren't appropriate for internal MIDI routing, which LMMS does not currently support. See similar issue #7107, and the issue tracking this feature, #3485 (consolidated into #1472).