You are here
Home › Forum home › VirtualMIDISynth › General discussions & questions › Assign SFZ soundfonts as drumkits ›Assign SFZ soundfonts as drumkits
Please let our ADS show!
This sites offers only FREE software and it's supported by a few advertisement boxes (no intrusive popups).
Please:
- disable your AdBlocker by adding CoolSoft website to whitelist
- give the proper cookie consent
- enable JavaScript for this website
This seconds wait is to let you update your browser configuration...
Ok, I've done the required changes... now show me your content!Pages
- LenweSaralonde
- Posts: 9
- Joined: April 28, 2020 - 12:12
- coolsoft
- Posts: 2004
- Joined: March 25, 2012 - 01:19
VMS support to SFZ was added because BASS library (the one used by the synth component) started supporting it.
I'm sorry but I don't know SFZ format enough to help you...
Hope some more skilled user could jump into this thread ;)
- falcosoft
- Posts: 129
- Joined: September 25, 2013 - 16:38
Hi,
Actually this is not a problem with the SFZ file definition. Bassmidi uses the same logic for loading SFZ files as SF2 files (namely using values given to BASS_MIDI_StreamSetFonts() ).
SFZ files are special in the sense that they always contain 1 instrument and provides no Preset/Bank information. Thus Bassmidi cannot do other than consider all SFZ instruments as if they provide Bank:0, Preset:0.
@Claudio:
If you remember our last discussion about Bank/Preset loading problems in the last post I mentioned the theoretical possiblities regarding valid Bank ranges:
https://coolsoft.altervista.org/en/forum/post/2993#post2993
There I mentioned:
2. When we calculated the usable bank range as -127 to 127 we left the Drum bank (located at Bank 128 in soundfonts) out of consideration. The real usable range is from -128 to 255.
This becomes relevant in case of SFZ instruments if you want them to be available in Drum channels. So you should enable at least Bank offset 128. This way the users could be able to position SFZ instruments (always considered to be at Bank 0 by default) to Drum channel by giving them a Bank offeset of 128. This would work since as I have written above Bassmidi handles SFZ files the same way as SF2 files and 128 is the pseudo-bank for Drum instruments in SF2 specification.
Bye.
- falcosoft
- Posts: 129
- Joined: September 25, 2013 - 16:38
LenweSaralonde wrote:....BTW, when 2 SFZ have the same preset number, only the first one seems to be working (we should hear both).
I wouldn't find any documentation about this. How is it supposed to work ?
No, in case of same bank and preset values the later instrument overwrites/hides the previous one. You should never hear both. If you think about it you should realize why this behavior is useful:
Tipically SF2 soundfonts contain many instruments. Let's suppose you have loaded a full GM SF2 soundfont with 128 instruments. But you do not like Preset 0/Bank0 Grand Piano. In this case you only have to load a single better quality SF2/SFZ Piano instrument at Preset 0/Bank0 after the GM Bank and you can listen to Midi files using all instruments from the original GM Bank and your better Piano.
This kind of soundfont stacking behavior was already implemeted in case of SF2 hardware synths such as Soundblaster Live/Audigy/X-FI series.
If you want many similar instruments at the same Preset position you should use different Bank numbers. This way you can achieve similar concept as 'variation tones' in case of GS specification. At bank 0 there are your capital tones and at Bank x (x>0) there are your variation tones. Many GS compatible SF2 soundfonts also use this concept.
- coolsoft
- Posts: 2004
- Joined: March 25, 2012 - 01:19
falcosoft wrote:If you remember our last discussion about Bank/Preset loading problems in the last post I mentioned the theoretical possiblities regarding valid Bank ranges:
https://coolsoft.altervista.org/en/forum/post/2993#post2993
Now I've put it at the top of TODO list, just after the pesky "Windows 10-2004 bug" that is driving me crazy...
- LenweSaralonde
- Posts: 9
- Joined: April 28, 2020 - 12:12
falcosoft wrote:2. When we calculated the usable bank range as -127 to 127 we left the Drum bank (located at Bank 128 in soundfonts) out of consideration. The real usable range is from -128 to 255.
This becomes relevant in case of SFZ instruments if you want them to be available in Drum channels. So you should enable at least Bank offset 128. This way the users could be able to position SFZ instruments (always considered to be at Bank 0 by default) to Drum channel by giving them a Bank offeset of 128. This would work since as I have written above Bassmidi handles SFZ files the same way as SF2 files and 128 is the pseudo-bank for Drum instruments in SF2 specification.
I tried bypassing the 127 limitation of the UI by setting bank=128 in my .vmssf file then import int but this doesn't seem to work. In this case, should the preset correspond to the drumkit (such as 0: standard, 16: power etc) ?
- Attachments (Only registered users)
- Screenshot from 2020-04-29 15-58-38.png
- falcosoft
- Posts: 129
- Joined: September 25, 2013 - 16:38
LenweSaralonde wrote:falcosoft wrote:2. When we calculated the usable bank range as -127 to 127 we left the Drum bank (located at Bank 128 in soundfonts) out of consideration. The real usable range is from -128 to 255.
This becomes relevant in case of SFZ instruments if you want them to be available in Drum channels. So you should enable at least Bank offset 128. This way the users could be able to position SFZ instruments (always considered to be at Bank 0 by default) to Drum channel by giving them a Bank offeset of 128. This would work since as I have written above Bassmidi handles SFZ files the same way as SF2 files and 128 is the pseudo-bank for Drum instruments in SF2 specification.I tried bypassing the 127 limitation of the UI by setting bank=128 in my .vmssf file then import int but this doesn't seem to work. In this case, should the preset correspond to the drumkit (such as 0: standard, 16: power etc) ?
Hi,
It does not work for you since you have referred to a non-existing single combination namely preset:0 Bank:128. Instead you have to refer to all presets (that is -1) and then the bank value means an offset, not a concrete bank.
More info about how 'Bank' value should be interpreted depending on the 'Preset' value:
https://coolsoft.altervista.org/en/forum/post/2937#post2937
With this vmss file I have succesfully transferred the SFZ instrument to Channel 10/Drum channel:
[SoundFonts]
sf1=E:\SFZ\EB5_FR~1.SFZ
sf1.enabled=1
sf1.preset=-1
sf1.bank=128
sf1.volume=100
- LenweSaralonde
- Posts: 9
- Joined: April 28, 2020 - 12:12
falcosoft wrote:It does not work for you since you have referred to a non-existing single combination namely preset:0 Bank:128. Instead you have to refer to all presets (that is -1) and then the bank value means an offset, not a concrete bank.
More info about how 'Bank' value should be interpreted depending on the 'Preset' value:
OK, it works now, thanks !
So what about the other drumkits, for example the "Power" drumkit with ID 15, should I set it as bank = 128 + 15 since it acts as a preset offset ? (I can't test it for now but I'll do it)
- falcosoft
- Posts: 129
- Joined: September 25, 2013 - 16:38
@LenweSaralonde:
I have tried and Bank:128 also works with concrete Preset values for me. I have tried 8 (room) and 16 (power). I'm not sure why. It should not :)
(Maybe when no instrument is found at the given Preset/Bank combination Bank is always interpreted as offset? Or is there some SFZ specific logic in Bassmidi that is not documented?)
So instead you should use absolute paths instead of relative ones in your vmssf file. That could also cause problems regardless of Bank offset values.
- falcosoft
- Posts: 129
- Joined: September 25, 2013 - 16:38
LenweSaralonde wrote:....
So what about the other drumkits, for example the "Power" drumkit with ID 15, should I set it as bank = 128 + 15 since it acts as a preset offset ? (I can't test it for now but I'll do it)
You should try what I have written above. Your method of 128 + 15 will not work. Bank offsets above 128 results in further banks in Drum channel. So your example Bank offset 128 + 15 will results in that your Drum instrument will be available at Bank 15 at Drum channel 10.

Pages
Navigation
Login
Support me
Click here if you want to support CoolSoft using PayPal