Page 1 of 1

Sound player with synced VU meters

Posted: Sat Dec 04, 2021 10:05 am
by CurlyPaul


Yeah it's that tune, in my defence I'd completely forgotten about the annoying frog, and was thinking of the very classy recording that was used the film.

Anyways.. just wanted to get to grips with playing sounds and in particular music. I generated that with Arkos Tracker and used their AKG player to use it in my program.

Now, in order to get the bars to sync, I couldn't quite grok the Arkos player well enough to be able to predict what notes it's going to be playing next. I tried reading the volume levels back out of the AY, but then I'm always a frame or two behind as I can't draw the VU's fast enough. In the end I created a tool that allowed me to capture the volume levels in a separate file so I could predict where the volume was going to be in a frame's time. This works, but it's a rather lengthy manual step in the build chain, and it's not very space efficient. I'm sure that with better knowledge the player working I could determine where it was in the song and read ahead.

I used the EventTrack in Arkos to time when to change between 1, 2 and 4 VU's on the screen, which will mean a fair amount of manually fiddling with it were I to do the entire song in this way.

As always, my code is on github https://github.com/CurlyPaul/cpc-z80-axelf and comments are welcome. Lot's of unfurling and DRY went out the window as well in order to keep the music at a constant pace. Having no buffer as such, you need to keep calling the play routine regulary.

Think this is my last project using WinApe though, the text editor was starting to become very annoying, and Arkos outputs RASM, which can be converted, but the conversion tool made it pretty hard to follow.