Author Topic: BASS MIDI soundfont streaming  (Read 236 times)

DaveAE

  • Posts: 8
BASS MIDI soundfont streaming
« on: 25 Sep '17 - 14:39 »
On older iPad's with only 512MB and using one or more big soundfonts (over 100MB), the app can crash with an out-of-memory error. Is there any way to stream from 'disk', now or planned?

Ian @ un4seen

  • Administrator
  • Posts: 20400
Re: BASS MIDI soundfont streaming
« Reply #1 on: 25 Sep '17 - 17:22 »
BASSMIDI doesn't stream samples from disk; that's likely to be too slow when there can be hundreds or even thousands of samples playing. But it does support memory-mapped files, which means it can access the soundfont's memory in the OS's file cache rather than allocating memory for the samples itself, so it's more memory efficient. If you haven't already done so, you could give that a try (by using the BASS_MIDI_FONT_MMAP flag in your BASS_MIDI_FontInit calls), although it may not be possible to memory-map large files on a device with limited memory; you can use BASS_MIDI_FontGetInfo to confirm whether a soundfont is memory-mapped (see the "samload" value).

rv

  • Posts: 191
Re: BASS MIDI soundfont streaming
« Reply #2 on: 26 Sep '17 - 11:46 »
I really think the next important feature for BASSMIDI is the sample streaming feature. Memory Mapping was not working very good for this on Windows.
Number of samples playing is not a problem, as long as you preload enough bytes of each samples in RAM
All today sample based software synthesizers has this option. This allow to create very high instruments with many GB of samples without using tons of RAM

https://steinberg.help/halion_sonic/v3/en/halion/topics/_shared/options_page_r.html
https://support.spectrasonics.net/manual/Keyscape/1/en/topic/streaming
https://support.spectrasonics.net/manual/Omnisphere/system/streaming/index.html
https://www.fxpansion.com/webmanuals/bfd3/operationmanual/index.html?engine_preferences.htm
https://support.native-instruments.com/hc/fr/article_attachments/205618585/DFD_Demystified.pdf


Sample decompression in realtime with a simple algorithm, can be useful too, as most of the time, it takes less time for the CPU to re-order few bytes rather than to load double of data from HDD. And take less hard drive space... (you told me you created a wav compression algorithm once)

Every 2 years, I ask it again to you... maybe one day..... :)   This will put BASSMIDI to another level for software synthesizer and this will allow me to improve my sampled instruments :)

saga

  • Posts: 2179
Re: BASS MIDI soundfont streaming
« Reply #3 on: 26 Sep '17 - 13:15 »
There's a big difference though, if those synths drop out while loading more samples it's not so tragic because the final product will be rendered to a streaming file in offline mode anyway. BASSMIDI is typically used in a real-time scenario with no offline bouncing; you cannot afford audio drop-outs because of sample loading there. And drop-outs are very much real in those samplers when using DFD mode, even on modern systems.

rv

  • Posts: 191
Re: BASS MIDI soundfont streaming
« Reply #4 on: 26 Sep '17 - 22:48 »
No. VST plugins samplers are most of the time played in realtime too.
Dropouts is something that can occur. And we hear a noise click.
We sometimes need to adjust the amount of RAM preload, depending on the computer performance