how to edit mxf
Dear user,
can one edit the mxf?
Sincerely,
prko
What exactly are you trying to do?
lh
I want to know the structure of a patch, which I downloaded from internet.
And I want to add another function for me.
prko
Open the mxf with textedit or something equivalent. copy the patch part and paste it in a new patch in max.
thanks!
I'm really hoping for the day that Max uses a password and/or encryption or some other mechanism to stop people accessing anything outside of the presentation view. This would making distributing Max applications much less of a risk to the developer if they want to protect their IP or do commercial products.
Eddy
eddy, c74 do not care
I also want this, and have made that clear in a prior post. Having an option to encrypt the .mxf would be great and would give us more options for developing patches, both for ourselves and paying clients.
Along those lines, I've found a commercial product which looks promising: I've been able to get it to encrypt an .mxf and run it from the .exe in a standalone. I'm not totally sure it's foolproof, but the file that it makes out of the .mxf is a .bak and copying/pasting it into a new patch does nothing. So it's a possibility.
The downside is that it's kind of expensive, which is a reality for any commercial protection scheme, but it's not too bad (about 450 Euros). However, being able to encrypt the .mxf through an option in Max would be much better---we wouldn't have to use this particular scheme, and others (which don't offer the encryption option) could be used. Some of these others have more affordable or more flexible licensing options.
The one that appears to work can be found at:
It's PC only, and you need the XBundler plug-in which allows you to encrypt data files, most importantly the .mxf. Once the app runs you can throw away the .mxf, and the .exe loads the encrypted version on-the-fly.
They have a demo version that you can try first.
Thanks for the info seejayjames, but for me this wouldn't be an option as I develop cross-platform.
As it is, my target market is fairly small and niche and my patches are very big with a lot of subpatchers in them so one option I was considering was to actually obfuscate my distributed version by (working on a copy, obviously!) cramming everything into one spot on the background (including within all the subpatches), setting everything to black (text, backgrounds, borders etc.) and adding a goodly number of 'fake' connections and objects which don't do anything but are connected together in such a way as to make detangling it very difficult even if the patch was extracted, perhaps using some obfuscated javascript objects to 'peek' certain values in the 'dummy mess' (including the set colours, if possible, to ensure everything is set to black at runtime) to make sure that they are set to expected values for certain inputs etc. Potentially, I'd even extend this to checking that the position of certain key objects hasn't been changed as well.
It wouldn't be impossible to detangle but I could make it a heck of a lot of work for someone to do so I'm sure, and almost certainly beyond the means of anyone without some decent Max knowledge.
Eddy
The above notwithstanding, please, Cycling74, could you post something to give us an idea of your position on this? Sharing is good. Yes, sharing is great, but it's not the be-all and end-all of software distribution... after all, is the source code for Max available? ;-)
Eddy
Even knowing how to edit an mxf doesn't always work. I tested this method and nothing happened or I'm just copying too much code. It just looks like a jumble to me.
There's a lot of additional stuff in the .mxf, be sure you only get from the initial { to the end } in the patching part, so that it looks like a regular .maxpat.
I've thought about the patch obfuscation too, there's probably a lot of clever things you could do to make it not worth de-tangling, and since you have the ability to move/hide things, and connect/disconnect, you can do pretty much anything.
Maybe you could have keystrokes or a big ubutton over everything that simply closes the patch, or creates a stack overflow and crashes, unless they enter a password. That would be pretty easy to implement, but could be found (like [key] in the code). Anything that spits out a value with idlemouse could help with this.
[pattr] can bind to an object's patching_rect attribute, so it can tell you if that object is being moved. you could then shut things down perhaps. (btw that binding can also be used if you want different UI layouts, with objects of different sizes/positions...they become stored slots in the [pattrstorage]. pretty fun.)
Here's a thought I've been rolling around... can Max (and more importantly, the Runtime) open a patch from a text source rather than a file? And I specifically DON'T mean the clipboard, because that could be pasted into other apps. I mean from jit.textfile. Because then you could scramble the code characters in the matrix, distribute that as your "patch", then make an unlocker-patch which would descramble the code letters if the right password is entered. It would be straightforward with some combination of jit.spill/fill, jit.op, %, etc.
I was able to shift all the chars in the jit.textfile's output matrix: original patch-->garbage-->restored patch, so it's definitely possible. The only catch is that the restored patch can't be in a written file or on the clipboard, or it's vulnerable. As long as it's in matrix form it can be kept hidden. So... the question is whether Runtime can open a patch in this way?
Along these lines, doing some experimentation with the built-in text editor in Max is interesting, how it deals with compressed versus uncompressed versus plain text was a little surprising while I was messing with all this. Kind of a neat little exploration, making your own encryption patch...but if the Runtime can't open it in this way, I don't see how this method could work. Maybe there's another way though.
if you want to do commercial things, why don't you use an other programming language ? easier to encript. and let the max community growing with a sharing spirit. please don't take this like an agressive answer, just i'm a little bit disapointed and sad when i read this. money money money. the new god. but maybe i'm wrong...
I am quite happy to do shared work from time to time, but I'm working on something that has taken hundreds of hours of careful design, implementation and testing and implements a commercial-grade solution. I see no issue whatsoever with charging a nominal fee for it. It would have taken a lot longer using another language and the end result probably wouldn't have been of the same quality.
Furthermore, as a result of the ongoing project I'm already doing I have been asked to implement a similar solution for another target user group, which is something that would take nearly as long.
It saddens me to see this model of 'everything should be free', as it seems to have resulted in a whole generation of leechers. I don't think it should be free unless the developer decides to make it so. It's great that so many do and I have in the past and undoubtedly will in the future, but for some things I want the choice to charge for. I think it's sad if we have development tools that don't even give the developer that choice without having to jump through hoops.
Eddy
It saddens me to see this model of 'everything should be free',...
This is a bit inverted logic. In the case of max it is not a chosen model, but the result of choosing not to make it an issue. The latter part is, as far as I understand, what the official stance is that you inquired for, as can be read in one of the several threads of which this one is an almost exact repetition: c74 doesn't care. I don't believe that any request is heeded.
This regardless my own opinion.
_
johan
little sidenote: if one is working for hire, customers like to see at least some sort of protection in place, as they pay for the exclusive code. Also if I work for hours and hours instead of chilling at the beach I d like to see some return of invest.
If one doesn t get paid, then one can share as much as he / she wants. If you have a payed gig, your customer will potentially be furious finding the code he / she payed for floating around the internet.
I don t expect c74 to look into this, because they ve made their position very clear, and it also is kind of clever too, because now there s not only one
mechanism that needs to be hacked in order to access all max-based software and we all can be really creative about how to protect our code if we need to!
=)
Hi,
revisiting this post.
I also downloaded some MXF files and would love to study them.
When you said:
'Open the mxf with textedit or something equivalent. copy the patch part and paste it in a new patch in max.'
Exactly how am i able to know where that part begins and ends? The MXF file is quite dense.
Thanks in advance
Martin,
A long time passed from when you ask the question but it is the part of the file starts and ends with a brace ( = { and }), which is JSON format. see https://stackoverflow.com/questions/383692/what-is-json-and-why-would-i-use-it