├── README.md ├── m8s.ksy └── m8s_midi+initial_v3.ksy /README.md: -------------------------------------------------------------------------------- 1 | Kaitai Struct parser for Dirtywave M8 file formats 2 | 3 | 4 | 5 | * [Overview](#overview) 6 | * [Development](#development) 7 | * [Credits](#credits) 8 | 9 | 10 | 11 | ## Overview 12 | 13 | This repository contains [Kaitai Struct][ks] `.ksy` definitions to parse 14 | various binary file formats used by the [Dirtywave M8][m8]. So far it includes 15 | initial support for: 16 | 17 | * `.m8s` Song files 18 | * `.m8i` Instrument files 19 | * `.m8t` Theme files 20 | * `.m8n` Scale files 21 | 22 | These Kaitai Struct definitions can be compiled into ready-made format handling 23 | libraries in various languages (C++/STL, C#, Go , Java , JavaScript , Lua, Nim, 24 | Perl, PHP, Python, Ruby). 25 | 26 | ## Development 27 | 28 | * Open the [Kaitai Struct IDE][kside] and load `m8s.ksy`, experiment with your 29 | own files! 30 | 31 | ## Credits 32 | 33 | * Thanks to [Dirtywave](https://github.com/Dirtywave) for creating the M8! 34 | * Thanks to [ftsf](https://github.com/ftsf) for [reversing and documenting most 35 | of the M8 binary 36 | formats](https://gist.github.com/ftsf/223b0fc761339b3c23dda7dd891514d9) and 37 | making various M8 tools, like [matey]). It was a great introduction to 38 | [nim], too! 39 | 40 | 41 | [m8]: https://dirtywave.com/ 42 | [kside]: https://ide.kaitai.io/# 43 | [ks]: https://kaitai.io/ 44 | [matey]: https://www.impbox.net/matey/ 45 | [nim]: https://nim-lang.org/ 46 | -------------------------------------------------------------------------------- /m8s.ksy: -------------------------------------------------------------------------------- 1 | meta: 2 | id: 'm8s_2_6_0' 3 | file-extension: 4 | - m8s 5 | - m8i 6 | - m8t 7 | - m8n 8 | title: 'M8 Song/Instrument/Theme/Scale file (Firmware 2.6.0)' 9 | license: GPL-3.0-or-later 10 | bit-endian: le 11 | endian: le 12 | encoding: utf-8 13 | 14 | doc: | 15 | M8 Song/Instrument/Theme/Scale file formats (WIP) 16 | 17 | Developed against M8 firmware version 2.6.0 18 | (Handles other firmware versions so far, but no guarantees) 19 | doc-ref: https://gist.github.com/ftsf/223b0fc761339b3c23dda7dd891514d9 20 | 21 | seq: 22 | - id: header 23 | type: m8_header 24 | - id: body 25 | type: 26 | switch-on: header.file_type 27 | cases: 28 | 'm8_filetype::song_file': m8_song 29 | 'm8_filetype::instrument_file': m8_instrument 30 | 'm8_filetype::theme_file': m8_theme 31 | 'm8_filetype::scale_file': m8_scale 32 | 33 | 34 | types: 35 | m8_header: 36 | seq: 37 | - id: magic 38 | contents: 39 | - 'M8VERSION' 40 | - 0x00 41 | doc: magic number 42 | - id: version_z 43 | type: b4 44 | - id: version_y 45 | type: b4 46 | - id: version_x 47 | type: b4 48 | - id: file_type 49 | type: u2 50 | enum: m8_filetype 51 | 52 | m8_song: 53 | seq: 54 | - id: directory 55 | size: 128 56 | type: strz 57 | - id: transpose 58 | type: u1 59 | - id: tempo 60 | type: f4 61 | - id: quantize 62 | type: u1 63 | - id: name 64 | size: 12 65 | type: strz 66 | - id: midi_settings 67 | type: midi_settings 68 | - size: 19 # all 00s 69 | - id: mixer_settings 70 | type: mixer_settings 71 | - size: 5 # TODO what is this? It has data in it 72 | - id: grooves 73 | type: groove 74 | repeat: expr 75 | repeat-expr: 32 76 | - id: song_data 77 | type: song_row 78 | repeat: expr 79 | repeat-expr: 256 80 | - id: phrases 81 | type: phrase 82 | repeat: expr 83 | repeat-expr: 255 84 | - id: chains 85 | type: chain 86 | repeat: expr 87 | repeat-expr: 255 88 | - id: tables 89 | type: table 90 | repeat: expr 91 | repeat-expr: 256 92 | - id: instruments 93 | type: instrument(27) 94 | repeat: expr 95 | repeat-expr: 128 96 | size: 215 # 215 * 128 = 27520 97 | - size: 3 98 | id: mystery # TODO what is this? 99 | - id: global_fx 100 | type: global_fx 101 | - size: 1191 # TODO mystery data + probable padding 102 | id: mystery2 103 | - id: scales 104 | type: scales 105 | repeat: expr 106 | repeat-expr: 16 107 | size: 42 108 | 109 | scales: 110 | seq: 111 | - id: enabled_notes 112 | type: b1 113 | repeat: expr 114 | repeat-expr: 12 115 | - id: unused_bits 116 | type: b4 117 | - id: notes 118 | type: u1 119 | repeat: expr 120 | repeat-expr: 12 121 | - id: offsets 122 | type: u1 123 | repeat: expr 124 | repeat-expr: 12 125 | - id: name 126 | size: 16 127 | type: str 128 | terminator: 0xff 129 | 130 | 131 | global_fx: 132 | seq: 133 | - id: chorus_mod_depth 134 | type: u1 135 | - id: chorus_mod_freq 136 | type: u1 137 | - id: chorus_width 138 | type: u1 139 | - id: chorus_reverb_send 140 | type: u1 141 | - size: 3 # TODO verify what these are 142 | id: mystery 143 | - id: delay_filter_hp # TODO this might be 3 bytes earlier 144 | type: u1 145 | - id: delay_filter_lp 146 | type: u1 147 | - id: delay_time_l 148 | type: u1 149 | - id: delay_time_r 150 | type: u1 151 | - id: delay_feedback 152 | type: u1 153 | - id: delay_width 154 | type: u1 155 | - id: delay_reverb_send 156 | type: u1 157 | - size: 1 158 | - id: reverb_filter_hp 159 | type: u1 160 | - id: reverb_filter_lp 161 | type: u1 162 | - id: reverb_size 163 | type: u1 164 | - id: reverb_decay 165 | type: u1 166 | - id: reverb_mod_depth 167 | type: u1 168 | - id: reverb_mod_freq 169 | type: u1 170 | - id: reverb_width 171 | type: u1 172 | instrument: 173 | params: 174 | - id: unknown_data_len 175 | type: u1 176 | seq: 177 | - id: type 178 | type: u1 179 | enum: instrument_type 180 | - id: name 181 | type: strz 182 | size: 12 183 | - id: transpose 184 | type: u1 185 | - id: table_tic_rate 186 | type: u1 187 | - id: volume 188 | type: u1 189 | - id: pitch 190 | type: u1 191 | - id: finetune 192 | type: u1 193 | - id: type_data 194 | type: 195 | switch-on: type 196 | cases: 197 | 'instrument_type::wavsynth': wavsynth_data 198 | 'instrument_type::macrosyn': macrosyn_data 199 | 'instrument_type::sample': sample_data 200 | 'instrument_type::midiout': no_instrument_data 201 | 'instrument_type::fmsynth': fm_data 202 | 'instrument_type::none': no_instrument_data 203 | - id: common_data 204 | type: common_instrument_data 205 | - size: unknown_data_len # TODO: what is this? 27 (song) or 25 (inst) 206 | - id: sample_path 207 | size: 127 208 | type: strz 209 | if: type == instrument_type::sample 210 | 211 | 212 | common_instrument_data: 213 | seq: 214 | - id: filter 215 | type: u1 216 | - id: cutoff 217 | type: u1 218 | - id: res 219 | type: u1 220 | - id: amp 221 | type: u1 222 | - id: lim 223 | type: u1 224 | - id: pan 225 | type: u1 226 | - id: dry 227 | type: u1 228 | - id: cho 229 | type: u1 230 | - id: del 231 | type: u1 232 | - id: rev 233 | type: u1 234 | - size: 2 # TODO what is this? 235 | - id: envelopes 236 | type: envelope 237 | repeat: expr 238 | repeat-expr: 2 239 | - id: lfos 240 | type: lfo 241 | repeat: expr 242 | repeat-expr: 2 # TODO: version check [x2 LFOs added in 1.4.0] 243 | lfo: 244 | seq: 245 | - id: shape 246 | type: u1 247 | - id: dest 248 | type: u1 249 | - id: trigger_mode 250 | type: u1 251 | - id: freq 252 | type: u1 253 | - id: amount 254 | type: u1 255 | - id: retrigger 256 | type: u1 257 | 258 | envelope: 259 | seq: 260 | - id: dest 261 | type: u1 262 | - id: amount 263 | type: u1 264 | - id: attack 265 | type: u1 266 | - id: hold 267 | type: u1 268 | - id: decay 269 | type: u1 270 | - id: retrigger 271 | type: u1 272 | 273 | fm_data: # todo 274 | seq: 275 | - id: algo 276 | type: u1 277 | - id: wave # TODO: FM wave type added in 1.4.0 278 | type: u1 279 | repeat: expr 280 | repeat-expr: 4 281 | - id: ratios 282 | type: fm_op_ratio 283 | repeat: expr 284 | repeat-expr: 4 285 | - id: level 286 | type: fm_op_level 287 | repeat: expr 288 | repeat-expr: 4 289 | - id: mod_a 290 | type: u1 291 | repeat: expr 292 | repeat-expr: 4 293 | - id: mod_b 294 | type: u1 295 | repeat: expr 296 | repeat-expr: 4 297 | - id: mods 298 | type: u1 299 | repeat: expr 300 | repeat-expr: 4 301 | 302 | fm_op_ratio: 303 | seq: 304 | - id: ratio 305 | type: u1 306 | - id: ratio_fine 307 | type: u1 308 | fm_op_level: 309 | seq: 310 | - id: level 311 | type: u1 312 | - id: feedback 313 | type: u1 314 | 315 | sample_data: 316 | seq: 317 | - id: play_mode 318 | type: u1 319 | - id: slices 320 | type: u1 321 | - id: start 322 | type: u1 323 | - id: loop_start 324 | type: u1 325 | - id: length 326 | type: u1 327 | - id: degrade 328 | type: u1 329 | 330 | macrosyn_data: 331 | seq: 332 | - id: shape 333 | type: u1 334 | - id: timbre 335 | type: u1 336 | - id: color 337 | type: u1 338 | - id: degrade 339 | type: u1 340 | - id: redux 341 | type: u1 342 | 343 | wavsynth_data: 344 | seq: 345 | - id: shape 346 | type: u1 347 | - id: size 348 | type: u1 349 | - id: mult 350 | type: u1 351 | - id: warp 352 | type: u1 353 | - id: mirror 354 | type: u1 355 | - id: none 356 | size: 1 357 | 358 | no_instrument_data: 359 | seq: 360 | - id: padding 361 | size: 6 362 | 363 | table: 364 | seq: 365 | - id: rows 366 | type: table_row 367 | repeat: expr 368 | repeat-expr: 16 369 | 370 | table_row: 371 | seq: 372 | - id: note_offset 373 | type: u1 374 | - id: vol 375 | type: u1 376 | - id: fx1_cmd 377 | type: u1 378 | enum: fx_common 379 | - id: fx1_value 380 | type: u1 381 | - id: fx2_cmd 382 | type: u1 383 | enum: fx_common 384 | - id: fx2_value 385 | type: u1 386 | - id: fx3_cmd 387 | type: u1 388 | enum: fx_common 389 | - id: fx3_value 390 | type: u1 391 | 392 | chain: 393 | seq: 394 | - id: rows 395 | type: chain_row 396 | repeat: expr 397 | repeat-expr: 16 398 | 399 | chain_row: 400 | seq: 401 | - id: phrase 402 | type: u1 403 | - id: transpose 404 | type: u1 405 | 406 | 407 | phrase: 408 | seq: 409 | - id: rows 410 | type: phrase_row 411 | repeat: expr 412 | repeat-expr: 16 413 | 414 | phrase_row: 415 | seq: 416 | - id: note 417 | type: u1 418 | - id: vol 419 | type: u1 420 | - id: instrument 421 | type: u1 422 | - id: fx1_cmd 423 | type: u1 424 | enum: fx_common 425 | - id: fx1_value 426 | type: u1 427 | - id: fx2_cmd 428 | type: u1 429 | enum: fx_common 430 | - id: fx2_value 431 | type: u1 432 | - id: fx3_cmd 433 | type: u1 434 | enum: fx_common 435 | - id: fx3_value 436 | type: u1 437 | song_row: 438 | seq: 439 | - id: column 440 | type: u1 441 | repeat: expr 442 | repeat-expr: 8 443 | 444 | groove: 445 | seq: 446 | - id: steps 447 | type: u1 448 | repeat: expr 449 | repeat-expr: 16 450 | 451 | midi_settings: 452 | seq: 453 | - id: recieve_sync 454 | type: u1 455 | enum: on_off 456 | - id: receive_transport 457 | type: u1 458 | enum: on_off 459 | - id: send_sync 460 | type: u1 461 | enum: on_off 462 | - id: send_transport 463 | type: u1 464 | enum: on_off 465 | - id: record_note_channel 466 | type: u1 467 | - id: record_velocity 468 | type: u1 469 | enum: on_off 470 | - id: record_delay_kill 471 | type: u1 472 | enum: on_off 473 | - id: control_map_channel 474 | type: u1 475 | enum: control_map_channel 476 | - id: song_row_cue_channel 477 | type: u1 478 | - id: track_input_channels 479 | type: u1 480 | repeat: expr 481 | repeat-expr: 8 482 | - id: track_input_instruments 483 | type: u1 484 | repeat: expr 485 | repeat-expr: 8 486 | - id: track_input_program_change 487 | type: u1 488 | - id: track_input_mode 489 | type: u1 490 | enum: midi_track_input_mode 491 | 492 | mixer_settings: 493 | seq: 494 | - id: main_volume 495 | type: u1 496 | - id: limit 497 | type: u1 498 | - id: track_volumes 499 | type: u1 500 | repeat: expr 501 | repeat-expr: 8 502 | - id: chorus_volume 503 | type: u1 504 | - id: delay_volume 505 | type: u1 506 | - id: reverb_volume 507 | type: u1 508 | - id: todo__wat1__input_usb_fx__wat2 509 | size: 12 510 | - id: djfilter 511 | type: u1 512 | - id: djf_peak 513 | type: u1 514 | 515 | 516 | m8_instrument: 517 | seq: 518 | - id: instrument 519 | type: instrument(25) 520 | size: 215 521 | - id: table 522 | type: table 523 | 524 | 525 | m8_theme: 526 | seq: 527 | - id: whatisthis 528 | type: b4 529 | 530 | m8_scale: 531 | seq: 532 | - id: what_is_this 533 | size: 26 534 | - id: name 535 | type: strz 536 | - id: what_is_this__finalbyte 537 | size: 1 538 | 539 | 540 | enums: 541 | m8_filetype: 542 | 0x0000: song_file 543 | 0x1000: instrument_file 544 | 0x2000: theme_file 545 | 0x3000: scale_file 546 | midi_track_input_mode: 547 | 0x0: mono 548 | 0x1: legato 549 | 0x2: poly 550 | on_off: 551 | 0x0: off 552 | 0x1: on 553 | control_map_channel: 554 | 0x0: ch1 555 | 0x1: ch2 556 | 0x2: ch3 557 | 0x3: ch4 558 | 0x4: ch5 559 | 0x5: ch6 560 | 0x6: ch7 561 | 0x7: ch8 562 | 0x8: ch9 563 | 0x9: ch10 564 | 0xA: ch11 565 | 0xB: ch12 566 | 0xC: ch13 567 | 0xD: ch14 568 | 0xE: ch15 569 | 0xF: ch16 570 | 0x10: todo__notsure 571 | 0x11: all 572 | instrument_type: 573 | 0x00: wavsynth 574 | 0x01: macrosyn 575 | 0x02: sample 576 | 0x03: midiout 577 | 0x04: fmsynth 578 | 0xFF: none 579 | fx_common: # TODO: validate these 580 | 0x00: arp 581 | 0x01: cha 582 | 0x02: del 583 | 0x03: grv 584 | 0x04: hop 585 | 0x05: kil 586 | 0x06: ran 587 | 0x07: ret 588 | 0x08: rep 589 | 0x09: nth 590 | 0x0A: psl 591 | 0x0b: pvb 592 | 0x0C: pvx 593 | 0x0D: sed 594 | 0x0E: xxx 595 | 0x0F: tbl 596 | 0x10: tho 597 | 0x11: tic 598 | 0x12: tpo 599 | 0x13: xxx 600 | 0x14: tic # imp = vmv 601 | 0x15: xxx 602 | 0x16: xcm 603 | 0x17: xcf 604 | 0x18: xcw 605 | 0x19: xcr 606 | 0x1A: xdt 607 | 0x1B: xdf 608 | 0x1C: xdw 609 | 0x1D: xdr 610 | 0x1E: xrs 611 | 0x1F: xrd 612 | 0x20: xrm 613 | 0x21: xrf 614 | 0x22: xrw 615 | 0x23: xrz 616 | 0x24: xxx 617 | 0x25: vch 618 | 0x26: vde 619 | 0x27: vre 620 | 0x28: vt1 621 | 0x29: vt2 622 | 0x2A: vt3 623 | 0x2B: vt4 624 | 0x2C: vt5 625 | 0x2D: vt6 626 | 0x2E: vt7 627 | 0x2F: vt8 628 | 0x30: xxx 629 | 0x31: djf 630 | 0x81: pit 631 | 0x82: fin 632 | 0x83: osc 633 | 0x84: siz # tbr 634 | 0x85: mul # col 635 | 0x89: cut 636 | 0x8b: amp 637 | 0x91: srv 638 | -------------------------------------------------------------------------------- /m8s_midi+initial_v3.ksy: -------------------------------------------------------------------------------- 1 | meta: 2 | id: 'm8s_2_6_0' 3 | file-extension: 4 | - m8s 5 | - m8i 6 | - m8t 7 | - m8n 8 | title: 'M8 Song/Instrument/Theme/Scale file (Firmware 2.6.0)' 9 | license: GPL-3.0-or-later 10 | bit-endian: le 11 | endian: le 12 | encoding: utf-8 13 | 14 | doc: | 15 | M8 Song/Instrument/Theme/Scale file formats (WIP) 16 | 17 | Developed against M8 firmware version 2.6.0 18 | (Handles other firmware versions so far, but no guarantees) 19 | doc-ref: https://gist.github.com/ftsf/223b0fc761339b3c23dda7dd891514d9 20 | 21 | seq: 22 | - id: header 23 | type: m8_header 24 | - id: body 25 | type: 26 | switch-on: header.file_type 27 | cases: 28 | 'm8_filetype::song_file': m8_song 29 | 'm8_filetype::instrument_file': m8_instrument 30 | 'm8_filetype::theme_file': m8_theme 31 | 'm8_filetype::scale_file': m8_scale 32 | 33 | 34 | types: 35 | m8_header: 36 | seq: 37 | - id: magic 38 | contents: 39 | - 'M8VERSION' 40 | - 0x00 41 | doc: magic number 42 | - id: version_z 43 | type: b4 44 | - id: version_y 45 | type: b4 46 | - id: version_x 47 | type: b4 48 | - id: file_type 49 | type: u2 50 | enum: m8_filetype 51 | 52 | m8_song: 53 | seq: 54 | - id: directory 55 | size: 128 56 | type: strz 57 | - id: transpose 58 | type: u1 59 | - id: tempo 60 | type: f4 61 | - id: quantize 62 | type: u1 63 | - id: name 64 | size: 12 65 | type: strz 66 | - id: midi_settings 67 | type: midi_settings 68 | - size: 19 # all 00s 69 | - id: mixer_settings 70 | type: mixer_settings 71 | - size: 5 # TODO what is this? It has data in it 72 | - id: grooves 73 | type: groove 74 | repeat: expr 75 | repeat-expr: 32 76 | - id: song_data 77 | type: song_row 78 | repeat: expr 79 | repeat-expr: 256 80 | - id: phrases 81 | type: phrase 82 | repeat: expr 83 | repeat-expr: 255 84 | - id: chains 85 | type: chain 86 | repeat: expr 87 | repeat-expr: 255 88 | - id: tables 89 | type: table 90 | repeat: expr 91 | repeat-expr: 256 92 | - id: instruments 93 | type: instrument(27) 94 | repeat: expr 95 | repeat-expr: 128 96 | size: 215 # 215 * 128 = 27520 97 | - size: 3 98 | id: mystery # TODO what is this? 99 | - id: global_fx 100 | type: global_fx 101 | - size: 1191 # TODO mystery data + probable padding 102 | id: mystery2 103 | - id: scales 104 | type: scales 105 | repeat: expr 106 | repeat-expr: 16 107 | size: 42 108 | 109 | scales: 110 | seq: 111 | - id: enabled_notes 112 | type: b1 113 | repeat: expr 114 | repeat-expr: 12 115 | - id: unused_bits 116 | type: b4 117 | - id: notes 118 | type: u1 119 | repeat: expr 120 | repeat-expr: 12 121 | - id: offsets 122 | type: u1 123 | repeat: expr 124 | repeat-expr: 12 125 | - id: name 126 | size: 16 127 | type: str 128 | terminator: 0xff 129 | 130 | 131 | global_fx: 132 | seq: 133 | - id: chorus_mod_depth 134 | type: u1 135 | - id: chorus_mod_freq 136 | type: u1 137 | - id: chorus_width 138 | type: u1 139 | - id: chorus_reverb_send 140 | type: u1 141 | - size: 3 # TODO verify what these are 142 | id: mystery 143 | - id: delay_filter_hp # TODO this might be 3 bytes earlier 144 | type: u1 145 | - id: delay_filter_lp 146 | type: u1 147 | - id: delay_time_l 148 | type: u1 149 | - id: delay_time_r 150 | type: u1 151 | - id: delay_feedback 152 | type: u1 153 | - id: delay_width 154 | type: u1 155 | - id: delay_reverb_send 156 | type: u1 157 | - size: 1 158 | - id: reverb_filter_hp 159 | type: u1 160 | - id: reverb_filter_lp 161 | type: u1 162 | - id: reverb_size 163 | type: u1 164 | - id: reverb_decay 165 | type: u1 166 | - id: reverb_mod_depth 167 | type: u1 168 | - id: reverb_mod_freq 169 | type: u1 170 | - id: reverb_width 171 | type: u1 172 | instrument: 173 | params: 174 | - id: unknown_data_len 175 | type: u1 176 | seq: 177 | - id: type 178 | type: u1 179 | enum: instrument_type 180 | - id: name 181 | type: strz 182 | size: 12 183 | - id: transpose 184 | type: u1 185 | - id: table_tic_rate 186 | type: u1 187 | - id: type_data 188 | type: 189 | switch-on: type 190 | cases: 191 | 'instrument_type::wavsynth': wavsynth_data 192 | 'instrument_type::macrosyn': macrosyn_data 193 | 'instrument_type::sample': sample_data 194 | 'instrument_type::midiout': midi_instrument_data 195 | 'instrument_type::fmsynth': fm_data 196 | 'instrument_type::none': no_instrument_data 197 | - id: common_data 198 | type: common_instrument_data 199 | - size: unknown_data_len # TODO: what is this? 27 (song) or 25 (inst) 200 | - id: sample_path 201 | size: 127 202 | type: strz 203 | if: type == instrument_type::sample 204 | 205 | 206 | 207 | common_instrument_data: 208 | seq: 209 | - id: filter 210 | type: u1 211 | - id: cutoff 212 | type: u1 213 | - id: res 214 | type: u1 215 | - id: amp 216 | type: u1 217 | - id: lim 218 | type: u1 219 | - id: pan 220 | type: u1 221 | - id: dry 222 | type: u1 223 | - id: cho 224 | type: u1 225 | - id: del 226 | type: u1 227 | - id: rev 228 | type: u1 229 | - size: 2 # TODO what is this? 230 | - id: envelopes 231 | type: envelope 232 | repeat: expr 233 | repeat-expr: 2 234 | - id: lfos 235 | type: lfo 236 | repeat: expr 237 | repeat-expr: 2 # TODO: version check [x2 LFOs added in 1.4.0] 238 | lfo: 239 | seq: 240 | - id: shape 241 | type: u1 242 | - id: dest 243 | type: u1 244 | - id: trigger_mode 245 | type: u1 246 | - id: freq 247 | type: u1 248 | - id: amount 249 | type: u1 250 | - id: retrigger 251 | type: u1 252 | 253 | envelope: 254 | seq: 255 | - id: dest 256 | type: u1 257 | - id: amount 258 | type: u1 259 | - id: attack 260 | type: u1 261 | - id: hold 262 | type: u1 263 | - id: decay 264 | type: u1 265 | - id: retrigger 266 | type: u1 267 | 268 | fm_data: # todo 269 | seq: 270 | - id: volume 271 | type: u1 272 | - id: pitch 273 | type: u1 274 | - id: finetune 275 | type: u1 276 | - id: algo 277 | type: u1 278 | - id: wave # TODO: FM wave type added in 1.4.0 279 | type: u1 280 | repeat: expr 281 | repeat-expr: 4 282 | - id: ratios 283 | type: fm_op_ratio 284 | repeat: expr 285 | repeat-expr: 4 286 | - id: level 287 | type: fm_op_level 288 | repeat: expr 289 | repeat-expr: 4 290 | - id: mod_a 291 | type: u1 292 | repeat: expr 293 | repeat-expr: 4 294 | - id: mod_b 295 | type: u1 296 | repeat: expr 297 | repeat-expr: 4 298 | - id: mods 299 | type: u1 300 | repeat: expr 301 | repeat-expr: 4 302 | 303 | fm_op_ratio: 304 | seq: 305 | - id: ratio 306 | type: u1 307 | - id: ratio_fine 308 | type: u1 309 | fm_op_level: 310 | seq: 311 | - id: level 312 | type: u1 313 | - id: feedback 314 | type: u1 315 | 316 | sample_data: 317 | seq: 318 | - id: pitch 319 | type: u1 320 | - id: finetune 321 | type: u1 322 | - id: play_mode 323 | type: u1 324 | - id: slices 325 | type: u1 326 | - id: start 327 | type: u1 328 | - id: loop_start 329 | type: u1 330 | - id: length 331 | type: u1 332 | - id: degrade 333 | type: u1 334 | 335 | macrosyn_data: 336 | seq: 337 | - id: volume 338 | type: u1 339 | - id: pitch 340 | type: u1 341 | - id: finetune 342 | type: u1 343 | - id: shape 344 | type: u1 345 | - id: timbre 346 | type: u1 347 | - id: color 348 | type: u1 349 | - id: degrade 350 | type: u1 351 | - id: redux 352 | type: u1 353 | 354 | wavsynth_data: 355 | seq: 356 | - id: volume 357 | type: u1 358 | - id: pitch 359 | type: u1 360 | - id: finetune 361 | type: u1 362 | - id: shape 363 | type: u1 364 | - id: size 365 | type: u1 366 | - id: mult 367 | type: u1 368 | - id: warp 369 | type: u1 370 | - id: mirror 371 | type: u1 372 | - id: none 373 | size: 1 374 | 375 | 376 | midi_instrument_data: 377 | seq: 378 | - id: port 379 | type: u1 380 | - id: channel 381 | type: u1 382 | - id: bank_lsb 383 | type: u1 384 | - id: program 385 | type: u1 386 | - id: unknown 387 | size: 3 388 | - id: cca 389 | type: u1 390 | - id: cca_default 391 | type: u1 392 | - id: ccb 393 | type: u1 394 | - id: ccb_default 395 | type: u1 396 | - id: ccc 397 | type: u1 398 | - id: ccc_default 399 | type: u1 400 | - id: ccd 401 | type: u1 402 | - id: ccd_default 403 | type: u1 404 | - id: cce 405 | type: u1 406 | - id: cce_default 407 | type: u1 408 | - id: ccf 409 | type: u1 410 | - id: ccf_default 411 | type: u1 412 | - id: ccg 413 | type: u1 414 | - id: ccg_default 415 | type: u1 416 | - id: cch 417 | type: u1 418 | - id: cch_default 419 | type: u1 420 | - id: cci 421 | type: u1 422 | - id: cci_default 423 | type: u1 424 | - id: ccj 425 | type: u1 426 | - id: ccj_default 427 | type: u1 428 | - id: padding 429 | size: 8 430 | 431 | 432 | 433 | no_instrument_data: 434 | seq: 435 | - id: padding 436 | size: 11 437 | 438 | table: 439 | seq: 440 | - id: rows 441 | type: table_row 442 | repeat: expr 443 | repeat-expr: 16 444 | 445 | table_row: 446 | seq: 447 | - id: note_offset 448 | type: u1 449 | - id: vol 450 | type: u1 451 | - id: fx1_cmd 452 | type: u1 453 | enum: fx_common 454 | - id: fx1_value 455 | type: u1 456 | - id: fx2_cmd 457 | type: u1 458 | enum: fx_common 459 | - id: fx2_value 460 | type: u1 461 | - id: fx3_cmd 462 | type: u1 463 | enum: fx_common 464 | - id: fx3_value 465 | type: u1 466 | 467 | chain: 468 | seq: 469 | - id: rows 470 | type: chain_row 471 | repeat: expr 472 | repeat-expr: 16 473 | 474 | chain_row: 475 | seq: 476 | - id: phrase 477 | type: u1 478 | - id: transpose 479 | type: u1 480 | 481 | 482 | phrase: 483 | seq: 484 | - id: rows 485 | type: phrase_row 486 | repeat: expr 487 | repeat-expr: 16 488 | 489 | phrase_row: 490 | seq: 491 | - id: note 492 | type: u1 493 | - id: vol 494 | type: u1 495 | - id: instrument 496 | type: u1 497 | - id: fx1_cmd 498 | type: u1 499 | enum: fx_common 500 | - id: fx1_value 501 | type: u1 502 | - id: fx2_cmd 503 | type: u1 504 | enum: fx_common 505 | - id: fx2_value 506 | type: u1 507 | - id: fx3_cmd 508 | type: u1 509 | enum: fx_common 510 | - id: fx3_value 511 | type: u1 512 | song_row: 513 | seq: 514 | - id: column 515 | type: u1 516 | repeat: expr 517 | repeat-expr: 8 518 | 519 | groove: 520 | seq: 521 | - id: steps 522 | type: u1 523 | repeat: expr 524 | repeat-expr: 16 525 | 526 | midi_settings: 527 | seq: 528 | - id: recieve_sync 529 | type: u1 530 | enum: on_off 531 | - id: receive_transport 532 | type: u1 533 | enum: on_off 534 | - id: send_sync 535 | type: u1 536 | enum: on_off 537 | - id: send_transport 538 | type: u1 539 | enum: on_off 540 | - id: record_note_channel 541 | type: u1 542 | - id: record_velocity 543 | type: u1 544 | enum: on_off 545 | - id: record_delay_kill 546 | type: u1 547 | enum: on_off 548 | - id: control_map_channel 549 | type: u1 550 | enum: control_map_channel 551 | - id: song_row_cue_channel 552 | type: u1 553 | - id: track_input_channels 554 | type: u1 555 | repeat: expr 556 | repeat-expr: 8 557 | - id: track_input_instruments 558 | type: u1 559 | repeat: expr 560 | repeat-expr: 8 561 | - id: track_input_program_change 562 | type: u1 563 | - id: track_input_mode 564 | type: u1 565 | enum: midi_track_input_mode 566 | 567 | mixer_settings: 568 | seq: 569 | - id: main_volume 570 | type: u1 571 | - id: limit 572 | type: u1 573 | - id: track_volumes 574 | type: u1 575 | repeat: expr 576 | repeat-expr: 8 577 | - id: chorus_volume 578 | type: u1 579 | - id: delay_volume 580 | type: u1 581 | - id: reverb_volume 582 | type: u1 583 | - id: todo__wat1__input_usb_fx__wat2 584 | size: 12 585 | - id: djfilter 586 | type: u1 587 | - id: djf_peak 588 | type: u1 589 | 590 | 591 | m8_instrument: 592 | seq: 593 | - id: instrument 594 | type: instrument(25) 595 | size: 215 596 | - id: table 597 | type: table 598 | 599 | 600 | m8_theme: 601 | seq: 602 | - id: whatisthis 603 | type: b4 604 | 605 | m8_scale: 606 | seq: 607 | - id: what_is_this 608 | size: 26 609 | - id: name 610 | type: strz 611 | - id: what_is_this__finalbyte 612 | size: 1 613 | 614 | 615 | enums: 616 | m8_filetype: 617 | 0x0000: song_file 618 | 0x1000: instrument_file 619 | 0x2000: theme_file 620 | 0x3000: scale_file 621 | midi_track_input_mode: 622 | 0x0: mono 623 | 0x1: legato 624 | 0x2: poly 625 | on_off: 626 | 0x0: off 627 | 0x1: on 628 | control_map_channel: 629 | 0x0: ch1 630 | 0x1: ch2 631 | 0x2: ch3 632 | 0x3: ch4 633 | 0x4: ch5 634 | 0x5: ch6 635 | 0x6: ch7 636 | 0x7: ch8 637 | 0x8: ch9 638 | 0x9: ch10 639 | 0xA: ch11 640 | 0xB: ch12 641 | 0xC: ch13 642 | 0xD: ch14 643 | 0xE: ch15 644 | 0xF: ch16 645 | 0x10: todo__notsure 646 | 0x11: all 647 | instrument_type: 648 | 0x00: wavsynth 649 | 0x01: macrosyn 650 | 0x02: sample 651 | 0x03: midiout 652 | 0x04: fmsynth 653 | 0xFF: none 654 | fx_common: # TODO: validate these 655 | 0x00: arp 656 | 0x01: cha 657 | 0x02: del 658 | 0x03: grv 659 | 0x04: hop 660 | 0x05: kil 661 | 0x06: ran 662 | 0x07: ret 663 | 0x08: rep 664 | 0x09: nth 665 | 0x0A: psl 666 | 0x0b: pvb 667 | 0x0C: pvx 668 | 0x0D: sed 669 | 0x0E: xx0 670 | 0x0F: tbl 671 | 0x10: tho 672 | 0x11: xx5 # imp = tic 673 | 0x12: tpo 674 | 0x13: xx1 675 | 0x14: tic # imp = vmv 676 | 0x15: xx2 677 | 0x16: xcm 678 | 0x17: xcf 679 | 0x18: xcw 680 | 0x19: xcr 681 | 0x1A: xdt 682 | 0x1B: xdf 683 | 0x1C: xdw 684 | 0x1D: xdr 685 | 0x1E: xrs 686 | 0x1F: xrd 687 | 0x20: xrm 688 | 0x21: xrf 689 | 0x22: xrw 690 | 0x23: xrz 691 | 0x24: xx3 692 | 0x25: vch 693 | 0x26: vde 694 | 0x27: vre 695 | 0x28: vt1 696 | 0x29: vt2 697 | 0x2A: vt3 698 | 0x2B: vt4 699 | 0x2C: vt5 700 | 0x2D: vt6 701 | 0x2E: vt7 702 | 0x2F: vt8 703 | 0x30: xx4 704 | 0x31: djf 705 | 0x81: pit 706 | 0x82: fin 707 | 0x83: osc 708 | 0x84: siz # tbr 709 | 0x85: mul # col 710 | 0x89: cut 711 | 0x8b: amp 712 | 0x91: srv 713 | --------------------------------------------------------------------------------