Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

UponTheEnd

Synchronizing The application with music

This topic is 5228 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Right now, i am trying to write a program where i am talking in the background, and every word i say, is highlithting on the screen, to show what word i am on. So for example, say i say the sentence "The dog ran through the hoop!" Those words would already be on the screen when i said The, and each time i advance to the new word, it highlights. The way i was going to do this was go into a music program and find the miliseconds for the start of each word i say, and put that in an array or something in my program. Then make that concurrent with another array of string values, the words. And then whenever each time elsapses, i go to the next word in the second array. I know this would work but i am saying alot of words and it would be hell trying to get everyone of those milisecond values into an array. My question is: Does anyone know of a better way to do this? How do those people sychronize there huge OpenGL applications with the music? Thanks [edited by - UponTheEnd on February 28, 2004 9:18:24 AM]

Share this post


Link to post
Share on other sites
Advertisement
Try checking the volume level from the mic, every time it goes above a threshold level (when you''re talking), advance a counter for which word you''re on and highlight it. You''ll have to speak more slowly to let the gaps between words register and trigger your counter.

Just an idea.



--
Cheers,

Share this post


Link to post
Share on other sites
Ooooooh, don''t go there. Stick with your milliseconds-offset unless you have a *lot* of samples, in which case make a separate helper app. to help you find the milliseconds offset. Audio processing so it works most of the time is fairly easy - audio processing so it works *all* of the time is heap-big-late-night material. If you can guarantee your samples will be clean, it *might* work, so maybe I''m being too paranoid, but I''d say that milliseconds-offset can''t break, audio processing will probably break. Feel free to prove me wrong, though (either way )

Share this post


Link to post
Share on other sites
You can try inserting cues into your audio files and have your program look for them. If your program finds a cue it will increment a counter and an action will follow. Look at FMod''s sync system for more elucidation.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!