Jump to content

SF2 Compression


Recommended Posts

I know that there are ways to compress them for storage, but as far as compression during use, I have my doubts. Especially lossless.

If these filesizes are an issue, I would advise that you consider adding a larger hard drive and/or upgrading the memory in your computer (Depending on where your deficiency is). Memory is at insanely cheap prices right now. (I got a decent 2 gig stick of SODIMM DDR2 for $20 recently). Note that 32-bit Windows limits you to 3.5 gigs of memory.

Samples take lots of space. Even moreso when you go beyond SF2. For instance, the Garritan Authorized Steinway piano uses up to 45 gigs. Of course the samplers used support disk streaming and things like that.

Link to comment
Share on other sites

Nope, I don't know of anyway to do easily do that. You could convert the sf2 to sfz using something like Extreme Sample Converter ($$$), then convert all of the .wav files to the compressed .ogg format. That would reduce file size considerably without a significant loss of quality . Or you could manually remove some of the velocity layers of the sf2 using something like viena(free) to make a "light" version of the sf2 with whatever loss of quality you see as acceptable. But both of those would take more time than I'm guessing you're willing to invest.

Sadly, the easiest solution I see is what DZComposer said: if you're ram-limited get more ram.

Link to comment
Share on other sites

Soundfonts are just files, so you should be able to edit them regardless of your soundcard. The only difference would be if you had a soundblaster which may give you a few more options in terms of editing and playing back sf2 files.

If you'd like to give editing a shot, download viena, find a simple soundfont to start out with, then have at it.

Link to comment
Share on other sites

Thanks for the replies, but I'm not talking about compressing for storage...:sleepzzz: I just ordered 1GB of ddr sdram. Also, I'm making a GM bank, it's already about 810MB in size without the harpsichord, is there a cap on how big it can be? I'm not nearly done tinkering with it. Thanks.

Link to comment
Share on other sites

Grr... I did the Ogg thingy and it's still the same size when in sf2 format. And, I already tried to download vienna but when I started it, it said something along the terms: "can not find soundfont compatible hardware."
That was awfully fast of you to pull all of the wav samples out of the SF, convert them to ogg and then convert them back to SF (assuming you didn't just keep everything in SFZ format). Are you sure you went through all of those steps?

And Vienna (two n's) is a soundfont editor made by Creative for SoundBlaster only cards. You'll get that message if you try to use it with any other card. Viena (one n) is a clone of Vienna which should work on any sound card. Did you go to the link I gave you? I've never had a problem with it on multiple setups with various soundcards (el cheapo laptop cards included).

Otherwise, soundfonts are actually really inefficient since they don't stream from the disk.
SFZ allows you to stream soundfonts directly from disk. Cuts the RAM usage way down but it obviously taxes the processor more.
After 200-300mb I've noticed soundfonts become unstable in FL. 800mb sounds like you're pushing the envelope.
Out of curiosity, what do you mean "unstable"? I don't recall ever using anything over 300mb so maybe I haven't run into this barrier, but I thought the stability should be a function of your available ram.
Link to comment
Share on other sites

So the Harpsichord you posted works fine for me in Viena. It is so large because each of about 60 keys is sampled in stereo with each sample running about 15 seconds. On top of that, each key has a jeu 1 and jeu 2 layer, which undoubtedly are harpsichord related terms that I'm unfamiliar with. So, in my crudeness, I just deleted all of the jeu 2 samples and that brought the sf2 file size to 80mb. The difference in sound is noticeable, but not detrimental imo. Nothing a good chorus or phase effect couldn't make up for.

Link to comment
Share on other sites

I’m sure there’s a tutorial out there somewhere. If you find one for Vienna, it’s virtually the same as Viena so you should be able to use that.

A soundfont is a collection of wave files bundled with instructions on how they should be played when midi info is passed their way.

At its core, a sf is made up of “samples”. These are just the wave files. For example, someone might record a snare being hit at 3 different volumes. These samples are then collected into groups called “instruments.” If we were making a drum kit soundfont, one instrument might be the 3 wave samples of our snare. Another might be the wave samples for the hi-hat, and so on. Most of the editing you’ll do to pre-made soundfonts is in the instruments. Here, you define what samples you want played and how you want them played when you press certain keys (or however you input your midi data). Instruments have further divisions like “layers” and “splits”, but those aren’t really important right now. Finally, instruments are arranged into “presets” or “patches”. So for the drum kit example, the snare, kick, and hi-hat instruments would be collected to form at single preset, say “drum-kit 1”. That preset is what you finally select in your sf player.

When you open up viena and load a soundfont, the left panel shows a tree of your samples, instruments and presets. Open up your harpsichord sf and you should see 116 samples, 2 instruments (Petit Italien-Jeu 1 and Petit Italien-Jeu 2), and 1 preset (Harpsichord) which is made up of both instruments.

What I suggested before was to delete the second instrument Petit Italien-Jeu 2. However, since the preset Harpsichord depends on Jeu 2, you first have to delete that instrument from the preset.

1) On the left tree, expand the Presets directory, expand the Harpsichord Preset, left click “Petit Italien-Jeu 2” and press ctrl-x. That should delete it.

2) Now, expand the Instruments directory, left click “Petit Italien-Jeu 2” and press ctrl-x. Now it’s gone. However, the samples that Jeu 2 used still remain and the file size is still large.

3) To get rid of them, expand the Samples directory. In order to find out what samples were used by what preset, you could have double-clicked on the sample names, but that was before we deleted the instruments that depended on them. In this case, just trust me that all of the samples with names that start with “II” were used by Jeu 2. Delete each one of those by selecting it, and pressing ctrl-x. Save and you should be done.

As far as effects like chorus and phasing, I was talking about applying them outside of the soundfont; nothing to do with Viena or soundfont editing. When you load your soundfont into whatever sequencer you’re going to use, you should be able to apply any number of effects

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...