A JSUI-based live.numbox replacement for Max/MSP
rob.numbox implements live.numbox functionality using JSUI, with patcher persistence and pattr integration working correctly.
*One remaining issue: Live parameter registration (see Known Issues)
- Mouse dragging for value adjustment with cursor locking
- Shift+drag for fine adjustment (0.02 step vs 0.5 normal)
- Cursor resets when reaching screen boundaries
- Double-click reset to initial value
- Focus management with visual indicators
- Arrow keys for value stepping (up/down, 0.5 step size)
- Text editing mode with number entry
- Input validation for numeric characters only
- Enter to commit, Escape to cancel edits
- Dynamic color adaptation using Live's LCD color scheme
- Active/inactive state visual feedback
- Text justification (left, center, right) via jsarguments
- Fixed 15px height matching live.numbox
- int - Integer display
- float - 2 decimal places
- time - Milliseconds with "ms" suffix
- hertz - Hz with "Hz" suffix
- dB - Amplitude conversion with "-inf" handling
- percent - Percentage with "%" suffix
- semitone - Semitones with "st" suffix
- MIDI note - Note numbers
- Custom/Native - Additional formatting options
- Complete save/restore with patcher persistence
- Parameter attribute restoration on load
- Inspector integration for all parameter settings
- getvalueof/setvalueof functions for pattr compatibility
- notifyclients() calls for parameter change notifications
- Dynamic range handling from inspector
- Add a JSUI object to your Max patch
- Load
jsui.numbox.jsinto the JSUI object - Optional: Add jsarguments for text justification:
left,centre, orright
Connect these objects for complete feature set:
[mousestate] -> [globalMouse $1 $2 $3] -> [jsui]
[key] -> [keyInput $1] -> [jsui]
[live.thisdevice] -> [active $1] -> [jsui]
- Range - Set min/max values
- Initial Value - Enable and set reset value
- Unit Style - Choose display format
- Parameter Name - For pattr integration
Despite implementing all documented parameter functions, one issue remains:
- Parameter doesn't appear in Live's automation lane
- Cannot be MIDI mapped in Live
- Live shows "Parameter index received from Max is out of range" error
The object works correctly for pattr and general Max use, but Live's parameter system doesn't recognize it as a valid parameter. All parameter functions (getvalueof, setvalueof, notifyclients) are implemented correctly.
- Max patches with full functionality
- Patcher persistence (saves/restores all state)
- Inspector integration
- User interaction (mouse, keyboard, focus)
- Visual theming and states
- Live parameter registration fix
- Max for Live device distribution
- Live automation recording
- Code comments with status tracking
- JSUI attribute reference:
jsui-object-prop.md
MIT
Robert Koster - Fixation Studios
June 30, 2025