-- $Date: 2004/03/08 11:05:10 $
-- $Revision: 1.3 $
-- $Author: jcrocholl $
-- $Hash: 6ed605b261f8c53ab3a05ee37e434755 $

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

package body Midi_Instruments is

   -- Constructor for instances.
   function Create
     (ID      : in String;         -- The initial id.
      Channel : in Natural;        -- The initial channel.
      Program : in Natural)        -- The initial program.
     return Midi_Instrument_Access -- The newly created midi instrument.
   is
      Result : Midi_Instrument_Access := new Midi_Instrument;
   begin
      To_String_Access(ID, Result.ID);
      Result.Channel := Channel;
      Result.Program := Program;
      return Result;
   end Create;

   -- Accessor to read the id of a midi instrument.
   function Get_ID
     (This : access Midi_Instrument-- The midi instrument to read from.
     return String is                -- The id of that midi instrument.
   begin
      return To_String(This.ID);
   end Get_ID;

   -- Accessor to read the channel of a midi instrument.
   function Get_Channel
     (This : access Midi_Instrument-- The midi instrument to read from.
     return Natural is               -- The channel of that midi instrument.
   begin
      return This.Channel;
   end Get_Channel;

   -- Accessor to read the program of a midi instrument.
   function Get_Program
     (This : access Midi_Instrument-- The midi instrument to read from.
     return Natural is               -- The program of that midi instrument.
   begin
      return This.Program;
   end Get_Program;

end Midi_Instruments;