Bug 310 - Support for ARIA's *silence extension in sfz
Summary: Support for ARIA's *silence extension in sfz
Alias: None
Product: LinuxSampler
Classification: Unclassified
Component: other (show other bugs)
Version: SVN Trunk
Hardware: All All
: P5 enhancement
Assignee: Christian Schoenebeck
Depends on:
Reported: 2019-03-09 07:57 CET by Jacek Roszkowski
Modified: 2021-05-11 13:53 CEST (History)
0 users

See Also:

sample=*silence support (1.41 KB, application/octet-stream)
2019-03-09 07:57 CET, Jacek Roszkowski

Note You need to log in before you can comment on or make changes to this bug.
Description Jacek Roszkowski 2019-03-09 07:57:56 CET
Created attachment 95 [details]
sample=*silence support

There is a possibility within sample opcode
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):