Support for SF4 (FLAC) format?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Support for SF4 (FLAC) format?

fluid-dev mailing list

We have a feature request for supporting SF4:

 

https://github.com/FluidSynth/fluidsynth/issues/605

 

Anybody ever heard of it? Anybody using it, or interested in using it?

 

Tom

 


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: Support for SF4 (FLAC) format?

Marcus Weseloh
Hi,

never heard of it, but I quite like the idea. And I might have a
use-case for it, as loading larger Soundfonts takes quite a while on
my instrument. Bottleneck seems to be the throughput of the sd-card...
so reducing the size of the file and using more CPU time to decompress
the samples might give a speed improvement. But that would need to be
tested... not sure how resource intensive the FLAC decompression is.

But I do wonder: sfconvert seems to have support for FLAC compression
for at least three years now. Why doesn't MuseScore support SF4/FLAC
yet?

Cheers
Marcus

Am So., 5. Jan. 2020 um 16:45 Uhr schrieb Tom M. via fluid-dev
<[hidden email]>:

>
> We have a feature request for supporting SF4:
>
>
>
> https://github.com/FluidSynth/fluidsynth/issues/605
>
>
>
> Anybody ever heard of it? Anybody using it, or interested in using it?
>
>
>
> Tom
>
>
>
> _______________________________________________
> fluid-dev mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/fluid-dev

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: Support for SF4 (FLAC) format?

fluid-dev mailing list
> But I do wonder: sfconvert seems to have support for FLAC compression
> for at least three years now. Why doesn't MuseScore support SF4/FLAC
> yet?

SF3 was single-handedly driven by Werner Schweer from MuseScore, when
they were in a need to reduce the filesize of soundfonts. It seems
that further development @MuseScore starved after Werner stepped down
from the project.

https://musescore.org/en/node/20818


I do sympathize with the idea of FLAC compression. But I do not see a
reason to bump the soundfonts major version again. From my
understanding, bumping to version 3 was necessary because of the
different handling of the sample start/stop markers AND to make
implementations look up the compression flag 0x10 that was added to
SfSampleLink enum.

Everything needed to support FLAC, as far as I see, is to add a new
compression flag to SfSampleLink enum that indicates that a sample is
FLAC compressed. If a soundfont reader is compliant with Werner's SF3,
it should ignore samples that have unknown flags set. (Hard to tell
though, due to a lacking "official" SF3 spec from Werner.) So, there
is no need to bump soundfont to major version 4, to my knowledge.


Tom

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: Support for SF4 (FLAC) format?

Marcus Weseloh
Am So., 19. Jan. 2020 um 10:27 Uhr schrieb Tom M. via fluid-dev
<[hidden email]>:

> I do sympathize with the idea of FLAC compression. But I do not see a
> reason to bump the soundfonts major version again.
[...]
> Everything needed to support FLAC, as far as I see, is to add a new
> compression flag to SfSampleLink enum that indicates that a sample is
> FLAC compressed.

Yes, I was thinking the same thing. And as I have a possible use-case
for it, I'll try to draft a pull-request in the next few days.

Then we would need to coordinate with sfconvert and try to get them to
abandon the SF4 idea in favour of an extended SF3 format. And maybe
also ask Polyphone to implement flac compression for SF3.

Cheers
Marcus

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: Support for SF4 (FLAC) format?

Reinhold Hoffmann
My 2 cents to SF3 vs. SF4

We use the SF3 format in our app, too. Due to its size the SF3 format
provides the possibility to include a decently good quality soundfont file
into the base installation package of the software. For us the SF4 format
would not be an alternative due to its size.

People of our user community load their individual SF2 soundfont files when
they need a better sound during regular operation.

Independent of the sound quality, our investigation has shown that the size
of a SF3 file is reduced down to ~10-15% compared to the size of the SF2
file, whereas the compression of the SF4 format is "only" ~50%. This means
that SF4 compression is not an alternative to a SF3 compression for this use
case (installation package) for us.

I tried a brief test converting various publicly available SF2 soundfont
files to SF3 and SF4 format. The outcome was somehow disillusioning.
Cracking and noises were created, but may be my fault that I did not use the
tool correctly or may be the used SF2 source files were not adequate enough
to be compressed.

