Davidmk Posted July 27, 2023 Report Posted July 27, 2023 Just wondering if anyone else has been writing scripts in TouchOSC Mk2. I've been playing with it for a few weeks now and I'm getting close to a finished busking interface for FLX (S) that is customisable (without changing the code) that you can operate from a tablet or a laptop. It also accepts MIDI over USB if you were using MIDI already and like physical controls. Its not ready for sharing yet but, while I still have a tenuous grip on my sanity, thought I'd see if anyone else is fighting lua who might like to share experiences and ideas. PM me if you are interested or have any tips on remaining sane while coding. 1 Quote
chrisw Posted December 12, 2023 Report Posted December 12, 2023 How did you get on with this? I’m just about to experiment to see if I can make a PC-based button wall for jumping straight to given cues on sub masters. Quote
Davidmk Posted December 13, 2023 Author Report Posted December 13, 2023 It was hard work but I did make something workable that I've been using live for a few months. I'm quit pleased by it. It was supposed to be customisable and sort of is but I've sort of forgotten what I need to do to make a 'clean' version. I've got a few weeks off after Friday so I guess I'll be on the laptop for most of them. Hints... If you have programming experience you may feel like putting a lot of code in the root so that you only have one copy and using messaging to execute it. Snag with that is the sending module will hang until the processing initiated by the message has completed. Find the Lua manual online here as well as the TouchOSC manual here. Refer to both often. There are scripting examples online - Google them yourself. Use label & text objects that have the visible property set to false to store values you want to share among modules. Get the hang of the hierarchy. Modules live in a tree structure where you can refer to them relatively (self.parent.children.object-name) or directly (root.children.object1-name.children.object2-name). You can also use array notation (root.children[pointer]) and loops to simplify code. (I'm not doing this with code examples in front of me, I hope I've got the notation right) Try out arrays. You can have arrays of anything including arrays. Check out the functions especially the callbacks and these. Finally, happy to indulge in a DM conversation as long as you accept that I cannot always get back quickly. 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.