Saturday, July 2, 2011

MIDI Remote Script Design Challenges

I have been spending free or non-music time I have had on programming something similar to Hans Petrov's MIDI Remote Script for the Akai APC40, but for Native Instruments' Maschine. The Maschine did come with it's own script and controller template for Ableton Live, but I guess I want to create a better one. I want it to integrate the two workflows more, specifically during live performance.

_Framework is a component set, written at Ableton, that can be composed and extended to make Live interact with the different parts of midi controllers. The script could plausibly be simple combinations of these classes in one file or if you want more complex controller interaction, split up over multiple files in folders. So in my vision for VoidMaschine, there are multiple functions for different groups of elements on it, so there will need to be states or modes built into the way the elements work. That could possibly be over-architected to become more work than I need to so for the script, though. Someone might be drinking cool-aid, saying "Always use a design pattern, or beware the wrath of [insert cool-aid drinker's preferred language progenitor or platform demi-god's name here]!!! But, don't worry, be happy with shitty code, "it works, doesn't it?" "But is it scalable?" "I'll scale you, dude, how's that?" JK about that drama, I intend on building states into the script in whatever way such thatit'll be easier to modify later and that is appropriate for each mode/element combination.

I have confusion about the APC40_* script, particularly in the code doing something like what I want to do. For instance, some of the classes in the APC40_* source are prefixed by 'shiftable', e.g. 'ShiftableTransportComponent' and 'ShiftableSelectorComponent'. These both extend different classes. 'TransportComponent' and 'ModeSelectorComponent', respectively. This confuses me a little. I know that these are for toggle behavior for a component(pressing a modifier or 'shift' button to complete an action) AND for a 'mode' component. The second looks more like a traditional state machine, but without too much documentation, I want the class naming to be self-documenting at least, yet I also think I need to study the code more.

The VoidMaschine script has a has very similar behavior to the APC40_* script. The functionalities of Live that they control are represented by component classes that combine groups of control elements:

1 row of 8 buttons,
2 displays,
1 row of 8 knobs,
7 miscellaneous buttons,
8 group buttons,
8 transport control buttons,
3 master section knobs,
8 'mode' buttons ('scene', 'pattern', 'pad mode', etc next to the pads)
16 velocity sensitive pads

The current script does these things:

The transport controls are mapped so:
'restart' : play/restart
'play' : stop (yeah)
'rec' : record
'erase' : back to arrangement
'<' & '>' : time-line navigation
Note Repeat is mapped to tap-tempo
Master Volume is mapped to the Volume knob
Master Tempo is mapped to the Tempo knob (that's nice, it says what it is mapped to, whew)

I have 6 Group buttons blocked out for up(B) down(F) left(E) right(G) navigation of the infamous session box. While the last 2 are up(D) & down(H) for vertical scene navigation. The 'scene' mode button triggers the currently selected scene. A & C stay dark (for now...).

The pads trigger clip slots, but they don't light up to show you that they have a clip in them. I am not sure I can use Hanz' APC script as a model for setting up the launch buttons. The button class that he created utilizes different midi note values which correspond with the lights in the APC40's buttons. Maschine doesn't seem to expose any internal color or blinking state for it's buttons, so I am working on a timer-based blinking state for the clip buttons in the script. Par for the course, but the APC script has a scrolling behavior that is triggered if you hold the navigation buttons for a second or so. My experience with timers has been to use them or events that they trigger to create animation frame loops, in just about every other language I know, just not Python yet(go figure).

Finally, I have basic identification of the project name and authorship displaying on the two screens upon initialization of the script. This was an amazing epiphany for me when I discovered how to use the screens in Controller mode. I am pretty sure I was the first to do this, but it depends on how you look at it. I am simply sending messages via sysex to a certain knob and it is showing up on the screen. I created simple constants with 14, 15, and 30 spaces in order to crudely format the lcds. I want to eventually integrate this behavior into the functionality of the various components, so that I can simply trigger events to display messages, both a persistent display explaining the states and names of the parameters being controlled toast messages(quick interruptions, like the name of a mode when you press that button). I would like the persistent display to be uncluttered and only show numbers or abbreviations of the param names, but to get both the number and the full name of a parameter, you need to hold some shift button and turn the knob. When doing this sort of identification, the knobs (continuous rotaries) would not transmit their messages.

Tuesday, February 22, 2011

Reaktor Tips: Introducing the Reaktor Sampler Pack

Amazing right out of the box, er, encrypted rar. These granular ensembles are super rad! I'd like to help get the word out about them. Looks like he uses Maschine as well as Reaktor. This is an ultimate setup. The patches that Peter shipped the Mirage with are gorgeous on their own. I can't wait to melt into these clouds of sonic condensation. This precipitates some amazing new work, I think. go buy these plugins!

Reaktor Tips: Introducing the Reaktor Sampler Pack: "I'm pleased to release three new granular sampling instruments for Reaktor: Frame 2, Loupe and Mirage. Each one has its own character and p..."

Monday, February 21, 2011

ctrl-alt-ded: im a blogger now? im a blogger now

ctrl-alt-ded: im a blogger now? im a blogger now
Yeah! My BFF - c:\f.r - Christopher is now blogging now too. Please subscribe to his blog for his gorgeous music and photos. Do it Chris!

Saturday, February 19, 2011

Groove-Boxing, Black-Ops, and Deranging Sound

I am finally getting back to developing the VoidMaschine script. I swear, I never wanted to stop. I am so into spending every second of my life programming, that I immediately qualify for a job at your company.. um yeah so anyway.. I moved in January and work has been a bit hectic, blah blah blah. I want to have the grid modes finished before offering the code to the Native instruments and Ableton forums so it is usable before it is even better than ever, which is what I am shooting for. Yeah, MIDI Control Script better than ever. That is the goal. That is what I am shooting for. That is the goal that I am shooting for and at. I hope that this project makes lots of groove-boxers happy.

oh yeah, the git repository is git://github.com/misterinterrupt/voidmaschine.git, nothing is guaranteed to work or even make sense, so let me know if you want to collaborate on this or want to use it and have any issues. Contact me in the comments here or wherever you find me on the stalknet.