build linear gesture interface for mnolth
task id: linear-gesture-interface2024-07-14 09:33: Indulging myself a little bit here #linear-gesture-interface
2024-07-14 10:52: Initial linear gesture interface work #linear-gesture-interface
First, I'll build out the initial interface in Rust, which will wrap the existing linear gesture node with a self contained vector of paths. I'll then write some C-style functions that make it possible to do the following: initialize, append, tick, and destroy. I will make a quick example of this in Rust, which will be a good stopping point.
The next parts involve actually getting this inside of mnolth/mnodes, and creating the glue code there.
2024-07-14 10:57: Initial scaffolding #linear-gesture-interface #timelog:00:26:58
2024-07-14 11:20: Creating an int to behavior wrapper #linear-gesture-interface #timelog:00:35:38
Using this as an opportunity to learn how to build a function with proper error handling and testing. I was going to do a more elaborte check validating each "okay" one, but it was less messy just to see it catch errors.
2024-07-14 12:01: Build an initial example using interface. #linear-gesture-interface #timelog:01:16:06
2024-07-14 12:11: Running into borrow-checker woes #linear-gesture-interface
2024-07-14 12:18: More borrow-checker woes. I am thinking of this problem wrong #linear-gesture-interface
Instead of building on the existing LinearGesture Generator, build a new gesture interface that owns a vector that can grow.
2024-07-14 12:29: Things work now. That's enough for now. #linear-gesture-interface #timelog:00:27:52
Going to work on the C interface next.
2024-07-14 13:59: Attempting the C interface #linear-gesture-interface
2024-07-14 14:47: Using C interface with Rust example. #linear-gesture-interface
I think I can do that right?
2024-07-14 14:50: We cannot make this both a crate and a library, but can we? #linear-gesture-interface
I did a bit of a hack, which was to duplicate "src/lib.rs", make it "src/clib.rs", and then add an example in the Cargo toml file.
2024-07-14 15:14: Time to get this in mnodes. #linear-gesture-interface
2024-07-14 16:38: Sidetracked. This will have to wait. #linear-gesture-interface
2024-07-14 18:44: Back on this... #linear-gesture-interface #timelog:00:53:38
Most of the day has been wasted away. Going to try to move quickly on this.
2024-07-14 19:40: Proof of concept done. Good enough for tonight? #linear-gesture-interface
Gotta compose now.
2024-07-15 08:42: After all that work yesterday, I didn't use any of it #linear-gesture-interface
I'll briefly try to defend the notion that it was mostly a good effort. For starters, I got very a convenient linear gesture interface, which required some moderate thinking about design in rust with ownership in mind. Secondly, I got Rust code working in mnolth for the first time, and this is important because it shows that I can leverage what I've done before to boost what I'm working on right now.
I've got a linear gesture interface that works pretty well in VoxBox, and I'd like to be able to use it with mnolth. I also want to be able to populate gesture from within lua. To do this, I'll need to build out an interface in rust, export a C interface, and write some mnolth glue code (mnodes).
mainly doing this so I can compose some of this audio telephone thing using mnolth. Frankly, the Uxn thing in GestVM is a bit cumbersome.... the setup time takes too long.