LMMS / lmms

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

Instrument track audio correlated to MIDI inputs/outputs from other instrument tracks, present in playback, does not make it into exported files #7107

Open byttyrs opened 9 months ago

byttyrs commented 9 months ago

Bug Summary

There are a number of bugs I encountered with MIDI I/O between instrument tracks, and a number of unresolved issues mentioning MIDI I/O, but this one I think is novel (I have not checked resolved issues).

In LMMS 1.2.1, audio can be heard in playback from a Song editor instrument track with a blank midi timeline, as long as it receives MIDI output from another instrument track in the Song editor or in the Beat/Bassline editor. This remains true if the source tracks are muted. However, this audio is missing from exported audio files when exporting, unless said MIDI is recorded as a hard input onto the song editor timeline for the song (e.g. by hitting record-with-backing-track on the song editor instrument track's piano roll; though this also crashes often).

Steps to reproduce

  1. Add two default TripleOscillator instrument tracks, "Muted Source" and "Audible Output," to the Song editor. Mute "Muted Source," and add MIDI in the piano roll.
  2. Add a default TripleOscillator instrument track, "B/B Source," into the Beat/Bassline editor. Mute "B/B Source," and add MIDI in the piano roll.
  3. Click the gear icon on "B/B Source" and "Muted Source," MIDI > Ouput, and check "Audible Output" for both.
  4. Place a segment on the Song editor timeline for the appropriate Beat/Bassline track.
  5. Hit play, to confirm that the Song editor instrument track, despite not having any MIDI in its timeline, produces the expected sounds.
  6. File > Export project..., or File > Export tracks...
  7. Play the exported file, and observe that the appropriate audio is not present.
  8. Add a piano roll entry to the timeline for "Audible Output," and hit the Record (with backing track) button. Observe MIDI being input in real time from "Muted Source" and "B/B Source," along with the expected audio. Hopefully get through this without a crash or without LMMS's sound cutting out entirely.
  9. Press Play in the Song editor. Observe that the appropriate sound is now "doubly present," extra loud, because two copies of the same MIDI are being played at once.
  10. File > Export project..., or File > Export tracks...
  11. Play the exported file, and observe that the originally-intended audio is present in the export, but not "doubly present" as it is in playback.

(In order to make instrument tracks appear in the Gear icon menu > MIDI > Output or Gear icon menu > MIDI > Input, I must first select "MIDI through" in any track to make this an option; I'm not sure why. Setting "Audible Output" to take "Muted Source" and "B/B Source" as MIDI inputs does nothing, either in playback or in export.)

Expected behavior

Sound present in playback will also be present in export. When export is run, if an instrument track is set up to receive MIDI from another instrument track (whether present in the Song editor timeline or in a Beat/Bassline track programmed to play concurrent in the Song editor; and whether the source instrument tracks are muted or not), it should receive and interpret that MIDI as it would in live playback, recording the appropriate audio into the export file.

Actual behavior

MIDI output from other instrument tracks will not be rendered in the exported file. Only hard-input MIDI on the song editor timeline makes it into exports.

Affected LMMS versions

LMMS 1.2.1, for certain.

DomClark commented 8 months ago

This is intended behaviour. The MIDI input and output features are designed for interaction with external devices, not for internal MIDI routing. MIDI input is ignored during rendering to avoid including unwanted input in the rendered file (indeed, since rendering is not done in real time, any external MIDI signals would generally be incorrect anyway). Internal MIDI routing is not yet supported, but is tracked in #3485/#1472.