New Lossless Codec API



  • I'm about 2-3 Projects into Hise and love the streaming it provides. It competes with Kontakt definitely.

    I was wondering if there was some sort of API or some direction for us to write our own lossless format. HLAC is only good for sounds with long decays, but for sounds that are looping, it falls short. For example, we launched a product that is 8GB uncompressed and HLAC only brought it down to 6GB, while others such as FLAC would have gotten it down to about 4GB. This really matters on iOS.

    We have some pretty good developers and was just wondering if there was some type of API for writing our own lossless that is not just for sustaining samples, but can do a good job with looping ones as well.


  • administrators

    This is a tradeoff between speed and compression ratio. As soon as you start using the technology behind FLAC and Apple Lossless (Rice + linear predictive encoding), you get a better ratio for a slower decompression performance. And I doubt it makes sense to roll your own codec with this approach since you have to compete with a very mature codebase.
    The reason I wrote HLAC was because I felt there was a missing piece between having uncompressed samples and "heavily compressed" FLAC style samples. So what HLAC offers you is something inbetween these two.

    The reason that HLAC performs better on decaying samples is because there is more to compress if samples do not use the full bit amount (which is the case if they get quieter). The "raw compression" power of the other lossless codecs are better so you can crank out a few more bits.

    However it's all about getting the bit depth down. If you're on iOS and need a certain compression ratio, you can always lower the volume of the samples until you meet your requirements (eg. a 12db attenuation will give you 2 more bits thus 12,5% more compression). For looped content this might still be enough dynamics.



  • @christoph-hart ok Good info and thanks!


Log in to reply
 

3
Online

343
Users

1.1k
Topics

7.1k
Posts

Looks like your connection to Forum was lost, please wait while we try to reconnect.