From 1bc599b6834b761a8228b51b7995c0c47465e142 Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Sat, 9 Apr 2022 15:32:12 +0200 Subject: [PATCH] MIDI bank is set after the MIDI program Fixes bug regarding incorrect program for the first few notes of some MIDI tracks. --- Content.Client/Instruments/InstrumentSystem.cs | 2 +- Resources/Changelog/Parts/midi.yml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 Resources/Changelog/Parts/midi.yml diff --git a/Content.Client/Instruments/InstrumentSystem.cs b/Content.Client/Instruments/InstrumentSystem.cs index 55a98a4827..c19ff76f9a 100644 --- a/Content.Client/Instruments/InstrumentSystem.cs +++ b/Content.Client/Instruments/InstrumentSystem.cs @@ -93,8 +93,8 @@ public sealed class InstrumentSystem : SharedInstrumentSystem if (!instrument.AllowProgramChange) { - instrument.Renderer.MidiProgram = instrument.InstrumentProgram; instrument.Renderer.MidiBank = instrument.InstrumentBank; + instrument.Renderer.MidiProgram = instrument.InstrumentProgram; } instrument.Renderer.LoopMidi = instrument.LoopMidi; diff --git a/Resources/Changelog/Parts/midi.yml b/Resources/Changelog/Parts/midi.yml new file mode 100644 index 0000000000..a59d42d475 --- /dev/null +++ b/Resources/Changelog/Parts/midi.yml @@ -0,0 +1,4 @@ +author: Zumorica +changes: + - type: Fix # One of the following: Add, Remove, Tweak, Fix + message: Fix bug where sometimes instruments would have the incorrect MIDI program for the first few notes.