Spectrum analysis on sound?

edited June 2015 in General discussions
Been digging through the API for orxSOUND. Wondering if it is possible to somehow listen to the a music audio track and pick out louder beat pulses?

I might have to use another library. This is pretty low priority, just curious, so no big deal.

Comments

  • edited June 2015
    It is!

    Well, at least you can retrieve all the data and even modifying it, when it's on its way to the sound card.
    There's a small test in bounce, where you can record sound by keeping shift pressed. This recording then gets processed (pitch x2), and recorded straight to disk (it could have been played on the fly as well).

    It's the exact same principle you'd use to analyze played sound, except that you'd look into the orxSOUND_EVENT_PACKET instead of the orxSOUND_EVENT_RECORDING_PACKET.

    It only works with streams though.

    So to sum it up, you can:

    - generate sound data on the fly, and have it played by the sound card (I've done it for an orx-based synthetizer that I never finished)
    - analyze streams when they are played
    - modify streams when they are played: you can read the packet data, but you can override it or even replace it with your own packet
    - record sound data, analyze, modify it, and save it to disk or redirect it back to the sound card

    If you need any details, just lemme know. :)
  • edited June 2015
    Cool thanks for that. Ok, I'll dig into it and see how far I get. I'll ping you if I get stuck.

    It's really for some pulsing eye candy on the front screen with the music. I'll leave it till last minute, because it's not an important feature at the moment.

    But a cool routine to have around if I need it.
Sign In or Register to comment.