Due to unusually high levels of website traffic you will be presenting with regular Cloudflare checks for the time being.

ZX Spectrum 48 beeper music colection

On the creation of AY or Beeper music, including the packages used to do so.
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

ZX Spectrum 48 beeper music colection

Post by _dw »

I created a collection of beeper tracks on a ZX Spectrum 48kb using Octode 2k16 engine and ZX0 packer and M4 FORTH.


https://www.youtube.com/watch?v=4D28quLwQG0

I played each song twice. Some have a unique beginning, the rest just repeat.

Code: Select all

https://codeberg.org/DW0RKiN/M4_FORTH/src/branch/master/Testing/music.tap
The sources are also here (but it is scattered in several directories, because there are both mod files and conversion to a text file and then compressed, and music engine and packer are in separate directories)
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

If you wanted to know what the song from Cyberpunk 2077 Edgerunners would sound like on the ZX Spectrum beeper, you can listen to it.

https://www.youtube.com/watch?v=1AQGruKJhO4
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

Something went wrong while converting to video. I found one flaw in the image that contradicts the physical display on the ZX Spectrum 48kb. Good if you find it. It can be seen by eye even without using an 8*8 grid, just simple thinking is enough.

You can download the executable from: https://codeberg.org/DW0RKiN/M4_FORTH/s ... erpunk.tap
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

I managed to get 1 like, so I keep going for success.

https://www.youtube.com/watch?v=PKDMHVykX9A
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

I guarantee you've never heard anything like it from a ZX Spectrum beeper!

https://youtu.be/RFJooCUfuFk
You can download the executable from: https://codeberg.org/DW0RKiN/M4_FORTH/s ... relude.tap
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
User avatar
R-Tape
Site Admin
Posts: 6494
Joined: Thu Nov 09, 2017 11:46 am

Re: ZX Spectrum 48 beeper music colection

Post by R-Tape »

That sounds far too smooth and soothing for beeper!
flange
Dizzy
Posts: 64
Joined: Tue Dec 12, 2023 5:27 pm

Re: ZX Spectrum 48 beeper music colection

Post by flange »

Agreed, tried it on three emulators and each had a noticeable top end "buzz" not apparent in this recording, maybe ok on real kit nice to hear something musical rather than the usual chip tune thud thud bleep.
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

I don't have access to real hardware.
To create a video I used FUSE File --> Movie --> Record (*.FMF)
I converted it to a YouTube video using a script.
Spoiler

Code: Select all

#!/bin/sh

