0.4 roadmap for next release

Hi friends, I’ve started this topic as a way to have a minimal news feed for people interested in Scheme for Max. Today I’d like to share what we have coming up this summer in s4m 0.4. I’m hoping to get this out by the end of August, if not sooner.

I’ve added a new UI element that is a flexible lightweight grid. It’s similar to the jit.cellblock, except can update much faster, making it better suited to making immediate mode GUIs, where the gui refetches the entire grid of data on a clocked refresh. This is great for custom sequencers because it allows one to keep the view code entirely out of the engine code. You can update an s4m.grid object from a list, or from a new data structure, the s4m.array…

s4m.array is a new Max data structure implemented in C to make statically sized arrays. They hold a preset number of ints, floats, or pre-sized char arrays. The purpose of these is to work with the grid though you could use them for other purposes too. By combining the s4m.array and s4m.grid with Scheme vectors, it’s possible to refresh a very large matrix much faster than if one has to pass through the Max message layer. In my work, I write to the s4m.array from a view-model scheme object, copying data out of my sequencer’s vectors into the array, and then send a “readarray” message to the grid, which also does a contiguous memory copy into its framebuffer to update the UI. The result is that I’m able to run multiple very large grids update in an immediate mode GUI at low latency without issue. Here’s an example shot of a step sequencers UI using several grid elements and running in Live:

I’m also working on improving the Max4Live Live API integration. Right now it works very well, but requires a patcher to be created. If we’re lucky, I can make that patcher invisibly. The upshot is, imho, the most pleasant way of working with the Live API as the path-based API is a perfect fit for Lisp backquoted lists.For example, here is an implementation of a function to stop a clip. You can see that we can stick the live path in much as it looks in the documentation, with just a comma to escape the elements we want interpolated:

(define (stop-clip track slot)
  (live-api 'send-path `(live_set tracks ,track clip_slots ,slot clip) 
    '(call stop)))

Some other smaller features will make it in too: some more common macros and functions from Common Lisp, Racket, and Clojure, and some garbage collector convenience functions.

If you would like to help beta test, please post in the beta test topic, it would be great to get more people kicking the tires on this. And don’t forget that if you want to be notified of the release, you can watch the Announcements topic.

That’s looks really promising Iain!

These two new features could really fit in the system I’m building actually !

I’m controlling the state of my slabs (shader containers) via s4m as you can see in this gif.
test

For the moment between scheme and the object there is a Dict that store the state, and S4M communicate with the object via thispatcher.
I would like to also be able to manage how these slabs are connected together, and for this I need to manage nested arrays in the dict. I suppose your s4m.array could be really helpfull here :slight_smile:

About your new UI object, can we change the value of the number with the mouse or keyboard? And also do we have the possibility to attach a label to the numberbox ? Anyway is already something super interesting :slight_smile:

Nice, glad to see you are keeping up your work with it!

At the moment the grid is read only, but I was thinking that in a future version I would like to add some basic inputing as well. For labels, you could just add another grid on top (what I do in my example) or use one of the rows. I will gradually make it more sophisticated though.