Skip to content

How to programmatically edit plugin state (to convert existing patches to Dexed) ? #402

Answered by probonopd
probonopd asked this question in Q&A
Discussion options

You must be logged in to vote

Here is a Python version of the en/decoder that seems to work for me:

#!/usr/bin/env python3

# This script implements the non-standard JUCE implementation of Base64 encoding/decoding
# https://github.com/juce-framework/JUCE/blob/master/modules/juce_core/memory/juce_MemoryBlock.cpp#L353C1-L411C2

encodingTable = ".ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+"

def _setBitRange(size, data, bitRangeStart, numBits, bitsToSet):
    bite = bitRangeStart >> 3
    offsetInByte = int(bitRangeStart & 7)
    mask = ~(((0xffffffff) << (32 - numBits)) >> (32 - numBits))
    while numBits > 0 and bite < size:
        bitsThisTime = min(numBits, 8 - offsetInByte)
        tempMask = (…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@probonopd
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by probonopd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant