Page 4 of 4

Re: Is there a list of games containing sound samples?

Posted: Wed Apr 19, 2023 4:53 pm
by Joefish
Lee Bee wrote: Wed Apr 19, 2023 4:26 pm You can convert a sample to 1-bit in Audacity, using a Nyquist script called Broadcast limited III. After installing it, select your audio, run the script, turn the Threshold down to 0, and the resulting sound will be 1-bit. However, the file itself will still be 16-bit and I don't know how to export as 1-bit. There's a utility called PCM2PWM which may do it?
I don't think that's the sort of PWM you want though. That'll give you a list of intervals between switching from high to low and back, that then gives you a stream of rapid pulses, then those pulses get smoothed by an RC circuit into a waveform. However, I don't think you'll be able to process them fast enough on the Speccy for that to work. Though I could be wrong... I suppose since you've already reduced the sample to 1s and 0s, it'd be crude enough that the intervals are between the absolute transitions of the waveform. But it'll sound as crude as if you'd just done it on the Speccy itself.

What I think you'd need is a stream of bits that you play at a constant rate, and there are pulses encoded in those 0s and 1s that do the job of the PWM speaker control. That would need a custom function.

Re: Is there a list of games containing sound samples?

Posted: Thu Apr 20, 2023 8:14 am
by zxbruno
Speaking of AY samples, someone in this forum posted something a while ago related to Gasman's WAV2AY utility.

Re: Is there a list of games containing sound samples?

Posted: Sat Apr 22, 2023 6:05 pm
by Nienn Heskil
Joefish wrote: Wed Apr 19, 2023 4:53 pm I don't think that's the sort of PWM you want though. That'll give you a list of intervals between switching from high to low and back, that then gives you a stream of rapid pulses, then those pulses get smoothed by an RC circuit into a waveform. However, I don't think you'll be able to process them fast enough on the Speccy for that to work. Though I could be wrong... I suppose since you've already reduced the sample to 1s and 0s, it'd be crude enough that the intervals are between the absolute transitions of the waveform. But it'll sound as crude as if you'd just done it on the Speccy itself.

What I think you'd need is a stream of bits that you play at a constant rate, and there are pulses encoded in those 0s and 1s that do the job of the PWM speaker control. That would need a custom function.
This is the sort of PWM you want. In a nutshell, each cycle do 2 OUTs, one is 'stationary', the other 'moves' relative to it with enough granularity within the cycle. The granularity here is 4t, so Pentagon-only, and preferrably not SpecEmu too lol, it fks up the sound somehow regardless

This example is 4bit, roughly 22KHz samples on the beeper. The AY version is also included for comparison, should be close enough.