[ $# -lt 1 ] && printf "Error: $0: Need fmf filename!\n" >&2 && exit 1

name=$1

if [ -s "$1" ] ; then
  name=${1%.*}
  input=$1
elif [ -s "$1.fmf" ] ; then
  name=$1
  input=$1.fmf
else
  printf "Error: $0: \"${1}\" not found!\n" >&2
  exit 2    
fi

echo "  name: " $name
echo " input: " $input
echo "output: " $name.mkv

fmfconv ${input} | ffmpeg -i - -vf palettegen palette.png
fmfconv --raw-sound ${input} | ffmpeg -i - -i palette.png -filter_complex "crop=288:216,scale=1440:1080:flags=neighbor [x]; [x][1:v] paletteuse" -c:a flac -c:v zmbv -compression_level:a 12 ${name}.mkv
My settings FUSE Options --> Sound... --> Speaker type = TV Speaker (others are Beeper and Unfiltered)

For me, the original mod is already interesting (see don't click {because it asks for my phone number} YouTube link)
https://modarchive.org/index.php?reques ... uery=56349

It is a classic mod using 4 channels (tracks). And unlike all the others, there are no special filters or volume changes. I even only have one sample.
The special sound is achieved by the fact that the start of each channel is shifted by 1/4.

The sample contains the sound of a piano.

Just replacing the sample with "tone.wav" sounds weird. I don't know how to describe it: Flat? In this case, I duplicated each track and shortened all tones in the copy to half the length. That sounded surprisingly good!

I played with the image and uploaded a video to youtube. But I improved something again on the picture when I thought about how it would sound if I shortened the double initial sound from half to a quarter. Then I could use only one instead of 4 additional channels. When I listened to it, it sounded the same as the previous version, but... the noise was reduced.

So I redid the whole thing again.

So what exactly does the sound of a real Spectra sound like? I have no idea, it will probably depend on the connection and the specific piece. (age?)

The sound is simply the result of the work of the octode2k16 engine. I'm just trying to convert mods and their features to an xm file containing 8 tracks supporting nothing but tone + 2 tracks that can only contain one drums/kick/snare at a time.

It's a bit of magic to make it sound similar. I have to lower the octave for some samples because they have a deeper tone. If something has different volume levels, it is duplicated and the second channel is switched off at a lower volume. Possibly the hardest parts below C10 are completely crushed.

Do some tones have vibrato? It shows me the code 400. This can also be duplicated and the second channel keeps turning on and off.
Or instead of duplication, the original channel can be turned on and off directly. But it sounds different.
Or instead of switching on and off, you can change the octave up and down. Etc.

Sometimes the main melody is hard to hear, so it is also duplicated to make it more distinct.

And you can never know the result directly from Fastracker II. But every change must be listened to in FUSE. It is also laborious to delete all those special effects, which are then ignored by the converter, so I usually leave them there. To know what happened there.

PS: I'm not much of a musician. And my elementary school musical education was a long time ago, so I wouldn't even be able to read notes accurately. Maybe we didn't even learn anything, just sing some folk songs and "do re mi fa so la si dó" (the English version is possible differently)

I have a lot of questions myself. Does the sound in octode2k16 differ in individual tracks? If the first ones are more pronounced? Would the sound change if the copies of the tracks were consecutive and not at the end? But I think that the converter made some kind of mix of all the tracks for the given lines and a single frequency will be created which will be tried to play in a short time. I do not know anything.
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

W.O.T.W: Intro number 82 (ZX Spectrum 1 bit beeper cover)

https://youtu.be/28eajCmzOcc
https://modarchive.org/index.php?reques ... ery=124507
You can download the executable from: https://codeberg.org/DW0RKiN/M4_FORTH/s ... tro_82.tap

PS: That text image took more work than usual because I drew it every pixel by hand.
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
User avatar
utz
Microbot
Posts: 116
Joined: Wed Nov 15, 2017 9:04 am
Contact:

Re: ZX Spectrum 48 beeper music colection

Post by utz »

Glad you're having fun with octode2k16! Those conversions are great. You're one of the very few people using that engine, actually.

To answer some questions: Yes, the sound on actual hardware is more raspy. The "unfiltered" option in Fuse provides a fairly accurate rendition of how it will sound on the real machine. Some other emulators tend to overemphasize the raspyness, though. In addition to the imperfections caused by hardware limitations, there some also bugs in the engine that lead to even more unwanted noise. But hey, I was young and naive when I wrote that :P
_dw wrote: Wed Mar 27, 2024 8:59 pm Does the sound in octode2k16 differ in individual tracks? If the first ones are more pronounced? Would the sound change if the copies of the tracks were consecutive and not at the end?
No, all the tracks are identical.
_dw wrote: Wed Mar 27, 2024 8:59 pm But I think that the converter made some kind of mix of all the tracks for the given lines and a single frequency will be created which will be tried to play in a short time.
No, the frequencies of all tracks are generated for each sample for a whopping total sample rate of 4557 KHz.
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

utz wrote: Thu Mar 28, 2024 2:45 pm Glad you're having fun with octode2k16! Those conversions are great. You're one of the very few people using that engine, actually.

To answer some questions: Yes, the sound on actual hardware is more raspy. The "unfiltered" option in Fuse provides a fairly accurate rendition of how it will sound on the real machine. Some other emulators tend to overemphasize the raspyness, though. In addition to the imperfections caused by hardware limitations, there some also bugs in the engine that lead to even more unwanted noise. But hey, I was young and naive when I wrote that :P

No, all the tracks are identical.

No, the frequencies of all tracks are generated for each sample for a whopping total sample rate of 4557 KHz.
Does the sound change if I have the same pattern, but I switch channels? Or is it impossible to hear with the human ear?

The same when I double track. And I will play a copy immediately in the next track, or for example the first and fourth tracks.

Does it affect the noise?

The last time I came across that the playback speed is sometimes lower than in the original. It seems that only "Speed" is taken into account and "BMP" is ignored. I deal with it by simply speeding it up until I don't like it. But some mods have the speed change written as an effect right in the track, and then I wonder what I'm doing when it slows me down in the middle of the song. Because speed change support is one of the few things that octode2k16 supports.

What errors in the engine do you mean? Somewhere you wrote something about the divergence in time of some tracks.
But when I commented the code, I didn't see what was wrong. I recalculated all the times and they were sitting at 192 t-clocks.

core0: only write OFF (hard constant 0) in block 192 t-clocks and repeat
core1: 24 t-clocks ON (content of B register) 24-192 OFF (hard 0) and repeat
core2: 48 t-clocks ON (content of B register) 48-192 OFF (hard 0) and repeat
core3: 72 t-clocks ON (content of B register) 72-192 OFF (hard 0) and repeat
core4: 96 t-clocks ON (content of B register) 96-192 OFF (hard 0) and repeat
core5: 120 t-clocks ON (content of B register) 120-192 OFF (hard 0) and repeat
core6: 144 t-clocks ON (content of B register) 144-192 OFF (hard 0) and repeat
core7: 168 t-clocks ON (content of B register) 168-192 OFF (hard 0) and repeat
core8: 168 t-clocks ON (content of B register) 168-192 OFF (hard 0) and repeat

I assume that in each row, each track will be selected in which !core" it will "play". Switch the bit on the speaker / position of the membrane.

Then there is a part where you probably solve the drums, but I didn't understand that at all.

Slightly modified engine part:
https://codeberg.org/DW0RKiN/M4_FORTH/s ... de2k16.asm

I also had to adjust the conversion from xm to text output a little, because I needed to have the resulting binary size in the file and set the labels so that they could change the position during compilation. So they are relative to one address.

As I am sclerotic, I have already put it out of my head.
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

unreal superhero (ZX Spectrum 1 bit beeper cover (Fuse Unfiltered))

https://www.youtube.com/watch?v=5x56yISZ3gA
https://modarchive.org/index.php?reques ... uery=67561

You can download the executable from: https://codeberg.org/DW0RKiN/M4_FORTH/s ... erhero.tap
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
User avatar
utz
Microbot
Posts: 116
Joined: Wed Nov 15, 2017 9:04 am
Contact:

Re: ZX Spectrum 48 beeper music colection

Post by utz »

_dw wrote: Sat Mar 30, 2024 10:24 pm Does the sound change if I have the same pattern, but I switch channels? Or is it impossible to hear with the human ear?
Switching channels should not change the sound. However, see the caveat below.
_dw wrote: Sat Mar 30, 2024 10:24 pm The same when I double track. And I will play a copy immediately in the next track, or for example the first and fourth tracks.
Generally it doesn't matter which combination of tracks you double on. However, the engine never resets the oscillator phases. That means that there might be some difference, depending on the combination of phases that will play. A slight phase difference will make the sound more bell-like. In theory, two tracks can even cancel each other out, if their phases happen to be inverted. However, there is no way to control phases directly, so any musical use of this will basically happen by accident. One could easily add phase control, but it would of course double the size of the music data, and make pattern row transitions slower and consequently noisier.
_dw wrote: Sat Mar 30, 2024 10:24 pm Does it affect the noise?
Only indirectly, depending on the oscillator phases. I assume any differences would be marginal, but I might be wrong.
_dw wrote: Sat Mar 30, 2024 10:24 pm The last time I came across that the playback speed is sometimes lower than in the original. It seems that only "Speed" is taken into account and "BMP" is ignored. I deal with it by simply speeding it up until I don't like it. But some mods have the speed change written as an effect right in the track, and then I wonder what I'm doing when it slows me down in the middle of the song. Because speed change support is one of the few things that octode2k16 supports.
Correct, BPM is ignored completely and the converter assumes a fixed BPM setting of 90 or thereabouts (it's never 100% accurate). If the mods change BPM via effects, then you're out of luck.
_dw wrote: Sat Mar 30, 2024 10:24 pm What errors in the engine do you mean? Somewhere you wrote something about the divergence in time of some tracks.
But when I commented the code, I didn't see what was wrong. I recalculated all the times and they were sitting at 192 t-clocks.
Ah, then it's actually not so bad. I was just glancing over it and had the impression that not all the timings were calculated correctly. This leaves only
_dw wrote: Sat Mar 30, 2024 10:24 pm core8: 168 t-clocks ON (content of B register) 168-192 OFF (hard 0) and repeat
which should actually do the same thing as core0, but switch the beeper ON at the beginning and then leave it on. In fact, with a bit of code shuffling one could probably just write the OUT command and then jump into core0. Everything must add up to 4x192t, though.
_dw wrote: Sat Mar 30, 2024 10:24 pm I assume that in each row, each track will be selected in which !core" it will "play". Switch the bit on the speaker / position of the membrane.
Not quite. For each sample (what you call row, I think - I prefer to use the latter term for pattern rows), the combined volume of all tracks is calculated, and that determines which core will play next.
_dw wrote: Sat Mar 30, 2024 10:24 pm Then there is a part where you probably solve the drums, but I didn't understand that at all.
That's just some hocus pocus to generate some short bursts of noise between rows. Don't worry about it too much. It's essentially the good old

Code: Select all

  add hl,de
  rlc h
aka "el cheapo" PRNG used in many beeper engines, being called with different seeds according to the drum type.
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

utz wrote: Mon Apr 01, 2024 4:21 pm Generally it doesn't matter which combination of tracks you double on. However, the engine never resets the oscillator phases. That means that there might be some difference, depending on the combination of phases that will play. A slight phase difference will make the sound more bell-like. In theory, two tracks can even cancel each other out, if their phases happen to be inverted. However, there is no way to control phases directly, so any musical use of this will basically happen by accident. One could easily add phase control, but it would of course double the size of the music data, and make pattern row transitions slower and consequently noisier.
I admit I don't understand it. Oscillator phase?
Can two tracks randomly interfere? Do you mean by chance it sounds different every time you start it up?

If the same note is played at the same octave more than twice, strange things start to happen. It also depends on the tone. It complicates the transfer of music a lot. Because some tracks have to shift an octave, sometimes I have to skip a tone altogether. I'm not sure if it also affects when the same tone is played in a lower octave.

I still don't understand how it is with that phase. I assumed that if I double the tone, then the engine plays the same CORE 2 times in close succession. I thought there was a constant switch between all 8 channels for each line. And each channel will play one line in the same CORE.
So CORE 0 is equal to CORE 8. Both mean "silence". Zeros switch OFF to OFF and eights ON to ON. So it shouldn't cause the diaphragm to move.

The phase control means that I double the number of lines and insert --- between them. So it will play intermittently, but synchronously?
utz wrote: Mon Apr 01, 2024 4:21 pm
Only indirectly, depending on the oscillator phases. I assume any differences would be marginal, but I might be wrong.



Correct, BPM is ignored completely and the converter assumes a fixed BPM setting of 90 or thereabouts (it's never 100% accurate). If the mods change BPM via effects, then you're out of luck.
You're right, this helped a lot. Played according to testing around 89+. Thanks to this, I am more or less able to synchronize FUSE and Fast Tracker 2 in which I edit it and find in which part there are problems.
utz wrote: Mon Apr 01, 2024 4:21 pm
Ah, then it's actually not so bad. I was just glancing over it and had the impression that not all the timings were calculated correctly. This leaves only



which should actually do the same thing as core0, but switch the beeper ON at the beginning and then leave it on. In fact, with a bit of code shuffling one could probably just write the OUT command and then jump into core0. Everything must add up to 4x192t, though.



Not quite. For each sample (what you call row, I think - I prefer to use the latter term for pattern rows), the combined volume of all tracks is calculated, and that determines which core will play next.
Again, I don't quite understand, I should probably go through the asm code.
utz wrote: Mon Apr 01, 2024 4:21 pm
That's just some hocus pocus to generate some short bursts of noise between rows. Don't worry about it too much. It's essentially the good old

Code: Select all

  add hl,de
  rlc h
aka "el cheapo" PRNG used in many beeper engines, being called with different seeds according to the drum type.
That drum sound is probably the weakest part of the engine. Sometimes I would need one more unique "sample" for "kick". How often is it difficult to assign which instrument to play which original sample. I have to go through it. Find out which sounds the most like a drum and then look to see if some of the samples don't merge into one, and if so, if they are consecutive in the patterns, so the file should be replaced. Or just leave them out. It is never systematic work to try to map an element of one set onto elements of another smaller set. It's like converting an image to a ZX image. Sometimes the "prettier" solution is the one that has more deviations from the original, because it preserves something that has more weight/importance for a person.

Do you write somewhere that the volume should be partially controlled? Or am I mistaken?

I hope that when converting from XM to data when duplicating a drum, the one with the lower track number will be preserved.
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

Rez and Kenët: Unreeeal Superhero 3 (ZX Spectrum 1 bit beeper cover (Fuse Unfiltered))

https://www.youtube.com/watch?v=IKAZsg1DtnM
You can download the executable from: https://codeberg.org/DW0RKiN/M4_FORTH/s ... hero_3.tap
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

Quazar: Hybrid song / Funky Stars 2:20 (ZX Spectrum 1 bit beeper cover (Fuse Unfiltered))

https://www.youtube.com/watch?v=JdRY9FOKBes
You can download the executable from: https://codeberg.org/DW0RKiN/M4_FORTH/s ... /cx_03.tap
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

Balrog: Ajoj (ZX Spectrum 1 bit beeper cover (Fuse Unfiltered))

https://www.youtube.com/watch?v=bfu1_5EWMYA
You can download the executable from: https://codeberg.org/DW0RKiN/M4_FORTH/s ... g/ajoj.tap
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

Martin "Maktone" Nordell: 1992 (ZX Spectrum 1 bit beeper cover (Fuse Unfiltered))

https://www.youtube.com/watch?v=IutxXNPFI6c
You can download the executable from: https://codeberg.org/DW0RKiN/M4_FORTH/s ... /_1992.tap
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

Martin "Maktone" Nordell: Polly Was A Cracker (ZX Spectrum 1 bit beeper cover (Fuse Unfiltered))

https://youtu.be/cNIdffMdxCU
Download: https://codeberg.org/DW0RKiN/M4_FORTH/s ... /polly.tap
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

Jürgen "Axk" Koch: Axk10 (ZX Spectrum 1 bit beeper cover (Fuse Unfiltered))

https://youtu.be/dmO2yw4ROBg
Download: https://codeberg.org/DW0RKiN/M4_FORTH/s ... /axk10.tap
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
User avatar
utz
Microbot
Posts: 116
Joined: Wed Nov 15, 2017 9:04 am
Contact:

Re: ZX Spectrum 48 beeper music colection

Post by utz »

_dw wrote: Wed Apr 10, 2024 4:29 am I admit I don't understand it. Oscillator phase?
Below I am drawing a picture of 3 square waves. Their frequency is the same, but the phase is different.

Code: Select all

___---___---
_---___---__
---___---___
Does this make sense?
_dw wrote: Wed Apr 10, 2024 4:29 am Can two tracks randomly interfere?
I thought so. However, I just checked the code again and it seems that phase is actually reset. So, the answer is no. Best forget everything I ever said about phase :o
_dw wrote: Wed Apr 10, 2024 4:29 am I still don't understand how it is with that phase. I assumed that if I double the tone, then the engine plays the same CORE 2 times in close succession. I thought there was a constant switch between all 8 channels for each line. And each channel will play one line in the same CORE.
So CORE 0 is equal to CORE 8. Both mean "silence". Zeros switch OFF to OFF and eights ON to ON. So it shouldn't cause the diaphragm to move.
No. Octode2k16 is not pulse-interleaving. It is a PCM renderer (with the different volume levels realized through PWM). Let's pretend the engine has only two channels. For a given point in time ("sample"), one of these will happen:

Code: Select all

chan state  core used
ch1 ch2
 0   0        core0
 1   0        core1
 0   1        core1
 1   1        core2
That is, for every sample, we calculate the total volume of all 8 channels, and select the core accordingly.
_dw wrote: Wed Apr 10, 2024 4:29 am That drum sound is probably the weakest part of the engine. Sometimes I would need one more unique "sample" for "kick". How often is it difficult to assign which instrument to play which original sample. I have to go through it. Find out which sounds the most like a drum and then look to see if some of the samples don't merge into one, and if so, if they are consecutive in the patterns, so the file should be replaced. Or just leave them out. It is never systematic work to try to map an element of one set onto elements of another smaller set. It's like converting an image to a ZX image. Sometimes the "prettier" solution is the one that has more deviations from the original, because it preserves something that has more weight/importance for a person.

Do you write somewhere that the volume should be partially controlled? Or am I mistaken?
Yes, the drums are crap. No volume control - in 2016, we didn't understand yet how to do it. Volume control for click drums was discovered around 2020, I think.
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

utz wrote: Mon Apr 15, 2024 10:08 pm Below I am drawing a picture of 3 square waves. Their frequency is the same, but the phase is different.

Code: Select all

___---___---
_---___---__
---___---___
Does this make sense?

I thought so. However, I just checked the code again and it seems that phase is actually reset. So, the answer is no. Best forget everything I ever said about phase :o



No. Octode2k16 is not pulse-interleaving. It is a PCM renderer (with the different volume levels realized through PWM). Let's pretend the engine has only two channels. For a given point in time ("sample"), one of these will happen:

Code: Select all

chan state  core used
ch1 ch2
 0   0        core0
 1   0        core1
 0   1        core1
 1   1        core2
That is, for every sample, we calculate the total volume of all 8 channels, and select the core accordingly.
Yes, I understand now. And this Table changes everything.
A pair of the same notes on the same row ceases to make sense unless each channel plays it in a row in succession.
It also suddenly starts to make sense to talk about conflict and disruption of phases.
I'm not sure if octode2k16 is something like 4557 KHz with emulated 3-bit depth. It's not quite accurate, because this "bit depth" is different from the normal one, which is drawn with a "square wave", but in reality it's just "points" on the wave, so this variant really has a bit of square waves. Because the ON/OFF ratio is repeated 4 times each time.
utz wrote: Mon Apr 15, 2024 10:08 pm

Yes, the drums are crap. No volume control - in 2016, we didn't understand yet how to do it. Volume control for click drums was discovered around 2020, I think.
So it can be said that if the sound has problems, it is not actually set in the engine (asm) but in the C++ converter. Which should, under certain circumstances, choose other solutions. Maybe it would be enough to have some effect registered directly in XM, which would tell him, here is a problem, try to solve it differently.
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

I think that the Bad Apple for the 48 version did not exist yet.

太田 "ZUN" 順也: Bad Apple!! (ZX Spectrum 1 bit beeper cover (Fuse Unfiltered))

https://codeberg.org/DW0RKiN/M4_FORTH/s ... _Apple.tap
(this tap has modified sound at the end and the corrected apple differs from the video)

Dash Berlin: Better to beep off Alone (ZX Spectrum 1 bit beeper cover (Fuse Unfiltered))

https://codeberg.org/DW0RKiN/M4_FORTH/s ... /Alone.tap

MoSeZ: Lightyear (ZX Spectrum 1 bit beeper cover (Fuse Unfiltered))

https://codeberg.org/DW0RKiN/M4_FORTH/s ... htyear.tap

The Chainsmokers & Coldplay: Something just like this - piano (ZX Spectrum 1 bit cover (Unfiltered))

https://codeberg.org/DW0RKiN/M4_FORTH/s ... e_this.tap

Michał "Michu" Brzeski: 068 (ZX Spectrum 1 bit beeper cover (Fuse Unfiltered))

https://codeberg.org/DW0RKiN/M4_FORTH/s ... g/_068.tap

Sascha "Zycro" Graune: Anno Domini 1991 (ZX Spectrum 1 bit beeper cover (Fuse Unfiltered))

https://codeberg.org/DW0RKiN/M4_FORTH/s ... d_1991.tap

Paweł "Zombie/Fire" Ząbek: Antibiotic 4 (ZX Spectrum 1 bit beeper cover (Fuse Unfiltered))

https://codeberg.org/DW0RKiN/M4_FORTH/s ... otic_4.tap

Hardliner / BLiZZARD: Contraduct Design (ZX Spectrum 1 bit beeper cover (Fuse Unfiltered))

https://codeberg.org/DW0RKiN/M4_FORTH/s ... design.tap
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

Kai Rosenkranz: Gothic 3 - Vista point (ZX Spectrum 1 bit beeper cover (Fuse Unfiltered))

https://codeberg.org/DW0RKiN/M4_FORTH/s ... _point.tap
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
_dw
Microbot
Posts: 107
Joined: Thu Dec 07, 2023 1:52 am

Re: ZX Spectrum 48 beeper music colection

Post by _dw »

Trevor Jones: Last Mohicans - Kiss (ZX Spectrum 1 bit beeper cover (Fuse Unfiltered))

https://codeberg.org/DW0RKiN/M4_FORTH/s ... s_Kiss.tap
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
Post Reply