Solved

realtime feedback of sound outpout

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Shell script to login to remote m/c and execute commands 10 78
pre4 challenge 19 93
canBalance challenge 34 69
Dell Alienware Graphics Amplifier Driver for non-Alienware systems 18 187
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

932 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

13 Experts available now in Live!

Get 1:1 Help Now