My conclusion for us: SF3 needs to stay and SF4 could be an option but only
in case if there are good quality SF4 soundfont files available in the
future.

Reinhold
 

-----Ursprüngliche Nachricht-----
Von: fluid-dev [mailto:fluid-dev-bounces+reinhold=[hidden email]]
Im Auftrag von Marcus Weseloh
Gesendet: Sonntag, 19. Januar 2020 10:49
An: FluidSynth mailing list
Betreff: Re: [fluid-dev] Support for SF4 (FLAC) format?

Am So., 19. Jan. 2020 um 10:27 Uhr schrieb Tom M. via fluid-dev
<[hidden email]>:

> I do sympathize with the idea of FLAC compression. But I do not see a
> reason to bump the soundfonts major version again.
[...]
> Everything needed to support FLAC, as far as I see, is to add a new
> compression flag to SfSampleLink enum that indicates that a sample is
> FLAC compressed.

Yes, I was thinking the same thing. And as I have a possible use-case
for it, I'll try to draft a pull-request in the next few days.

Then we would need to coordinate with sfconvert and try to get them to
abandon the SF4 idea in favour of an extended SF3 format. And maybe
also ask Polyphone to implement flac compression for SF3.

Cheers
Marcus

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: Support for SF4 (FLAC) format?

Marcus Weseloh
Hi Reinhold,

Am So., 19. Jan. 2020 um 12:38 Uhr schrieb Reinhold Hoffmann
<[hidden email]>:
> I tried a brief test converting various publicly available SF2 soundfont
> files to SF3 and SF4 format. The outcome was somehow disillusioning.
> Cracking and noises were created, but may be my fault that I did not use the
> tool correctly or may be the used SF2 source files were not adequate enough
> to be compressed.

Very interesting, thanks for explaining your use-case. How did you
test the converted SF4 files? Did you patch fluidsynth to allow FLAC
decompression? Or did you use a different synth?

> My conclusion for us: SF3 needs to stay and SF4 could be an option but only
> in case if there are good quality SF4 soundfont files available in the
> future.

It is not about removing ogg support in favour of flac, but rather
adding flac as an additional compression choice next to ogg vorbis. So
don't worry, SF3 is here to stay.

Cheers
Marcus

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: Support for SF4 (FLAC) format?

Reinhold Hoffmann
Hi Marcus,

> Very interesting, thanks for explaining your use-case. How did you
> test the converted SF4 files? Did you patch fluidsynth to allow FLAC
> decompression? Or did you use a different synth?

I used the sf2convert tool and converted the SF2 soundfont to SF3 and SF4
and compared the file sizes to the original SF2 file.
Only for the SF3 file I was able to check the sound quality with our
software which uses the libfluidsynth library. The sound quality of the SF4
file I did not check. Sorry, in case my comment was misleading.

Best regards,

Reinhold  

-----Ursprüngliche Nachricht-----
Von: fluid-dev [mailto:fluid-dev-bounces+reinhold=[hidden email]]
Im Auftrag von Marcus Weseloh
Gesendet: Sonntag, 19. Januar 2020 15:58
An: FluidSynth mailing list
Betreff: Re: [fluid-dev] Support for SF4 (FLAC) format?

Hi Reinhold,

Am So., 19. Jan. 2020 um 12:38 Uhr schrieb Reinhold Hoffmann
<[hidden email]>:
> I tried a brief test converting various publicly available SF2 soundfont
> files to SF3 and SF4 format. The outcome was somehow disillusioning.
> Cracking and noises were created, but may be my fault that I did not use
the
> tool correctly or may be the used SF2 source files were not adequate
enough
> to be compressed.

Very interesting, thanks for explaining your use-case. How did you
test the converted SF4 files? Did you patch fluidsynth to allow FLAC
decompression? Or did you use a different synth?

> My conclusion for us: SF3 needs to stay and SF4 could be an option but
only
> in case if there are good quality SF4 soundfont files available in the
> future.

