Bob Wilkinson > Audio-Gramofile-0.08 > Audio::Gramofile

Download:
Audio-Gramofile-0.08.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.08   Source  

NAME ^

Audio::Gramofile - Perl interface to libgramofile, a library derived from Gramofile

SYNOPSIS ^

use Audio::Gramofile;

my $gramofile = Audio::Gramofile->new;

$gramofile->set_input_file($wav_file);

$gramofile->set_output_file($out_file);

# track splitting methods

$gramofile->init_tracksplit("make_use_rms" => 1);

$gramofile->split_to_tracks;

# signal processing methods

$gramofile->init_filter_tracks(@filter_list);

$gramofile->init_simple_median_filter("num_samples" => 7);

$gramofile->init_double_median_filter("first_num_samples" => 5);

$gramofile->init_simple_mean_filter("num_samples" => 9);

$gramofile->init_rms_filter("num_samples" => 3);

$gramofile->init_cmf_filter("rms_length" => 9);

$gramofile->init_cmf2_filter("rec_med_len" => 11);

$gramofile->init_cmf3_filter("fft_length" => 8);

$gramofile->init_simple_normalize_filter("normalize_factor" => 25);

$gramofile->use_begin_end_time($begin_time, $end_time);

$gramofile->process_whole_file;

$gramofile->adjust_frames($framesize);

$gramofile->filter_tracks;

ABSTRACT ^

This module provides a Perl interface to Gramofile, a program for recording gramophone records. It is able to record hours of CD quality music, split long sound files in separate tracks, and remove ticks and pops from recordings.

Gramofile was written by Anne Bezemer and Ton Le.

Gramofile is available from http://www.opensourcepartners.nl/~costar/gramofile/

libgramofile - a library derived from Gramofile is available from http://sourceforge.net/projects/libgramofile

DESCRIPTION ^

new

returns an object initialised with the parameters specified in the original C code.

e.g. my $gramofile = Audio::Gramofile->new;

set_input_file

sets the input .wav file for track splitting and signal processing methods.

e.g. $gramofile->set_input_file($wav_file);

track splitting methods

init_tracksplit

The following elements may be initialised by this method. All are used to modify the track splitting algorithm.

e.g. $gramofile->init_tracksplit("make_use_rms" => 1, "min_silence_blocks" => 10);

split_to_tracks

The input file is split into a number of tracks. A file with name new.wav will be split into tracks called new01.wav, new02.wav etc.

e.g. $gramofile->split_to_tracks;

signal processing methods

init_filter_tracks

Any, or all, of the following filters may be specified:

The filters are applied in the order given in the list.

e.g. $gramofile->init_filter_tracks("rms_filter", "simple_mean_filter");

by default the cond_median2_filter is used.

set_output_file

sets the output .wav file name for the signal processing method, filter_tracks.

e.g. $gramofile->set_output_file($out_file);

init_simple_median_filter

This method allows the parameters to be set for the simple median filter.

The following elements may be set for this filter:

e.g. $gramofile->init_simple_median_filter("num_samples" => 7);

init_double_median_filter

This method allows the parameters to be set for the simple median filter.

The following elements may be set for this filter:

e.g. $gramofile->init_double_median_filter("first_num_samples" => 5);

init_simple_mean_filter

This method allows the parameters to be set for the simple mean filter.

The following elements may be set for this filter:

e.g. $gramofile->init_simple_mean_filter("num_samples" => 9);

rms_filter

This method allows the parameters to be set for the rms filter.

The following elements may be set for this filter:

e.g. $gramofile->init_rms_filter("num_samples" => 3);

init_cmf_filter

This method allows the parameters to be set for the conditional mean filter.

The following elements may be set for this filter:

e.g. $gramofile->init_cmf_filter("rms_length" => 9, "tick_threshold" => 3000);

init_cmf2_filter

This method allows the parameters to be set for the second conditional mean filter.

The following elements may be set for this filter:

e.g. $gramofile->init_cmf2_filter("rec_med_len" => 11, "fine_threshold" => 2500);

init_cmf3_filter

This method allows the parameters to be set for the second conditional mean (frequency domain using fft) filter.

The following elements may be set for this filter:

e.g. $gramofile->init_cmf3_filter("fft_length" => 8, "fine_threshold" => 2500);

init_simple_normalize_filter

This method allows the parameters to be set for the simple normalize filter.

The following elements may be set for this filter:

e.g. $gramofile->init_simple_normalize_filter("normalize_factor" => 50);

use_begin_end_time

A begin time and end time can be specified. These times will be used instead of the track times derived from the split_to_tracks method.

e.g. $gramofile->use_begin_end_time($begin_time, $end_time);

process_whole_file

The whole file can be passed through the signal processing routines if this method is used.

e.g. $gramofile->process_whole_file;

adjust_frames

The default frame size is 588 (1/75 sec. @ 44.1 khz). This method allows this value to be user-defined.

e.g. $gramofile->adjust_frames($framesize);

filter_tracks

This method filters the tracks with the previously specified (or default) parameters.

e.g. $gramofile->filter_tracks;

EXPORT ^

None by default.

SEE ALSO ^

Gramofile : available from http://www.opensourcepartners.nl/~costar/gramofile/

libgramofile : A dynamically linked library derived from Gramofile, which this module needs, available from http://sourceforge.net/projects/libgramofile

fftw - the fastest Fourier Transform in the west : available from http://www.fftw.org

Signproc.txt, Tracksplit.txt, Tracksplit2.txt supplied with the Gramofile source code.

AUTHOR ^

Bob Wilkinson, <bob@fourtheye.org>

COPYRIGHT AND LICENSE ^

Copyright 2003-2005 by Bob Wilkinson

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: