How do you get amplitude modulation (tremolo) based on a sample?

That sounds like an envelope-follower. Steve’s dynamic-mirror plugin can do that …