Sf2 and 16 MIDI-channel routing in HW-keyboards

Having trouble with LMMS? Ask about it here.
I'm trying to use sf2 with the GS midi set "General User." I have assigned 16 instances of it to my orchestral instruments, and they play fine. However, when I play them with my midi keyboard, I hear only the flute, which is the first instrument, and on channel one. If I assign the next one, Oboe, to channel 2, I still hear the flute. This is only when trying to play with my midi keyboard. When I hit Playback, they all do play correctly. Can't figure out what I'm doing wrong.

Thanks, Mike
mdiemer wrote:Can't figure out what I'm doing wrong.
My problem is that i dont own midi-hw, so the best i can do is to change you topic a bit, and then hope one of the midi-hw users chimes in.
We also have a chapter in the wiki, but i doubt the exact issue has been dealt with
https://lmms.io/wiki/index.php?title=Using_MIDI
Hi Mike, musikbear, I don't use LMMS a lot these days but I pop in here from time to time and no-one else seems to want to help so...

I assume your "different instances" means each on a different track. I only did a quick experiment with 3 SF2 tracks and a couple of 3OSCs just to check but it works perfectly for me on Windows. I enable the MIDI keyboard on each track and set the channel number in the track's MIDI tab. Then when I change the channel that the keyboard is transmitting on it plays a different instrument.

Are you sure your keyboard is actually sending on different MIDI channels ? In my M-Audio keyboard it is "Global Channel" that I have to set. If I change "Channel" that only applies to specific knobs/controls not to the main keyboard (which has confused me more than once).

Steve
slipstick wrote:Hi Mike, musikbear, I don't use LMMS a lot these days but I pop in here from time to time and no-one else seems to want to help so...
You are missed :)
You have forgotten more about MIDI that i ever knew
I assume your "different instances" means each on a different track. I only did a quick experiment with 3 SF2 tracks and a couple of 3OSCs just to check but it works perfectly for me on Windows. I enable the MIDI keyboard on each track and set the channel number in the track's MIDI tab.
Could you upload such a project on LSP?
I would like to study it, so i can give better help to all those midi-kb problems.
Then when I change the channel that the keyboard is transmitting on it plays a different instrument.
This 'channel-change' is that done in LMMS or ON the actual midi-hw-keyboard?
Are you sure your keyboard is actually sending on different MIDI channels ? In my M-Audio keyboard it is "Global Channel" that I have to set. If I change "Channel" that only applies to specific knobs/controls not to the main keyboard (which has confused me more than once).
That does indeed sound odd :?
I believe the most common question about midi-kb's is why LMMS works different with a midi-hw-kb, than it does with a pc-kb.
In other words:
Why issent it sufficient just to activate any track-instrument (giving it focus) in LMMS to make that instrument play, when a key on the midi-hw-kb is pressed (as it indeed is, with a simple pc-kb)
-IF! it indeed is so, then we need to change the architecture for midi completely, so it is the same as for pc-kb -Imo (if at all possible)
(sorry i got technical there :)
I also think that hw-MIDI-kb function should be depending on LMMS-settings, so different hw-MIDI-kb would be usable in next to identical fashion (if at all possible)..
musikbear wrote:
Then when I change the channel that the keyboard is transmitting on it plays a different instrument.
This 'channel-change' is that done in LMMS or ON the actual midi-hw-keyboard?
The initial setup is In LMMS but then the hardware keyboard itself needs to be changed to send data to LMMS on the right channel. The MIDI spec allows for 16 different channels and all MIDI keyboards I've ever met allow the user to select which one they are working with.
I believe the most common question about midi-kb's is why LMMS works different with a midi-hw-kb, than it does with a pc-kb.
In other words:
Why issent it sufficient just to activate any track-instrument (giving it focus) in LMMS to make that instrument play, when a key on the midi-hw-kb is pressed (as it indeed is, with a simple pc-kb)
Well I had nothing to do with the design of LMMS but I'd guess that one reason is that there is only ever one PC keyboard but you might have several different MIDI input devices connected (I have 3, two keyboards and a controller ) and each can be working on any one of 16 MIDI channels - so at some point you have to tell LMMS which you want to use and what MIDI channel it's transmitting on. There are certainly other ways of managing the problem but they would involve a bit of a re-design.

I've uploaded midichannels.mmp to LSP in the Tutorials section but there's really not much to see. It's all in the setup on the MIDI tabs of the different tracks.

Steve
We were busy answering the question as asked...but when I think about it wouldn't it be a lot easier to have all the instruments on the same channel and just hit the SOLO button for the one you want to listen to ?

Steve
Still can't get it, but I appreciate the responses. I forgot to mention, when I play the different instances of the sf2 player, I do get the correct instruments. So, the flute sf2 instance plays the flute, the oboe plays the oboe, etc. I'm talking here about the little keyboard actually on the sf2 player.

As for my midi keyboard, it's very basic. No controls except on off (power). Nothing to configure, I do all configuring in the DAW.

No matter how I configure the midi settings, all I get is channel one, flute. I have to choose my audio interface (UR-22), or I can't get sound at all from my midi keyboard.

Whoa, I'm making progress. Still don't have it, but I now have both flute and oboe playing together. Hopefully some more fooling with midi and channel settings will do it.
If your MIDI keyboard is really fixed on channel 1 then all you can really do is set all tracks to MIDI + Ch1 and use the Mute and Solo buttons to choose which you're hearing. I've never met a MIDI keyboard that can't change channel but I've obviously led a sheltered life ;).

Good luck - Steve
slipstick wrote:all MIDI keyboards I've ever met allow the user to select which one they are working with.
you might have several different MIDI input devices connected (I have 3, two keyboards and a controller
Oh dear -i diddent think about that 8|
I've uploaded midichannels.mmp to LSP in the Tutorials section but there's really not much to see. It's all in the setup on the MIDI tabs of the different tracks.
Thanks! I will look at it anyways, because i kind of need to be able to explain the setting on /in lmms
mdiemer wrote: As for my midi keyboard, it's very basic. No controls except on off (power). Nothing to configure, I do all configuring in the DAW.
Ah.. Now i think we need to know the Mark and type-version of that MIDI-HW-KB, and Steves idea with solo and mute is properly the only way.
As for the midi keyboard, it's called "The Master Key." 49 keys, on/off switch. As basic as it gets. I bought it in the late 90's, when I knew zero about this stuff. Paid 200.00, what a rip off. Still, it's served me well. I do intend to upgrade at some point...

It has worked well on Reaper and Sonar, didn't have this problem. (Not a criticism of LMMS, I think it's superb, more a limitation of my keyboard). I am going to try to route things as much as I did on Reaper as I can, and see if that makes a difference. For example, looking at the list of inst's on the left of the screen, each one has a little gear, which gives you various choices. On Reaper, with the corresponding feature, I have to set it to my interface (UR-22), and also specify the channel for each instrument. Weirdly, there is a setting also for the UR-22 as a whole, which must be set to "all midi inputs." I don'r know what corresponds to this in LMMS.

now, in LMMS there is also the midi settings on the sf2 player. This is where I may be confused. I still have hope this can be resolved. With Reaper, it took over a week, with constant input from Dark Star, to nail it. I suspect my settings on Reaper may be tailored specifically to this primitive keyboard. So, maybe there is a combination of settings in LMMS that will work. Fortunately, I'm stubborn. If there is a solution, I'll find it.