Formatting output optimal for processing in Max

    May 18 2010 | 9:08 pm
    With this thread I like to get opinions of the MFL community for the output format of complex objects in Max. After explaining a real live example I will ask 3 questions for your opinions.
    The demo is for Windows. I don't know if it will work on Apple.
    I’ve written a MFL interface for the Novation Launchpad. It will also work with the software only. So stay tuned! The most obvious use is to place it inside a bpatcher and to add circuitry to make it do something useful.
    In my demo a js object is added to create a rainstorm sequencer, a recreation of Lukas Fittl’s device demonstratd at Honour to this young Austrian!
    The direction has changed from top-down to left-right. At the top a start/stop and a reset button are added and it plays in sync with Live 8th notes. This application is written in Javascript.
    As a seasoned C# programmer I tend to see Max objects as the equivalent of functions. When working with javascript this works quite well. I want to recreate this program in Max. This gets me into some issues for choosing the most useful output format.
    Currently the syntax for asking the colour of a led/button is: [top|matrix|right] get [column-number] and for matrix leds additionally [row-number] The answer is currently: [top|matrix|right] color [0-7].
    1. The position of the led is currently not in the output format. The javascript for rainstorm has to save the position of the led for witch the colour is asked. To prevent mismatches it is clear that the position of the led should be added to the output. But should this come before or after the colour information?
    The colour of a led can be asked for several reasons. I’m not certain that after asking a colour because a button was pressed the first output answers this question and is not an output for the working of the sequencer. In Max there is no function call, only goto. This can be solved by adding a symbol (or even a js object) to the input. This symbol should be part of the output to lead the processing in the right direction. For instance the input of the launchpad emulation could be ‘matrix get 3 4 ShiftIt’
    2. The output can be various. a. ShiftIt 3 4 color b. ShiftIt color 3 4 c. matrix ShiftIt 3 4 color d. matrix ShiftIt color 3 4 What is optimal for processing in Max language?
    I’ve found ‘route’ and ‘unpack’ the objects of choice for decoding a sequence of symbols.
    3. Are there other objects I should *really* need to learn for decoding of symbol sequences?