pouët.net

Go to bottom

ZX-Spectrum or other 1-bit music system tricks

category: code [glöplog]
 
Hello,
I want to generate some 1-bit music for some not-yet-known computer with a buzzer similar to the zx spectrum one.
I know the spectrum guys got pretty far in terms of multivoice music with such a buzzer, and I'm looking for some information on the tricks and techniques used to do it properly.

Since I'm not too familiar with the spectrum scene, I'm not sure where to start looking for information. I'm intereseted in anything you have : explanations of the different techniques, player code, algorithms, whatever else.
I'm guessing pulse width modulation is your friend :)
added on the 2010-08-05 12:31:00 by xeron xeron
I'm curious too, but for a ready-to-be-forgotten not-really-a-computer :)

The pulse width modulation seems interesting, but I'm wondering about the timings between the lower limit and the upper limit (when the buzzer is on) as described in the following graphic:

BB Image
http://en.wikipedia.org/wiki/Pulse-width_modulation

Also, it is possible to mix pre-converted frequencies or do they mix frequencies and then convert the result to PWM ?
added on the 2010-08-05 13:14:12 by tobé tobé
Ok, I can hear the PWM stuff.
Apparently not everyone is using it, however. Listening to the intro music from Ramparts ( http://www.worldofspectrum.org/infoseekid.cgi?id=0004020, I hear there is no volume control, but at least 2 channels of squarewaves that sound better to me. So I guess there are other ways ?
PulkoMandy: Yes. "Ramparts" isn't a PulseWithModulation, as far as I know.
Check out this stuff too: http://8bc.org/music/MISTER+BEEP/Greetings+to+C64/ or http://8bc.org/music/MISTER+BEEP/NEBULA+FIGHT/. Shiru wrote the sound-engine. He could answer a lot of the questions. He's the guy behind "1-bit blog".
Whatever you find, post it here. I keep entertaining the idea of seeing if decent 1-bit music is possible realtime/background on 4.77MHz 8088 but I can't understand speccy asm...
added on the 2010-08-06 06:44:52 by trixter trixter
I wrote a small intro with beeper sound at one point, but never had access to a 8088 to verify that it would actually run on it.. Should have, in theory. I'll have to dig up my archives to see if I still have it. I have no idea what I did for the sound.. I think I did some kind of conversion from 8 bit audio sample to the beeper. If I had to guess, I probably just used the source as pwm width or some such. It's been a while, and I never even released it.
added on the 2010-08-06 08:49:53 by sol_hsa sol_hsa
I found this : http://www.romanblack.com/BTc_alg.htm

It relies on heavy RC filtering of the output, so not sure it's applicable.
Looks like romanblack discovered/reinvented CVSD: http://en.wikipedia.org/wiki/Continuously_variable_slope_delta_modulation
added on the 2010-08-07 21:52:49 by trixter trixter

login

Go to top