This content has been marked as final. Show 4 replies
Are you needing help with installing the xtra or using it once installed?
all aspects really, just getting to grips with program so anything to get me on track really!
Installing an xtra is a matter of placing it in the correct
sub-directory of the folder you installed Director into. The "root"
xtras folder is at %Director MX2004%\Configuration\Xtras\
There are 4 different types of xtra: asset, scripting, tool and
transition. How an xtra is used is partly dependent on what type it is.
Tool xtras provide extensions to the authoring environment only and
usually add an entry under the Xtras menu of Director's titlebar
('Convert WAV to SWA...' is an example of a tool xtra)
Transition xtras add extra transitions to the existing set.
Asset xtras allow Director to display (and control) additional media
types, like MPEG video.
There is sometimes a little crossover between asset xtras and scripting
xtras in that an asset xtra often contains methods specific to the media
type and sometimes more "global" methods.
The xtra you are wanting to use is a scripting xtra. Once you drop it
into the correct folder and restart Director its methods should be
available. If you open a script window (Ctrl + Shift + U) you'll see a
menu bar with the same icon as an xtra (with a script overlay) - if you
pull down this menu you can see all the scripting xtras installed and
all their methods, and if you select a method it will be added to the
current script at the insertion point along with any required parameters.
Hope that helps to get you started. You should read the docs (F1) about
xtras and familiarise yourself with DOUG: < http://www.director-online.com>
Following on from Sean's post, once installed, you can use the asFFT xtra like this:
Create an instance of the xtra by using the 'new' function, and put it into a variable (a property, or a global). In this example, it gets put into a variable called 'fft':
fft = xtra("asFFT").new()
Then, you can call handlers on that instance. For example, to get the current volume of the sound input, use:
currentVolume = fft.getVolume()
To get a list of the current FFT values from the sound input, use:
fftList = fft.getFFT()
To get a list (an array) of the most recent 1024 sample values from the sound input, use:
sampleList = fft.getSamples(1024,ampRange)
(where 'ampRange' is the max value to scale the readings to. Eg, if you put 100 there, your values will range between -100 and 100).
hope this helps,