Cupflow Music Trails Research by Aless

Note: This article is a work in progress. I still want to implement more things but I’m working on other projects as well. My goal is to be able to create a game that can react to music to cast attacks.

Source code: https://github.com/AlessTheDev/music-trails-audio-visualizer

Welcome to my ongoing research about music trails, the rhythm game I'm creating. This paper contains some of the knownledge I gained while researching. Please take a look at the articles I linked below to get a more in-depth understanding.

<aside> ⚠️

Disclaimer 1: I'm not an expert, I've just decided to study some of these concepts online by myself and this is what I came up with :3

Disclaimer 2: Some images and information are sourced from external references, I’ve linked all the websites and videos where I’ve found this information

</aside>

https://imgur.com/WJIJ8ig

https://www.youtube.com/watch?v=9C8LIuOnJm8

Table of Contents

  1. Audio Processing Fundamentals
  2. Real-Time Audio Analysis
  3. Beat Detection Algorithm
  4. Audio Visualizer Implementation
  5. Future Improvements
  6. Resources

Introduction to Audio Processing

First of all, let's introduce some important terms.

A sound wave is a continuous signal containing an infinite number of signal values within a given time period. In game development, audio processing involves converting continuous sound waves into discrete values for digital processing. This transformation is achieved through a technique called sampling. Yippie!

An FFT transform deconstructs a time domain representation of a signal into the frequency domain representation to analyze the different frequencies in a signal.

Spectrum Data

Ok so… what's next? What can we do with this data? Instead of focusing solely on the waveform (which shows the amplitude of a signal over time), we’ll analyze the audio using its spectrum. A spectrum reveals the individual frequencies that make up the signal and their relative strengths, offering a new perspective on the same data.