- The envelope generator wasn't working as it should have, minor issues
with the limits and whether to use 10-bit or 12-bit values (more to come)
- fixed issues with sustain level where it was always set to 0
- fixed release rate and levels to make them 5-bit and 10-bit numbers
respectively, so they match the others
- switched from SineWave to SquareWave and this alone made it go from
terrible and muddy to not that far off. I probably need to completely
change the output
- also included an attempt at removing HostData, still needed for an
interrupt that is triggered by user input
The hope was that this would reduce the amount of copying and bit
shifting required by the frontend to get the data on screen, but
it doesn't seem to offer much advantage, surprisingly. I'll leave
it in though. There are a few other minor tweaks included here to
try to improve the performance a bit
AddressRepeater now takes the range it should repeat over, which only
really affects its reported size.
AddressAdapter is now AddressRightShifter, which is literally the operation
it performs, where the input is still the bits to shift the address right by
It turns out to not be too much of a performance issue to allocate
a new frame each time one is produced, so to reduce lock contention
I added a queue where frames are added to and taken from without
locking the frame for the whole update. I'm hoping this will give
more flexibility to frontend implementations, which can simply
skip or repeat frames if needed.
I wanted to make this a bit more modular, so it's easier in theory to
write external crates that can reuse bits, and selectively compile in
bits, such as adding new systems or new cpu implementations