Solved

realtime feedback of sound outpout

Posted on 1999-01-18
2
222 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
2 Comments
 
LVL 1

Accepted Solution

by:
The_Raven earned 100 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Login Script to Copy Folders 12 35
Running shell command from Access 3 75
notReplace  challenge 53 131
Not needed 13 113
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

810 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