home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / M2V11-1.LHA / modula / amiga / Narrator.def < prev    next >
Encoding:
Text File  |  1993-11-01  |  4.6 KB  |  117 lines

  1. DEFINITION FOR C MODULE Narrator ;
  2.  
  3. FROM SYSTEM IMPORT ADDRESS , SHORTSET , STRING ;
  4. FROM Exec IMPORT IOStdReq ;
  5.  
  6. CONST
  7.   NDB_NEWIORB    = 0 ; (* Use new extended IORB         *)
  8.   NDB_WORDSYNC    = 1 ; (* Generate word sync messages     *)
  9.   NDB_SYLSYNC    = 2 ; (* Generate syllable sync messages *)
  10.  
  11.   NDF_NEWIORB  = { NDB_NEWIORB } ;
  12.   NDF_WORDSYNC = { NDB_WORDSYNC } ;
  13.   NDF_SYLSYNC  = { NDB_SYLSYNC } ;
  14.  
  15.   (* Error Codes *)
  16.  
  17.   ND_NoMem     =  -2 ;    (* Can't allocate memory        *)
  18.   ND_NoAudLib     =  -3 ;    (* Can't open audio device        *)
  19.   ND_MakeBad     =  -4 ;    (* Error in MakeLibrary call        *)
  20.   ND_UnitErr     =  -5 ;    (* Unit other than 0            *)
  21.   ND_CantAlloc     =  -6 ;    (* Can't allocate audio channel(s)    *)
  22.   ND_Unimpl     =  -7 ;    (* Unimplemented command        *)
  23.   ND_NoWrite     =  -8 ;    (* Read for mouth without write first    *)
  24.   ND_Expunged     =  -9 ;    (* Can't open, deferred expunge bit set *)
  25.   ND_PhonErr     = -20 ;    (* Phoneme code spelling error        *)
  26.   ND_RateErr     = -21 ;    (* Rate out of bounds            *)
  27.   ND_PitchErr     = -22 ;    (* Pitch out of bounds            *)
  28.   ND_SexErr     = -23 ;    (* Sex not valid            *)
  29.   ND_ModeErr     = -24 ;    (* Mode not valid            *)
  30.   ND_FreqErr     = -25 ;    (* Sampling frequency out of bounds    *)
  31.   ND_VolErr     = -26 ;    (* Volume out of bounds            *)
  32.   ND_DCentErr     = -27 ;    (* Degree of centralization outof bounds*)
  33.   ND_CentPhonErr = -28 ;    (* Invalid central phon            *)
  34.  
  35.   (* Input parameters and defaults *)
  36.  
  37.   DEFPITCH     = 110 ;    (* Default pitch            *)
  38.   DEFRATE     = 150 ;    (* Default speaking rate (wpm)        *)
  39.   DEFVOL     =  64 ;    (* Default volume (full)        *)
  40.   DEFFREQ     = 22200 ;    (* Default sampling frequency (Hz)    *)
  41.   MALE         =   0 ;    (* Male vocal tract            *)
  42.   FEMALE     =   1 ;    (* Female vocal tract            *)
  43.   NATURALF0     =   0 ;    (* Natural pitch contours        *)
  44.   ROBOTICF0     =   1 ;    (* Monotone                *)
  45.   DEFSEX     = MALE ;    (* Default sex                *)
  46.   DEFMODE     = NATURALF0 ;    (* Default mode                *)
  47.  
  48.   DEFARTIC     = 100 ;    (* 100% articulation (normal)        *)
  49.   DEFCENTRAL     = 000 ;    (* No centralization            *)
  50.   DEFF0PERT     = 000 ;    (* No F0 Perturbation            *)
  51.   DEFF0ENTHUS     = 032 ;    (* Default F0 enthusiasm (in 32nds)    *)
  52.   DEFPRIORITY     = 100 ;    (* Default speaking priority        *)
  53.  
  54.   (* Parameter bounds *)
  55.  
  56.   MINRATE    = 40   ; (* Minimum speaking rate        *)
  57.   MAXRATE    = 400  ; (* Maximum speaking rate        *)
  58.   MINPITCH    = 65   ; (* Minimum pitch            *)
  59.   MAXPITCH    = 320  ; (* Maximum pitch            *)
  60.   MINFREQ    = 5000 ; (* Minimum sampling frequency        *)
  61.   MAXFREQ    = 28000; (* Maximum sampling frequency        *)
  62.   MINVOL    = 0    ; (* Minimum volume            *)
  63.   MAXVOL    = 64   ; (* Maximum volume            *)
  64.   MINCENT    = 0    ; (* Minimum degree of centralization    *)
  65.   MAXCENT    = 100  ; (* Maximum degree of centralization    *)
  66.  
  67.  
  68. TYPE
  69.   narrator_rbPtr = POINTER TO narrator_rb ;
  70.   mouth_rbPtr     = POINTER TO mouth_rb    ;
  71.  
  72.   (* Standard Write request *)
  73.  
  74.   narrator_rb = RECORD
  75.     message    : IOStdReq ;    (* Standard IORB          *)
  76.     rate    : CARDINAL ;    (* Speaking rate (words/minute)   *)
  77.     pitch    : CARDINAL ;    (* Baseline pitch in Hertz      *)
  78.     mode    : CARDINAL ;    (* Pitch mode              *)
  79.     sex        : CARDINAL ;    (* Sex of voice              *)
  80.     ch_masks    : ADDRESS  ;    (* Pointer to audio alloc maps      *)
  81.     nm_masks    : CARDINAL ;    (* Number of audio alloc maps      *)
  82.     volume    : CARDINAL ;    (* Volume. 0 (off) thru 64      *)
  83.     sampfreq    : CARDINAL ;    (* Audio sampling freq          *)
  84.     mouths    : BOOLEAN  ;    (* If non-zero, generate mouths   *)
  85.     chanmask    : SHORTCARD;    (* Which ch mask used (internal)  *)
  86.     numchan    : SHORTCARD;    (* Num ch masks used (internal)   *)
  87.  
  88.     flags    : SHORTSET  ;    (* New feature flags          *)
  89.     F0enthusiasm: SHORTCARD ;    (* F0 excursion factor          *)
  90.     F0perturb    : SHORTCARD ;    (* Amount of F0 perturbation      *)
  91.     F1adj    : SHORTINT  ;    (* F1 adjustment in ±5% steps      *)
  92.     F2adj    : SHORTINT  ;    (* F2 adjustment in ±5% steps      *)
  93.     F3adj    : SHORTINT  ;    (* F3 adjustment in ±5% steps      *)
  94.     A1adj    : SHORTINT  ;    (* A1 adjustment in decibels      *)
  95.     A2adj    : SHORTINT  ;    (* A2 adjustment in decibels      *)
  96.     A3adj    : SHORTINT  ;    (* A3 adjustment in decibels      *)
  97.     articulate    : SHORTCARD ;    (* Transition time multiplier      *)
  98.     centralize    : SHORTCARD ;    (* Degree of vowel centralization *)
  99.     centphon    : STRING    ;    (* Pointer to central ASCII phon  *)
  100.     AVbias    : SHORTINT  ;    (* AV bias              *)
  101.     AFbias    : SHORTINT  ;    (* AF bias              *)
  102.     priority    : SHORTINT  ;    (* Priority while speaking      *)
  103.     pad1    : SHORTINT  ;    (* For alignment          *)
  104.   END ;
  105.  
  106.   (* Standard Read request *)
  107.  
  108.   mouth_rb = RECORD
  109.     voice   : narrator_rb ; (* Speech IORB            *)
  110.     width   : SHORTCARD   ; (* Width (returned value)        *)
  111.     height  : SHORTCARD   ; (* Height (returned value)        *)
  112.     shape   : SHORTCARD   ; (* Internal use, do not modify    *)
  113.     sync    : SHORTCARD   ; (* Returned sync events        *)
  114.   END ;
  115.  
  116. END Narrator.
  117.