home *** CD-ROM | disk | FTP | other *** search
/ AMIGA PD 1 / AMIGA-PD-1.iso / Programme_zum_Heft / Programmieren / Kurztests / PascalPCQ / Include / Devices / Narrator.i < prev    next >
Text File  |  1990-08-28  |  3KB  |  90 lines

  1. {
  2.     Narrator.i for PCQ Pascal
  3. }
  4.  
  5. {$I "Include:Exec/IO.i"}
  6.  
  7. Const
  8.  
  9.         {        Error Codes        }
  10.  
  11.     ND_NoMem        = -2;    { Can't allocate memory        }
  12.     ND_NoAudLib        = -3;    { Can't open audio device        }
  13.     ND_MakeBad        = -4;    { Error in MakeLibrary call        }
  14.     ND_UnitErr        = -5;    { Unit other than 0            }
  15.     ND_CantAlloc    = -6;    { Can't allocate audio channel(s)    }
  16.     ND_Unimpl        = -7;    { Unimplemented command        }
  17.     ND_NoWrite        = -8;    { Read for mouth without write first    }
  18.     ND_Expunged        = -9;    { Can't open, deferred expunge bit set }
  19.     ND_PhonErr        = -20;    { Phoneme code spelling error        }
  20.     ND_RateErr        = -21;    { Rate out of bounds            }
  21.     ND_PitchErr        = -22;    { Pitch out of bounds            }
  22.     ND_SexErr        = -23;    { Sex not valid            }
  23.     ND_ModeErr        = -24;    { Mode not valid            }
  24.     ND_FreqErr        = -25;    { Sampling frequency out of bounds    }
  25.     ND_VolErr        = -26;    { Volume out of bounds            }
  26.     
  27.  
  28.  
  29.         { Input parameters and defaults }
  30.  
  31.     DEFPITCH        = 110;    { Default pitch            }
  32.     DEFRATE        = 150;    { Default speaking rate (wpm)        }
  33.     DEFVOL        = 64;    { Default volume (full)        }
  34.     DEFFREQ        = 22200; { Default sampling frequency (Hz)    }
  35.     MALE        = 0;    { Male vocal tract            }
  36.     FEMALE        = 1;    { Female vocal tract            }
  37.     NATURALF0        = 0;    { Natural pitch contours        }
  38.     ROBOTICF0        = 1;    { Monotone                }
  39.     DEFSEX        = MALE;    { Default sex                }
  40.     DEFMODE        = NATURALF0;    { Default mode                }
  41.  
  42.  
  43.  
  44.         {    Parameter bounds    }
  45.  
  46.     MINRATE        = 40;    { Minimum speaking rate        }
  47.     MAXRATE        = 400;    { Maximum speaking rate        }
  48.     MINPITCH        = 65;    { Minimum pitch            }
  49.     MAXPITCH        = 320;    { Maximum pitch            }
  50.     MINFREQ        = 5000;    { Minimum sampling frequency        }
  51.     MAXFREQ        = 28000; { Maximum sampling frequency        }
  52.     MINVOL        = 0;    { Minimum volume            }
  53.     MAXVOL        = 64;    { Maximum volume            }
  54.  
  55.  
  56.  
  57. Type
  58.  
  59.         {    Standard Write request    }
  60.  
  61.     narrator_rb = record
  62.     message        : IOStdReq;    { Standard IORB        }
  63.     rate        : Short;    { Speaking rate (words/minute) }
  64.     pitch        : Short;    { Baseline pitch in Hertz    }
  65.     mode        : Short;    { Pitch mode            }
  66.     sex        : Short;    { Sex of voice            }
  67.     ch_masks    : Address;    { Pointer to audio alloc maps    }
  68.     nm_masks    : Short;    { Number of audio alloc maps    }
  69.     volume        : Short;    { Volume. 0 (off) thru 64    }
  70.     sampfreq    : Short;    { Audio sampling freq        }
  71.     mouths        : Boolean;    { If non-zero, generate mouths }
  72.     chanmask    : Byte;        { Which ch mask used (internal)}
  73.     numchan        : Byte;        { Num ch masks used (internal) }
  74.     pad        : Byte;        { For alignment        }
  75.     end;
  76.     narrator_rbPtr = ^narrator_rb;
  77.  
  78.  
  79.         {    Standard Read request    }
  80.  
  81.     mouth_rb = record
  82.     voice    : narrator_rb;        { Speech IORB            }
  83.     width    : Byte;            { Width (returned value)    }
  84.     height    : Byte;            { Height (returned value)    }
  85.     shape    : Byte;            { Internal use, do not modify    }
  86.     pad    : Byte;            { For alignment        }
  87.     end;
  88.     mouth_rbPtr = ^mouth_rb;
  89.  
  90.