don't click here

Sonic FM Instrument Breakdown?

Discussion in 'Engineering & Reverse Engineering' started by SegaLoco, Sep 9, 2012.

  1. SegaLoco

    SegaLoco

    W)(at did you say? Misfit
    I've been wondering this for a little while now: Has there been a breakdown of the SMPS voices/instruments from S1-S3K into common terms such as wave type, envelope settings, etc rather than just raw data in a file. You know, something that would be easily applicable to any synthesizer in some sort of way, detailing the instrument in common words rather than sorting through a data file. Thanks for any information, and if this hasn't been done, I'm willing to sit down with the YM2612 and Z80 manuals, the SMPS wiki page, and my synth and hammer it out, although it may take some time.
     
  2. MarkeyJester

    MarkeyJester

    Time to Grow Up. Resident Jester
    2,127
    253
    63
    Japan
    As far as I'm aware, no, it hasn't, it might be useful if we had the instrument information stored in the asm files via dc segments. Now, due to the settings of each sinewave operator being stored in multiple grouped bit sizes, perhaps by using some form of macro we can break up the individual bit groups into seperate parameter components, something like:

    Code (Text):
    1.     VoiceSMPS   $04,$1F,$20,...
    Not that I'm a fan of macros or breaking information up, mostly because the people who do it usually leave it messy looking. But I'm sure with careful aligning and some thought, a compromising software alternative to editing SMPS voice instruments, without looking like pure shit, will prove to be useful to some.
     
  3. Cinossu

    Cinossu

    Administrator
    2,830
    16
    18
    London, UK
    Sonic the Hedgehog Extended Edition
    S1SMPS2ASM would like a word with you:

    Code (Text):
    1. ;   Voice 00
    2. ;   $08,$0A,$70,$30,$00,$1F,$1F,$5F,$5F,$12,$0E,$0A,$0A,$00,$04,$04,$03,$2F,$2F,$2F,$2F,$24,$2D,$13,$80
    3. ;               #
    4.     smpsVcAlgorithm     $00
    5.     smpsVcFeedback      $01
    6. ;               op1 op2 op3 op4
    7.     smpsVcDetune        $00,    $03,    $07,    $00
    8.     smpsVcCoarseFreq    $00,    $00,    $00,    $0A
    9.     smpsVcRateScale     $01,    $01,    $00,    $00
    10.     smpsVcAttackRate    $1F,    $1F,    $1F,    $1F
    11.     smpsVcAmpMod        $00,    $00,    $00,    $00
    12.     smpsVcDecayRate1    $0A,    $0A,    $0E,    $12
    13.     smpsVcDecayRate2    $03,    $04,    $04,    $00
    14.     smpsVcDecayLevel    $02,    $02,    $02,    $02
    15.     smpsVcReleaseRate   $0F,    $0F,    $0F,    $0F
    16.     smpsVcTotalLevel    $80,    $13,    $2D,    $24
    And a few simple setting macros to get it working, the last does all the "work"..

    Code (Text):
    1. smpsVcFeedback macro val
    2. vcFeedback set val
    3.     endm
    4.  
    5. smpsVcAlgorithm macro val
    6. vcAlgorithm set val
    7.     endm
    8.  
    9. smpsVcDetune macro op1,op2,op3,op4
    10. vcDT1 set op1
    11. vcDT2 set op2
    12. vcDT3 set op3
    13. vcDT4 set op4
    14.     endm
    15.    
    16. smpsVcCoarseFreq macro op1,op2,op3,op4
    17. vcCF1 set op1
    18. vcCF2 set op2
    19. vcCF3 set op3
    20. vcCF4 set op4
    21.     endm
    22.    
    23. smpsVcRateScale macro op1,op2,op3,op4
    24. vcRS1 set op1
    25. vcRS2 set op2
    26. vcRS3 set op3
    27. vcRS4 set op4
    28.     endm
    29.    
    30. smpsVcAttackRate macro op1,op2,op3,op4
    31. vcAR1 set op1
    32. vcAR2 set op2
    33. vcAR3 set op3
    34. vcAR4 set op4
    35.     endm
    36.    
    37. smpsVcAmpMod macro op1,op2,op3,op4
    38. vcAM1 set op1
    39. vcAM2 set op2
    40. vcAM3 set op3
    41. vcAM4 set op4
    42.     endm
    43.    
    44. smpsVcDecayRate1 macro op1,op2,op3,op4
    45. vcD1R1 set op1
    46. vcD1R2 set op2
    47. vcD1R3 set op3
    48. vcD1R4 set op4
    49.     endm
    50.    
    51. smpsVcDecayRate2 macro op1,op2,op3,op4
    52. vcD2R1 set op1
    53. vcD2R2 set op2
    54. vcD2R3 set op3
    55. vcD2R4 set op4
    56.     endm
    57.    
    58. smpsVcDecayLevel macro op1,op2,op3,op4
    59. vcDL1 set op1
    60. vcDL2 set op2
    61. vcDL3 set op3
    62. vcDL4 set op4
    63.     endm
    64.    
    65. smpsVcReleaseRate macro op1,op2,op3,op4
    66. vcRR1 set op1
    67. vcRR2 set op2
    68. vcRR3 set op3
    69. vcRR4 set op4
    70.     endm
    71.    
    72. smpsVcTotalLevel macro op1,op2,op3,op4
    73. vcTL1 set op1
    74. vcTL2 set op2
    75. vcTL3 set op3
    76. vcTL4 set op4
    77.     dc.b    (vcFeedback<<3)+vcAlgorithm
    78.     dc.b    (vcDT4<<4)+vcCF4,(vcDT3<<4)+vcCF3,(vcDT2<<4)+vcCF2,(vcDT1<<4)+vcCF1
    79.     dc.b    (vcRS4<<6)+vcAR4,(vcRS3<<6)+vcAR3,(vcRS2<<6)+vcAR2,(vcRS1<<6)+vcAR1
    80.     dc.b    (vcAM4<<5)+vcD1R4,(vcAM3<<5)+vcD1R3,(vcAM2<<5)+vcD1R2,(vcAM1<<5)+vcD1R1
    81.     dc.b    vcD2R4,vcD2R3,vcD2R2,vcD2R1
    82.     dc.b    (vcDL4<<4)+vcRR4,(vcDL3<<4)+vcRR3,(vcDL2<<4)+vcRR2,(vcDL1<<4)+vcRR1
    83.     dc.b    vcTL4,vcTL3,vcTL2,vcTL1
    84.     endm
     
  4. MarkeyJester

    MarkeyJester

    Time to Grow Up. Resident Jester
    2,127
    253
    63
    Japan
    Ah, well there you go ^ job done...
     
  5. Retroman

    Retroman

    Member
    732
    2
    18
    alternatively, if you have fl studio, you can use the vopm vst with the OPM pack to get the settings.
    Here is the OPM link to every Genesis game imaginable:
    http://www.mediafire.com/file/ynnygzowyzw/2612org OPMs.zip

    And VOPM, well can't be stuffed linking it.

    Edit: http://www.geocities.jp/sam_kb/VOPM/