modified to use xar envelopes and tone filter