4 ms·
This is pretty crazy - even the ZX Spectrum beeper is supported. Is there some Z80 player code allowing the music to be played on real hardware?
by bartread 2y ago
This is pretty crazy - even the ZX Spectrum beeper is supported. Is there some Z80 player code allowing the music to be played on real hardware?
- mdp2021 2y ago> even the ZX Spectrum beeper is supported You know what we can do with 1-bit music, right? I.e. Tim Follin's Agent X ( https://www.youtube.com/watch?v=T42WuUpBuHE https://www.youtube.com/watch?v=T42WuUpBuHE ) or Agent X II ( https://www.youtube.com/watch?v=gNc_xczyGLc https://www.youtube.com/watch?v=gNc_xczyGLc ) or Chronos ( https://www.youtube.com/watch?v=u-D24A_N4d4 https://www.youtube.com/watch?v=u-D24A_N4d4 ) or Raw Recruit ( https://www.youtube.com/watch?v=kl8dAVybwq8 https://www.youtube.com/watch?v=kl8dAVybwq8 ) or Future Games ( https://www.youtube.com/watch?v=orEXKOBIv_8 https://www.youtube.com/watch?v=orEXKOBIv_8 )... A modern attempt, the ON and OFF album by Rich 'Tufty' Hollins ( https://www.youtube.com/watch?v=4nEfO4Yu7Mg https://www.youtube.com/watch?v=4nEfO4Yu7Mg )
- jim-jim-jim 2y agoFrom the comments: > Say, we switch our signal at a rate of 440 Hz. Or any rate, as a matter of fact. One would assume that the signal is on for half of the time, and off the other half of the time (which is what’s known as a square wave). But it doesn’t need to be that way. We can also create a signal that’s on for 1% of the time, and off 99% of the time. As long as we switch at 440 Hz, we still get a 440 Hz note. However, we now have a lot of space between the “on” pulses. Within that space, we can render a second train of pulses at a different frequency. The result will be that both frequencies are audible. This gives a very characteristic sound. This is pulse frequency modulation. Funny side node, that’s actually how your brain cells communicate with each other. Anyway, Tim Follin’s early works on ZX Spectrum are typical examples of that. I wish I could use my relative youth as an excuse here, but I'm afraid I don't quite understand what "on for 1% of the time" means. Like the envelope of the beep is extremely short? And then if you pulse at regular intervals, it creates a sustained tone? And then interleaving differently-spaced pulse sequences creates the illusion of polyphony? Or is it something fancier? Does the ZX have any notion of sample rate or is the signal not even digital?
- qwery 2y ago> what "on for 1% of the time" means It's a description of the synthesised waveform. There's no envelope and sample rate isn't particularly meaningful as there are no samples or recording involved. The wave is a pulse/square wave -- 1 bit. The signal goes high/"on" at a frequency of e.g. 440 Hz. The 1% refers to the duty cycle[0] -- this is expressed as a percentage of the wave period (1 / 440 Hz) that the signal remains high. So every cycle of a 1% pulse wave, for 0.01 / 440 seconds the signal is high, then 0.99 / 440 seconds the signal is low. Changing the duty cycle can change the character of the tone, but the note/frequency is unaffected. [0] https://en.wikipedia.org/wiki/Duty_cycle https://en.wikipedia.org/wiki/Duty_cycle
- jim-jim-jim 2y agoThat clears it up a bit, thank you. To simulate 440hz and 220hz playing simultaneously, would the phase of the latter have to be offset?
- sim7c00 2y agohttps://www.chibiakumas.com/z80/platform3.php#LessonP23 https://www.chibiakumas.com/z80/platform3.php#LessonP23 if you are interested in the beeper and how to make sound on it :D it has few tips but can give an idea how basic the stuff is. appearently the 128k has a better chip. I am wholly unfamiliar with the platform tho so sorry if my comment is a bit off the rails :D
- smrq 2y agoSpecifically here I believe he is referring to the pulse width of the square wave, like you would see on many basic oscillators. A 50% setting would have the wave high for half of the cycle, then low for the other half (111110000011111000001111100000 etc). A 1% setting would have the wave high for 1% of the cycle, then low for the remaining 99% (something like 100000000010000000001000000000). This is still a 440Hz periodic signal, just with a somewhat different timbre.
- uticus 2y agoWonder if this could be done with light as well? For example, an LED flashing at 60Hz, but duty cycle of 30%; vs an LED at 60Hz, but duty cycle of 70%.
- pixelfarmer 2y agoPC speaker: - 8088 mph demo: https://www.youtube.com/watch?v=yHXx3orN35Y https://www.youtube.com/watch?v=yHXx3orN35Y - Area 5150 demo: https://www.youtube.com/watch?v=fWDxdoRTZPc https://www.youtube.com/watch?v=fWDxdoRTZPc - Stormlord (game, 1989): https://www.youtube.com/watch?v=lmDJt1etzRE https://www.youtube.com/watch?v=lmDJt1etzRE (unfortunately doesn't keep intro screen around for long) - A nice video explaining PC speaker with examples (also features Chronos from ZX Spectrum): https://www.youtube.com/watch?v=jD4m9JvLy2Y https://www.youtube.com/watch?v=jD4m9JvLy2Y
- bartread 2y agoOh, yeah, very familiar with Agent X and Chronos. I remember getting Chronos back in the day and, bearing in mind it was a budget title, being absolutely blown away by the music.