Light Development Spectrum Analyzer Component
(readme.txt, January 20, 2005)
Contents
--------
- What is the Light Development Spectrum Analyzer?
- Requirements
- Contents of the distribution package
- Installation
- Usage
- Author
- Credits
- Copyrights
- License
What is the Light Development Spectrum Analyzer?
------------------------------------------------
The Light Development Spectrum Analyzer is a component that can be
incorporated into user interfaces of applications wishing to visualize
audio data in real time. It displays the sound pressure for a range of
audio frequencies over time as produced by an audio data stream
currently being played.
Requirements
------------
The component relies on the KJ DSP package and the Light Development
Java Library. Both are included in the distribution package as files
kj_dsp.jar and ldlib.jar
The component is written in Java. Applications that wish to incorporate
the component require a Java Runtime Environment Version 5. The JRE
is not included in the distribution package, it can be obtained free
of charge at http://www.java.com
Contents of the distribution package
------------------------------------
This package (file ldsa.zip) has the following contents
ldsa.jar - spectrum analyzer component classes
kj_dsp - dsp package required by the component
ldlib.jar - library classes required by the component
readme.txt - this file
license.txt - usage license for all content
doc/api - api documentation directory
src - source code directory for ldsa.jar
Installation
------------
To install the Spectrum Analyzer component, extract the contents of
file ldsa.zip to an arbitrary directory. The file ldsa.zip can be
deleted after successful installation.
Usage
-----
To use the component, add files ldsa.jar, kj_dsp.jar and ldlib.jar
to the classpath of your application.
Three parts are needed to implement the component as follows:
1. a Player object to play audio
2. a SpectrumAnalyzer object to visualize decoded audio data
3. a KJSignalProcessor object to synchronize the decoded audio
stream with the visualization
The following code lines demonstrate the usage:
// create an instance of KJDigitalSignalProcessingAudioDataConsumer
KJDigitalSignalProcessingAudioDataConsumer synchronizer =
new KJDigitalSignalProcessingAudioDataConsumer(4096, 10);
// create an instance of the spectrum analyzer component
SpectrumAnalyzer analyzer = new SpectrumAnalyzer(20, 12);
// add the analyzer to the synchronizer as a KJDigitalSignalProcessor
synchronizer.add(analyzer);
// create a Player object
Player player = new Player();
// add the analyzer to the Player as a listener to player events
player.addPlayerListener(analyzer);
.
.
//when the player fires a START event, start the synchronizer too
case Player.PLAYING:
synchronizer.start(player.getSourceDataLine());
.
.
//when the player fires PAUSE or STOP, stop the synchronizer
case Player.STOPPED_PLAY:
synchronizer.stop();
.
.
Once the components are created as shown above, the spectrum analyzer
component simply is added to the user interface, i.e it is added to a Swing
component such as a JPanel whcih in turn is shown on a JFrame, etc.
Please see the API docs and the source codes to find out more.
You can use the Light Development application PlaylistEditor to find
more details about how to use the component as well.
Author
------
The Light Devlopment Spectrum Analyzer is created and maintained by
Ulrich Hilger
Gartenstrasse 15
65830 Kriftel
Germany
Internet http://www.ligtdev.com
e-mail info@lightdev.com
Credits
-------
Many thanks go to Kris Fudalewski for his KJ DSP package and for his
hints during creation of the spectrum analyzer component.
Copyrights
----------
All material is copyright 2004, 2005 Ulrich Hilger except for
the KJ DSP package which is copyright Kris Fudalewski.
License
-------
All parts in this distribution package may be used and distributed
under the terms and conditions of the GNU General Public License.
Please see file license.txt included in this package for terms and
conditions of the license.
- 1
- 2
- 3
- 4
- 5
- 6
前往页