Page 6 of 6

Re: pcmplay - new dragon sound routine

Posted: Fri Sep 11, 2015 10:44 am
by utz
$800 is mapped to C-0. But the values are chosen arbitrarily, the table isn't tuned to 440 Hz or anything.

Ok, here we go, testing with reduced counter size and one long triangle wave sample.
Convinced now?

Re: pcmplay - new dragon sound routine

Posted: Fri Sep 11, 2015 11:07 am
by sorchard
Cheers, I'll give that a listen when I get home tonight.

I notice that the lookup value that was $800 is now $100, so that means the pitch error is now 8 times bigger!

Re: pcmplay - new dragon sound routine

Posted: Fri Sep 11, 2015 5:16 pm
by sorchard
utz wrote:Ok, here we go, testing with reduced counter size and one long triangle wave sample
Ouch. It shouldn't sound that bad. Something's wrong somewhere. I'll try & figure it out.

Re: pcmplay - new dragon sound routine

Posted: Fri Sep 11, 2015 8:02 pm
by sixxie
I've not looked at the example, but is some of the misunderstanding here from what constitutes a "sample"? In most players those 256 bytes constitute one cycle at (mixing rate / 256), pretty sure pcmplay has them be low-res "samples", i.e. more cycles at whatever nominal frequency they're at, thus you have to cut the internal "frequency" delta per mix cycle, thus the error at the low end is that much increased.

Or have I missed something?

Re: pcmplay - new dragon sound routine

Posted: Fri Sep 11, 2015 8:12 pm
by sorchard
Found it. The divide by 256 on the instrument address was missing. Sounds closer to expectation now.

Re: pcmplay - new dragon sound routine

Posted: Fri Sep 11, 2015 8:32 pm
by utz
Oh, that sounds much, much better than I expected. My sincere apologies for doubting you.

@sixxie: Yes, but this new version uses 256 bytes per cycle. Or rather, will use 256 bytes per cycle as I have to make new samples now. I'll probably make a new player for this, as some things won't be possible with this approach (chord05.smp would fail, for example).

Re: pcmplay - new dragon sound routine

Posted: Fri Sep 11, 2015 9:21 pm
by sorchard
@utz

No worries. I've learned quite a lot by looking at your excellent player and thinking about how these things work. The fun is in the discovery :)