home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / cbm / os-include.lha / os-include / devices / narrator.h < prev    next >
C/C++ Source or Header  |  1993-10-15  |  5KB  |  140 lines

  1. #ifndef DEVICES_NARRATOR_H
  2. #define DEVICES_NARRATOR_H
  3. /*
  4. **    $VER: narrator.h 1.7 (12.3.91)
  5. **    Includes Release 40.15
  6. **
  7. **    V37 Narrator device C language include file
  8. **
  9. **    Copyright 1990, 1991 Joseph Katz/Mark Barton.
  10. **    All rights reserved.
  11. **
  12. **    This include file (narrator.h) may be freely distributed
  13. **    as long as the above copyright notice remains intact.
  14. **
  15. */
  16.  
  17.  
  18. #ifndef EXEC_IO_H
  19. #include "exec/io.h"
  20. #endif
  21.  
  22.  
  23.         /*        Device Options    */
  24.  
  25. #define NDB_NEWIORB    0    /* Use new extended IORB        */
  26. #define NDB_WORDSYNC    1    /* Generate word sync messages        */
  27. #define NDB_SYLSYNC    2    /* Generate syllable sync messages    */
  28.  
  29.  
  30. #define NDF_NEWIORB    (1 << NDB_NEWIORB)
  31. #define NDF_WORDSYNC    (1 << NDB_WORDSYNC)
  32. #define NDF_SYLSYNC    (1 << NDB_SYLSYNC)
  33.  
  34.  
  35.  
  36.         /*        Error Codes        */
  37.  
  38. #define ND_NoMem    -2    /* Can't allocate memory        */
  39. #define ND_NoAudLib    -3    /* Can't open audio device        */
  40. #define ND_MakeBad    -4    /* Error in MakeLibrary call        */
  41. #define ND_UnitErr    -5    /* Unit other than 0            */
  42. #define ND_CantAlloc    -6    /* Can't allocate audio channel(s)    */
  43. #define ND_Unimpl    -7    /* Unimplemented command        */
  44. #define ND_NoWrite    -8    /* Read for mouth without write first    */
  45. #define ND_Expunged    -9    /* Can't open, deferred expunge bit set    */
  46. #define ND_PhonErr     -20    /* Phoneme code spelling error            */
  47. #define ND_RateErr     -21    /* Rate out of bounds            */
  48. #define ND_PitchErr    -22    /* Pitch out of bounds                */
  49. #define ND_SexErr      -23    /* Sex not valid            */
  50. #define ND_ModeErr     -24    /* Mode not valid            */
  51. #define ND_FreqErr     -25    /* Sampling frequency out of bounds    */
  52. #define ND_VolErr      -26    /* Volume out of bounds        */
  53. #define ND_DCentErr    -27    /* Degree of centralization out of bounds */
  54. #define ND_CentPhonErr -28    /* Invalid central phon            */
  55.  
  56.  
  57.  
  58.         /* Input parameters and defaults */
  59.  
  60. #define DEFPITCH    110        /* Default pitch            */
  61. #define DEFRATE     150        /* Default speaking rate (wpm)            */
  62. #define DEFVOL        64        /* Default volume (full)        */
  63. #define DEFFREQ     22200    /* Default sampling frequency (Hz)    */
  64. #define MALE        0        /* Male vocal tract            */
  65. #define FEMALE        1        /* Female vocal tract            */
  66. #define NATURALF0   0        /* Natural pitch contours        */
  67. #define ROBOTICF0   1        /* Monotone pitch            */
  68. #define MANUALF0    2        /* Manual setting of pitch contours    */
  69. #define DEFSEX        MALE    /* Default sex                    */
  70. #define DEFMODE     NATURALF0    /* Default mode            */
  71. #define    DEFARTIC    100        /* 100% articulation (normal)        */
  72. #define DEFCENTRAL  0        /* No centralization            */
  73. #define DEFF0PERT   0        /* No F0 Perturbation            */
  74. #define DEFF0ENTHUS 32        /* Default F0 enthusiasm (in 32nds)    */
  75. #define DEFPRIORITY 100        /* Default speaking priority        */
  76.  
  77.  
  78.             /*    Parameter bounds    */
  79.  
  80. #define MINRATE     40        /* Minimum speaking rate        */
  81. #define MAXRATE     400        /* Maximum speaking rate        */
  82. #define MINPITCH    65        /* Minimum pitch            */
  83. #define MAXPITCH    320        /* Maximum pitch            */
  84. #define MINFREQ     5000    /* Minimum sampling frequency        */
  85. #define MAXFREQ     28000    /* Maximum sampling frequency        */
  86. #define MINVOL        0        /* Minimum volume            */
  87. #define MAXVOL        64        /* Maximum volume            */
  88. #define MINCENT      0        /* Minimum degree of centralization    */
  89. #define MAXCENT    100        /* Maximum degree of centralization    */
  90.  
  91.  
  92.         /*    Standard Write request    */
  93.  
  94. struct narrator_rb {
  95.     struct IOStdReq  message;    /* Standard IORB        */
  96.     UWORD    rate;            /* Speaking rate (words/minute) */
  97.     UWORD    pitch;            /* Baseline pitch in Hertz        */
  98.     UWORD    mode;            /* Pitch mode            */
  99.     UWORD    sex;            /* Sex of voice            */
  100.     UBYTE    *ch_masks;        /* Pointer to audio alloc maps    */
  101.     UWORD    nm_masks;        /* Number of audio alloc maps    */
  102.     UWORD    volume;            /* Volume. 0 (off) thru 64    */
  103.     UWORD    sampfreq;        /* Audio sampling freq            */
  104.     UBYTE    mouths;            /* If non-zero, generate mouths */
  105.     UBYTE    chanmask;        /* Which ch mask used (internal)*/
  106.     UBYTE    numchan;        /* Num ch masks used (internal) */
  107.     UBYTE    flags;            /* New feature flags        */
  108.     UBYTE    F0enthusiasm;        /* F0 excursion factor        */
  109.     UBYTE    F0perturb;        /* Amount of F0 perturbation    */
  110.     BYTE    F1adj;            /* F1 adjustment in ±5% steps    */
  111.     BYTE    F2adj;                /* F2 adjustment in ±5% steps    */
  112.     BYTE    F3adj;            /* F3 adjustment in ±5% steps    */
  113.     BYTE    A1adj;            /* A1 adjustment in decibels    */
  114.     BYTE    A2adj;            /* A2 adjustment in decibels    */
  115.     BYTE    A3adj;            /* A3 adjustment in decibels    */
  116.     UBYTE    articulate;        /* Transition time multiplier    */
  117.     UBYTE    centralize;        /* Degree of vowel centralization */
  118.     char    *centphon;        /* Pointer to central ASCII phon  */
  119.     BYTE    AVbias;            /* AV bias            */
  120.     BYTE    AFbias;            /* AF bias            */
  121.     BYTE    priority;        /* Priority while speaking    */
  122.     BYTE    pad1;            /* For alignment        */
  123.     };
  124.  
  125.  
  126.  
  127.         /*    Standard Read request    */
  128.  
  129. struct mouth_rb {
  130.     struct    narrator_rb voice;    /* Speech IORB            */
  131.     UBYTE    width;            /* Width (returned value)    */
  132.     UBYTE    height;            /* Height (returned value)    */
  133.     UBYTE    shape;            /* Internal use, do not modify    */
  134.     UBYTE    sync;            /* Returned sync events        */
  135.     };
  136.  
  137.  
  138.  
  139. #endif    /* DEVICES_NARRATOR_H */
  140.