com-posers-pit / smw_music

11 stars 3 forks source link

Incorrect KDn immediately following SNn commands #93

Closed werneta closed 1 year ago

werneta commented 2 years ago

@com_poser, can you upload the musicxml for the MM11 piece that had this bug?

werneta commented 1 year ago

Got more information. It's when there's a KDn etc. that's at the start of a loop or superloop

werneta commented 1 year ago

This file shows how this can happen:

Broken Percussion Loop.mxl.zip

Which generates:

#amk 2

; beer v0.2.3
; Built: 2023-02-18 03:02:40 UTC

#spc {
    #author  "COMPOSER HERE"
    #title   "Broken Percussion Loop"
    #game    "GAME NAME HERE"
    #comment "Ported by: PORTER NAME HERE"
}

; PORTER: GLOBAL VOLUME HERE
w128

; PORTER: INSTRUMENT DEFINITIONS HERE

; Percussion definitions
"CR3_ = @22 CR3_n" "CR3_n = o6 c"
"CR2_ = @22 CR2_n" "CR2_n = o5 b"
"CR   = @22 CRn"   "CRn   = o5 a"
"CH   = @22 CHn"   "CHn   = o5 g"
"OH   = @22 OHn"   "OHn   = o5 f"
"RD   = @22 RDn"   "RDn   = o5 e"
"RD2_ = @22 RD2_n" "RD2_n = o5 d"
"HT   = @24 HTn"   "HTn   = o5 e"
"MT   = @23 MTn"   "MTn   = o5 d"
"SN   = @10 SNn"   "SNn   = o5 c"
"LT   = @21 LTn"   "LTn   = o4 a"
"KD   = @21 KDn"   "KDn   = o4 f"

; Echo settings

$EF$00$00$00
$F1$00$00$00

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Macro magic.  Look, but don't touch.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Instrument definitions.  Smoosh together the instrument voice definition
; with its dynamics, articulation, and pan definitions

; This is a way to use a hex value in a volume command.  We want to use hex
; values because that's how volume fades work.  Update the corresponding
; dynamics marks in each instrument.
"vPPPP = $E7$_PPPP"
"vPPP  = $E7$_PPP"
"vPP   = $E7$_PP"
"vP    = $E7$_P"
"vMP   = $E7$_MP"
"vMF   = $E7$_MF"
"vF    = $E7$_F"
"vFF   = $E7$_FF"
"vFFF  = $E7$_FFF"
"vFFFF = $E7$_FFFF"

; Magic hex values are no fun, we'll give them nicer names
"LEGATO_ON     = $F4$01"
"LEGATO_OFF    = $F4$01"
"GLOBAL_LEGATO = $F4$02"
"CRESC         = $E8"
"DIM           = $E8"
"PAN_LEFT      = y20"
"PAN_MID_LEFT  = y15"
"PAN_CENTER    = y10"
"PAN_MID_RIGHT = y05"
"PAN_RIGHT     = y00"
"VIB_OFF       = $DF"

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Staff 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

#0 GLOBAL_LEGATO /

l4
KD (100)[ [[ KDn]]3] ; Measure 1
[[ SN]]4 (100) ; Measure 2
r ; Measure 3

The problem is there's no KD at the start of the loop, so the snare gets retriggered at the end of measure .