Changeset 7258c6a in buchla-68k for ram/im700.c
- Timestamp:
- 07/09/2017 04:45:34 PM (7 years ago)
- Branches:
- master
- Children:
- 8618599
- Parents:
- 0292fbb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ram/im700.c
r0292fbb r7258c6a 44 44 #include "wsdsp.h" 45 45 46 extern u nsigned tofpu(unsignedtime);46 extern uint16_t tofpu(uint16_t time); 47 47 48 48 extern void nokey(void); 49 extern short nonf(short k);49 extern int16_t nonf(int16_t k); 50 50 extern void stdmkey(void); 51 51 extern void cxkstd(void); … … 54 54 extern void cygen(void); 55 55 extern void cmvgen(void); 56 extern short stdctp2(void);57 58 extern short blakpal[16][3];56 extern int16_t stdctp2(void); 57 58 extern int16_t blakpal[16][3]; 59 59 60 60 extern LPF t_prmtr[]; 61 61 62 extern char*funcndx[256][2];63 64 extern charkeystat[24];65 extern charldcmnt[38];66 extern charldfile[9];67 extern charloadedc[NLTYPES][37];68 extern charloadedf[NLTYPES][8];69 extern charmasens[3];70 extern charmctlval[NCTRLS];71 extern charmdbyte[3];72 extern charmpsust[48];73 extern charmrstat[3];74 extern chartrgtab[NTRIGS];75 76 extern short fnoff[];77 78 extern short articen[12]; /* voice articulation enable status */79 extern short grpmode[12]; /* group mode - 0 = play, 1 = stdby, 2 = rec */80 extern short grpsel[12]; /* group select status for instrument selection */81 extern short grpstat[12]; /* group status - 0 = off, non-0 = on */82 extern short gtctab[12]; /* group to color table */83 extern short lastvce[12]; /* last voice assigned in each group */84 extern short lastvel[12]; /* last velocity sent to group */85 extern short mpbend[48]; /* MIDI pitch bend data, by port and channel */86 extern short msmstv[3]; /* MIDI state machine state variables */87 extern short prstab[NTRIGS]; /* pressure */88 extern short vce2trg[12]; /* voice to trigger map (-1 EQ NULL) */89 extern short veltab[NTRIGS]; /* velocity */62 extern int8_t *funcndx[256][2]; 63 64 extern int8_t keystat[24]; 65 extern int8_t ldcmnt[38]; 66 extern int8_t ldfile[9]; 67 extern int8_t loadedc[NLTYPES][37]; 68 extern int8_t loadedf[NLTYPES][8]; 69 extern int8_t masens[3]; 70 extern int8_t mctlval[NCTRLS]; 71 extern int8_t mdbyte[3]; 72 extern int8_t mpsust[48]; 73 extern int8_t mrstat[3]; 74 extern int8_t trgtab[NTRIGS]; 75 76 extern int16_t fnoff[]; 77 78 extern int16_t articen[12]; /* voice articulation enable status */ 79 extern int16_t grpmode[12]; /* group mode - 0 = play, 1 = stdby, 2 = rec */ 80 extern int16_t grpsel[12]; /* group select status for instrument selection */ 81 extern int16_t grpstat[12]; /* group status - 0 = off, non-0 = on */ 82 extern int16_t gtctab[12]; /* group to color table */ 83 extern int16_t lastvce[12]; /* last voice assigned in each group */ 84 extern int16_t lastvel[12]; /* last velocity sent to group */ 85 extern int16_t mpbend[48]; /* MIDI pitch bend data, by port and channel */ 86 extern int16_t msmstv[3]; /* MIDI state machine state variables */ 87 extern int16_t prstab[NTRIGS]; /* pressure */ 88 extern int16_t vce2trg[12]; /* voice to trigger map (-1 EQ NULL) */ 89 extern int16_t veltab[NTRIGS]; /* velocity */ 90 90 91 91 /* … … 97 97 98 98 extern void (*curmove)(void); /* cursor move function */ 99 extern short (*curtype)(void); /* cursor type function */99 extern int16_t (*curtype)(void); /* cursor type function */ 100 100 extern void (*cx_key)(void); /* x rate calculation */ 101 101 extern void (*cx_upd)(void); /* x update */ 102 102 extern void (*cy_key)(void); /* y rate calculation */ 103 103 extern void (*cy_upd)(void); /* y update */ 104 extern void (*d_key)( short k); /* in-field data key processor */104 extern void (*d_key)(int16_t k); /* in-field data key processor */ 105 105 extern void (*e_key)(void); /* E key processor */ 106 106 extern void (*m_key)(void); /* M key processor */ 107 extern short (*not_fld)(short k); /* not-in-field data key processor */107 extern int16_t (*not_fld)(int16_t k); /* not-in-field data key processor */ 108 108 extern void (*premove)(void); /* cursor pre-move function */ 109 109 extern void (*pstmove)(void); /* cursor post-move function */ … … 112 112 extern void (*xy_up)(void); /* cursor - finger off (up) */ 113 113 114 extern short *cratex; /* cursor x rate table pointer */115 extern short *cratey; /* cursor x rate table pointer */116 117 short admctl; /* assignment display submenu control variable */118 short adnamsw; /* assignment display virtual typewriter flag */119 short aflag; /* analog activity flag */120 short aform; /* action buffer format */121 short amplval; /* amplitude */122 short ancmsw; /* analog variable r/p control source */123 short angroup; /* analog variable group being shown */124 short asgfks; /* first key selected */125 short asghit; /* row hit / assignment in progress */126 short asgmod; /* assignment number or table modified */127 short asig; /* analog signal number */128 short asmode; /* panel assignment mode */129 short astat; /* analog signal status */130 short auxctl; /* aux control flag */131 short aval; /* analog signal value */132 short bform; /* oscillator data buffer format */133 short catin; /* catalog read in flag */134 short cents; /* pitch to cents conversion buffer */135 short chtime; /* horizontal cursor counter */136 short chwait; /* horizontal cursor wait time */137 short cflag; /* accidental flag */138 short clkctl; /* clock control */139 short clkrun; /* clock status */140 short clksrc; /* clock source */141 short cmfirst; /* first cursor motion switch */142 short cmtype; /* cursor motion type */143 short cnote; /* note value at cursor */144 short ctrsw; /* scupd center update switch */145 short curasg; /* current assignment table */146 short curfunc; /* current function number */147 short curgrp; /* current group */148 short curinst; /* current instrument number */149 short curmop; /* current MIDI output port */150 short curpnt; /* current point number (absolute) */151 short curpos; /* cursor pad position for current axis */152 short cursbox; /* currently selected box */153 short curscor; /* Current score number */154 short cursect; /* current section */155 short curslim; /* cursor type change point */156 short curtun; /* current tuning table */157 short curvce; /* current voice number */158 short curwave; /* current waveshape library slot */159 short curwdth; /* current waveshape cursor width */160 short curwfnl; /* current waveshape final value */161 short curwhrm; /* current waveshape harmonic number */162 short curwhrv; /* current waveshape harmonic value */163 short curwoff; /* current waveshape offset value */164 short curwpnt; /* current waveshape point number */165 short curwslt; /* current waveshape instrument slot */166 short cvtime; /* vertical cursor counter */167 short cvwait; /* veritcal cursor wait time */168 short cxrate; /* cursor x rate */169 short cxval; /* graphic cursor x value */170 short cyrate; /* cursor y rate */171 short cyval; /* graphic cursor y value */172 short debugne; /* debug flag for note entry */173 short defect; /* defect code */174 short dferror; /* error code from BIOS or XBIOS */175 short dfsides; /* number of sides */176 short dftype; /* disk type code */177 short dsp_ok; /* display update OK this cycle flag */178 short dubsw; /* overdub / replace switch */179 short ebflag; /* edit buffer data flag */180 short editss; /* edit panel switch state */181 short editsw; /* edit mode switch */182 short endflg; /* !end flag */183 short ext_cv1; /* CV-1 value */184 short ext_cv2; /* CV-2 value */185 short ext_cv3; /* CV-3 value */186 short ext_cv4; /* CV-4 value */187 short ext_mod; /* Aux Signal Mod value */188 short gomode; /* go to mode */189 short grptran; /* group translation value */190 short gtmsel; /* group transpose/map select */191 short hitbox; /* box we just hit */192 short hitcx; /* x of cursor when we hit the box */193 short hitcy; /* y of cursor when we hit the box */194 short idcfsw; /* copy / fetch menu switch */195 short idimsw; /* instrument display instrument menu switch */196 short idintmp; /* temporary for instrument number */197 short idnamsw; /* typewriter switch */198 short idsrcsw; /* source menu switch */199 short idtdat; /* current instrument vtyper data entry string */200 short imflag; /* instrument modified flag */201 short initcfg; /* initial configuration */202 short insmode; /* score insert mode */203 short ismode; /* instrument select mode */204 short lampio; /* LCD timeout disable switch state at I/O time */205 short lampsw; /* LCD timeout disable switch */206 short lasgsw; /* assignments store switch */207 short lastam; /* last assignment menu base */208 short ldelsw; /* delete switch */209 short lderrsw; /* error message displayed switch */210 short ldidsiz; /* getcat() did showsiz() switch */211 short ldkind; /* fetch file type */212 short ldpass; /* librarian load state variable */213 short ldrow; /* fetch select row */214 short ldslot; /* fetch select slot */215 short legato; /* execkey() "legato" mode switch */216 short lksel; /* librarian key slot selector */217 short lmwtype; /* librarian message window type */218 short loadrow; /* librarian row selected for load letter */219 short loadsw; /* panel "Load" mode state */220 short lorchl; /* load hi (TRUE) / lo (FALSE) orchestra */221 short lorchsw; /* hi orchestra (21 - 40) store switch */222 short lorclsw; /* lo orchestra (01 - 20) store switch */223 short lpatsw; /* patch table store switch */224 short lrasw; /* append (TRUE) / replace (FALSE) score */225 short lscrsw; /* score store switch */226 short lselsw; /* fetch select switch */227 short lseqsw; /* sequence table store switch */228 short lstbgnc; /* last note begin entry table index */229 short lstendc; /* last note end entry table index */230 short lstflag; /* last note list end switch */231 short lstrsw; /* store state switch */232 short lstwoff; /* last waveshape offset value */233 short lstwpnt; /* last waveshape point number */234 short ltagged; /* load tag switch */235 short ltunsw; /* tunings store switch */236 short lwavsw; /* waveshapes store switch */237 short mascntr; /* MIDI active sensing timeout counter */238 short mdb1; /* current MIDI data byte 1 */239 short mdb2; /* current MIDI data byte 2 */240 short michan; /* current MIDI channel */241 short midiclk; /* MIDI clock switch */242 short midigo; /* MIDI run switch */243 short mistat; /* current MIDI status */244 short nchwait; /* next chwait value */245 short ncvwait; /* next cvwait value */246 short ndisp; /* current display number */247 short newflag; /* new data entered while t_cur EQ t_ctr */248 short nkdown; /* number of keys down */249 short notenum; /* note number */250 short noteop; /* pending note operation code */251 short notepit; /* note pitch */252 short notesel; /* note selection state */253 short npts; /* number of points in function */254 short nxtflag; /* next score flag */255 short oldltag; /* previous load tag for tagslot */256 short oldpk; /* previous pkctrl state */257 short oldsl; /* previous sliders state */258 short pchsw; /* punch-in enable switch */259 short pecase; /* point edit case variable */260 short pkctrl; /* local performance key state */261 short pntsv; /* point selection state variable */262 short prgchan; /* MIDI program change channel (port 1) */263 short ps_dpth; /* phase shifter -- depth */264 short ps_intn; /* phase shifter -- intensity */265 short ps_rate; /* phase shifter -- rate */266 short pulsclk; /* pulse clock state */267 short recsw; /* record / play switch */268 short runit; /* run switch for main scan loop */269 short sbase; /* score VSDD RAM scroll offset */270 short scmctl; /* score submenu control flag */271 short scrlpot; /* scroll pot state */272 short sd; /* score display direction */273 short se; /* score execution direction */274 short sdmcol; /* score menu - saved stccol */275 short sdmctl; /* score menu - control variable */276 short sdmrow; /* score menu - saved stcrow */277 short secop; /* pending score section operation */278 short secopok; /* section operation OK flag */279 short sgcsw; /* graphic cursor display switch */280 short sgoflag; /* section number relative column 0..3 */281 short sharp; /* sharp flag */282 short sliders; /* slider and switch state */283 short soffset; /* score scroll offset */284 short ss_ptsw; /* smooth scroll patch scroll switch */285 short ss_sqsw; /* smooth scroll sequence scroll switch */286 short stccol; /* score cursor col */287 short stcrow; /* score cursor row */288 short stepclk; /* note entry - step clock state */289 short stepenb; /* note entry - step enable flag */290 short stepint; /* note entry - note interval */291 short stepwgt; /* note entry - note weight */292 short subj; /* edited point number (relative) */293 short submenu; /* submenu active switch */294 short swctrl; /* scroll wheel 'srolling' flag */295 short swdelta; /* scroll wheel change while touched */296 short swdir; /* scroll wheel direction */297 short swfiin; /* scroll wheel fifo input pointer */298 short swflag; /* scroll wheel touched flag */299 short swlast; /* scroll wheel last value */300 short swstop; /* scroll wheel stop flag */301 short swndx; /* scroll wheel look back index */302 short tagslot; /* tagged load slot */303 short tdnamsw; /* tuning editor displaying typewriter */304 short temax; /* time upper limit */305 short temin; /* time lower limit */306 short testing; /* test level */307 short tglclk; /* clock on/off toggle flag */308 short tglpch; /* punch in/out toggle flag */309 short thescore; /* score selected from sqscan */310 short timemlt; /* time scaling */311 short tkctrl; /* trackball active flag */312 short tmpomlt; /* tempo multiplier */313 short tmpoval; /* tempo value */314 short trkball; /* trackball selected switch */315 short ttcmdsv; /* tuning editor edit state variable */316 short ttsel1; /* tuning editor key select variable 1 */317 short ttsel2; /* tuning editor key select variable 2 */318 short ttsel3; /* tuning editor key select variable 3 */319 short tuneval; /* fine tuning */320 short tunmod; /* tuning table modified */321 short tunval; /* tuning editor increment / transpose value */322 short txfiin; /* trackball x fifo input pointer */323 short txflag; /* trackball x axis active flag */324 short txlast; /* trackball x axis last value */325 short txstop; /* trackball x axis filter counter */326 short tyfiin; /* trackball y fifo input pointer */327 short tyflag; /* trackball y axis active flag */328 short tylast; /* trackball y axis last value */329 short tystop; /* trackball y axis filter counter */330 short velflag; /* velocity display flag */331 short verbose; /* verbose output switch */332 short vlbtype; /* type of message window display */333 short vrbw08; /* score display video reset detail word */334 short vrbw09; /* score display video reset detail word */335 short vrbw10; /* score display video reset detail word */336 short vrbw11; /* score display video reset detail word */337 short vrbw12; /* score display video reset detail word */338 short vrbw13; /* score display video reset detail word */339 short vrbw14; /* score display video reset detail word */340 short vrbw15; /* score display video reset detail word */341 short vrcw; /* score display video reset control word */342 short vtccol; /* virtual typewriter cursor column */343 short vtcrow; /* virtual typewriter cursor row */344 charvtdechr; /* virtual typewriter data entry character */345 short vtdecol; /* virtual typewriter data entry column */346 short vtpcol; /* virtual typewriter column */347 short vtprow; /* virtual typewriter row */348 short vtwcol; /* virtual typewriter window left column */349 short vtwrow; /* virtual typewriter window top row */350 short vtxval; /* virtual typewriter cursor x value */351 short vtyval; /* virtual typewriter cursor y value */352 short wcflag; /* ws/cf menu select flag (cf=0, ws=1) */353 short wcmcol; /* ws/cf menu label column */354 short wcmrow; /* ws/cf menu label row */355 short wcpage; /* ws/cf menu page */356 short wdupdfl; /* waveshape display needs updated flag */357 short wmcsel; /* ws menu ws a/b select */358 short wmctag; /* ws/cf display update flag */359 short wplast; /* last point for interpolate operation */360 short wpntsv; /* waveshape point selection state variable */361 short wshmax; /* waveshape maximum value */362 short wvlast; /* last value for interpolate operation */363 short xkcount; /* cursor x key on count */364 short xkstat; /* cursor x key status */365 short xycntr; /* xy center for cursor pad */366 short ykcount; /* cursor y key on count */367 short ykstat; /* cursor y key status */368 369 short anrs[8][16]; /* analog variable resolution */370 short grp2prt[12][2]; /* group to port and channel table */371 short sctctab[10][64]; /* score background color table */372 short sigtab[128][2]; /* signals: [0] = value, [1] = switch */373 short tunlib[NTUNS][128]; /* tuning table library */374 short varmode[8][16]; /* analog variable record mode */375 short wsnmod[12][2]; /* waveshape number / data modified */114 extern int16_t *cratex; /* cursor x rate table pointer */ 115 extern int16_t *cratey; /* cursor x rate table pointer */ 116 117 int16_t admctl; /* assignment display submenu control variable */ 118 int16_t adnamsw; /* assignment display virtual typewriter flag */ 119 int16_t aflag; /* analog activity flag */ 120 int16_t aform; /* action buffer format */ 121 int16_t amplval; /* amplitude */ 122 int16_t ancmsw; /* analog variable r/p control source */ 123 int16_t angroup; /* analog variable group being shown */ 124 int16_t asgfks; /* first key selected */ 125 int16_t asghit; /* row hit / assignment in progress */ 126 int16_t asgmod; /* assignment number or table modified */ 127 int16_t asig; /* analog signal number */ 128 int16_t asmode; /* panel assignment mode */ 129 int16_t astat; /* analog signal status */ 130 int16_t auxctl; /* aux control flag */ 131 int16_t aval; /* analog signal value */ 132 int16_t bform; /* oscillator data buffer format */ 133 int16_t catin; /* catalog read in flag */ 134 int16_t cents; /* pitch to cents conversion buffer */ 135 int16_t chtime; /* horizontal cursor counter */ 136 int16_t chwait; /* horizontal cursor wait time */ 137 int16_t cflag; /* accidental flag */ 138 int16_t clkctl; /* clock control */ 139 int16_t clkrun; /* clock status */ 140 int16_t clksrc; /* clock source */ 141 int16_t cmfirst; /* first cursor motion switch */ 142 int16_t cmtype; /* cursor motion type */ 143 int16_t cnote; /* note value at cursor */ 144 int16_t ctrsw; /* scupd center update switch */ 145 int16_t curasg; /* current assignment table */ 146 int16_t curfunc; /* current function number */ 147 int16_t curgrp; /* current group */ 148 int16_t curinst; /* current instrument number */ 149 int16_t curmop; /* current MIDI output port */ 150 int16_t curpnt; /* current point number (absolute) */ 151 int16_t curpos; /* cursor pad position for current axis */ 152 int16_t cursbox; /* currently selected box */ 153 int16_t curscor; /* Current score number */ 154 int16_t cursect; /* current section */ 155 int16_t curslim; /* cursor type change point */ 156 int16_t curtun; /* current tuning table */ 157 int16_t curvce; /* current voice number */ 158 int16_t curwave; /* current waveshape library slot */ 159 int16_t curwdth; /* current waveshape cursor width */ 160 int16_t curwfnl; /* current waveshape final value */ 161 int16_t curwhrm; /* current waveshape harmonic number */ 162 int16_t curwhrv; /* current waveshape harmonic value */ 163 int16_t curwoff; /* current waveshape offset value */ 164 int16_t curwpnt; /* current waveshape point number */ 165 int16_t curwslt; /* current waveshape instrument slot */ 166 int16_t cvtime; /* vertical cursor counter */ 167 int16_t cvwait; /* veritcal cursor wait time */ 168 int16_t cxrate; /* cursor x rate */ 169 int16_t cxval; /* graphic cursor x value */ 170 int16_t cyrate; /* cursor y rate */ 171 int16_t cyval; /* graphic cursor y value */ 172 int16_t debugne; /* debug flag for note entry */ 173 int16_t defect; /* defect code */ 174 int16_t dferror; /* error code from BIOS or XBIOS */ 175 int16_t dfsides; /* number of sides */ 176 int16_t dftype; /* disk type code */ 177 int16_t dsp_ok; /* display update OK this cycle flag */ 178 int16_t dubsw; /* overdub / replace switch */ 179 int16_t ebflag; /* edit buffer data flag */ 180 int16_t editss; /* edit panel switch state */ 181 int16_t editsw; /* edit mode switch */ 182 int16_t endflg; /* !end flag */ 183 int16_t ext_cv1; /* CV-1 value */ 184 int16_t ext_cv2; /* CV-2 value */ 185 int16_t ext_cv3; /* CV-3 value */ 186 int16_t ext_cv4; /* CV-4 value */ 187 int16_t ext_mod; /* Aux Signal Mod value */ 188 int16_t gomode; /* go to mode */ 189 int16_t grptran; /* group translation value */ 190 int16_t gtmsel; /* group transpose/map select */ 191 int16_t hitbox; /* box we just hit */ 192 int16_t hitcx; /* x of cursor when we hit the box */ 193 int16_t hitcy; /* y of cursor when we hit the box */ 194 int16_t idcfsw; /* copy / fetch menu switch */ 195 int16_t idimsw; /* instrument display instrument menu switch */ 196 int16_t idintmp; /* temporary for instrument number */ 197 int16_t idnamsw; /* typewriter switch */ 198 int16_t idsrcsw; /* source menu switch */ 199 int16_t idtdat; /* current instrument vtyper data entry string */ 200 int16_t imflag; /* instrument modified flag */ 201 int16_t initcfg; /* initial configuration */ 202 int16_t insmode; /* score insert mode */ 203 int16_t ismode; /* instrument select mode */ 204 int16_t lampio; /* LCD timeout disable switch state at I/O time */ 205 int16_t lampsw; /* LCD timeout disable switch */ 206 int16_t lasgsw; /* assignments store switch */ 207 int16_t lastam; /* last assignment menu base */ 208 int16_t ldelsw; /* delete switch */ 209 int16_t lderrsw; /* error message displayed switch */ 210 int16_t ldidsiz; /* getcat() did showsiz() switch */ 211 int16_t ldkind; /* fetch file type */ 212 int16_t ldpass; /* librarian load state variable */ 213 int16_t ldrow; /* fetch select row */ 214 int16_t ldslot; /* fetch select slot */ 215 int16_t legato; /* execkey() "legato" mode switch */ 216 int16_t lksel; /* librarian key slot selector */ 217 int16_t lmwtype; /* librarian message window type */ 218 int16_t loadrow; /* librarian row selected for load letter */ 219 int16_t loadsw; /* panel "Load" mode state */ 220 int16_t lorchl; /* load hi (TRUE) / lo (FALSE) orchestra */ 221 int16_t lorchsw; /* hi orchestra (21 - 40) store switch */ 222 int16_t lorclsw; /* lo orchestra (01 - 20) store switch */ 223 int16_t lpatsw; /* patch table store switch */ 224 int16_t lrasw; /* append (TRUE) / replace (FALSE) score */ 225 int16_t lscrsw; /* score store switch */ 226 int16_t lselsw; /* fetch select switch */ 227 int16_t lseqsw; /* sequence table store switch */ 228 int16_t lstbgnc; /* last note begin entry table index */ 229 int16_t lstendc; /* last note end entry table index */ 230 int16_t lstflag; /* last note list end switch */ 231 int16_t lstrsw; /* store state switch */ 232 int16_t lstwoff; /* last waveshape offset value */ 233 int16_t lstwpnt; /* last waveshape point number */ 234 int16_t ltagged; /* load tag switch */ 235 int16_t ltunsw; /* tunings store switch */ 236 int16_t lwavsw; /* waveshapes store switch */ 237 int16_t mascntr; /* MIDI active sensing timeout counter */ 238 int16_t mdb1; /* current MIDI data byte 1 */ 239 int16_t mdb2; /* current MIDI data byte 2 */ 240 int16_t michan; /* current MIDI channel */ 241 int16_t midiclk; /* MIDI clock switch */ 242 int16_t midigo; /* MIDI run switch */ 243 int16_t mistat; /* current MIDI status */ 244 int16_t nchwait; /* next chwait value */ 245 int16_t ncvwait; /* next cvwait value */ 246 int16_t ndisp; /* current display number */ 247 int16_t newflag; /* new data entered while t_cur EQ t_ctr */ 248 int16_t nkdown; /* number of keys down */ 249 int16_t notenum; /* note number */ 250 int16_t noteop; /* pending note operation code */ 251 int16_t notepit; /* note pitch */ 252 int16_t notesel; /* note selection state */ 253 int16_t npts; /* number of points in function */ 254 int16_t nxtflag; /* next score flag */ 255 int16_t oldltag; /* previous load tag for tagslot */ 256 int16_t oldpk; /* previous pkctrl state */ 257 int16_t oldsl; /* previous sliders state */ 258 int16_t pchsw; /* punch-in enable switch */ 259 int16_t pecase; /* point edit case variable */ 260 int16_t pkctrl; /* local performance key state */ 261 int16_t pntsv; /* point selection state variable */ 262 int16_t prgchan; /* MIDI program change channel (port 1) */ 263 int16_t ps_dpth; /* phase shifter -- depth */ 264 int16_t ps_intn; /* phase shifter -- intensity */ 265 int16_t ps_rate; /* phase shifter -- rate */ 266 int16_t pulsclk; /* pulse clock state */ 267 int16_t recsw; /* record / play switch */ 268 int16_t runit; /* run switch for main scan loop */ 269 int16_t sbase; /* score VSDD RAM scroll offset */ 270 int16_t scmctl; /* score submenu control flag */ 271 int16_t scrlpot; /* scroll pot state */ 272 int16_t sd; /* score display direction */ 273 int16_t se; /* score execution direction */ 274 int16_t sdmcol; /* score menu - saved stccol */ 275 int16_t sdmctl; /* score menu - control variable */ 276 int16_t sdmrow; /* score menu - saved stcrow */ 277 int16_t secop; /* pending score section operation */ 278 int16_t secopok; /* section operation OK flag */ 279 int16_t sgcsw; /* graphic cursor display switch */ 280 int16_t sgoflag; /* section number relative column 0..3 */ 281 int16_t sharp; /* sharp flag */ 282 int16_t sliders; /* slider and switch state */ 283 int16_t soffset; /* score scroll offset */ 284 int16_t ss_ptsw; /* smooth scroll patch scroll switch */ 285 int16_t ss_sqsw; /* smooth scroll sequence scroll switch */ 286 int16_t stccol; /* score cursor col */ 287 int16_t stcrow; /* score cursor row */ 288 int16_t stepclk; /* note entry - step clock state */ 289 int16_t stepenb; /* note entry - step enable flag */ 290 int16_t stepint; /* note entry - note interval */ 291 int16_t stepwgt; /* note entry - note weight */ 292 int16_t subj; /* edited point number (relative) */ 293 int16_t submenu; /* submenu active switch */ 294 int16_t swctrl; /* scroll wheel 'srolling' flag */ 295 int16_t swdelta; /* scroll wheel change while touched */ 296 int16_t swdir; /* scroll wheel direction */ 297 int16_t swfiin; /* scroll wheel fifo input pointer */ 298 int16_t swflag; /* scroll wheel touched flag */ 299 int16_t swlast; /* scroll wheel last value */ 300 int16_t swstop; /* scroll wheel stop flag */ 301 int16_t swndx; /* scroll wheel look back index */ 302 int16_t tagslot; /* tagged load slot */ 303 int16_t tdnamsw; /* tuning editor displaying typewriter */ 304 int16_t temax; /* time upper limit */ 305 int16_t temin; /* time lower limit */ 306 int16_t testing; /* test level */ 307 int16_t tglclk; /* clock on/off toggle flag */ 308 int16_t tglpch; /* punch in/out toggle flag */ 309 int16_t thescore; /* score selected from sqscan */ 310 int16_t timemlt; /* time scaling */ 311 int16_t tkctrl; /* trackball active flag */ 312 int16_t tmpomlt; /* tempo multiplier */ 313 int16_t tmpoval; /* tempo value */ 314 int16_t trkball; /* trackball selected switch */ 315 int16_t ttcmdsv; /* tuning editor edit state variable */ 316 int16_t ttsel1; /* tuning editor key select variable 1 */ 317 int16_t ttsel2; /* tuning editor key select variable 2 */ 318 int16_t ttsel3; /* tuning editor key select variable 3 */ 319 int16_t tuneval; /* fine tuning */ 320 int16_t tunmod; /* tuning table modified */ 321 int16_t tunval; /* tuning editor increment / transpose value */ 322 int16_t txfiin; /* trackball x fifo input pointer */ 323 int16_t txflag; /* trackball x axis active flag */ 324 int16_t txlast; /* trackball x axis last value */ 325 int16_t txstop; /* trackball x axis filter counter */ 326 int16_t tyfiin; /* trackball y fifo input pointer */ 327 int16_t tyflag; /* trackball y axis active flag */ 328 int16_t tylast; /* trackball y axis last value */ 329 int16_t tystop; /* trackball y axis filter counter */ 330 int16_t velflag; /* velocity display flag */ 331 int16_t verbose; /* verbose output switch */ 332 int16_t vlbtype; /* type of message window display */ 333 int16_t vrbw08; /* score display video reset detail word */ 334 int16_t vrbw09; /* score display video reset detail word */ 335 int16_t vrbw10; /* score display video reset detail word */ 336 int16_t vrbw11; /* score display video reset detail word */ 337 int16_t vrbw12; /* score display video reset detail word */ 338 int16_t vrbw13; /* score display video reset detail word */ 339 int16_t vrbw14; /* score display video reset detail word */ 340 int16_t vrbw15; /* score display video reset detail word */ 341 int16_t vrcw; /* score display video reset control word */ 342 int16_t vtccol; /* virtual typewriter cursor column */ 343 int16_t vtcrow; /* virtual typewriter cursor row */ 344 int8_t vtdechr; /* virtual typewriter data entry character */ 345 int16_t vtdecol; /* virtual typewriter data entry column */ 346 int16_t vtpcol; /* virtual typewriter column */ 347 int16_t vtprow; /* virtual typewriter row */ 348 int16_t vtwcol; /* virtual typewriter window left column */ 349 int16_t vtwrow; /* virtual typewriter window top row */ 350 int16_t vtxval; /* virtual typewriter cursor x value */ 351 int16_t vtyval; /* virtual typewriter cursor y value */ 352 int16_t wcflag; /* ws/cf menu select flag (cf=0, ws=1) */ 353 int16_t wcmcol; /* ws/cf menu label column */ 354 int16_t wcmrow; /* ws/cf menu label row */ 355 int16_t wcpage; /* ws/cf menu page */ 356 int16_t wdupdfl; /* waveshape display needs updated flag */ 357 int16_t wmcsel; /* ws menu ws a/b select */ 358 int16_t wmctag; /* ws/cf display update flag */ 359 int16_t wplast; /* last point for interpolate operation */ 360 int16_t wpntsv; /* waveshape point selection state variable */ 361 int16_t wshmax; /* waveshape maximum value */ 362 int16_t wvlast; /* last value for interpolate operation */ 363 int16_t xkcount; /* cursor x key on count */ 364 int16_t xkstat; /* cursor x key status */ 365 int16_t xycntr; /* xy center for cursor pad */ 366 int16_t ykcount; /* cursor y key on count */ 367 int16_t ykstat; /* cursor y key status */ 368 369 int16_t anrs[8][16]; /* analog variable resolution */ 370 int16_t grp2prt[12][2]; /* group to port and channel table */ 371 int16_t sctctab[10][64]; /* score background color table */ 372 int16_t sigtab[128][2]; /* signals: [0] = value, [1] = switch */ 373 int16_t tunlib[NTUNS][128]; /* tuning table library */ 374 int16_t varmode[8][16]; /* analog variable record mode */ 375 int16_t wsnmod[12][2]; /* waveshape number / data modified */ 376 376 377 377 struct EXFILE mphead; /* MIDAS-VII program header */ … … 436 436 struct s_entry *seclist[N_SCORES][N_SECTS]; /* Section pointer table */ 437 437 438 u nsigned*asgob; /* assignment display object pointer */439 u nsigned*consl; /* constant slice pointer */440 u nsigned*cursl; /* current (center) slice pointer */441 u nsigned*instob; /* instrument object pointer */442 u nsigned*librob; /* librarian display object pointer */443 u nsigned*menuob; /* menu display object pointer */444 u nsigned*nxtsl; /* next (right edge) slice pointer */445 u nsigned*obj0; /* object 0 VSDD RAM pointer */446 u nsigned*obj1; /* object 1 VSDD RAM pointer */447 u nsigned*obj2; /* object 2 VSDD RAM pointer */448 u nsigned*obj3; /* object 3 VSDD RAM pointer */449 u nsigned*obj4; /* object 4 VSDD RAM pointer */450 u nsigned*obj5; /* object 5 VSDD RAM pointer */451 u nsigned*obj6; /* object 6 VSDD RAM pointer */452 u nsigned*obj7; /* object 7 VSDD RAM pointer */453 u nsigned*obj8; /* object 8 VSDD RAM pointer */454 u nsigned*obj9; /* object 9 VSDD RAM pointer */455 u nsigned*obj10; /* object 10 VSDD RAM pointer */456 u nsigned*obj11; /* object 11 VSDD RAM pointer */457 u nsigned*obj12; /* object 12 VSDD RAM pointer */458 u nsigned*obj13; /* object 13 VSDD RAM pointer */459 u nsigned*obj14; /* object 14 VSDD RAM pointer */460 u nsigned*obj15; /* object 15 VSDD RAM pointer */461 u nsigned*prvsl; /* previous (left edge) slice pointer */462 u nsigned*saddr; /* score VSDD RAM base pointer */463 u nsigned*tunob; /* tuning table display object pointer */464 u nsigned*vtobj; /* virtual typewriter display object pointer */465 u nsigned*waveob; /* waveshape display object pointer */466 467 u nsignedcurintp; /* current interpolate time (FPU format) */468 u nsignedscrl; /* score VSDD object scroll register image */469 u nsignedvtbgval; /* virtual typewriter data background color */470 u nsignedvtfgval; /* virtual typewriter data foreground color */471 472 u nsigneddfbuf[4096]; /* track formatting buffer */473 u nsignedslices[896]; /* score display slices */438 uint16_t *asgob; /* assignment display object pointer */ 439 uint16_t *consl; /* constant slice pointer */ 440 uint16_t *cursl; /* current (center) slice pointer */ 441 uint16_t *instob; /* instrument object pointer */ 442 uint16_t *librob; /* librarian display object pointer */ 443 uint16_t *menuob; /* menu display object pointer */ 444 uint16_t *nxtsl; /* next (right edge) slice pointer */ 445 uint16_t *obj0; /* object 0 VSDD RAM pointer */ 446 uint16_t *obj1; /* object 1 VSDD RAM pointer */ 447 uint16_t *obj2; /* object 2 VSDD RAM pointer */ 448 uint16_t *obj3; /* object 3 VSDD RAM pointer */ 449 uint16_t *obj4; /* object 4 VSDD RAM pointer */ 450 uint16_t *obj5; /* object 5 VSDD RAM pointer */ 451 uint16_t *obj6; /* object 6 VSDD RAM pointer */ 452 uint16_t *obj7; /* object 7 VSDD RAM pointer */ 453 uint16_t *obj8; /* object 8 VSDD RAM pointer */ 454 uint16_t *obj9; /* object 9 VSDD RAM pointer */ 455 uint16_t *obj10; /* object 10 VSDD RAM pointer */ 456 uint16_t *obj11; /* object 11 VSDD RAM pointer */ 457 uint16_t *obj12; /* object 12 VSDD RAM pointer */ 458 uint16_t *obj13; /* object 13 VSDD RAM pointer */ 459 uint16_t *obj14; /* object 14 VSDD RAM pointer */ 460 uint16_t *obj15; /* object 15 VSDD RAM pointer */ 461 uint16_t *prvsl; /* previous (left edge) slice pointer */ 462 uint16_t *saddr; /* score VSDD RAM base pointer */ 463 uint16_t *tunob; /* tuning table display object pointer */ 464 uint16_t *vtobj; /* virtual typewriter display object pointer */ 465 uint16_t *waveob; /* waveshape display object pointer */ 466 467 uint16_t curintp; /* current interpolate time (FPU format) */ 468 uint16_t scrl; /* score VSDD object scroll register image */ 469 uint16_t vtbgval; /* virtual typewriter data background color */ 470 uint16_t vtfgval; /* virtual typewriter data foreground color */ 471 472 uint16_t dfbuf[4096]; /* track formatting buffer */ 473 uint16_t slices[896]; /* score display slices */ 474 474 475 475 /* … … 479 479 /* initialized variables */ 480 480 481 short debugsw = DEBUGVAL; /* debug output switch */482 483 short swback = SWBACK; /* scroll wheel look back count */484 short swthr = SWTHR; /* scroll wheel movement threshold */485 short swtime = SWTIME; /* scroll wheel timer scan time */486 short swwait = SWWAIT; /* scroll wheel wait count */487 488 short tkback = TKBACK; /* trackball FIFO look back count */489 short tkrmin = TKRMIN; /* trackball rate threshold */490 short tkthr = TKTHR; /* trackball movement threshold */491 short tktime = TKTIME; /* trackball timer scan time */492 short tkwait = TKWAIT; /* trackball wait count */493 494 short curhold = CURHOLD; /* cursor hold time */495 short hcwval = HCWVAL; /* graphics cursor X wait time */496 short thcwval = THCWVAL; /* text cursor H wait time */497 short tvcwval = TVCWVAL; /* text cursor V wait time */498 short vcwval = VCWVAL; /* graphics cursor Y wait time */499 500 /* 501 502 */ 503 504 short tmultab[] = { /* time multiplier table - indexed by voltage */481 int16_t debugsw = DEBUGVAL; /* debug output switch */ 482 483 int16_t swback = SWBACK; /* scroll wheel look back count */ 484 int16_t swthr = SWTHR; /* scroll wheel movement threshold */ 485 int16_t swtime = SWTIME; /* scroll wheel timer scan time */ 486 int16_t swwait = SWWAIT; /* scroll wheel wait count */ 487 488 int16_t tkback = TKBACK; /* trackball FIFO look back count */ 489 int16_t tkrmin = TKRMIN; /* trackball rate threshold */ 490 int16_t tkthr = TKTHR; /* trackball movement threshold */ 491 int16_t tktime = TKTIME; /* trackball timer scan time */ 492 int16_t tkwait = TKWAIT; /* trackball wait count */ 493 494 int16_t curhold = CURHOLD; /* cursor hold time */ 495 int16_t hcwval = HCWVAL; /* graphics cursor X wait time */ 496 int16_t thcwval = THCWVAL; /* text cursor H wait time */ 497 int16_t tvcwval = TVCWVAL; /* text cursor V wait time */ 498 int16_t vcwval = VCWVAL; /* graphics cursor Y wait time */ 499 500 /* 501 502 */ 503 504 int16_t tmultab[] = { /* time multiplier table - indexed by voltage */ 505 505 506 506 0xFFFF, 0xFAFA, 0xF627, 0xF182, 0xED09, /* 0 */ … … 531 531 */ 532 532 533 short crate0[] = { /* cursor rate table 1 */533 int16_t crate0[] = { /* cursor rate table 1 */ 534 534 535 535 0, 0, 0, 0, 0, 0, 0, 0, /* 0..7 */ … … 543 543 }; 544 544 545 short crate1[] = { /* cursor rate table 1 */545 int16_t crate1[] = { /* cursor rate table 1 */ 546 546 547 547 0, 0, 0, 0, 0, 0, 0, 0, /* 0..7 */ … … 555 555 }; 556 556 557 short crate2[] = { /* cursor rate table 2 */557 int16_t crate2[] = { /* cursor rate table 2 */ 558 558 559 559 0, 0, 0, 0, 0, 0, 0, 0, /* 0..7 */ … … 571 571 */ 572 572 573 short loctab[9] = {573 int16_t loctab[9] = { 574 574 575 575 0, /* 0 - left */ … … 598 598 */ 599 599 600 short valof(short srcv)600 int16_t valof(int16_t srcv) 601 601 { 602 602 switch (srcv) { … … 645 645 void inismtb(void) 646 646 { 647 register short i, oldi;647 register int16_t i, oldi; 648 648 649 649 oldi = setipl(FPU_DI); … … 690 690 void clrpfl(void) 691 691 { 692 register short i;692 register int16_t i; 693 693 694 694 memsetw(&pfents[0], 0, (NPFENTS * sizeof (struct pflent))/2); … … 713 713 void im700(void) 714 714 { 715 register short i, j, k;716 register char*ioadr;715 register int16_t i, j, k; 716 register int8_t *ioadr; 717 717 register struct instdef *ip; 718 718
Note:
See TracChangeset
for help on using the changeset viewer.