source: buchla-68k/orig/lib/INCLUDE/MIDAS.H@ 6888aa2

Last change on this file since 6888aa2 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Imported original source code.

  • Property mode set to 100755
File size: 4.5 KB
Line 
1/*
2 =============================================================================
3 midas.h -- MIDAS 700 global definitions
4 Version 38 -- 1989-12-19 -- D.N. Lynx Crowe
5
6 Uses definitions from: "graphdef.h", "vsdd.h"
7 =============================================================================
8*/
9
10typedef short (*PFS)(); /* pointer to a function returning a short */
11
12#define SM_SCALE(x) (((x) * 252) & 0x7FE0)
13#define ART_VAL(x) (((((x)-5) > 100) ? 100 : (((x)-5) < 0 ? 0 : ((x)-5)))*320)
14
15#define CWORD(x) ((short)((x)|((x)<<4)|((x)<<8)|((x)<<12)))
16
17#define CTOX(C) ((C) << 3) /* column to x pixel value */
18#define RTOY(R) ((R) * 14) /* row to y pixel value */
19#define XTOC(X) ((X) >> 3) /* x pixel value to column */
20#define YTOR(Y) ((Y) / 14) /* y pixel value to row */
21
22#define AMP_TIME 200 /* amplitude pot interpolate time */
23
24#define GCPRI 15 /* graphic cursor priority */
25#define GCURS 0 /* graphic cursor object number */
26
27#define BIT2 (V_RES2) /* graphics - 2 bit pixels */
28#define BIT3 (V_RES3) /* graphics - 4 bit pixels */
29#define CHR2 (0) /* characters - no attributes */
30#define CHR3 (V_FAD | V_HCR) /* characters - full attributes */
31
32#define OBFL_00 (BIT3 | V_TDE) /* cursor - arrow */
33
34#define LIBRFL (V_RES3) /* librarian display object flags */
35
36#define TTCURS 2 /* typewriter cursor object */
37#define TTCPRI 14 /* typewriter cursor priority */
38#define TTCCFL (V_RES3 | V_OBL | V_TDE)
39
40#define XYCENTRE 50 /* center of range of cursor pots */
41
42#define SMYRATE 4 /* smooth scroll vertical rate */
43
44#define HCWVAL 30 /* graphics cursor x wait time */
45#define VCWVAL 30 /* graphics cursor y wait time */
46#define THCWVAL 60 /* text cursor h wait time */
47#define TVCWVAL 120 /* text cursor v wait time */
48#define CURHOLD 300 /* cursor motion startup delay */
49
50#define CXMAX XMAX /* cursor x maximum */
51#define CYMAX YMAX /* cursor y maximum */
52
53#define FN_NULL 0L /* null for address entries */
54
55/*
56
57*/
58
59#define NASGS 100 /* number of assignments in memory */
60#define NASGLIB 99 /* number of assignments on disk */
61
62#define NTUNS 10 /* number of tunings in memory */
63#define NTUNSLIB 9 /* number of tunings on disk */
64
65#define NINST 41 /* number of instruments in memory */
66#define NINORC 20 /* number of instruments on disk */
67#define NIPNTS 128 /* maximum number of points in the instrument */
68#define MAXIDLN 16 /* maximum length of function ID strings */
69#define NFINST 13 /* number of functions in an instrument */
70#define NUMCFG 12 /* number of oscillator configurations */
71
72#define NUMWAVS 20 /* number of waveshapes in memory or on disk*/
73#define NUMWIDS 8 /* number of waveshape cursor widths */
74#define NUMHARM 32 /* number of waveshape harmonics */
75#define NUMWPNT 254 /* number of waveshape points stored */
76#define NUMWPCAL 256 /* number of waveshape points calculated */
77
78#define VID_EI 0 /* IPL to enable video */
79#define VID_DI 1 /* IPL to disable video */
80#define FPU_EI 1 /* IPL to enable FPU */
81#define FPU_DI 2 /* IPL to disable FPU */
82#define TIM_DI 4 /* IPL to disable timer */
83
84#define NTRIGS 6144 /* number of trigger related entries */
85#define NCTRLS 6144 /* number of controller related entries */
86#define NPFENTS 336 /* number of pendant function list entries */
87#define NLSTENTS 48 /* number of last note entry table entries */
88
89#define NMPORTS 2 /* number of MIDI ports */
90
91#define MASENSCT 500 /* active sensing timeout count */
92
93#define MIDISUS 64 /* MIDI damper (sustain) controller number */
94#define MIDIHLD 66 /* MIDI sustenuto (hold) controller number */
95
96#define MSW_ON 0x3F /* MIDI switch on threshold */
97#define MSW_OFF 0x40 /* MIDI switch off threshold */
98
99#define M_KSTATE 0x01 /* MIDI key status */
100#define M_LCLSUS 0x04 /* MIDI local sustain status */
101#define M_CHNSUS 0x08 /* MIDI channel sustain status */
102#define M_LCLHLD 0x40 /* MIDI local hold status */
103#define M_CHNHLD 0x80 /* MIDI channel hold status */
104#define MKEYHELD (M_CHNHLD | M_LCLHLD) /* key held */
105
106#define PITCHMIN 320 /* C0 in 1/2 cents (160 cents) */
107#define PITCHMAX 21920 /* C9 in 1/2 cents (10960 cents) */
108
109#define GTAG1 0x0100
110#define GTAG2 0x0200
111#define GTAG3 0x0400
112#define GTAG4 0x0800
113#define GTAG5 0x1000
114#define GTAG6 0x2000
115#define GTAG7 0x4000
116#define GTAG8 0x8000
117
118#define CTAG1 0x0100
119#define CTAG2 0x0200
120#define CTAG3 0x0400
121#define CTAG4 0x0800
122#define CTAG5 0x1000
123#define CTAG6 0x2000
124#define CTAG7 0x4000
125#define CTAG8 0x8000
Note: See TracBrowser for help on using the repository browser.