Before execution, it is necessary to perform SMPC system information acquisition processing (issue the insertback type PER_KD_SYS using the PER_LInit function). Use of the PER_Init function is prohibited.
After obtaining this information, you need to configure your sound driver for stereo/mono. For settings, use the SND_SET_SND_CTRL macro. (Described in SEGALIB\MAN\MANSND.DOC of the sound I/F library)
For more details, please refer to
We are currently trying to place multiple sequence data and tone bank data in sound memory and switch songs.
Switching of sequence data is done by specifying the argument of SND_StartSeq, and switching of tone banks is done by SND_ChgMix, but in reality only the sequence is switched, and the tone bank does not change.
How do I switch tone banks?
I think the eight MIDI commands are functions that can be directly controlled, but I don't know the details of the settings for each parameter.
I looked at the sound driver documentation, but I couldn't find anything about the MIDI commands themselves. (Also converted to bank)
It will stop ringing.
The data sent to the 68000 uses MIDI data transformed for the Sega Saturn. The format looks like this:
bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|
0 | * Priority | CMD | ||||||
1 | KNo | MIDI Ch | ||||||
2 | MIDI Data #1 | |||||||
3 | MIDI Data #2 |
Priority level | 0-31 | Pronunciation priority at Sequence Start |
---|---|---|
CMD | 0-7 | MIDI command |
Kno | 0-7 | Pronunciation control number |
MIDI Ch | 0-31 | MIDI channel |
MIDI data #1 | 0-127 | MIDI data byte #1 |
MIDI data #2 | 0-127 | MIDI data byte #2 |
CMD value | Corresponding MIDI Event |
---|---|
0 | (80-8Fh) Note Off Event |
1 | (90-9Fh) Note On Event |
2 | (A0-AFh) After Touch |
3 | (B0-BFh) Control Change |
4 | (C0-CFh) Program Change |
5 | (D0-DFh) Channel Pressure |
6 | (E0-EFh) Pitch Wheel |
7 | (F0-FFh) System Message |
First, the basic processing required before starting play, such as sound initialization, map changes, effect changes, and mixer changes, is completed using normal requests. Please refer to the programmer's guide for these matters.
Now, let's play the 0th sound effect of bank 0 with pronunciation control number 1 and MIDI channel 0. Set Note on as the 1st byte for "Table 1". Note on means the beginning of pronunciation, so you can select 1 as the value of CMD from Table 3. Since priority is not used, the 1st byte will be 0x01.
Similarly, the 2nd byte is 0x20 because the pronunciation control number = 1 and the MIDI channel = 0.
The 3rd byte sets the note number. A note number is data that represents musical scale data in 7 bits. For more information, please refer to a MIDI textbook. Here we will set it to 0x40.
The 4th byte is velocity. Velocity is 7-bit data that represents strength.
MIDI PAN | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
00h - 0Fh | 1F | 1F | 1F | 1F | 1E | 1E | 1E | 1E | 1D | 1D | 1D | 1D | 1C | 1C | 1C | 1C |
10h - 1Fh | 1B | 1B | 1B | 1B | 1A | 1A | 1A | 1A | 19 | 19 | 19 | 19 | 18 | 18 | 18 | 18 |
20h - 2Fh | 17 | 17 | 17 | 17 | 16 | 16 | 16 | 16 | 15 | 15 | 15 | 15 | 14 | 14 | 14 | 14 |
30h - 3Fh | 13 | 13 | 13 | 13 | 12 | 12 | 12 | 12 | 11 | 11 | 11 | 11 | 10 | 10 | 10 | 10 |
40h - 4Fh | 00 | 00 | 00 | 00 | 01 | 01 | 01 | 01 | 02 | 02 | 02 | 02 | 03 | 03 | 03 | 03 |
50h - 5Fh | 04 | 04 | 04 | 04 | 05 | 05 | 05 | 05 | 06 | 06 | 06 | 06 | 07 | 07 | 07 | 07 |
60h - 6Fh | 08 | 08 | 08 | 08 | 09 | 09 | 09 | 09 | 0A | 0A | 0A | 0A | 0B | 0B | 0B | 0B |
70h - 7Fh | 0C | 0C | 0C | 0C | 0D | 0D | 0D | 0D | 0E | 0E | 0E | 0E | 0F | 0F | 0F | 0F |
Left Center Right 00h <-----------------> 40h <--------------------> 7Fh
PAN | L(db) | R(db) | Localization | PAN | L(db) | R(db) | Localization | |
---|---|---|---|---|---|---|---|---|
00h | -00.0 | -00.0 | C | 10h | -00.0 | -00.0 | C | |
01h | -03.0 | -00.0 | R1 | 11h | -00.0 | -03.0 | L1 | |
02h | -06.0 | -00.0 | R2 | 12h | -00.0 | -06.0 | L2 | |
03h | -09.0 | -00.0 | R3 | 13h | -00.0 | -09.0 | L3 | |
04h | -12.0 | -00.0 | R4 | 14h | -00.0 | -12.0 | L4 | |
05h | -15.0 | -00.0 | R5 | 15h | -00.0 | -15.0 | L5 | |
06h | -18.0 | -00.0 | R6 | 16h | -00.0 | -18.0 | L6 | |
07h | -21.0 | -00.0 | R7 | 17h | -00.0 | -21.0 | L7 | |
08h | -24.0 | -00.0 | R8 | 18h | -00.0 | -24.0 | L8 | |
09h | -27.0 | -00.0 | R9 | 19h | -00.0 | -27.0 | L9 | |
0Ah | -30.0 | -00.0 | R10 | 1Ah | -00.0 | -30.0 | L10 | |
0Bh | -33.0 | -00.0 | R11 | 1Bh | -00.0 | -33.0 | L11 | |
0Ch | -36.0 | -00.0 | R12 | 1Ch | -00.0 | -36.0 | L12 | |
0Dh | -39.0 | -00.0 | R13 | 1Dh | -00.0 | -39.0 | L13 | |
0Eh | -42.0 | -00.0 | R14 | 1Eh | -00.0 | -42.0 | L14 | |
0Fh | -infinite | -00.0 | R15 | 1Fh | -00.0 | -infinite | L15 |