Comments (2)
For such questions, what you should do in general is to create the simplest possible <name>.maxpat
file to demonstrate your requirement using the Max application and then save the file. Then look at the .maxpat
file in an editor and see how the changes you made are implemented in the .maxpat
file.
So for the above requirement, create a single object in a Max file (let's say a [cycle~]
) and populate the scripting name of the object from the Max application's inspector (let's say 'osc1') and then save. Then look at the file that was created in an editor and you will find that the Scripting Name
field is implemented as varname
in the .maxpat
file.
So from py2max, you would then do the following to give an object a 'scripting name':
from py2max import Patcher
p = Patcher("outputs/test_scripting_name.maxpat")
p.add_textbox('cycle~ 440', varname='osc1')
p.save()
Incidentally, I have added the above case as a test (see tests/test_scripting_name.py
)
You maybe thinking why we don't implement a scripting_name
keyword api that maps between scripting_name
and varname
at the py2max level. The answer is because the current py2max implementation tries to minimally reflect the lower-level api of a .maxpat
file and if you make a change in a py2max program you should be able to immediately check if that change is reflected in the .maxpat
file. The tradeoff is that you have to remember that varname
is mapped to Scripting Name
in the Max Application.
It may be that in the future, one can implement a higher-level py2max api which reflects the api from the Max Application side. In this case you would use scripting_name
rather than varname
, but underneath the lower-level part of py2max would still be generating varname
.
from py2max.
Thanks. I appreciate the detailed description. And it is helpful to know there is an easy way to find and specify additional values.
from py2max.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py2max.