This thread was probably the one which you were thinking of?
In game beeper music
Re: In game beeper music
Re: In game beeper music
Yes!!! That one, thanks!djnzx48 wrote: ↑Wed Mar 06, 2024 8:43 am This thread was probably the one which you were thinking of?
Re: In game beeper music
Another one:
Sex Tetris (x-rated)
Music: Jacques Offenbach, "Orpheus in the Underworld" [Overture] (CAN-CAN Music)
Sex Tetris (x-rated)
Music: Jacques Offenbach, "Orpheus in the Underworld" [Overture] (CAN-CAN Music)
✓ Reviewed
RANDOMIZE USR 1333
Re: In game beeper music
Head Over Heels plays short melodies when you pick up various objects, though there's nothing plays continuously. It's really just an extension of the sound effects.
In my own games the beeper sound effects are done by twiddling the speaker bit high/low off the back of a more vital loop of code (e.g. screen or sprite drawing) that's already running at roughly a rate that counts as 'audible' (1-2 scanlines per loop). So the timing is nowhere near good enough to play a note, just farts or squeaks and the occasional crunch. But at least they don't need their own devoted CPU time.
In my own games the beeper sound effects are done by twiddling the speaker bit high/low off the back of a more vital loop of code (e.g. screen or sprite drawing) that's already running at roughly a rate that counts as 'audible' (1-2 scanlines per loop). So the timing is nowhere near good enough to play a note, just farts or squeaks and the occasional crunch. But at least they don't need their own devoted CPU time.
✓ Reviewed
Re: In game beeper music
A similar case is the game 'Jack the Nipper II: In Coconut Capers'. It reproduces different music jingles associated with specific actions without interrupting the gameplay.
RANDOMIZE USR 1333
Re: In game beeper music
Snakes & Hazards, Xmas Ludo, Shove-a-Sledge, Tiddly Drinks. On Spectrum 48K, it plays music through the beeper.
✓ Reviewed
Re: In game beeper music
In dynamite dan 2 it happens too. I remember that when you take the vinyl to the jukebox, a melody plays. And picking some objects too.
- ParadigmShifter
- Manic Miner
- Posts: 785
- Joined: Sat Sep 09, 2023 4:55 am
Re: In game beeper music
So are you saying playing a note at a random point in a frame might sound bad?
In Turbo Manic Miner I played a tune note every couple of frames in the ISR (I also did all my drawing in the ISR for that lol, not doing that these days). That sounded fine to me even though I did the tune update after the draw in the ISR.
I was planning on borrowing some code from that but playing after drawing completes (maybe also in the ISR if an ISR has gone off and it did not play a note the previous frame and it should have).
Unfortunately I do all my draw code with the interrupts disabled (since all the draw routines use the stack to blit the graphics). All drawing is done in only 1 place from a list of what to draw. (When I add the HUD I may draw parts of that which need updating without using the stack though and outside the main draw loop with interrupts enabled - not too bothered if the HUD drawing does not beat the raster). I haven't done much checking whether I ever miss an ISR though (how to do that as well when interrupts are turned off during drawing hmm). It looks to me that nearly all the time drawing has finished within a frame (maybe the game logic that follows could cause it to drop a frame though - but the ISR will be enabled for that so that was why I was thinking of also checking in the ISR if I should update a tune).
I could do the tune playing in the ISR and the drawing afterwards but I don't know how many scanlines playing the note will take, can't be too many since I am drawing directly to the screen and I want to start drawing ASAP after the HALT returns.
EDIT: Ok my code from Manic Miner Turbo just pasted into the code after the drawing has finished is definitely not feasible lol
takes nearly half a frame when the tune timer plays a note (every 4th frame - black border).
In Turbo Manic Miner I played a tune note every couple of frames in the ISR (I also did all my drawing in the ISR for that lol, not doing that these days). That sounded fine to me even though I did the tune update after the draw in the ISR.
I was planning on borrowing some code from that but playing after drawing completes (maybe also in the ISR if an ISR has gone off and it did not play a note the previous frame and it should have).
Unfortunately I do all my draw code with the interrupts disabled (since all the draw routines use the stack to blit the graphics). All drawing is done in only 1 place from a list of what to draw. (When I add the HUD I may draw parts of that which need updating without using the stack though and outside the main draw loop with interrupts enabled - not too bothered if the HUD drawing does not beat the raster). I haven't done much checking whether I ever miss an ISR though (how to do that as well when interrupts are turned off during drawing hmm). It looks to me that nearly all the time drawing has finished within a frame (maybe the game logic that follows could cause it to drop a frame though - but the ISR will be enabled for that so that was why I was thinking of also checking in the ISR if I should update a tune).
I could do the tune playing in the ISR and the drawing afterwards but I don't know how many scanlines playing the note will take, can't be too many since I am drawing directly to the screen and I want to start drawing ASAP after the HALT returns.
EDIT: Ok my code from Manic Miner Turbo just pasted into the code after the drawing has finished is definitely not feasible lol
takes nearly half a frame when the tune timer plays a note (every 4th frame - black border).
Re: In game beeper music
I remember this one:
Arcade Zx Collection : TETRIS
https://spectrumcomputing.co.uk/entry/3 ... rum/Tetris
Arcade Zx Collection : TETRIS
https://spectrumcomputing.co.uk/entry/3 ... rum/Tetris
✓ Reviewed
If something works, don't touch it !!!! at all !!!
Re: In game beeper music
Dynamite Dan games case is easier to justify, because they have many and recognizable melodies (I added them to the list). In Jack the Nipper II is more tricky, because it plays mostly some escale notes and sound effects, but it has some melodies when you pick up some objects or you complete some actions.
Re: In game beeper music
Thanks! Cómeme was also missing some credits (specially Sandra Ariza with the level design, love when other members of the family help with the game). That is also fixed.
Re: In game beeper music
It's complex but necessary to set the limits; if we include 'Jack The Nipper II' , it opens the door for other games with similar characteristics, like 'Cobra'.druellan wrote: ↑Thu Mar 07, 2024 10:13 am Dynamite Dan games case is easier to justify, because they have many and recognizable melodies (I added them to the list). In Jack the Nipper II is more tricky, because it plays mostly some escale notes and sound effects, but it has some melodies when you pick up some objects or you complete some actions.
According to as I remember or discover more games with in-game beeper music, I'll put them here, if it's not a problem.
Another one for the list
Stack Up
✓ Reviewed
RANDOMIZE USR 1333
Re: In game beeper music
Yes, I agree, but we can handle that as we discover more. For now, I'm adding everything that plays a tune in-game for more than a second, and it is a melody, not a scale of notes, etc. I added a new column so we can keep track of the special cases.
Of course it is not! This is going to be a group in the database, and a very interesting one, giving that this is considered challenging to do in the system, and for that reason is also a defining feature. Any help to make the list more complete is welcome!
Re: In game beeper music
If that was directed at me then no, there's no argument. It doesn't sound bad exactly, just I expect a bit farty as it's constantly stop-start, and it's a harsh-sounding square-ish wave behind that as it's all 1s and 0s and nothing in-between, just like Manic Miner does. But it is vaguely in tune.ParadigmShifter wrote: ↑Wed Mar 06, 2024 9:18 pmSo are you saying playing a note at a random point in a frame might sound bad?
What I said was, my code doesn't even bother with the timing necessary to tune a note to the right frequency, it just sends a 1 or a 0 to the speaker from some entirely unrelated loop, like as it copies up each line of the screen. That means the note frequency is completely arbitrary (e.g. a multicolour routine timed to the scan lines could also pump out 0s and 1s at 156 Hz, somewhere just below a D#, or variant harmonics thereof). As I said, good enough for effects; not accurate enough to even play a single good note, let alone a tune (unless you have a whole tune made up of D# played badly in assorted octaves).
- ParadigmShifter
- Manic Miner
- Posts: 785
- Joined: Sat Sep 09, 2023 4:55 am
Re: In game beeper music
I can hear occasional clicks anyway if I try and play the manic miner tune after my drawing has finished even if it does not drop a frame.
So I guess the only way to do it would be to play a note in the ISR at the beginning but as you can see from the timing that takes too long for me to start drawing afterwards and then still be ahead of the raster.
So I'm probably going to forget about that and just not play any ingame tune
Here is the code I use to play the Manic Miner tune (I think this was straight out of the Manic Miner source, maybe I modified it slightly, all the data addresses changed anyway)
Here is the data for the tune
If I change
ld bc, 3
to
ld bc, 2
it uses a bit less time (still too much though) and it still sounds ok. If I change it to 1 instead it sounds bad
So I guess the only way to do it would be to play a note in the ISR at the beginning but as you can see from the timing that takes too long for me to start drawing afterwards and then still be ahead of the raster.
So I'm probably going to forget about that and just not play any ingame tune
Here is the code I use to play the Manic Miner tune (I think this was straight out of the Manic Miner source, maybe I modified it slightly, all the data addresses changed anyway)
Code: Select all
; play tune
ld a, (tune_tick)
dec a
ld (tune_tick), a
jr nz, .skipnote
ld a, (tune_offset)
inc a
ld (tune_offset), a
ld a, 4
.playnote
ld (tune_tick), a
ld a, (tune_offset)
and #7e
rrca
ld e, a
ld d, 0
ld hl, tune_data
add hl, de
ld a, (bdr_colour)
ld e, (hl)
ld bc, 3
.tuneloop
out (#fe), a
dec e
jr nz, .noflip
ld e, (hl)
xor #18
.noflip
djnz .tuneloop
dec c
jr nz, .tuneloop
.skipnote
Code: Select all
bdr_colour db 0 ; black border
tune_offset db 0
tune_tick db 4
tune_data db #80, #72, #66, #60, #56, #66, #56, #56, #51, #60, #51, #51, #56, #66
db #56, #56, #80, #72, #66, #60, #56, #66, #56, #56, #51, #60, #51, #51
db #56, #56, #56, #56, #80, #72, #66, #60, #56, #66, #56, #56, #51, #60
db #51, #51, #56, #66, #56, #56, #80, #72, #66, #60, #56, #66, #56, #40
db #56, #66, #80, #66, #56, #56, #56, #56
ld bc, 3
to
ld bc, 2
it uses a bit less time (still too much though) and it still sounds ok. If I change it to 1 instead it sounds bad
Re: In game beeper music
More games with in-game beeper music for the list:
Chinese Juggler
Carpet Capers
Donkey Kong Jr.
Fizzy Wizzy
Cobra (Occasional short tunes)
Chinese Juggler
Carpet Capers
Donkey Kong Jr.
Fizzy Wizzy
Cobra (Occasional short tunes)
✓ Reviewed
RANDOMIZE USR 1333
- WhatHoSnorkers
- Manic Miner
- Posts: 255
- Joined: Tue Dec 10, 2019 3:22 pm
Re: In game beeper music
I did a Snorkified version of "Ant Hill" from "Spectrum Gamesmaster" where it plays a beeper tune. In BASIC.
It's horrendous, a sort of arpeggiated version of "The Ants Are Marching Two By Two...".
It's horrendous, a sort of arpeggiated version of "The Ants Are Marching Two By Two...".
I have a little YouTube channel of nonsense
https://www.youtube.com/c/JamesOGradyWhatHoSnorkers
https://www.youtube.com/c/JamesOGradyWhatHoSnorkers
Re: In game beeper music
POKE 23614,10: STOP 1..0 hold, SS/m/n colors, b/spc toggle