Skip to content

Yamaha SPX Checksum calculation #250

Answered by dnaldoog
damiensellier asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Damien,

Below are a couple of functions that should work! Looks like the offset from start is 6 bytes.


function checkSumMemoryBlock(sum)
    -- Yamaha checksum formula = checksum = ( NOT sum + 1 ) AND 0x7F
    -- thanks to IntEyes for this
    -- https://yamahamusicians.com/forum/viewtopic.php?t=6864
    local cs = bit.band(bit.bnot(sum) + 0x01, 0x7F)
    return cs
end --end function
---------------------------------------------------------

Here is how I did it with an incoming MemoryBlock:
YAMAHA CHECKSUM_1_0_2021-04-07_23-00.zip


myMethod = function(--[[ CtrlrModulator --]] mod --[[ number --]], value --[[ number --]], source)
    local offset, csEox = 6, 2
    mf =
        Memory…

Replies: 2 comments 48 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
48 replies
@dnaldoog
Comment options

@dnaldoog
Comment options

@damiensellier
Comment options

@dnaldoog
Comment options

@dnaldoog
Comment options

Answer selected by damiensellier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants