[share] padKontrol device & Mootools JS LiveAPI abstraction

Learn about building and using Max for Live devices.
Post Reply
JoeM
Posts: 14
Joined: Thu Dec 20, 2007 6:55 am
Contact:

[share] padKontrol device & Mootools JS LiveAPI abstraction

Post by JoeM » Tue Mar 16, 2010 2:17 am

I was going to wait until this was polished before I shared, but what the hell. Here's an early preview of some stuff I'm working on in M4L.

This is basically two things.
1) A M4L device that is a modification of some publicly available Max patches for the Korg padKontrol. Max handles talking to the device and drawing the UI, the remaining logic is written in JS.
Right now it does basically nothing but make the pads light up on tap. It's an empty canvas with lots of ground work done for you.

2) It's the start of an OO JS abstraction for the M4L LiveAPI JS objects written in Mootools.
LiveAPI is great as far as functionality but it's very functional programming orientated, requiring lots of objects being created, used, and deleted and it not exactly intuitive.
I have only a start on the API, and not all is tested. Actually not much except for some clip triggering and play / stop stuff, but in theory other functions should work.

All of live_app and live_app.view is written
live_set has about a dozen useful functions written.

Most of what needs to be done in the JS library is handling observers, which are completely unimplimented, and also filling in missing/bare classes like clips and tracks.
I think eventually I will make a open source repo for the LiveAPI part.

This is built in a Makefile for clean JS so gnu make is required to build. OS X users just need XCode installed, Windows ppl need cygwin with gnu gcc installed. Running 'make' from the root directory builds the file liveKontrol.jso. The Makefile is kind of shitty right now so it's safest to run 'make clean; make' on each change to ensure a clean build.

For those interested in the padKontrol part, you need to run the helper patch/app udpKontrol. This is how M4L interfaces with the SYSEX messages, via Max udp messaging, since Live does not support SYSEX.
(Didn't include the compiled version as it's 25mb)

For those interested in the Mootools JS part, just look at the pink and blue boxes for examples of how input/output works. liveKontrol.js is the "main" logic of the app that passes messages to the liveKontrolDelegate object. You send bangs to the JS object to start the app. A new bang should cause a new fresh state, in theory.

Performance is instant FAST even with all the JS/OO/UDP messaging bloat.
Enjoy, and remember this is early concept code to try to get people to give some feed back or to help out.

- Download site down -
Last edited by JoeM on Fri Mar 26, 2010 4:10 am, edited 2 times in total.
Live 8 (boxed suite) - 17" MacBook Pro - Remote SL 37 - Audio DJ 8 - Korg padKontrol -
Hooked up as an effect device and live instrument for Traktor

Surreal
Posts: 560
Joined: Wed May 17, 2006 1:18 am

Re: [share] padKontrol device & Mootools JS LiveAPI abstraction

Post by Surreal » Tue Mar 16, 2010 2:32 am

you are a wonderful person.

ophidite
Posts: 59
Joined: Sun Feb 03, 2008 10:56 am
Contact:

Re: [share] padKontrol device & Mootools JS LiveAPI abstraction

Post by ophidite » Thu Mar 18, 2010 12:18 pm

Here is a Max patcher i found on http://fr.audiofanzine.com/surface-de-c ... L/astuces/

Enjoy

Post Reply