Please consider a donation to the Higher Intellect project. See https://preterhuman.net/donate.php or the Donate to Higher Intellect page for more info. |
GenericMusicComponent.r
Jump to navigation
Jump to search
/* File: GenericMusicComponent.r Contains: xxx put contents here xxx Written by: xxx put writers here xxx Copyright: © 1994-1996 by Apple Computer, Inc., all rights reserved. Change History (most recent first): <21> 4/8/96 dvb Bigger knobs <20> 11/20/95 dvb Use new InstrumentList api, and new instrument numbering scheme. <19> 8/30/95 dvb settings list tagged with numbers, for category <18> 8/9/95 dvb removed some synth flags <17> 8/9/95 dvb Remove some rather useless knob flags. <16> 7/3/95 JB rippling music name changes <15> 6/27/95 dvb knobID field in knobdescription <14> 28-4-95 dvb about box info <13> 10-2-95 dvb type in an enum <12+> incorrect enum type <12> 5-1-95 dvb settings list <11> 12/19/94 JLN More knob type numbers <10> 7-12-94 dvb UM, uh, he gave it more synth flags <9> 11/30/94 JB Component defs are now in types.r <8> 24-10-94 dvb new synth and knob flags <7+> new synth flag <7> 30-9-94 dvb more resources <6+> ROM Instruments can be here <6> 21-9-94 dvb GM Translation table <5> 19-9-94 dvb Added flag for nubus synth <4> 27-7-94 dvb ersatzmidi flag <3> 5/24/94 dvb some constants <2> 5/23/94 dvb Everything */ #define UseExtendedThingResource 1 #include "types.r" /* #include "ImageCodec.r" */ type 'Shrt' /* Number list, list of ints with count */ { integer = $$CountOf(dataArray); array dataArray { integer; }; }; type 'ROMi' /* list of ROM instruments */ { longint = $$CountOf(instArray); array instArray { longint = $$CountOf(knobArray); array knobArray { longint; }; }; }; type 'Long' /* Category list, list of ints with count */ { longint = $$CountOf(dataArray); array dataArray { longint; }; }; type 'Knob' /* KnobDescription list */ { longint = $$CountOf(dataArray); array dataArray { pstring[63]; /* knob name */ longint; /* lowest value, user value */ longint; /* highest value, user value */ longint; /* default value */ longint; /* flags */ longint; /* knobID */ longint offset; /* lowest param value */ longint scale; /* Fixed. HWRange = scale * userRange + offset */ longint hardwareAddress1; /* used by particular driver */ longint hardwareAddress2; }; }; type 'NmLs' /* Name list */ { integer = $$CountOf(dataArray); array dataArray { pstring; /* knob name */ integer hw; /* -1 to start category or user value, usage depends on driver and hardware (often a bank/midi number) */ }; }; type 'zLst' /* Instrument list */ { integer = $$CountOf(dataArray); array dataArray { pstring; /* knob name */ longint hw; /* 0 to start category or 0x8000+ instrument number, usage depends on driver and hardware (often a bank/midi number) */ longint flags; /* 1 for a drum kit or drum kit category */ }; }; #define kInstListFlagDrumKit 1 type 'KSLs' /* Settings list (just like name list) */ { integer = $$CountOf(dataArray); array dataArray { pstring; /* knob name */ integer cat; /* -1 if beginning a category */ }; }; #define kSynthesizerDynamicVoice 1 /* can allocate voice dynamically (polyphony less important per part */ #define kSynthesizerUsesMIDIPort 2 /* must be patched through MIDI Manager */ #define kSynthesizerMicrotone 4 /* can play microtonal scales */ //#define kSynthesizerLimitedMicrotone 8 /* can play microtones, but only on 1-voice parts */ #define kSynthesizerMixedDrums 16 /* any part can play drum parts, total = instrument parts */ #define kSynthesizerSoftware 32 /* implemented in main CPU software == uses cpu cycles */ #define kSynthesizerHardware 64 /* hardware, such as nubus device */ #define kSynthesizerDynamicChannel 128 /* can reassign channels and turn parts on/off */ #define kSynthesizerHogsSystemChannel 256 /* can be channelwise dynamic, but must keep its system channel */ //#define kSynthesizerEditsMainChannel 512 /* can only twiddle knobs on the main system channel */ //#define kSynthesizerSlowSetPart 1024 /* SetPart() and SetPartInstrumentNumber() calls do not have rapid response, may glitch notes */ //#define kSynthesizerNeedsSystemChannel 2048 /* The user need not be queried for system channel, example: GM synth */ //#define kSynthesizerCanBeMono 4096 /* Synthesizer can be configured either mono or poly */ #define kSynthesizerGMSuperset 8192 #define kSynthesizerGM 16384 /* synth is a GM device */ #define resFirst 0 #define resMiscStringList resFirst+1 /* 1 - synth type, 2 - synth name */ #define resMiscLongList resMiscStringList+1 #define resInstrumentList resMiscLongList+1 #define resDrumList resInstrumentList+1 #define resInstrumentKnobDescriptionList resDrumList+1 #define resDrumKnobDescriptionList resInstrumentKnobDescriptionList+1 #define resKnobDescriptionList resDrumKnobDescriptionList+1 #define resBitsLongList resKnobDescriptionList+1 /* longword size, 4 each of controllers, gmInstrument, gmDrumkits */ #define resModifiableInstrumentHW resBitsLongList+1 /* Shrt same as the hw shorts trailing the instrument names, a shortlist */ #define resGMTranslation resModifiableInstrumentHW+1 /* list of 128 long entries, 1 for each gm inst, of local instrument numbers 1-n (not hw numbers) */ #define resROMInstrumentData resGMTranslation+1 /* knob lists for ROM instruments, so the knob values may be known */ #define resAboutPICT resROMInstrumentData+1 /* Derived from MusicComponent.i */ #define kKnobRealtime 1 #define kKnobNextNote 2 #define kKnobAction 4 #define kKnobNotInstrument 8 #define kKnobInterruptUnsafe 32 #define kKnobGroupStart 128 #define kKnobTypeNumber 0x0000 #define kKnobTypeGroupName 0x1000 #define kKnobTypeBoolean 0x2000 #define kKnobTypeNote 0x3000 #define kKnobTypePan 0x4000 #define kKnobTypeInstrument 0x5000 #define kKnobTypeSetting 0x6000 #define kKnobTypeMilliseconds 0x7000 #define kKnobTypePercentage 0x8000