Giter Site home page Giter Site logo

jaxter184 / pytwig Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 2.0 270 KB

Looking for new maintainer. Or someone to figure out how device encryption/compression works. Also, this repository is outdated. Please go to https://gitlab.com/jaxter184/pytwig

License: GNU General Public License v3.0

Python 100.00%

pytwig's People

Contributors

jaxter184 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

pytwig's Issues

Decoding UTF-16 Strings fails sometimes

I've found at least one recent Preset where the current method of reading a UTF-16 String in the PREPEND_LEN mode will fail. I have a fix and could PR, but I'm not sure I fully understand the situation so I'm starting with an issue.

In this case, the UTF-16 String will only decode in Big-Endian mode, and for some reason the default is Little-Endian. I don't know how the defaults or how Bitwig saves them are chosen.

My quick solution here is in read_str and to adjust the decoding portion to:

					str_bytes = self.read(str_len * (char_len))
					try:
						return str_bytes.decode(char_enc)
					except UnicodeDecodeError:
						return str_bytes.decode('utf-16-be')

It's not the best fail-safe, but in this case it's working for the existing and problem Presets.

New encoding method in 3.0

In BW 3.0, .bwmodulators, .bwdevices, and .bwmodules (new) use a new encoding for the non-metadata portion of the data. This new encoding does not carry over to project files, so pytwig still works on those. Presumably, clips and presets are also still the same.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.