The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Lutherie::FretCalc - Calculate stringed instrument fret locations

SYNOPSIS

  use Lutherie::FretCalc qw/fret fretcalc/;

  my $fret = fret($scale_length,$fret_num,$in_units,$out_units,$calc_method);
  my @chart = fretcalc($scale_length,$num_frets,$in_units,$out_units,
                       $calc_method,$tet);

DESCRIPTION

Lutherie::FretCalc provides two routines for calculating fret spacing locations for stringed musical instruments. fret() will find the distance from the nut for a given fret number. fretcalc() will generate an array containing the fret locations for the given number of frets.

fret()

  • $scale_length - Numeric scale length (int or float)

  • $fret_num - Fret number being calculated (int)

  • $in_units - Scale to be used for the input (Scale length): 'in' (inches) or 'mm' (millimeters) (int of float)

  • $out_units - Scale to be used when displaying the calculations: 'in' (inches) or 'mm' (millimeters) (int or float)

  • $calc_method - Calculation method (optional): 't': tempered - power of $i/$tet (default), 'ec': classic - 17.817, 'es': Sloane - 17.835, 'ep': Primative - 18

  • $tet - Tones per Octave (optional, $calc_mode='t' only: default=12) (int)

fretcalc()

  • $scale_length - Numeric scale length (int of float)

  • $num_frets - Number of frets to be calculated (int)

  • $in_units - Scale to be used for the input (Scale length): 'in' (inches) or 'mm' (millimeters)

  • $out_units - Scale to be used when displaying the calculations: 'in' (inches) or 'mm' (millimeters) (int or float)

  • $calc_method - Calculation method (optional): 't': tempered - power of $i/$tet (default), 'ec': classic - 17.817, 'es': Sloane - 17.835, 'ep': Primative - 18

  • $tet - Tones per Octave (optional, $calc_mode='t' only: default=12) (int)

AUTHOR

Doug Sparling, doug@dougsparling.com

COPYRIGHT

Copyright (c) 2001 Douglas Sparling. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.