Midi Panning strange behavior with VirtualMIDISynth

It seems you're using an AdBlocker or JavaScript is disabled!

This sites offers only FREE software and it's supported by a few advertisement boxes (no intrusive popups).

This 10 seconds wait is to let you update your AdBlocker whitelist...

Got it, show me the content...
Please enable JavaScript!
Posts: 1
Joined: April 16, 2019 - 15:35
Midi Panning strange behavior with VirtualMIDISynth

I have a question regarding the usage of midi control change (CC) message number 10 with VirtualMIDISynth.

Midi CC 10 is described as: Controls the left and right balance, generally for stereo patches. 0 = hard left, 64 = center, 127 = hard right

I was testing VirtualMIDISynth with a MAX/MSP patch that uses the pan CC message to send one instrument on one channel to the left and another instrument on a different channel to the right. Unfortunately, this was not working with VirtualMIDISynth but it was working fine with Microsoft GS wavetable synth.

I have therefore created a simple patch (see attached file) that allow to send the pan CC message to set the balance and then to send midi note... With MS GS the balance was working as expected but with VirtualMIDISynth the balance was modified but never reached hard left or right.

I first suspected a bug in VirtualMIDISynth, but I have done more tests to be sure. I have found out that in fact this problem seems to be related to the SoundFonts libraries. I have tested 6 SF lib (FluidR3_GM, Timbers of heaven, Arachno, SGM, CromiumRevA, WeedsGM3) and I got a correct behavior of VirtualMIDISynth regarding pan CC only with the last two lib.

I am just starting to use VirtualMIDISynth and I am not familiar with SF libraries and therefore I do not understand why we have the CC pan messages not fully working on some libraries?

I would appreciate if someone can provide me with an explanation and if there is a way to fix this, so that CC Pan messages works on all SF libraries. It is too bad that I can’t use my favorites SF lib with VirtualMIDISynth :(

Attachments (Only registered users)
Pan CC problem.PNG
Posts: 74
Joined: September 25, 2013 - 16:38
Re: Midi Panning strange behavior with VirtualMIDISynth


This phenomenon actually is not related to whole SF2 soundfonts but individual instruments/presets in a soundfont.

According to SF2 specification instruments are given a set of default modulators that can be overridden by the soundfont designer if he wants to. Such a modulator is CC# 10 Pan amount. (A soundfont designer can even completely disable panning or e.g. disregard velocity values for an instrument if he wants to.)

E.g in case of FluidR3_GM this 'ignored full panning' phenomenon definitely affects the default program 0 Acoustic Grand Piano but e.g. program 2 Electric Piano or program 127 Gun Shot is not affected.  

In order to change the panning behavior you should modify the affected instruments in the soundfont. Of course an alternative could be to implement a force full panning override option in the soundfont handling engine but Bassmidi used by VMS does not provide such option currently.

Also remember that enabled channel effects like reverb/chorus always produce 'wet' signals that are present on both channels. So reverb/chorus effects should be disabled to produce full left/right panning even with instruments programmed to allow full panning.