Assign SFZ soundfonts as drumkits

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!

Pages

Posts: 7
Joined: April 28, 2020 - 12:12
Assign SFZ soundfonts as drumkits

Hi

I'm struggling to assign SFZ soundfonts as drumkits.

I have no issue with melodic soundfonts, I just set the preset number and bank 0 to the preset I want (0 piano, 24 guitar etc.) it just works perfectly as intended.

Drumkits are supposed to share the same preset numbers (0 standard drumkit, 8 room, 16 power etc.) but use a specific MIDI channel (10).

Here is what I tried but nothing worked as expected :

  • Adding lochan / hichan opcodes (lochan=10 hichan=10) in my drumkit SFZ to use channel 10 only with preset 0 (standard drumkit) and bank 0.
  • Using another bank for the drumkit SFZ (tried 0, 1 and 127)

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 ?

Posts: 1660
Joined: March 25, 2012 - 01:19
Re: Assign SFZ soundfonts as drumkits

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 ;)

Posts: 81
Joined: September 25, 2013 - 16:38
Re: Assign SFZ soundfonts as drumkits

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.

Posts: 81
Joined: September 25, 2013 - 16:38
Re: Assign SFZ soundfonts as drumkits
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.

Posts: 1660
Joined: March 25, 2012 - 01:19
Re: Assign SFZ soundfonts as drumkits
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...

Posts: 7
Joined: April 28, 2020 - 12:12
Re: Assign SFZ soundfonts as drumkits
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
Posts: 81
Joined: September 25, 2013 - 16:38
Re: Assign SFZ soundfonts as drumkits
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

Posts: 7
Joined: April 28, 2020 - 12:12
Re: Assign SFZ soundfonts as drumkits
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:

https://coolsoft.altervista.org/en/forum/post/2937#post2937

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)

Posts: 81
Joined: September 25, 2013 - 16:38
Re: Assign SFZ soundfonts as drumkits

@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.

Posts: 81
Joined: September 25, 2013 - 16:38
Re: Assign SFZ soundfonts as drumkits
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