lmms icon indicating copy to clipboard operation
lmms copied to clipboard

Connect two Instruments via MIDI won't be saved

Open BaraMGB opened this issue 10 years ago • 8 comments

  1. Open a new project
  2. add two Triple OSC instruments
  3. chose "MIDI: Output: Midi Through: Midi Through Port-0" at the first Instrument
  4. chose "MIDI: Input: LMMS: Triple Oscillator" at the second instrument.

The first Instrument controls the second Instrument now.

  1. save the project.
  2. Open it again.

The connection wasn't saved.

BaraMGB avatar Jan 31 '15 13:01 BaraMGB

The port names are saved in the project file. Connections to system ports seem to be fine on reopening, so I'm thinking the problem could be that the ports don't exist yet at the point in time when the settings are loaded. A "usable" workaround for now seems to be connecting both instruments to the MIDI through port, one to input, the other to output, as those connections are preserved.

So, one would hope setting both ends of the connection explicitly means at least one of the ports exists before connecting (provided the ALSA numbering stays the same), but no luck in that. Weird.

And then there's the thing that ALSA port numbers change depending on which ALSA MIDI apps are running and the order in which they were started. And that doesn't rhyme well with how the connections are saved: <midiport inputcontroller="0" inports="129:1 LMMS:Master" Maybe LMMS should recognize connections to itself as a special case to be able to bypass that problem.

(Added bonus problem: If you make a connection outside LMMS, e.g. using aconnect, LMMS won't notice it at all and not even save it in the project file.)

softrabbit avatar Mar 31 '15 09:03 softrabbit

the problem is that when it's loading the second instrument, before creating the track it runs this line (I suppose runs on another thread):

https://github.com/LMMS/lmms/blob/cfb1465c057fde0452e974415adeed190d579079/src/core/TrackContainer.cpp#L112

and when it creates the track, some lines below:

https://github.com/LMMS/lmms/blob/cfb1465c057fde0452e974415adeed190d579079/src/core/TrackContainer.cpp#L123

it doesn't have time to update the model (done by the first line I linked) in my pc, if the execution is put to sleep for 150ms between those lines, the midi connections are done well

is there a way to check if the model change was done before creating the track?

serdnab avatar Jul 29 '16 02:07 serdnab

Seeing as this is not a new bug, should we get this moved out to the 1.3 milestone?

Umcaruje avatar May 29 '17 14:05 Umcaruje

OK with me.

zonkmachine avatar May 29 '17 15:05 zonkmachine

I can't replicate this. The suggested project saves/opens fine and lets me control one plugin with another.

zonkmachine avatar Apr 09 '24 19:04 zonkmachine

I would like to confirm @zonkmachine 's claim, but I don't understand the issue reproducing:

chose "MIDI: Output: Midi Through: Midi Through Port-0" at the first Instrument
chose "MIDI: Input: LMMS: Triple Oscillator" at the second instrument.

I am in the InstrumentTrackWindow, MIDI tab (with the piano symbol). For MIDI: Input, I have only 2 numerics (channel and velocity) and cannot choose "LMMS: Triple Oscillator". The "MIDI: Output" is also no clear, where do I select "Midi Through"?

JohannesLorenz avatar Aug 05 '24 00:08 JohannesLorenz

Hi, sorry if I butt in and my English is translated, but I have two problems with MIDI that possibly have to do with this issue: The first is that this issue presents that LMMS does not save MIDI connections and the second is that LMMS unexpectedly closes when I create notes in the Piano Roll of a connected or routed instrument track. In the following video I show you an AFP instrument track as an attempt at a "Drum Sampler" in which I control the MIDI of other tracks previously "mapped" or configured to only sound on a single note and at the end of the video I also show you how LMMS unexpectedly closes while I compose a rhythm in Piano Roll. The video has sound and I am using LMMS on Debian Sid Cinnamon.

https://github.com/user-attachments/assets/bc3c9202-4461-4c4e-92a9-609fabfc28de

Gabrielxd195 avatar Aug 05 '24 02:08 Gabrielxd195

I'm moving this out of 1.3 milestone to make the milestone more focused on what we need to fix asap. If this should be fixed asap, feel free to add back in.

Rossmaxx avatar Oct 02 '24 15:10 Rossmaxx