★ FAQ ★ SBL programming relatedBefore execution, it is necessary to perform SMPC system information acquisition processing (issue the into-back type PER_KD_SYS with the PER_LInit function). The PER_Init function is disabled.
After getting this information, you need to set the sound driver to stereo / monaural. The setting uses the SND_SET_SND_CTRL macro. (It is described in SEGALIB \ MAN \ MANSND.DOC in the sound I / F library)
For details, see
Currently, I am trying to switch songs by placing multiple sequence data and tone bank data in the sound memory.
The sequence data is switched by specifying the argument of SND_StartSeq, and the tone bank is switched by SND_ChgMix, but in reality, only the sequence is switched and the tone bank does not change.
How do you switch tone banks?
I think the eight MIDI commands are functions that can be controlled directly, but I don't know the details about the setting values of each parameter.
I also looked at the sound driver documentation, but couldn't find the content of the MIDI command itself. (Already converted to bank)
It won't ring.
The data to be sent to the 68000 uses MIDI data transformed for Sega Saturn. The format is as follows:
| bit | 7 | 6 | Five | Four | 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 |
| Four | (C0-CFh) Program Change |
| Five | (D0-DFh) Channel Pressure |
| 6 | (E0-EFh) Pitch Wheel |
| 7 | (F0-FFh) System Message |
First of all, the basic processing required before starting the performance, such as sound initialization, map change, effect change, mixer change, etc., is completed by a normal request. Please refer to the Programmer's Guide for these things.
Now, let's play the 0th and 0th sound effects on the pronunciation control number 1 and MIDI channel 0. Set Note on as the 1st byte for "Table 1". Note on means the start of pronunciation, so you can select 1 as the CMD value from "Table 3". Since no priority is used, the 1st byte is 0x01.
Similarly, the 2nd byte is 0x20 because the pronunciation control number = 1 and MIDI channel = 0.
The 3rd byte sets the note number. Note number is data that represents scale data in 7 bits. For details, refer to the MIDI technical book. Let's set it to 0x40 here.
The 4th byte is velocity. Velocity is 7-bit data that represents the strength.
| MIDI PAN | 0 | 1 | 2 | 3 | Four | Five | 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 | Ten | Ten | Ten | Ten |
| 40h-4Fh | 00 | 00 | 00 | 00 | 01 01 | 01 01 | 01 01 | 01 01 | 02 02 | 02 02 | 02 02 | 02 02 | 03 03 | 03 03 | 03 03 | 03 03 |
| 50h-5Fh | 04 | 04 | 04 | 04 | 05 05 | 05 05 | 05 05 | 05 05 | 06 06 | 06 06 | 06 06 | 06 06 | 07 07 | 07 07 | 07 07 | 07 07 |
| 60h-6Fh | 08 08 | 08 08 | 08 08 | 08 08 | 09 09 | 09 09 | 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 |
★ FAQ ★ SBL programming related