目次
主な特長
使用前の準備
GIMICをMIDIキーボードや他のMIDI音源と接続する
基本操作
演奏する
音色を作る
アルペジエーター
全体に関する機能を設定する
スタンダードMIDIファイルを再生する
MIDIインプリメンテーション
ファイルフォーマット
トラブルシューティング
変更履歴
gtb(GIMIC Timbre Bank)ファイルフォーマット概要 †
多バイト数値データは全てリトルエンディアン
全体構造 †
Offset | Size(byte) | Field | Description |
0x00 | 8 | sig | ファイル識別用の固定データ"GMCTIMB"+ 0x00 |
0x08 | 4 | chunk_start_pos | 最初のチャンクデータのファイル内位置 |
0x0c | 4 | mb_fw_version | 作成されたマザーボードのファームウェアバージョン |
0x10 | 2 | mb_type_tablerev | マザーボードID定義のバージョン(使用せず) |
0x12 | 2 | soundmodule_tablerev | モジュールID定義のバージョン(使用せず) |
0x14 | 2 | mb_type_id | データが作成されたマザーボード種別(使用せず) |
0x16 | 2 | soundmodule_id | データが作成時のモジュール種別(使用せず) |
0x18 | 8 | mb_serial_no | マザーボードシリアル番号(使用せず) |
chunk_start_pos | 可変 | chunkデータ | チャンクデータ |
typedef struct {
char sig[8]; // "GMCTIMB" gimic timble parameter
uint32_t chunk_start_pos; // チャンクデータのファイル内開始位置
uint8_t mb_fw_version[4]; // MAJOR, MINOR, YEAR, MONTH
uint16_t mb_type_tablerev; // GIMIC_MOTHERBOARD_ID_TABLEREV
uint16_t soundmodule_tablerev; // GIMIC_SOUNDMODULE_TABLEREV
uint16_t mb_type_id; // GIMIC_MOTHERBOARD_ID_MB
uint16_t soundmodule_id; // データ作成時のモジュール
char mb_serial_no[8]; // MBシリアル番号
} PatchFileHeader;
rptcチャンク †
Offset | Size(byte) | Field | Description |
0x00 | 4 | chunk_type | チャンクタイプ"rptc" |
0x04 | 4 | chunk_size | チャンクデータのデータサイズ(byte) =128 |
0x08 | 4 | chunk_crc | チャンクデータのチェックサム(CRC32) |
0x0c | 128 | patch_data | Patchデータブロック |
rbnkチャンク †
Offset | Size(byte) | Field | Description |
0x00 | 4 | chunk_type | チャンクタイプ"rbnk" |
0x04 | 4 | chunk_size | チャンクデータのデータサイズ(byte) =128_N |
0x08 | 4 | chunk_crc | チャンクデータのチェックサム(CRC32) ...FW7.3では使用せず |
0x0c | 128 | patch_data | Patchデータブロック 0 |
0x8c | 128 | patch_data | Patchデータブロック 1 |
... | | | |
0x0c+128_(N-1) | 128 | patch_data | Patchデータブロック N-1 |
typedef struct {
uint32_t chunk_type; ///< データのタイプ
uint32_t chunk_size; ///< データの中身のバイト数
uint32_t chunk_crc; ///< データの中身のCRC32
uint8_t chunk_data[]; ///< データの中身
} PatchFileChunk;
Patchデータブロック(PatchTypeOPM_FM) †
Offset | Size(byte) | Field | Description |
0x00 | 20 | common_param | パッチデータ共通(PatchCommon) |
0x14 | 48 | tone_param | TonedSynthCommon(TonedSynthCommon) |
0x44 | 12 | slot0 | スロット0(OPM_FM_SlotPatch) |
0x50 | 12 | slot1 | スロット1(OPM_FM_SlotPatch) |
0x5c | 12 | slot2 | スロット2(OPM_FM_SlotPatch) |
0x68 | 12 | slot3 | スロット3(OPM_FM_SlotPatch) |
0x74 | 1 | fl_con | 未使用(2bit), フィードバックレベル(3bit), アルゴリズム(3bit) |
0x75 | 1 | slotMask | 未使用(4bit), スロットマスク op.4,2,3,1 (4bit) |
0x76 | 1 | ne_nfrq | ne=1ならvoice7強制でノイズ有効(1bit), 未使用(2bit), ノイズ周波数(5bit) |
0x77 | 1 | fastrelease0 | 非0ならキーオン前にリリースレートを最速にして強制消音 |
0x78 | 1 | fastrelease1 | 非0ならキーオン前にリリースレートを最速にして強制消音 |
0x79 | 1 | fastrelease2 | 非0ならキーオン前にリリースレートを最速にして強制消音 |
0x7a | 1 | fastrelease3 | 非0ならキーオン前にリリースレートを最速にして強制消音 |
0x7b | 5 | reserved | 未使用 |
OPM_FM_SlotPatch †
Offset | Size(byte) | Field | Description |
0x00 | 7 | common | スロット共通データ(SlotPatchCommon) |
0x07 | 1 | dt1_mul | 未使用(1bit), DT1(3bit), MUL(4bit) |
0x08 | 1 | ks_ar | KS(2bit), 未使用(1bit), AR(5bit) |
0x09 | 1 | ame_d1r | AME(1bit), 未使用(2bit), D1R(5bit) |
0x0a | 1 | dt2_d2r | DT2(2bit), 未使用(1bit), D2R(5bit) |
0x0b | 1 | d1l_rr | D1L(4bit), RR(4bit) |
typedef struct OPM_FM_SlotPatch {
SlotPatchCommon common;
uint8_t dt1_mul;
uint8_t ks_ar;
uint8_t ame_d1r;
uint8_t dt2_d2r;
uint8_t d1l_rr;
} OPM_FM_SlotPatch;
typedef struct OPM_FM_Patch {
PatchCommon common_param;
TonedSynthCommon tone_param;
OPM_FM_SlotPatch slot[4];
uint8_t fl_con;
uint8_t slot_mask;
uint8_t ne_nfrq; ///< ne=trueの時はvoice7で発音する
uint8_t fastrelease[4];
uint8_t reserved[5];
} OPM_FM_Patch;
Patchデータブロック(PatchTypeOPN_FM) †
Offset | Size(byte) | Field | Description |
0x00 | 20 | common_param | パッチデータ共通(PatchCommon) |
0x14 | 48 | tone_param | TonedSynthCommon(TonedSynthCommon) |
0x44 | 12 | slot0 | スロット0(OPN_FM_SlotPatch) |
0x50 | 12 | slot1 | スロット1(OPN_FM_SlotPatch) |
0x5c | 12 | slot2 | スロット2(OPN_FM_SlotPatch) |
0x68 | 12 | slot3 | スロット3(OPN_FM_SlotPatch) |
0x74 | 1 | fb_con | 未使用(2bit), フィードバックレベル(3bit), アルゴリズム(3bit) |
0x75 | 1 | fr_slotmask | 非0ならキーオン前にリリースレートを最速にして強制消音 op.4,3,2,1(4bit), スロットマスク op.4,3,2,1(4bit) |
0x76 | 2 | ch3_slot_lfo_env_en | Pitch LFO on op.4,3,2,1(4bit), Pitch EG on op4.3.2.1(4bit) |
0x78 | 2 | ch3_fix_coarse_fine0 | op1 Freq Fix(1bit), Coarse Tune(8bit), Fine Tune(6bit) |
0x7a | 2 | ch3_fix_coarse_fine1 | op2 Freq Fix(1bit), Coarse Tune(8bit), Fine Tune(6bit) |
0x7c | 2 | ch3_fix_coarse_fine2 | op3 Freq Fix(1bit), Coarse Tune(8bit), Fine Tune(6bit) |
0x7e | 2 | ch3_fix_coarse_fine3 | op4 Freq Fix(1bit), Coarse Tune(8bit), Fine Tune(6bit) |
OPN_FM_SlotPatch †
Offset | Size(byte) | Field | Description |
0x00 | 7 | common | スロット共通データ(SlotPatchCommon) |
0x07 | 1 | dt_mul | 未使用(1bit), DT(3bit), MUL(4bit) |
0x08 | 1 | ks_ar | KS(2bit), 未使用(1bit), AR(5bit) |
0x09 | 1 | ame_ssgege_dr | AMON(1bit), SSG-EG_Enable(1bit), 未使用(1bit), DR(5bit) |
0x0a | 1 | ssgegn_sr | SSG-EG Wave(3bit), SR(5bit) |
0x0b | 1 | sl_rr | SL(4bit), RR(4bit) |
typedef struct OPN_FM_SlotPatch {
SlotPatchCommon common;
uint8_t dt_mul;
uint8_t ks_ar;
uint8_t ame_ssgege_dr;
uint8_t ssgegn_sr;
uint8_t sl_rr;
} OPN_FM_SlotPatch;
typedef struct OPN_FM_Patch {
PatchCommon common_param;
TonedSynthCommon tone_param;
OPN_FM_SlotPatch slot[4];
uint8_t fb_con;
uint8_t fr_slot_mask;
// ch3専用パラメータ
uint16_t ch3_slot_lfo_env_en;
uint16_t ch3_fix_coarse_fine[4];
} OPN_FM_Patch;
Patchデータブロック(PatchTypeSSG_PSG) †
Offset | Size(byte) | Field | Description |
0x00 | 20 | common_param | パッチデータ共通(PatchCommon) |
0x14 | 48 | tone_param | TonedSynthCommon(TonedSynthCommon) |
0x44 | 7 | slot | スロット情報(SlotPatchCommon) |
0x4b | 2 | dummy | 未使用 |
0x4d | 1 | hwenv_wave | 未使用(5bit), エンベロープ選択(3bit) |
0x4e | 2 | reserved | 未使用 |
0x50 | 8 | param_tone | SsgParam(Tone) |
0x58 | 8 | param_noise | SsgParam(Noise) |
0x60 | 8 | param_env | SsgParam(Env) |
0x68 | 24 | reserved2 | 未使用 |
PatchTypeSSG_PSG †
Offset | Size(byte) | Field | Description |
0x00 | 1 | enable | 0以外だとOn |
0x01 | 1 | coarse_tune | 周波数比またはノートナンバー Noiseでは不使用 |
0x02 | 1 | fine_tune | |
0x03 | 1 | fix_freq | 0以外だと固定の周波数を書き込む |
0x04 | 1 | start_time | 1以上だとキーオン前に指定時間(ms)待つ |
0x05 | 1 | gate_time | 0以外だとキーオン後に指定時間(ms)で自動的にキーオフする |
0x06 | 1 | invert_freq | 周波数を反転させる |
0x07 | 1 | enable_pitchmod | 未使用(5bit), SWEnvのピッチへの入力有効(1bit), SWLFOのピッチへの入力有効(1bit) |
typedef struct SsgParam {
uint8_t enable; ///< 0以外だとOn
uint8_t coarse_tune; ///< 周波数比またはノートナンバー Noiseでは不使用
uint8_t fine_tune; ///<
uint8_t fix_freq; ///< 0以外だと固定の周波数を書き込む
uint8_t start_time; ///< 1以上だとキーオン前に指定時間(ms)待つ
uint8_t gate_time; ///< 0以外だとキーオン後に指定時間(ms)で自動的にキーオフする
uint8_t invert_freq; ///< 周波数を反転させる
uint8_t enable_pitchmod; ///< LSBがSWLFO,次のビットがSWEnvのピッチへの入力有効
} SsgParam;
typedef struct SSG_PSG_Patch {
PatchCommon common_param;
TonedSynthCommon tone_param;
SlotPatchCommon slot;
uint8_t dummy;
uint8_t hwenv_wave;
uint8_t reserved[2];
SsgParam param[3]; // 0:Tone, 1:Noise, 2:Env
uint8_t reserved2[24];
} SSG_PSG_Patch;
Patchデータブロック(PatchTypeOPN_RHYTHM) †
Offset | Size(byte) | Field | Description |
0x00 | 20 | common_param | パッチデータ共通(PatchCommon) |
0x14 | 48 | tone_param | TonedSynthCommon(TonedSynthCommon) |
0x44 | 7 | slot | スロット情報(SlotPatchCommon) |
0x4b | 1 | dummy | 未使用 |
0x4c | 8 | voice0 | OPN_RHYTHM_VoiceInfo |
0x54 | 8 | voice1 | OPN_RHYTHM_VoiceInfo |
0x5c | 8 | voice2 | OPN_RHYTHM_VoiceInfo |
0x64 | 8 | voice3 | OPN_RHYTHM_VoiceInfo |
0x6c | 8 | voice4 | OPN_RHYTHM_VoiceInfo |
0x64 | 8 | voice5 | OPN_RHYTHM_VoiceInfo |
0x7c | 4 | reserved | 未使用 |
OPN_RHYTHM_VoiceInfo †
Offset | Size(byte) | Field | Description |
0x00 | 1 | vol | 音量 |
0x01 | 1 | pan | パン |
0x02 | 1 | oneshot | on時にノートオフでキーオフしない |
0x03 | 1 | attackTime | アタック時間 |
0x04 | 1 | attackSlope | アタック時の音量カーブ |
0x05 | 1 | decayRate | 減衰量 |
0x06 | 1 | decaySlope | 減衰時の音量カーブ |
0x07 | 1 | reserved | 未使用 |
typedef struct OPN_RHYTHM_VoiceInfo {
int8_t vol;
int8_t pan;
uint8_t oneshot;
uint8_t attackTime;
int8_t attackSlope;
uint8_t decayRate;
int8_t decaySlope;
uint8_t reserved;
} OPN_RHYTHM_VoiceInfo;
typedef struct OPN_RHYTHM_Patch {
PatchCommon common_param;
TonedSynthCommon tone_param;
SlotPatchCommon slot;
uint8_t dummy;
OPN_RHYTHM_VoiceInfo voice[6];
uint8_t reserved[4];
} OPN_RHYTHM_Patch;
Patchデータブロック(PatchTypeOPNA_ADPCM) †
Offset | Size(byte) | Field | Description |
0x00 | 20 | common_param | パッチデータ共通(PatchCommon) |
0x14 | 48 | tone_param | TonedSynthCommon(TonedSynthCommon) |
0x44 | 7 | slot | スロット情報(SlotPatchCommon) |
0x4b | 1 | dummy | 未使用 |
0x4c | 8 | samples0 | OPNA_ADPCM_SampleInfo |
0x54 | 8 | samples1 | OPNA_ADPCM_SampleInfo |
0x5c | 8 | samples2 | OPNA_ADPCM_SampleInfo |
0x64 | 8 | samples3 | OPNA_ADPCM_SampleInfo |
0x6c | 8 | samples4 | OPNA_ADPCM_SampleInfo |
0x64 | 8 | samples5 | OPNA_ADPCM_SampleInfo |
0x7c | 4 | reserved | 未使用 |
OPNA_ADPCM_SampleInfo †
Offset | Size(byte) | Field | Description |
0x00 | 1 | loop_sampleNo | ループ有効(1bit), サンプル番号(7bit) |
0x01 | 1 | oneshot_baseKey | ノートオフ時に消音しない(1bit), 基準ノート番号(7bit) |
0x02 | 1 | lowestKey | 発音範囲(最下キー番号) |
0x03 | 1 | highestKey | 発音範囲(最高キー番号) |
0x04 | 2 | fsample | サンプリングレート |
0x06 | 1 | vol | 音量 |
0x07 | 1 | pan | パン |
typedef struct OPNA_ADPCM_SampleInfo {
uint8_t loop_sampleNo;
uint8_t oneshot_baseKey;
uint8_t lowestKey;
uint8_t highestKey;
uint16_t fsample;
int8_t vol;
int8_t pan;
} OPNA_ADPCM_SampleInfo;
typedef struct OPNA_ADPCM_Patch {
PatchCommon common_param;
TonedSynthCommon tone_param;
SlotPatchCommon slot;
uint8_t reserved;
OPNA_ADPCM_SampleInfo samples[6];
uint8_t reserved2[4];
} OPNA_ADPCM_Patch;
Patchデータブロック(PatchTypeOPL3_FM) †
Offset | Size(byte) | Field | Description |
0x00 | 20 | common_param | パッチデータ共通(PatchCommon) |
0x14 | 48 | tone_param | TonedSynthCommon(TonedSynthCommon) |
0x44 | 12 | slot0 | スロット0(OPL3_FM_SlotPatch) |
0x50 | 12 | slot1 | スロット1(OPL3_FM_SlotPatch) |
0x5c | 12 | slot2 | スロット2(OPL3_FM_SlotPatch) |
0x68 | 12 | slot3 | スロット3(OPL3_FM_SlotPatch) |
0x74 | 1 | fb_cnt1 | 未使用(4bit), フィードバックレベル(3bit), アルゴリズム上位ビット(1bit) |
0x75 | 1 | fb_cnt2 | 未使用(4bit), 4opモード用アルゴリズム下位ビット(1bit) |
0x76 | 1 | fastrelease0 | op1 非0ならキーオン前にリリースレートを最速にして強制消音 |
0x77 | 1 | fastrelease1 | op2 非0ならキーオン前にリリースレートを最速にして強制消音 |
0x78 | 1 | fastrelease2 | op3 非0ならキーオン前にリリースレートを最速にして強制消音 |
0x79 | 1 | fastrelease3 | op4 非0ならキーオン前にリリースレートを最速にして強制消音 |
0x7a | 6 | reserved | 未使用 |
OPL3_FM_SlotPatch †
Offset | Size(byte) | Field | Description |
0x00 | 7 | common | SlotPatchCommon |
0x07 | 1 | a_v_e_k_mul | AM(1bit), VIB(1bit), EGT(1bit), KSR(1bit), MUL(4bit) |
0x08 | 1 | ksl_ws | KSL(2bit), 未使用(3bit), WS(3bit) |
0x09 | 1 | ar_dr | AR(4bit), DR(4bit) |
0x0a | 1 | sr | キーオン直後のRR値(EGT=0時のみ有効)キーオフ時にRRに設定(4bit), 上位4bitは未使用 |
0x0b | 1 | sl_rr | SL(4bit), RR(4bit) |
typedef struct OPL3_FM_SlotPatch {
SlotPatchCommon common;
uint8_t a_v_e_k_mul;
uint8_t ksl_ws;
uint8_t ar_dr;
uint8_t sr;
uint8_t sl_rr;
} OPL3_FM_SlotPatch;
typedef struct OPL3_FM_Patch {
PatchCommon common_param; ///< 2op,4opはcommon_param.patch_type で区別する
TonedSynthCommon tone_param;
OPL3_FM_SlotPatch slot[4];
uint8_t fb_cnt1;
uint8_t fb_cnt2;
uint8_t fastrelease[4];
uint8_t reserved[6];
} OPL3_FM_Patch;
Patchデータブロック(PatchTypeOPL3_RHYTHM) †
Offset | Size(byte) | Field | Description |
0x00 | 20 | common_param | パッチデータ共通(PatchCommon) |
0x14 | 1 | bd_mul1 | BD(キャリア)の周波数倍率(4bit) |
0x15 | 1 | bd_mul2 | BD(モジュレータ)の周波数倍率(4bit) |
0x16 | 1 | bd_m_level | BD(モジュレータ)の出力レベル(6bit) |
0x17 | 1 | bd_m_ar_dr | BD(モジュレータ)のAR(4bit), BD(モジュレータ)のDR(4bit) |
0x18 | 1 | bd_m_ws | BD(モジュレータ)のWS(3bit) |
0x19 | 1 | bd_pan_fb_cnt | 未使用(2bit), BDのパン(2bit,0=x,1=L,2=R,3=C), Feedback(3bit), 並列/直列(1bit) |
0x1a | 1 | sd_pan_fb_cnt | 未使用(2bit), SDのパン(2bit,0=x,1=L,2=R,3=C), Feedback(3bit), 並列/直列(1bit) |
0x1b | 1 | tom_pan_fb_cnt | 未使用(2bit), TOMのパン(2bit,0=x,1=L,2=R,3=C), Feedback(3bit), 並列/直列(1bit) |
0x1c | 8 | bd | OPL3_RHYTHM_RYTParam |
0x24 | 8 | sd | OPL3_RHYTHM_RYTParam |
0x2c | 8 | hh | OPL3_RHYTHM_RYTParam |
0x34 | 8 | tc | OPL3_RHYTHM_RYTParam |
0x3c | 8 | tom | OPL3_RHYTHM_RYTParam |
0x44 | 60 | reserved | 未使用 |
OPL3_RHYTHM_RYTParam †
Offset | Size(byte) | Field | Description |
0x00 | 1 | velo_sens | ベロシティ感度 |
0x01 | 1 | level | 音量レベル |
0x02 | 1 | tune | 音程 |
0x03 | 1 | bend_dr | ピッチ減衰率 |
0x04 | 1 | bend_depth | ピッチ変化強度 |
0x05 | 1 | bend_slope | ピッチ変化カーブ |
0x06 | 1 | ar_dr | AR(4bit), DR(4bit) |
0x07 | 1 | ws | 波形選択(3bit) |
typedef struct OPL3_RHYTHM_RYTParam {
uint8_t velo_sens;
uint8_t level;
int8_t tune;
uint8_t bend_dr;
int8_t bend_depth;
int8_t bend_slope;
uint8_t ar_dr;
uint8_t ws;
} OPL3_RHYTHM_RYTParam;
typedef struct OPL3_RHYTHM_Patch {
PatchCommon common_param;
int8_t bd_mul[2];
uint8_t bd_m_level;
uint8_t bd_m_ar_dr;
uint8_t bd_m_ws;
uint8_t bd_pan_fb_cnt;
uint8_t sd_pan_fb_cnt;
uint8_t tom_pan_fb_cnt;
OPL3_RHYTHM_RYTParam bd;
OPL3_RHYTHM_RYTParam sd;
OPL3_RHYTHM_RYTParam hh;
OPL3_RHYTHM_RYTParam tc;
OPL3_RHYTHM_RYTParam tom;
uint8_t reserved[60];
} OPL3_RHYTHM_Patch;
Patchデータブロック(PatchTypeSPC_PCM) †
Offset | Size(byte) | Field | Description |
0x00 | 20 | common_param | パッチデータ共通(PatchCommon) |
0x14 | 48 | tone_param | TonedSynthCommon(TonedSynthCommon) |
0x44 | 7 | slot | スロット情報(SlotPatchCommon) |
0x4b | 1 | srcn | モード(1bit,0:sample,1:wavetable), 波形番号(7bit) |
0x4c | 4 | rate | サンプリングレート |
0x50 | 1 | fixedKey_basekey | 固定ピッチ(1bit), 基準キー番号(7bit) |
0x51 | 1 | dr_ar | 未使用(1bit), DecayRate(3bit), AttackRate(4bit) |
0x52 | 1 | sl_sr1 | SustainLevel(3bit), キーオン時のSustainRate(5bit) |
0x53 | 1 | echo_pmOn_noiseOn_sr2 | Echo(1bit), PitchModulation(1bit), Noise(1bit), キーオフ後のSustainRate(5bit) |
0x54 | 1 | pwmFilter_pwmOctave_pwmWave2_pwmWave1 | Wavetable用Filter(2bit), Wavetable用Octave(2bit), Wavetable用波形選択1(2bit), Wavetable用波形選択(2bit) |
0x55 | 1 | polarity_pwmBlend | R位相反転(1bit), L位相反転(1bit), Wavetable用Blend(6bit) |
0x56 | 1 | pwmBlend_lfo1_sens | LFO1->Blendのモジュレーション感度 |
0x57 | 1 | pwmBlend_lfo2_sens | LFO2->Blendのモジュレーション感度 |
0x58 | 1 | pwmBlend_env1_sens | Envelope1->Blendのモジュレーション感度 |
0x59 | 1 | pwmBlend_env2_sens | Envelope2->Blendのモジュレーション感度 |
0x5a | 1 | pwmFilter_lfo1_sens | LFO1->Filterのモジュレーション感度 |
0x5b | 1 | pwmFilter_lfo2_sens | LFO2->Filterのモジュレーション感度 |
0x5c | 1 | pwmFilter_env1_sens | Envelope1->Filterのモジュレーション感度 |
0x5d | 1 | pwmFilter_env2_sens | Envelope2->Filterのモジュレーション感度 |
0x5e | 1 | pwmBlend_ksl_sens | KeyScaling->Blendのモジュレーション感度 |
0x5f | 1 | pwmFilter_ksl_sens | KeyScaling->Filterのモジュレーション感度 |
0x60 | 32 | userWave | ユーザー波形テーブル(4bit*64) |
typedef struct SPC_PCM_Patch {
PatchCommon common_param;
TonedSynthCommon tone_param;
SlotPatchCommon slot;
uint8_t srcn;
uint32_t rate;
uint8_t fixedKey_basekey; // 1.7
uint8_t dr_ar;
uint8_t sl_sr1;
uint8_t echo_pmOn_noiseOn_sr2; // 1.1.1.5
uint8_t pwmFilter_pwmOctave_pwmWave2_pwmWave1; // 2.2.2.2
uint8_t polarity_pwmBlend; // 2.6
int8_t pwmBlend_lfo_sens[SWLFO_NUM];
int8_t pwmBlend_env_sens[SWENV_NUM];
int8_t pwmFilter_lfo_sens[SWLFO_NUM];
int8_t pwmFilter_env_sens[SWENV_NUM];
int8_t pwmBlend_ksl_sens;
int8_t pwmFilter_ksl_sens;
uint8_t userWave[32];
} SPC_PCM_Patch;
Patchデータブロック(PatchTypeOPLL_FM) †
Offset | Size(byte) | Field | Description |
0x00 | 20 | common_param | パッチデータ共通(PatchCommon) |
0x14 | 48 | tone_param | TonedSynthCommon(TonedSynthCommon) |
0x44 | 12 | slot0 | スロット0(OPLL_FM_SlotPatch) |
0x50 | 12 | slot1 | スロット1(OPLL_FM_SlotPatch) |
0x5c | 12 | slot2 | 未使用 |
0x68 | 12 | slot3 | 未使用 |
0x74 | 1 | fb | フィードバックレベル(3bit) |
0x75 | 1 | instNo | 音色番号(4bit) |
0x76 | 10 | reserved | 未使用 |
OPLL_FM_SlotPatch †
Offset | Size(byte) | Field | Description |
0x00 | 7 | common | SlotPatchCommon |
0x07 | 1 | a_v_e_k_mul | AM(1bit), VIB(1bit), EGT(1bit), KSR(1bit), MUL(4bit) |
0x08 | 1 | ksl_ws | KSL(2bit), 未使用(3bit), WS(3bit) |
0x09 | 1 | ar_dr | AR(4bit), DR(4bit) |
0x0a | 1 | unused | 未使用 |
0x0b | 1 | sl_rr | SL(4bit), RR(4bit) |
typedef struct OPLL_FM_SlotPatch {
SlotPatchCommon common;
uint8_t a_v_e_k_mul;
uint8_t ksl_ws;
uint8_t ar_dr;
uint8_t unused;
uint8_t sl_rr;
} OPLL_FM_SlotPatch;
typedef struct OPLL_FM_Patch {
PatchCommon common_param;
TonedSynthCommon tone_param;
OPLL_FM_SlotPatch slot[4];
uint8_t fb;
uint8_t inst_no;
uint8_t reserved[10];
} OPLL_FM_Patch;
Patchデータブロック(PatchTypeOPLL_RHYTHM) †
Offset | Size(byte) | Field | Description |
0x00 | 20 | common_param | パッチデータ共通(PatchCommon) |
0x14 | 1 | bd_mul1 | 未使用 |
0x15 | 1 | bd_mul2 | 未使用 |
0x16 | 1 | bd_m_level | 未使用 |
0x17 | 1 | bd_m_ar_dr | 未使用 |
0x18 | 1 | bd_m_ws | 未使用 |
0x19 | 1 | bd_pan_fb_cnt | 未使用 |
0x1a | 1 | sd_pan_fb_cnt | 未使用 |
0x1b | 1 | tom_pan_fb_cnt | 未使用 |
0x1c | 8 | bd | OPLL_RHYTHM_RYTParam |
0x24 | 8 | sd | OPLL_RHYTHM_RYTParam |
0x2c | 8 | hh | OPLL_RHYTHM_RYTParam |
0x34 | 8 | tc | OPLL_RHYTHM_RYTParam |
0x3c | 8 | tom | OPLL_RHYTHM_RYTParam |
0x44 | 60 | reserved | 未使用 |
OPLL_RHYTHM_RYTParam †
Offset | Size(byte) | Field | Description |
0x00 | 1 | velo_sens | ベロシティ感度 |
0x01 | 1 | level | 音量レベル |
0x02 | 1 | tune | 音程 |
0x03 | 1 | bend_dr | ピッチ減衰率 |
0x04 | 1 | bend_depth | ピッチ変化強度 |
0x05 | 1 | bend_slope | ピッチ変化カーブ |
0x06 | 2 | unused | 未使用 |
typedef struct OPLL_RHYTHM_RYTParam {
uint8_t velo_sens;
uint8_t level;
int8_t tune;
uint8_t bend_dr;
int8_t bend_depth;
int8_t bend_slope;
uint8_t unused[2];
} OPLL_RHYTHM_RYTParam;
typedef struct OPLL_RHYTHM_Patch {
PatchCommon common_param;
int8_t bd_mul[2];
uint8_t bd_m_level;
uint8_t bd_m_ar_dr;
uint8_t bd_m_ws;
uint8_t bd_pan_fb_cnt;
uint8_t sd_pan_fb_cnt;
uint8_t tom_pan_fb_cnt;
OPLL_RHYTHM_RYTParam bd;
OPLL_RHYTHM_RYTParam sd;
OPLL_RHYTHM_RYTParam hh;
OPLL_RHYTHM_RYTParam tc;
OPLL_RHYTHM_RYTParam tom;
uint8_t reserved[60];
} OPLL_RHYTHM_Patch;
PatchCommon †
Offset | Size(byte) | Field | Description |
0x00 | 1 | patch_type | 1=PatchTypeOPN_FM |
0x01 | 1 | lk_nxp_formatVersion | 1b変更不可 1bエクスポート不可 6bフォーマットバージョン(後方互換性用) |
0x02 | 14 | patch_name | Patch名(Shift-JIS,0終端) |
0x10 | 4 | original_clock | 作成時のチップクロック周波数 |
TonedSynthCommon †
Offset | Size(byte) | Field | Description |
0x00 | 1 | transpose | トランスポーズ |
0x01 | 1 | tuning | チューニング |
0x02 | 1 | panpot | パン |
0x03 | 1 | panpot_ksl_sens | KeyScaling->panpotのモジュレーション感度 |
0x04 | 1 | pitch_lfo1_sens | LFO1->Pitchのモジュレーション感度 |
0x05 | 1 | pitch_lfo2_sens | LFO2->Pitchのモジュレーション感度 |
0x06 | 1 | pitch_env1_sens | Envelope1->Pitchのモジュレーション感度 |
0x07 | 1 | pitch_env2_sens | Envelope2->Pitchのモジュレーション感度 |
0x08 | 4 | ksl | KeyScaleParam |
0x0c | 12 | sw_env1 | EnvelopeParam |
0x18 | 12 | sw_env2 | EnvelopeParam |
0x24 | 4 | sw_lfo1 | LFOParam |
0x28 | 4 | sw_lfo2 | LFOParam |
0x2c | 1 | lfo1_delay | LFO1のディレイ |
0x2d | 1 | lfo2_delay | LFO2のディレイ |
0x2e | 1 | transpose2 | OPL3疑似4op音色の2音目のトランスポーズ値 |
0x2f | 1 | tuning2 | OPL3疑似4op音色の2音目のチューニング値 |
LFOParam †
Offset | Size(byte) | Field | Description |
0x00 | 1 | midisync_wf_inputselect | MIDI Sync...テンポ同期(1bit), Waveform...LFO波形(3bit), Input...LFO感度入力源(4bit) |
0x01 | 1 | keyonrst_inputdepth | KeyOn Reset...キーオン時に位相リセット(1bit), Depth(7bit) |
0x02 | 1 | freq | Freq...LFOの速さ |
0x03 | 1 | fadein | FadeIn...フェードインの長さ |
EnvelopeParam †
Offset | Size(byte) | Field | Description |
0x00 | 1 | inputselect | Input...Envelope感度入力源(4bit) |
0x01 | 1 | inputdepth | Depth(7bit) |
0x02 | 1 | attack_time | A...アタック時間(7bit) |
0x03 | 1 | attack_slope | アタック時のカーブ(4bit) |
0x04 | 1 | hold_time | H...ホールド時間(7bit) |
0x05 | 1 | decay_time | D...ディケイ時間(7bit) |
0x06 | 1 | decay_release_slope | ディケイ時のカーブ(4bit), リリース時のカーブ(4bit) |
0x07 | 1 | sustain_level | SL...サスティンレベル(7bit) |
0x08 | 1 | release_time | RR...リリース時間(7bit) |
0x09 | 1 | release_level | RL...リリースレベル(7bit) |
0x0a | 1 | key_scaling | KeyScaling |
0x0b | 1 | velocity_scaling | VelocityScaling |
KeyScaleParam †
Offset | Size(byte) | Field | Description |
0x00 | 1 | min_level | MinLevel |
0x01 | 1 | slope1_2 | Min->Centerのカーブ(4bit), Center->Maxのカーブ(4bit) |
0x02 | 1 | center_key | CenterKey |
0x03 | 1 | max_level | MaxLevel |
SlotPatchCommon †
Offset | Size(byte) | Field | Description |
0x00 | 1 | velo_sens | Velocity Sens...ベロシティ感度 |
0x01 | 1 | tl | TL...Total Level |
0x02 | 1 | lfo1_sens | LFO1->TLへのモジュレーション感度 |
0x03 | 1 | lfo2_sens | LFO2->TLへのモジュレーション感度 |
0x04 | 1 | env1_sens | Envelope1->TLへのモジュレーション感度 |
0x05 | 1 | env2_sens | Envelope2->TLへのモジュレーション感度 |
0x06 | 1 | ksl_sens | KeyScaling->TLへのモジュレーション感度 |
typedef struct PatchCommon {
uint8_t patch_type; ///< 音源種別
uint8_t lk_nxp_format_version; ///< 1.変更不可 1.エクスポート不可 6.フォーマットバージョン(後方互換性用)
char name[14]; ///< パッチ名
uint32_t original_clock; ///< 作成時のクロック周波数
} PatchCommon;
typedef struct TonedSynthCommon {
int8_t transpose;
int8_t tuning;
int8_t panpot;
int8_t panpot_ksl_sens;
int8_t pitch_lfo_sens[SWLFO_NUM];
int8_t pitch_env_sens[SWENV_NUM];
KeyScaleParam ksl;
EnvelopeParam sw_env[SWENV_NUM];
LFOParam sw_lfo[SWLFO_NUM];
uint8_t lfo_delay[SWLFO_NUM];
int8_t transpose2; // OPL3で使用
int8_t tuning2; // OPL3で使用
} TonedSynthCommon;
// LFOのパラメータ(4Byte)
typedef struct LFOParam {
uint8_t midisync_wf_inputselect; // 1.3.4
uint8_t keyonrst_inputdepth; // 1.7
uint8_t freq;
uint8_t fadein;
} LFOParam;
// ソフトエンベロープのパラメータ(12Byte)
typedef struct EnvelopeParam {
uint8_t inputselect;
int8_t inputdepth;
uint8_t attack_time;
uint8_t attack_slope;
uint8_t hold_time;
uint8_t decay_time;
uint8_t decay_release_slope;
uint8_t sustain_level;
uint8_t release_time;
uint8_t release_level;
int8_t key_scaling; // 最大時に1oct上がる毎にnote=60を基準に半分に
int8_t velocity_scaling; // 80を基準として32上がる毎に倍に
} EnvelopeParam;
// キースケールのカーブ定義(4Byte)
typedef struct KeyScaleParam {
int8_t min_level;
uint8_t slope1_2;
int8_t center_key;
int8_t max_level;
} KeyScaleParam;
// スロット毎のパッチデータの共通部分
typedef struct SlotPatchCommon {
uint8_t velo_sens;
uint8_t tl;
int8_t lfo_sens[SWLFO_NUM];
int8_t env_sens[SWENV_NUM];
int8_t ksl_sens;
} SlotPatchCommon;
patch_type †
id | Type |
0 | PatchTypeUndefined |
1 | PatchTypeOPM_FM |
2 | PatchTypeOPN_FM |
3 | PatchTypeOPN_FMch3(効果音モード) |
4 | PatchTypeSSG_PSG |
5 | PatchTypeOPN_RHYTHM |
6 | PatchTypeOPNA_ADPCM |
7 | PatchTypeOPL3_FM2op |
8 | PatchTypeOPL3_FM4op |
9 | PatchTypeOPL3_RHYTHM |
10 | PatchTypeSPC_PCM |
11 | PatchTypeOPLL_FM |
12 | PatchTypeOPLL_RHYTHM |