?
Solved

realtime feedback of sound outpout

Posted on 1999-01-18
2
Medium Priority
?
229 Views
Last Modified: 2013-12-26
I'm writing a Director Xtra that will provide realtime feedback of a sound that's playing (frequency response, amplitude response, etc.).  I know I must use the Sound Manager to play sounds asynchronously and manage my own doublebuffers.  What I'm asking is, how and what do I analyze to get this kind of "realtime" feedback.  Can I just analyze the data in the doublebuffers (for each sound channel) or would I need to write a sound component to analyze a more raw form of the sound?  I really just need to be pointed in a general direction here.  And if anyone knows of any books that would help, that'd be great too.  Thanks.
0
Comment
Question by:copland
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
The_Raven earned 400 total points
ID: 1291760
Copland,

You have a long road to travel. I know because I've been down it. My first question would be "Why Director?" If your focus is real time, director won't be able to give that to you on it's own.  You will have to do what I did, open a dialog that give the realtime response your looking for... Callbacks into director wont work in real time...

The second hill to climb in your quest for real time is the processing of the data. You CAN do it between the double buffer switch over time, in other words, get a buffer, switch buffer, anylize old buffer, get a buffer, switch buffer, anylize old buffer... For Amplitude (volume) this is easy (take all values in the buffer over 128, add them together and divide by 2) Make sure you use a power of 2 for your sample, that way you can can use byte shifting to do the division (much faster).

Fequency Response, Oh My, another story... for that you will need a very low resolution FFT routine written in PPC Asm. Complex Math isn't something to take on lightly.  That's a lot of processor cycles to be sharing with director's own cycle hungry appitite.  

I would consider the purpose of the application and use that as you starting point for how you should do it.

Director or Codewarrior???


0
 

Author Comment

by:copland
ID: 1291761
Thanks Raven.  Just to clear a few things up for you.....I'm writing this as a Director Xtra because I need this funtionality in a Director project I'm working on (actually my thesis).  And I don't need constant feedback about a sound; I only need feedback when it's requested (i.e. a Lingo command like GetAmplitude).

Another problem I'm facing is being able to sync two sounds playing from disk, but I think I know how to do it now (scheduledCmd and using a ClockComponent).

Anyway, thanks again for the help.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question