Topic: new engine: Octode 2k16

Nothing special really, just some practise so my asm skills don't get rusty during all that C++ learning I'm doing recently.

Octode 2k16 is basically a rewrite of Octode PWM with better sound and an increased frequency range. Variable duty cycles have been axed in this version, instead you get some limited volume control on the 3 available click drums. Code is rather sloppy and there are quite a few cycles left, so perhaps I'll add some more features later on. Also, Octode 2k16 uses the OUT (C),0 instruction, so like with fluidcore, there are two different versions for NMOS (regular ZX, emulators) and CMOS (Pentagon, Eva, etc.) CPUs. I was too lazy to add CPU detection code, so for now just select the version you need.

download (XM converter included)
source
test tune

Test tune is recorded from 48K hardware. It's interesting to see how emulators fail to handle this fast switching code properly (same with fluidcore), even though it's very similar to regular pulse interleaving.

2 (edited by garvalf 2016-05-26 19:42:38)

Re: new engine: Octode 2k16

so nice... the tune is great (as usual), it doesn't really sounds like regular 1bit music. Well done. For the fuse version I don't really understand what is wrong, except maybe it sounds less "full". Did you use some postproduction effects on the zx48 version on soundcloud?

Re: new engine: Octode 2k16

Really nice. A pretty unique sound to this one, like a sort of 1bit / AY hybrid. Very cool.

Great tune as usual too, like the volume control on the click drums smile

4 (edited by utz 2016-05-27 07:57:32)

Re: new engine: Octode 2k16

Thx guys wink Barely any post-production, just a tad of added bass (+3 db). For me, fuse adds quite a bit of distortion when 7 or 8 channels are active. There is some distortion on hw, but it's less intrusive and more irregular. Fuse makes the bass sound like a YM buzzer in saw mode, on hw it's more of a muddy, fuzzy kind of sound. Oddly enough with fluidcore it's the other way around - fuse sounds rather clean, whereas hw has random clicks and pops and a nasty buzz when going into higher volume levels. In any case it's surprising, since normally fuse's beeper emulation is quite excellent. Guess I should eventually talk to fred about this, but I first want to investigate a bit more myself.

Also, the more important question for me is what causes these distortions in the first place. At the moment, I have two theories.
1) Full speaker expansion is reached before the sound loop is completed, hence the sound is clipping. However, if that was the case, pulse-interleaving engines should also have that problem, but generally they don't exhibit these symptoms.
2) Speaker cone response is non-linear, ie the cone starts to expand slowly and then gradually moves faster. I think this is more likely, so I'll be looking into this.

Edit: I think I've figured it out. Third, much more logical hypothesis:

3) The problem is that I'm only looking at speaker cone expansion, but not at contraction. Now, when a string of several high volume samples is played, the speaker cone has no time contract inbetween, hence the volume starts to ramp up. For pulse-interleaving engines this is rarely a problem because there, on and off states are alternating most of the time, preventing volume ramping. But fluidcore, wtfx, and Octode 2k16 only toggle the state once or twice within a sound loop frame, so I need to add another mechanism to prevent volume ramping.

This also gives me another idea - perhaps the volume ramping phenomenon can actually used on purpose to simulate the AY buzzer effect. Hmmm... exiting days for beeper.

Re: new engine: Octode 2k16

Just spend several hours writing an engine to investigate my theory about volume ramping. Findings:
- Volume ramping does happen, but it can't be the only culprit.
- Volume ramping seems nearly impossible to control in a meaningful way. The effects are pretty random, certainly not the nice AY buzzer effect I was hoping for. Also, it glitches all over the place which is something I didn't expect. Perhaps I have some bugs in my engine, but I actually calculated the timings several times now and can't find any errors. So, I'm giving up on this for the time being.