skeletonffd / max-pd-converter

A node script that converts MaxMSP patches to PureData and vice versa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

max <=> pd converter

A Node.JS script that converts MaxMSP patches to PureData or vice versa. At the moment not all objects are compatible with the conversion or alternatively named in the output to ensure compatability. This may result in Pd- or Max-patches that are not immediately working because of syntax errors in the patches. You will have to check your .pd or .maxpat output for these errors and fix the patches where needed. Abstractions/Externals are not supported. It also depends on your version of Pd/Max and which libraries you have included. This converter can however work as a quick'n'dirty starting point for converting your patches without having to repatch everything. Future versions may have better syntax corrections.

This is a work-in-progress and contributions are welcome!

Newest Features

  • Support for slider with size preference
  • Support for segmented messages with ,
  • Support for variables in messages $1 $2 ...
  • Support for arguments in abstractions # => $
  • Recursive conversion of subpatchers are now supported in the Max to Pd converter (not yet in the Pd to Max converter).

Screenshot

Install

$ git clone https://github.com/tmhglnd/max-pd-converter
$ cd max-pd-converter
$ npm install

Quickly test and see result in the test folder

$ npm test

Usage

convert single max-patch

$ npm start <path>/myMaxPatch.maxpat

or pd-patch

$ npm start <path>/myPdPatch.pd

or convert multiple files in one line

$ npm start <path>/patch1.maxpat <path>/patch2.pd <path>/patch3.maxpat ...

The result is stored in the same folder as the original file and named identical as the original except with the opposite extension:

myMaxPatch.maxpat => myMaxPatch.pd
myPdPatch.pd      => myPdPatch.maxpat

Contribution

  1. Fork this repository (click fork in the top right)
  2. Clone the repository to your computer git clone https://github.com/<this-is-you>/<forked-repo>.git
  3. Branch the Fork git checkout -b <name-your-branch>
  4. Make the changes to the code
  5. Add, commit and push your changes git add . git commit -a git push origin <your-branch-name>
  6. Go to your forked repo in the browser and click compare & pull request, then create pull request

License

The MIT License

Copyright (c) 2020 Timo Hoogland

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A node script that converts MaxMSP patches to PureData and vice versa

License:MIT License


Languages

Language:Max 85.6%Language:JavaScript 14.4%