source: buchla-68k/include/midas.h@ a95b757

Last change on this file since a95b757 was 09d1345, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Prefer signed integers in vlib.

  • Property mode set to 100644
File size: 4.4 KB
RevLine 
[f40a309]1/*
2 =============================================================================
3 midas.h -- MIDAS 700 global definitions
4 Version 38 -- 1989-12-19 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
[f7428b1]8#pragma once
[5fa506d]9
10#include "graphdef.h"
[f7428b1]11#include "stdint.h"
[5fa506d]12#include "vsdd.h"
[f7428b1]13
14typedef void (*LPF)(int16_t _1, int16_t _2); /* pointer to a LCD panel function */
[f40a309]15
[f7428b1]16#define SM_SCALE(x) (((x) * 252) & 0x7fe0)
17#define ART_VAL(x) (((((x) - 5) > 100) ? 100 : (((x) - 5) < 0 ? 0 : ((x) - 5))) * 320)
[f40a309]18
[f7428b1]19#define CWORD(x) ((int16_t)((x) | ((x) << 4) | ((x) << 8) | ((x) << 12)))
[f40a309]20
21#define CTOX(C) ((C) << 3) /* column to x pixel value */
22#define RTOY(R) ((R) * 14) /* row to y pixel value */
23#define XTOC(X) ((X) >> 3) /* x pixel value to column */
24#define YTOR(Y) ((Y) / 14) /* y pixel value to row */
25
26#define AMP_TIME 200 /* amplitude pot interpolate time */
27
28#define GCPRI 15 /* graphic cursor priority */
29#define GCURS 0 /* graphic cursor object number */
30
[f7428b1]31#define BIT2 V_RES2 /* graphics - 2 bit pixels */
32#define BIT3 V_RES3 /* graphics - 4 bit pixels */
[09d1345]33#define CHR2 0u /* characters - no attributes */
[f40a309]34#define CHR3 (V_FAD | V_HCR) /* characters - full attributes */
35
36#define OBFL_00 (BIT3 | V_TDE) /* cursor - arrow */
37
[f7428b1]38#define LIBRFL V_RES3 /* librarian display object flags */
[f40a309]39
40#define TTCURS 2 /* typewriter cursor object */
41#define TTCPRI 14 /* typewriter cursor priority */
42#define TTCCFL (V_RES3 | V_OBL | V_TDE)
43
44#define XYCENTRE 50 /* center of range of cursor pots */
45
46#define SMYRATE 4 /* smooth scroll vertical rate */
47
48#define HCWVAL 30 /* graphics cursor x wait time */
49#define VCWVAL 30 /* graphics cursor y wait time */
50#define THCWVAL 60 /* text cursor h wait time */
51#define TVCWVAL 120 /* text cursor v wait time */
52#define CURHOLD 300 /* cursor motion startup delay */
53
54#define CXMAX XMAX /* cursor x maximum */
55#define CYMAX YMAX /* cursor y maximum */
56
57#define FN_NULL 0L /* null for address entries */
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 */
[f7428b1]104#define MKEYHELD (M_CHNHLD | M_LCLHLD)
105 /* key held */
[f40a309]106
[f7428b1]107#define PITCHMIN 320 /* C0 in 1/2 cents (160 cents) */
108#define PITCHMAX 21920 /* C9 in 1/2 cents (10960 cents) */
[f40a309]109
110#define GTAG1 0x0100
111#define GTAG2 0x0200
112#define GTAG3 0x0400
113#define GTAG4 0x0800
114#define GTAG5 0x1000
115#define GTAG6 0x2000
116#define GTAG7 0x4000
117#define GTAG8 0x8000
118
119#define CTAG1 0x0100
120#define CTAG2 0x0200
121#define CTAG3 0x0400
122#define CTAG4 0x0800
123#define CTAG5 0x1000
124#define CTAG6 0x2000
125#define CTAG7 0x4000
126#define CTAG8 0x8000
Note: See TracBrowser for help on using the repository browser.