NAME

Music::PitchNum::Dutch - note name and pitch number roles for lilypond

SYNOPSIS

  package MyCleverOckeghem;
  use Moo;
  with('Music::PitchNum::Dutch');
  ...

Then elsewhere:

  use MyCleverOckeghem;
  my $x = MyCleverOckeghem->new;

  $x->pitchname(72);      # c''
  $x->pitchname(71);      # b'
  $x->pitchname(70);      # bes'
  $x->pitchname(69);      # a'

  $x->pitchnum(q{aes'});  # 68
  $x->pitchnum(q{g'});    # 67
  $x->pitchnum(q{b'});    # 70
  $x->pitchnum(q{a'});    # 69

  $x->pitchname(72, ignore_octave => 1); # c

DESCRIPTION

A Music::PitchNum implementation for the default lilypond note name syntax ("nederlands").

This module is expected to be used as a Role from some other module; Moo::Role may be informative.

METHODS

pitchname pitchnumber

Returns the pitch name for the given integer, though will throw an exception if passed something that is not a number.

This method accepts an optional ignore_octave parameter that if true will strip the octave information from the pitch name.

pitchnum pitchname

Returns the pitch number for the given note name, or undef if the note could not be parsed. Note that the parser is quite permissive, see "Known Issues".

BUGS

Reporting Bugs

Please report any bugs or feature requests to bug-music-pitchnum at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Music-PitchNum.

Patches might best be applied towards:

https://github.com/thrig/Music-PitchNum

Known Issues

The parser is too lax, in that it will parse invalid input such as cses''' as pitch number 48 on account of the leading c.

SEE ALSO

Music::PitchNum, ly-fu of App::MusicTools

REFERENCES

AUTHOR

thrig - Jeremy Mates (cpan:JMATES) <jmates at cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2014-2016 by Jeremy Mates

This module is free software; you can redistribute it and/or modify it under the Artistic License (2.0).