Quote:
Originally Posted by Lokasenna
That's good to know - I got really frustrated trying to come up with a more reasonable way to do that.
|
I think that I found a way to reduce your frustration even more
I came across a lua library called "lupy", a simple Python-like OO implementation for lua. It does a lot of things that I don't even understand, nevertheless I made a toy example with encapsulation.
You can define virtual functions, not sure if the term is correct. I mean you define the function in the object file and then override it in your main script.
Extract the Zip-File under "C:\Program Files\REAPER (x64)". For simplicity I also included the lupy code. Load AKAI_MPK25_Track_Control.lua in Reaper as usual. Try left and right clicking on the pads.
lupy:
https://github.com/uleelx/lupy
other OO libs:
http://lua-users.org/wiki/ObjectOrientedProgramming
HTH
Nz0