Page 1 of 1
BEEPOLA: Exiting after every note
Posted: Mon Aug 14, 2023 7:38 pm
by Bubu
Jarl, torpedos!
Hi, all!
I'm using BEEPOLA as a great tracker to make music for the Spectrum 48K, but I need to exit from the player after every note is played, do things in my program, and then come back to play the following note with something like "CALL NEXT_NOTE"
I'd like to have an engine that makes a 2 channel sound and a drum.
I know that the following engines can exit after every note:
- The Music Box: PROBLEM -> You can't do a note and a drum bit at the same time.
- The Music Studio: PROBLEM ->I don't like that sound. The sound I need is the same as the music box engine
- ROM Beep: PROBLEM -> No drums
I've been trying to modify the Music Studio, Phaser 1 and Tritone engines, with no success at all.
Has any of you been able to modify an engine to get out of the player after every note? Or is any author of any BEEPOLA engine in this forum?
Re: BEEPOLA: Exiting after every note
Posted: Mon Aug 14, 2023 10:48 pm
by Morkin
I've previously tweaked the Music Box code that Beepola creates, but only to run a quick Kempston joystick check between each note, to see if the player is using Kempston and pressed the fire button (to stop the tune).
It may have changed, but I think the exported code contains this bit:
Code: Select all
NEXTNOTE:
CALL PLAYNOTE
XOR A
IN A,($FE)
AND $1F
CP $1F
JR Z,NEXTNOTE ; Play next note if no key pressed
EI
RET ; Return from playing tune
After the CALL PLAYNOTE I think you can insert whatever code you like. You'll have to preserve registers (e.g. pointers to where in the current tune pattern you are) if you want to get back to the next note in the tune.
As far as drums are concerned I'm not sure what it'd sound like to use this gap to shove in a drum hit (especially for Music Box, as it's quite legato-sounding). My guess is it'd be better to use another engine that has drums integrated a bit more, but others may have suggestions.
Re: BEEPOLA: Exiting after every note
Posted: Tue Aug 15, 2023 1:12 am
by Bubu
It's esasy to find out where to return after a note has been played, but the thing is how hard is to find out what registers, stack, darta in ram... to save before exiting. I've been trying to do it in the Tritone engine, but I have to give up... or almost.
Thanx anyway, @Morkin
Re: BEEPOLA: Exiting after every note
Posted: Fri Aug 18, 2023 11:16 am
by utz
Have a look at the modified Tritone player in z88dk.
Re: BEEPOLA: Exiting after every note
Posted: Fri Aug 18, 2023 5:04 pm
by Bubu
Hi, @utz , I've been googling that but can't find any difference between the Tritone engine included in Beepola, and those in z88dk. I mean, the engine plays the full song or exits after a key is pressed, but you can't exit after a note, do things (move a sprite...) and then come back to the engine and go on from the same point you were before.
Have you any link where this is done?
Re: BEEPOLA: Exiting after every note
Posted: Fri Aug 18, 2023 5:27 pm
by hikoki
Re: BEEPOLA: Exiting after every note
Posted: Fri Aug 18, 2023 5:46 pm
by hikoki
See what Beepola's manual says about the Music Box engine to have ingame music
http://freestuff.grok.co.uk/beepola/help/compiling.html
Re: BEEPOLA: Exiting after every note
Posted: Fri Aug 18, 2023 5:59 pm
by Bubu
Not really, there'snt any example I'm looking for: exit after every note.
Mmmm... the thing is that Music Box can't play a musical note and a drum bit at the same time, or at least I don't know how to do it.
Re: BEEPOLA: Exiting after every note
Posted: Fri Aug 18, 2023 6:17 pm
by Bubu
Now I'm tryning the "Lindon Sharp MB" engine implemented in the "1tracker", it's seems not so difficult to implement the exit after every note.
I'll let you know when I do the tests.
Re: BEEPOLA: Exiting after every note
Posted: Fri Aug 18, 2023 6:22 pm
by hikoki
How is it made in Manic Miner? Dividing each note in micronotes of the same duration? Ir produces a ratchet effect, sort of a percussion
Re: BEEPOLA: Exiting after every note
Posted: Fri Aug 18, 2023 8:46 pm
by Bubu
I think that Manic Miner uses only 1 note at the same time (semiquavers), even I use more or less the same technique in my
ArcZX-Tetris, but this is with 2
polyphony tones. But what I need now is something a bit more... professional, with good drums.
Re: BEEPOLA: Exiting after every note
Posted: Sat Aug 19, 2023 11:21 pm
by utz
Bubu wrote: ↑Fri Aug 18, 2023 5:04 pm
Hi, @utz , I've been googling that but can't find any difference between the Tritone engine included in Beepola, and those in z88dk.
My bad, I thought they had a modified version that can be called note-by-note, but apparently that's not the case.
Re: BEEPOLA: Exiting after every note
Posted: Sun Aug 20, 2023 5:09 pm
by Bubu
Re: BEEPOLA: Exiting after every note
Posted: Sun Aug 20, 2023 7:31 pm
by Mpk
Bubu wrote: ↑Sun Aug 20, 2023 5:09 pm
If there is any interest in this, ask me and I'll upload the code here
Hey, can you upload the code?
Re: BEEPOLA: Exiting after every note
Posted: Mon Aug 21, 2023 12:28 am
by Bubu
Sure!
Have you trying to add some in-game music in any game of yours? Let me rewrite a little bit the code and then I'll post it here.