home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD2.bin / bbs / dev / oberon-a-1.4ß.lha / Oberon-A / source / amiga / Narrator.mod < prev    next >
Text File  |  1994-08-08  |  7KB  |  153 lines

  1. (**************************************************************************
  2.  
  3.      $RCSfile: Narrator.mod $
  4.   Description: Interface to V37 narrator.device
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.2 $
  8.       $Author: fjc $
  9.         $Date: 1994/08/08 00:47:50 $
  10.  
  11.   $VER: narrator.h 1.7 (12.3.91)
  12.   Includes Release 40.15
  13.  
  14.   Copyright 1990, 1991 Joseph Katz/Mark Barton.
  15.   All rights reserved.
  16.  
  17.   This include file (narrator.h) may be freely distributed
  18.   as long as the above copyright notice remains intact.
  19.  
  20.   Oberon-A interface Copyright © 1994, Frank Copeland.
  21.   This file is part of the Oberon-A Interface.
  22.   See Oberon-A.doc for conditions of use and distribution.
  23.  
  24. ***************************************************************************)
  25.  
  26. MODULE Narrator;
  27.  
  28. (*
  29. ** $C- CaseChk       $I- IndexChk  $L+ LongAdr   $N- NilChk
  30. ** $P- PortableCode  $R- RangeChk  $S- StackChk  $T- TypeChk
  31. ** $V- OvflChk       $Z- ZeroVars
  32. *)
  33.  
  34. IMPORT E := Exec;
  35.  
  36. CONST
  37.                 (*          Device Options      *)
  38.  
  39.   newIORB     * = 0;       (* Use new extended IORB                *)
  40.   wordSync    * = 1;       (* Generate word sync messages          *)
  41.   sylSync     * = 2;       (* Generate syllable sync messages      *)
  42.  
  43.  
  44.                 (*          Error Codes         *)
  45.  
  46.   noMem        * = -2;      (* Can't allocate memory                *)
  47.   noAudLib     * = -3;      (* Can't open audio device              *)
  48.   makeBad      * = -4;      (* Error in MakeLibrary call            *)
  49.   unitErr      * = -5;      (* Unit other than 0                    *)
  50.   cantAlloc    * = -6;      (* Can't allocate audio channel(s)      *)
  51.   unimpl       * = -7;      (* Unimplemented command                *)
  52.   noWrite      * = -8;      (* Read for mouth without write first   *)
  53.   expunged     * = -9;      (* Can't open, deferred expunge bit set *)
  54.   phonErr     * = -20;      (* Phoneme code spelling error                  *)
  55.   rateErr     * = -21;      (* Rate out of bounds                   *)
  56.   pitchErr    * = -22;      (* Pitch out of bounds                          *)
  57.   sexErr      * = -23;      (* Sex not valid                        *)
  58.   modeErr     * = -24;      (* Mode not valid                       *)
  59.   freqErr     * = -25;      (* Sampling frequency out of bounds     *)
  60.   volErr      * = -26;      (* Volume out of bounds         *)
  61.   dCentErr    * = -27;      (* Degree of centralization out of bounds *)
  62.   centPhonErr * = -28;      (* Invalid central phon                 *)
  63.  
  64.  
  65.  
  66.                 (* Input parameters and defaults *)
  67.  
  68.   defPitch    * = 110;         (* Default pitch                        *)
  69.   defRate     * = 150;         (* Default speaking rate (wpm)                  *)
  70.   defVol      * = 64;          (* Default volume (full)                *)
  71.   defFreq     * = 22200;       (* Default sampling frequency (Hz)      *)
  72.   male        * = 0;           (* Male vocal tract                     *)
  73.   female      * = 1;           (* Female vocal tract                   *)
  74.   naturalF0   * = 0;           (* Natural pitch contours               *)
  75.   roboticF0   * = 1;           (* Monotone pitch                       *)
  76.   manualF0    * = 2;           (* Manual setting of pitch contours     *)
  77.   defSex      * = male;        (* Default sex                                  *)
  78.   defMode     * = naturalF0;   (* Default mode                 *)
  79.   defArtic    * = 100;         (* 100% articulation (normal)           *)
  80.   defCentral  * = 0;           (* No centralization                    *)
  81.   defF0Pert   * = 0;           (* No F0 Perturbation                   *)
  82.   defF0Enthus * = 32;          (* Default F0 enthusiasm (in 32nds)     *)
  83.   defPriority * = 100;         (* Default speaking priority            *)
  84.  
  85.  
  86.                         (*      Parameter bounds        *)
  87.  
  88.   minRate     * = 40;          (* Minimum speaking rate                *)
  89.   maxRate     * = 400;         (* Maximum speaking rate                *)
  90.   minPitch    * = 65;          (* Minimum pitch                        *)
  91.   maxPitch    * = 320;         (* Maximum pitch                        *)
  92.   minFreq     * = 5000;        (* Minimum sampling frequency           *)
  93.   maxFreq     * = 28000;       (* Maximum sampling frequency           *)
  94.   minVol      * = 0;           (* Minimum volume                       *)
  95.   maxVol      * = 64;          (* Maximum volume                       *)
  96.   minCent     * = 0;           (* Minimum degree of centralization     *)
  97.   maxCent     * = 100;         (* Maximum degree of centralization     *)
  98.  
  99.  
  100. TYPE
  101.  
  102.                 (*    Standard Write request    *)
  103.  
  104.   NarratorPtr * = CPOINTER TO Narrator;
  105.   Narrator * = RECORD (E.IOStdReq) (* Standard IORB                *)
  106.     rate *         : E.UWORD;      (* Speaking rate (words/minute) *)
  107.     pitch *        : E.UWORD;      (* Baseline pitch in Hertz      *)
  108.     mode *         : E.UWORD;      (* Pitch mode                   *)
  109.     sex *          : E.UWORD;      (* Sex of voice                 *)
  110.     chMasks *      : E.APTR;       (* Pointer to audio alloc maps  *)
  111.     nmMasks *      : E.UWORD;      (* Number of audio alloc maps   *)
  112.     volume *       : E.UWORD;      (* Volume. 0 (off) thru 64      *)
  113.     sampfreq *     : E.UWORD;      (* Audio sampling freq          *)
  114.     mouths *       : BOOLEAN;      (* If non-zero, generate mouths *)
  115.     chanmask *     : E.UBYTE;      (* Which ch mask used (internal)*)
  116.     numchan *      : E.UBYTE;      (* Num ch masks used (internal) *)
  117.     nFlags *       : E.BSET;       (* New feature flags            *)
  118.     f0enthusiasm * : E.UBYTE;      (* F0 excursion factor          *)
  119.     f0perturb *    : E.UBYTE;      (* Amount of F0 perturbation    *)
  120.     f1adj *        : SHORTINT;     (* F1 adjustment in ±5% steps   *)
  121.     f2adj *        : SHORTINT;     (* F2 adjustment in ±5% steps   *)
  122.     f3adj *        : SHORTINT;     (* F3 adjustment in ±5% steps   *)
  123.     a1adj *        : SHORTINT;     (* A1 adjustment in decibels    *)
  124.     a2adj *        : SHORTINT;     (* A2 adjustment in decibels    *)
  125.     a3adj *        : SHORTINT;     (* A3 adjustment in decibels    *)
  126.     articulate *   : E.UBYTE;      (* Transition time multiplier   *)
  127.     centralize *   : E.UBYTE;      (* Degree of vowel centralization *)
  128.     centphon *     : E.APTR;       (* Pointer to central ASCII phon  *)
  129.     avbias *       : SHORTINT;     (* AV bias                      *)
  130.     afbias *       : SHORTINT;     (* AF bias                      *)
  131.     priority *     : SHORTINT;     (* Priority while speaking      *)
  132.     pad1 *         : SHORTINT;     (* For alignment                *)
  133.   END; (* Narrator *)
  134.  
  135.  
  136.  
  137.                 (*    Standard Read request     *)
  138.  
  139.   MouthPtr * = CPOINTER TO Mouth;
  140.   Mouth * = RECORD (Narrator)   (* Speech IORB                  *)
  141.     width *  : E.UBYTE;         (* Width (returned value)       *)
  142.     height * : E.UBYTE;         (* Height (returned value)      *)
  143.     shape -  : E.UBYTE;         (* Internal use, do not modify  *)
  144.     sync *   : E.UBYTE;         (* Returned sync events         *)
  145.   END; (* Mouth *)
  146.  
  147.  
  148. CONST
  149.  
  150.   name * = "narrator.device";
  151.  
  152. END Narrator.
  153.