It is not about removing ogg support in favour of flac, but rather
adding flac as an additional compression choice next to ogg vorbis. So
don't worry, SF3 is here to stay.

Cheers
Marcus

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: Support for SF4 (FLAC) format?

Garth Hjelte
Can I ask why are smaller SoundFonts are even a need in this day of age? I mean, it's NICE to compress data, but isn't this a whole lot of worry and work for minimal - even useless - benefit?

The other observation I have is that PLEASE if anyone is going to fiddle with the SoundFont format and make some unofficial v3 or v4, administrate it with lots of authority and a heavy hand. And it seems to me that having to have a v4 just means that v3 was done half-baked. One of the great things about the SoundFont spec/format is that a parser can accept or reject opcodes it either doesn't understand or aren't written correctly, thus allowing addition of features without breaking current loaders ability to load them.

Garth Hjelte
Sampler User


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: Support for SF4 (FLAC) format?

Marcus Weseloh
Hey Garth,

Am So., 19. Jan. 2020 um 18:11 Uhr schrieb Garth Hjelte <[hidden email]>:
> Can I ask why are smaller SoundFonts are even a need in this day of age? I mean, it's NICE to compress data, but isn't this a whole lot of worry and work for minimal - even useless - benefit?

Well, my use-case is to reduce the loading time of soundfonts stored
on an SD-card in an electronic musical instrument. Currently I'm still
using uncompressed samples, because I don't like the idea of lossy
compression. But the lossless FLAC compression might be interesting.
Whether it actually has any benefit with regard to loading times
remains to be seen. But I'm fairly certain that the loading time on my
embedded system is disk-bound, not CPU-bound.

> The other observation I have is that PLEASE if anyone is going to fiddle with the SoundFont format and make some unofficial v3 or v4, administrate it with lots of authority and a heavy hand. And it seems to me that having to have a v4 just means that v3 was done half-baked.

Yes, I was thinking the same thing. As far as I know, the SF3 format
has no specs and no documentation. There are only a few posts in the
MuseScore forum and the implementation in MuseScores sfconvert tool
and now Polyphone and fluidsynth.

But then again, the only change that SF3 brought was the addition of
OGG/Vorbis compressed samples, an additional sample type enum value to
indicate that and the decision to use sample-local start,end and loop
markers for those samples. So I think we should definitely document
the SF3 format as it is currently used and implemented, maybe via a
dedicated github repo/wiki. Maybe even get all interested parties to
join the conversation and agree about the implementation, most
importantly Polyphone, MuseScore, Swami, Qsynth, the various
fluidsynth-as-daw-plugin authors, ... and possibly more that I have
missed.

And I definitely agree with Tom: there is no need for an "SF4" format.
SF3 adds the ability to use compressed samples. What encoder is used
to do the compression can be expressed with the sample type flag.

> One of the great things about the SoundFont spec/format is that a parser can accept or reject opcodes it either doesn't understand or aren't written correctly, thus allowing addition of features without breaking current loaders ability to load them.

Assuming the soundfont loader is written well and checks the sample
type flag, SF3 with different compression algorithms will fit right
in. If a loader does not support a particular compression type, it can
simply ignore those samples.

Cheers
Marcus

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: Support for SF4 (FLAC) format?

Marcus Weseloh
Am So., 19. Jan. 2020 um 21:26 Uhr schrieb Marcus Weseloh <[hidden email]>:
> As far as I know, the SF3 format
> has no specs and no documentation. There are only a few posts in the
> MuseScore forum and the implementation in MuseScores sfconvert tool
> and now Polyphone and fluidsynth.

Just FYI: I have reached out to the MuseScore devs to see what their
plans are regarding a specification for the SF3 format.

Cheers
Marcus

_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Reply | Threaded
Open this post in threaded view
|

Re: Support for SF4 (FLAC) format?

Ceresa Jean-Jacques
In reply to this post by Marcus Weseloh

Hello,

 

>So I think we should definitely document the SF3 format as it is currently used

>and implemented, maybe via a dedicated github repo/wiki.

It would be nice indeed.

jjc

 


_______________________________________________
fluid-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/fluid-dev