-
Notifications
You must be signed in to change notification settings - Fork 1
simple pad
senso edited this page Jun 22, 2026
·
2 revisions
#example #drawing #mouse #persistence #automation #control #graphics
Multi-pad XY controller with automation recording.
| Module Name | simple pad |
| Type | mtControl |
| Color | clInterfaceDesignModuleColor |
| Source | examples/SimplePad/ |
An interactive multi-pad XY controller. Drag 4 pads on a 2D canvas and output their X/Y coordinates as arrays. Supports automation recording, randomization, chunk persistence, and quick color changes.
| # | Name | Type | I/O | Callback |
|---|---|---|---|---|
| 0 | randomize position |
ptButton |
Input | ctNormal |
| 1 | arr pos x |
ptArray |
Output (DontSave) | ctNormal |
| 2 | arr pos y |
ptArray |
Output (DontSave) | ctNormal |
- Mouse down: Hit-tests against all 4 pads (elliptical detection) to select one
- Mouse move: Drags the selected pad with offset compensation
- Mouse up: Releases the pad
-
onPaint: Draws 4 points usingsdkDrawPoint - Randomize: Repositions all pads randomly
- Hit detection: Elliptical distance test for pad selection
-
Chunk system:
onGetChunkLen/onGetChunk/onSetChunkfor pad position persistence -
Automation recording:
sdkProcessRecordAutomation/sdkStopRecordAutomation+onSetRecordedValue -
CanRecord = TRUE— enables Usine's automation recording -
onSetQuickColor— responds to global quick color change - Contextual commands and settings panel
-
sdkDrawPointfor rendering pads
onGetModuleInfo · onInitModule · onGetParamInfo · onCallBack · onGetChunkLen · onGetChunk · onSetChunk · onCreateSettings · onSettingsHasChanged · onCreateCommands · onPaint · onMouseMove · onMouseDown · onMouseUp · onRandomize · onSetRecordedValue · onSetQuickColor
- DrawBox — Simpler mouse interaction
- DrawTrajectoryBox — Advanced path drawing with chunks
- Granulator — Another module with automation recording