Solved

realtime feedback of sound outpout

Posted on 1999-01-18
2
217 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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now