Audio-Analyzer
view release on metacpan or search on metacpan
lib/Audio/Analyzer.pm view on Meta::CPAN
=item $completed = $analyzer->progress;
Return a number between 0 and 99 that represents in percent how far along in
the file we have processed.
=back
=head1 CHUNK SYSTEM
Instances of Audio::Analyzer::Chunk represent a set of PCM from the file.
Operations on instances of this class perform the FFT and access the PCM.
=over 4
=item $channels = $chunk->pcm;
Return an array ref of channels; each array value is an array ref which contains
the samples from the PCM converted to numbers between -1 and 1.
=item $channels = $chunk->fft;
Return an array ref of channels; each array value is an array ref which contains
the magnitudes from the Fast Fourier Transform. Numbers are between 0 and 1.
=item $combined = $chunk->combine_fft($channels);
Combine together 2 or more channels of FFT output into a single array ref. The
returned ref contains the RMS of each of the channel specific readings.
=back
=head1 SCALER CLASSES
The scaler classes are simple. The scaler will be created through new and a
reference to the analyzer object is provided as an argument. The scaler class
must return a blessed instance of itself.
To perform scaling, Audio::Analyzer will periodically invoke the scale method
of the scaler class. This method must take an array reference which represents
the data returned by the FFT for one channel. The scaler modifies the data
inside the array reference and does not return any value.
Your scaler class should also force all output to be between 0 and 1.
=head1 EXAMPLE MEDIA
The following pieces of media were done using Audio::Analyzer:
=over 4
=item http://www.youtube.com/watch?v=W8Jk8rTP5lg
=item http://www.youtube.com/watch?v=6yTEUBgvxs4
Templatized PovRay scenes written out one file per frame then rendered
into images individually with a make file.
=item http://www.youtube.com/watch?v=bFp2zZlFgv4
Imager::Graph generated pngs of the output of Audio::Analyzer and the internal
state of a software beat detector.
=back
=head1 LIMITATIONS
In no way shape or form should this module be considered accurate or
correct enough for actual scientific analysis.
=head1 AUTHOR
This module was created and documented by Tyler Riddle E<lt>triddle@gmail.comE<gt>.
Many thanks to Andrew Rodland who contributed greatly to getting as far as we
got.
=head1 BUGS
Please report any bugs or feature requests to
C<bug-audio-analyzer@rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Audio::Analyzer>.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
=head2 Known Bugs
=over 4
=item This module is still not passing tests on all types of hardware. See
http://cpantesters.org/distro/A/Audio-Analyzer.html for details on what is
and is not passing.
=back
Copyright 2007 Tyler Riddle, all rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
( run in 0.475 second using v1.01-cache-2.11-cpan-df04353d9ac )