infiniteneslives wrote:
Quote:
For what can be synthesized with an MCU, you have the STM8 in mind?
I really only have the stm8 in mind for a minimalist homebrew synth as it could be integrated into the CIC's mcu giving discrete mappers expansion audio on the cheap. I'm somewhat hopeful the stm32f030 running ~48Mhz with dual PWM DAC may be able to decently replicate some original audio expansions like VRC6, sunsoft5b, & FDS. I've yet to even start tinkering with them enough to be confident an stm32f0 will be adequate. Another consideration I've had is the stm32f051 as it includes a built in DAC for close to the price of a standalone DAC.
It looks like a single-cycle multiplier is optional in the M0 parts, that would be nice to have, if possible. 4 audio channels mixed at 48khz will be 192k multiplies per second. I'm sure that CPU could power through it anyways (maybe 20-30 cycles per multiply?). Those chips are mostly wavetable, so it'd be like one 24 or 32-bit addition, indexing sample, multiply, 16 or 24-bit add+accumulate. Number of CPU cycles that all takes * number of channels * sample rate. STM8 w/ multiplier likely could also passably emulate those chips at 48khz (probably best if coded in asm), compared to the M0 w/o multiplier the performance is probably about the same at the same clock rate (which it's not, so M0 comes out ahead

))
I wonder how much those Cortex M4 with DSP features cost, I haven't checked. I noticed the PIC32MK is a new family that's around $5 with features that would be killer for audio, multiply+accumulate, saturation math, 1-cycle SIMD instructions, even floating point. Unfortunately they totally borked the parallel port slave mode on that one (would allow the NES to interface directly with the MCU). That port does work on the PIC32MZ but those parts are like $1.50 more (w/ more memory of course). I figure with that kind of MCU I should be able to do 32-channel audio with Squeedo 2.0, overkill extreme.

Anyways, a lot of the stuff I'm saying here is probably already known, I'm just kinda thinking out loud.
Quote:
Quote:
I imagine you would want an external clock too, if using an RC oscillator the audio will be out of tune.
Yes that's a good point, another potential solution would be to use a NES clock source multiplied by a PLL if the mcu provides one. But most internal RC oscillators are tuneable, perhaps the mcu could finely tune itself with a calibration routine at boot/post warmup.
One problem that shows up is that when the composer uses the NES and detuned expansion audio together, normally when you play a slightly detuned note in 2 channels you will get a phasing or "beating" effect (this is often used as an effect), if it's the same note+octave there are also cancellation effects (absolute worst case is summing 2 square waves perfectly aligned on opposite phases, the result would be a constant zero). The downside could be minimized by telling composers avoid using the same note on both soundchips, but to some degree it will still sound different on everyone's system. If the effect is noticable on different octaves too, then this becomes pretty darn hard to avoid.

I don't know if people would consider it endearing or janky, could go either way but I'm sure that some chiptuners won't like that aspect of it.