Sound effect distortions caused by kernel bugs

Topics related to the API, programming discussions & questions, coding tips, bugs, etc. should go here.
User avatar
Jubatian
Posts: 1569
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Sound effect distortions caused by kernel bugs

Post by Jubatian »

A wave channel is cheaper than a noise channel, so replacing the noise to a wave is perfectly possible. Also the original kernel's 3 wave + 1 noise + 1 PCM could be replaced to 6 waves instead (in the inline mixer) since the PCM is very expensive, not that much like 2 waves, but with the noise also being more expensive than a wave, 1 noise + 1 PCM makes about 3 waves. Possibly after the UCC I will look into this, how to get the original kernel going with such fixes, changes or added features. With an optimized inline mixer I can get a wave for 27 cycles, that could give you 7 wave channels in about the same amount of cycles like 3 wave + 1 noise + 1 PCM in the original kernel.

A patch command to set priority (with a "real" priority flag) could indeed be useful, like normally the patch would begin at high priority, then at some point with a command you could clear this, allowing another effect to take over. It wouldn't help much though unless you have very different high priority durations in your effects since otherwise the current behavior (taking over the channel which began playing earlier) does the job fine.

For the clicks in my UCC entry I experiment with a more expensive (per channel) inline mixer allowing continuous volume ramping. The results are quite satisfactory.
User avatar
D3thAdd3r
Posts: 3293
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Sound effect distortions caused by kernel bugs

Post by D3thAdd3r »

Jubatian wrote:A patch command to set priority (with a "real" priority flag) could indeed be useful, like normally the patch would begin at high priority, then at some point with a command you could clear this, allowing another effect to take over. It wouldn't help much though unless you have very different high priority durations in your effects since otherwise the current behavior (taking over the channel which began playing earlier) does the job fine.
I like this idea quite a bit actually, considering the flash cost would be small and baking priorities into effects could be a clean approach. In combination with other variables, it might be enough to do fine tuning for most things. This also makes me think of something else I wanted forever, which is to be able to trigger a patch from a patch, for those 2 part sound effects without requiring custom higher level logic.

The 4+ wave solutions could really be a game changer for better music. Even in situations where you needed just a little bit of noise effects, you could emulate it as long as you had 1 channel that could do PCM and enough flash to burn to playback noise...or find a sweet spot in your graphics data that sounds appropriate when played back as noise.
User avatar
Jubatian
Posts: 1569
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Sound effect distortions caused by kernel bugs

Post by Jubatian »

D3thAdd3r wrote:...which is to be able to trigger a patch from a patch, for those 2 part sound effects without requiring custom higher level logic.
Good idea, it can also save ROM if you want for example the same envelope for several of your patches, and doesn't require any extra state either. Adding simple patch commands is cheap by the way (they compile to very few instructions even in the original kernel).
Post Reply