12-21-2022, 09:56 PM
(This post was last modified: 12-21-2022, 09:58 PM by proxemics.
Edit Reason: was escaping
)
@eliclement honestly, I'm not much of a javascript person, I was mostly interested in exporting some hidden markov chains beats, etc., into patterns. You are completely right that javascript is the way to go, though. I don't have much time in the next weeks but happy to brainstorm.
Here was the quick test:
Here was the quick test:
Code:
# open pattern
f = open('/Users/x/Downloads/2023_BLANK-EXPO_TR16.PTN', 'rb')
content = f.read()
f.close()
length=21
start = 69
# print pattern
for i in range(0,64):
s = content[start+length*i:start+length*i+length]
print(' '.join('{:02X}'.format(c) for c in s))
# dumb modify pattern
content = content.replace(b"\x88",b"\x07")
f = open('/Users/x/Downloads/2023_BLANK-EXPO_TR16.PTN', 'wb')
f.write(content)
f.close()
