Weekly status update August 8th to 14th

Posted 7 years ago

Hi,
GSoC's end is quite near and this week I worked on the last big issue regarding the playback future of MuseScore: disk streaming playback and sample pool.

Before I started working on this topic I did also some touches on the MidiSpanner/Soundbank side of things and implemented the export xml features. (Before I could read all things regarding soundbanks from xml but not export!) Also now really all settings are copied to the newly instantiated instrument. (Yes I still owe you a video about all of that!)

But let me explain a bit more about sample pool and disk streaming. The sample pool now keeps track of all loaded samples in Zerberus. If one sample is referenced more than once (I could Imagine having a normal and a legato version of a sfz that use the same samples but different start times/loop etc.) it will not load it again. In addition to that if disk streaming is enabled just the very beginning of that file is loaded. Than there is a second object called a SampleStream - this one contains a buffer which is filled during playback of that sample. So each new voice requests a SampleStream from the SamplePool and just streams the data from a HD/SSD without the need to copy everything to RAM first. This makes a huge difference in loading times and memory usage.

Right now the system is lacking a GUI (there are actually quite some parameters you need to tweak to make it work best with your system - like buffer size, buffer refill trigger percent (at which level should the buffer get refilled from disk?) and if you want to use the streaming at all). This will be incorporated into Zerberus settings (the place where you also load soundfonts). To make that work on the fly (without restarting) it is needed to reload all sample data (on loading samples are filled with the buffer size of samples so that on load there is a buffer waiting to be played).

All in all I think that this is the last major playback feature that will be realized during GSoC 2016! Besides final touches and getting everything into master (MidiSpanner/Soundbanks will give configuration and single note crescendo + legato features, SamplePool/Streaming I described here and some small additions to Fluidsynth that makes it possible to skip attack phase to enable legato) I doubt there will be big changes.

Until then have a nice day!