Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - snerp

Pages: [1]
1
Audio / Access to Current Music Data?
« on: January 30, 2016, 10:40:00 pm »
I'm wondering about building a Music + video art project where the video is dynamically generated based on the audio. So I was wondering, is there a way for me to poll data from the sound buffer?

Basically I want to do:
// Declare a new music
sf::Music music;
// Open it from an audio file
if (!music.openFromFile("music.ogg"))
{
    // error...
}
// Change some parameters
music.setLoop(true);         // make it loop
// Play it
music.play();

And then every frame I want to check what the music has done since last frame. Does SFML have a way to do this? I assume it does since the audio module seems pretty powerful and people are recording audio with it?
Basically, think Audiosurf, I want to use the waveform to find the pitch and volume to use as inputs to generate visuals instead of a track.

Edit: some more info.

Basically, the part I'm having a problem with is accessing the sound data, also I'm not sure what format it's going to be in.

Pages: [1]
anything