-- $Date: 2004/03/08 11:05:10 $
-- $Revision: 1.9 $
-- $Author: jcrocholl $
-- $Hash: f6493b5c3733890be3f1e78267c81e0c $

-- This file was automatically created with ado.php.
-- Manual changes will be lost when it is updated.

with Enum_Strings; use Enum_Strings;

package Pitches is

   type Step_Enum is (A, B, C, D, E, F, G);
   function To_Step_Enum is new To_Enum(Step_Enum);

   -- Public representation.
   type Pitch is limited private;

   -- Pointer to representation data.
   type Pitch_Access is access all Pitch;

   -- Constructor for instances.
   function Create
     (Step   : in Step_Enum-- The initial step.
      Alter  : in Integer;   -- The initial alter.
      Octave : in Integer)   -- The initial octave.
     return Pitch_Access;    -- The newly created pitch.

   -- Accessor to read the step of a pitch.
   function Get_Step
     (This : access Pitch-- The pitch to read from.
     return Step_Enum;     -- The step of that pitch.

   -- Accessor to read the alter of a pitch.
   function Get_Alter
     (This : access Pitch-- The pitch to read from.
     return Integer;       -- The alter of that pitch.

   -- Accessor to read the octave of a pitch.
   function Get_Octave
     (This : access Pitch-- The pitch to read from.
     return Integer;       -- The octave of that pitch.

   -- Return the pitch position relative to middle C.
   function Get_Position
     (This : access Pitch-- The pitch object instance.
     return Integer;       -- Up or down from middle C.

private

   -- Private representation.
   type Pitch is limited record
      Step   : Step_Enum;
      Alter  : Integer;
      Octave : Integer;
   end record;

end Pitches;