1 The following file describes the procedure for adding modules to MIDI
2 Please READ the main documentation files for the driver first!!!
5 Example: We have a sound card with a MIDI chip & port on it
6 and, we call it the 'MYBLASTER' card:
8 **************************************************************************
10 0: Run 'configure'. Select the MIDI on CHIP support option.
12 1: Write a midi driver module; 'blast_midi.c'
13 (with functions for open,close,read,write,attach.)
15 1a: Write all functions except the 'attach' the way you want.
17 For the 'attach' function, look at a model in the 'pro_midi.c'
18 file. Just dup it in the same fashion. For the 'generic_midi_operations'
19 structure which is required, see file 'dev_table.h'.
21 2: We called the 'attach' function: 'blast_attach'.
23 Go to the file 'dev_table.h' and add your driver name and the function
24 pointer ( which is 'blast_attach' ) to the 'midi_supported' table.
26 3: You are almost set. Go and make a reference
27 to an 'exclude constant'; say EXLCUDE_BLAST_MIDI in your module
28 (refer to the 'pro_midi.c' file for model). Also make sure to
29 add the constant to the file 'sound_config.h' (for example, look
30 where the constant EXCLUDE_PRO_MIDI is in the file.)
34 #define ALL_EXTERNAL_TO_ME
36 as the 1st line of your 'blast_midi.c' file. This happily, makes
37 you ignorant of everything else specific to the driver! :).
39 4a: And of course, don't forget to make a device :). Note that your
40 minor number should be = ( 15 + position of your driver in the
41 'midi_supported' table in the 'dev_table.h' file ).
43 Eg: Your driver is the second one in the table. viz midi_supported[1].
44 Your device minor number should be ( 15 + 1 = 16 ). Then, make the
45 reference to your device as, say CMIDI_DEV_BLAST in the file
46 'sound_config.h'. Also add this in 'soundcard.c' for the open, read,
47 write and close routines. See files for example using CMIDI_DEV_PRO
48 (which is the ProAudioSpectrum on chip MIDI).
50 5: You are all set. If ever you have problems, follow the same model
51 as the file 'pro_midi.c', except for substituting your own functions!