simulating a synth with samples... how do i rolloff a sample that is stopped?

Hi,

I have a piano key sample (C3) which has rolloff baked into it for the full note duration.

However if i tap the key once, I want to stop the sample playing but let unity perform the rolloff in software… is this possible ? is that how unitys rolloff works?

Rolloff in Unity is only related to distance. It isn’t the Release component of ADSR. This page may be of service to you in scripting audio.volume yourself, which you’ll have to.

Thanks Jessy! I had hacked in some weird hack that started to drop the volume big then went small :S its not ideal, so heading to that link :slight_smile: