Solved

realtime feedback of sound outpout

Posted on 1999-01-18
2
224 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 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.

756 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