12-21-2022, 10:06 PM
(12-21-2022, 09:56 PM)proxemics Wrote: @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:
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()
Thanks for you snippet!
Indeed JS is not the most wonderful language in the world
... anyway I'll experiment further.Please list also your must have features for the offline editor here as well, so I can set priorities :-)

