Bug 310

Summary: Support for ARIA's *silence extension in sfz
Product: LinuxSampler Reporter: Jacek Roszkowski <j.roszk>
Component: otherAssignee: Christian Schoenebeck <cuse>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: P5    
Version: SVN Trunk   
Hardware: All   
OS: All   
Attachments: sample=*silence support

Description Jacek Roszkowski 2019-03-09 07:57:56 CET
Created attachment 95 [details]
sample=*silence support

There is a possibility within sample opcode
http://www.sfzformat.com/index.php?title=Sample
to extend it with *silence value, to get a silent region (similar effect to setting end=-1, but without actually loading the sample). Linuxsampler already checks if sample is silent in sfz::Engine::LaunchVoice(), so this is a very minor change to enhance this behaviour.
Comment 1 Christian Schoenebeck 2019-03-09 13:06:43 CET
I just reviewed your patch. The only minor thing questionable is that you call

GetInstrument()->GetSampleManager()->AddSampleConsumer(pSample, this);

with pSample being a NULL pointer. As far as I can see it calling AddSampleConsumer in case of a silent sample should not be required, so if you don't mind I will just change that.
Comment 2 Jacek Roszkowski 2019-03-09 14:28:55 CET
Yeah, missed it.
Comment 3 Christian Schoenebeck 2019-03-10 16:08:06 CET
I committed the changes (SVN r3497). I also added a warning message in case an unknown/unsupported built-in sample type is used.

Updated the docs as well (site will be auto updated in about 30 minutes):
http://doc.linuxsampler.org/sfz/sample_opcode/