View Single Post
Old 04 August 2018, 04:58   #3
Registered User
Join Date: Dec 2017
Location: Austin, TX
Age: 36
Posts: 196
I've hooked up audio playback through ptplayer. This runs by itself through a CIA interrupt timed to the song's current BPM. Seems to work fine, Frank did a great job.

To build the "track" the player will move along I've implemented a MOD parser. It walks through the entire song to figure out what will appear at each step, and how much time will pass between steps. This will eventually try to identify beats from the ADSR envelope of each sample but for now just makes a note when a sample plays.

I wanted to test synchronization between the audio and visuals so I put together the demo below. My initial attempt relied on precalculated speed to move visuals independently of the audio, but this incurred some problematic drift over time.

I reworked it to synchronize with ptplayer as it steps through the MOD, leaving calculated speed to interpolate movement between steps. The demo below doesn't interpolate movement, though, as the scrolling method is not relevant to the 3D track that will eventually be used.

I'm now working on the 3D component. This uses the copper to render track edges and stripes. In each scanline sprites of appropriate width are manually constructed (no DMA, written straight to SPRxDATx) and the sprite channel is reused throughout the scanline. It's currently 2D while I work on the projection math.

[ Show youtube player ]
arcanist is offline  
Page generated in 0.04225 seconds with 11 queries