quohog Posted May 26, 2020 Share Posted May 26, 2020 I'm writing a little musical program where you can set the frequency, tone, and volume of notes on a timeline, and when the beat marker sweeps through, it plays the tone defined at each spot. It mostly works, but when you set the volume or distortion of one of the notes to be zero, it creates a small but annoying "tick" or "pop" every time that note is passed. I've changed the order in which I'm setting the three values, but whenever I set the volume or control to be 0, there's the tick. Here's how I'd LIKE my code to look: jsr GetTone sta AUDC0 jsr GetVol sta AUDV0 jsr GetFreq sta AUDF0 So simple! Right? Seems like it should work, right? But here's how I actually have it now: jsr GetTone beq SKIP_NOTE ; Skip the rest or there will be a tick sta AUDC0 jsr GetVol beq SKIP_NOTE ; skip this or there will be a tick on the first 0 vol beat sta AUDV0 jsr GetFreq sta AUDF0 The problem with this "fix" is that you can't actually set your notes to be zero volume. You can try, and I'll display it as a zero, but I won't actually set it because of the tick sound. So you can still hear the note playing faintly. I've created a lie. I know it's hard to debug without seeing the whole thing, but its such a mess, no one should have to see it. I'm hoping someone might know some general good practice rules about setting a zero volume without creating a pop. Is there a correct order of operations to do such a thing? Thanks for any insights, rules, or experience you care to share! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.