copy/paste number box
Hello,
perhaps a stupid question:
Is it possible to copy/paste values from/to number boxes in presentation mode ?
Best,
abs
Same problem here. Has someone a hint ?
Or is it simply not possible ;-)
This should be possible. But it might not be easy. I suggest you investigate copying/pasting in Max more generally, and not just for number objects. I don't need to do this myself (yet!) but I've just had a look to see if I can point you in the right direction. I found two different approaches suggested on the forum:
Object or method to interact with the clipboard (copy/paste)? In this thread, there is a recommendation to use Jeremy Bernstein's shell external, which you would need to download to Max's Library folder or elsewhere on Max's search path. It does not support 64-bit Windows, so I was unable to get it to run. However, if you are using MacOs or are one of the few people still using 32-bit Windows, it looks promising and fairly easy to get to work.
Object or method to interact with the clipboard (copy/paste)?
A Java solution is given in this thread. I don't have Java on my PC, so I've not tried it.
Also, it looks like you should be able to do this with node.js, which you can run inside Max using the node.script object. You will need Max 8 or later. For an introduction to using node.js in Max, see Node For Max Intro – Let’s Get Started!. There appear to be multiple ways to access the clipboard in node.js, such as clipboardy.
Finally, if you can code in any other conventional programming language, you could roll your own solution. Because my programming skills are in C#, which unfortunately cannot be used to write Max externals, I would add clipboard access to the C# utility application I've already written, which communicates with Max via OSC.
Hello Simon,
Thank you very much for your response.
It is funny that such a simple task seems to be that complex.
Just copying one value of a number box to another one ...
btw. here you can find a 64bit version of the shell object ;-)
https://cycling74.com/forums/shell
Vm
Yes, I tried that 64-bit version of shell. But I got an error message. It's possible there's something extra I've got to do to get it working. But the release notes for shell in that thread mention 64-bit support for MacOs but only 32-bit support for Windows.
It's a workaround but you can copy/paste using the 11olsen's external "11stroke"..
One can use few objects like mousestate,
hover, etc to store a value when object is clicked and insert that value
into another object if one holds a key, like ctrl for example when mouse is released.
I'd prefer that than fiddling with clipboard.
here one basic example :
P.S. numbers need scripting name, forgot to mention.
if you are looking for a custom solution:
i am using keyboard commands to copy and paste values (or groups of values) between parts of a program.
to do so, all controls in every place would be hooked up to one global [v foo] to store their last status and one global [v foo] where "pasting" can be triggered from.
you can drive the principle further by using different [v]s for different purposes (so that e.g. a filter preset can not be pasted in reverb program.)
Yes, it all hinges on the requirement. Does it include getting data in and out of Max? When I posted suggestions for accessing the clipboard, I perhaps naively assumed so . Or as later clarified by @Videomaker, the second of the two contributors who asked for help, only for passing data between Max objects?
It is funny that such a simple task seems to be that complex. Just copying one value of a number box to another one ...
If the requirement is only for passing data between Max objects , then as others have explained, clipboard access is unnecessary and, I concur, best avoided.
It would be interesting to get clarification of the requirement from the original questioner, @Abs11.
Hello All,
Thank you very much for all your time and interesting solutions.
But I just tried to copy one numerbox vaue into another numerbox of the same type.
What i tried: changed the value of a numerbox then pressed cmd c.
Result: I only get an alert sound
Same on Mac and PC.
Max seem to block the copy action.
As I mentioned before, perhaps a stupid question :)
Here is a small patch:
Best,
abs
Only few max objects allow copy and paste of values.
numbers that you want to use definitely not.
If you select any object that contains some info
while patch is locked, you can see if copy and paste menu items
are active or not.
If you want to copy from one numberbox to a dedicated selection of other number boxes, you may consider a 'paste' button beside each numberbox.
If you have more of this stuff, colors can help to show different copy-possibilities. To avoid many object-cables, you can use pvar and pattrforward or (maybe better) pattrstorage to observe and process numbers and buttons.

For a more flexible system you can also have multiple masters and either add a "copy from here" button or make multiple paste buttons in different colors (red button copies red master, green button copies green master etc).
Hi Peter,
These are really two clever and elegant solutions.
Thanks for sharing !
Best,
abs
Hello,
Ist funny, that we have to implement such a basic task by ourselves.
But cool, that there is always a creative solution ;-)
Thanks a lot to the community !
Perhaps a feature request to cycling74 for the future to let us copy/paste values.
Vm
the numberboxes already have far too much functions built in. :)
But one function is missing! No, not copy/paste.
The numberbox should have an outlet for text in display format. Like [umenu].
MIDI notes, Hex etc. Mei, wär des schen ...
i´ve always thought it is strange that it can display converted stuff but not output it.
well, but after a few years then we learned to do the same with regexp, isn´t it?
ehm ... no :-)
Regex baby here.