Tape Timeline
Control tape timeline visibility and display
The strip is off for a tapp until requested
To display timeline - equest it with tape_timeline_show(true), and point it at the tapp's own params with tape_timeline_setup() plus tape_timeline_attach_params().
Show or hide the tape timeline widget
| bool | state | true to show, false to hide |
REMEMBERED, like ui_hints_show() and ui_statusbar_show(): the firmware records the request against the CALLING image and replays it every time it re-derives the screen, so one call in init() survives a menu round-trip with no on_resume() handling. Keyed per image, so a co-resident source tapp and standalone tapp cannot overwrite each other's.
Show or hide the time display on the timeline
| bool | state | true to show, false to hide |
Configure timeline geometry and track count
| uint8_t | tracks | Number of tracks to display (1-4) |
| int_fast16_t | x | X position on screen |
| int_fast16_t | y | Y position on screen |
| uint_fast16_t | w | Width in pixels |
| uint_fast16_t | h | Height in pixels |
Zoom out to show entire tape
Zoom in to follow playhead
Zoom to fit loop region in view
Enable or disable loop mode visualization
| bool | state | true to enable loop shading, false to disable |
Switch to a different track
| uint8_t | tr | Track index (0-3) |
Bind the APP's params to a timeline track, instead of the tapehead singleton
| uint8_t | track | Track index (0-3), within the count given to tape_timeline_setup() |
| params_t* | pos | Playhead position, in tape positions (frames / 64) |
| params_t* | start | Loop/selection start |
| params_t* | end | Loop/selection end |
The app drives the three params from tick() and the widget follows - tick() must also return true while the transport is moving, since advancing the params does not by itself schedule the frame that repaints them.
Call after tape_timeline_setup() and before tape_timeline_show(true). The params must outlive the timeline - keep them in the app model, not on the stack - and the visible span is taken from the currently loaded tape, so there is nothing to size by hand.
tape_timeline_setup(1, 8, 206, SCREEN_WIDTH - 16, 28); tape_timeline_attach_params(0, &m->tl_pos, &m->tl_start, &m->tl_end); tape_timeline_switch_track(0); tape_timeline_show(true);
Register a custom overlay drawn over the finished timeline widget
| tapp_statusbar_gfx_cb | cb | Draw callback `(gfx, x, y, w, user)` - same signature as the statusbar cell |
| void* | user | Passed through to the callback |
The callback fires on the UI task each frame the timeline is drawn - which is each frame that gets painted at all, i.e. the ones the app's tick() requested - AFTER the widget has fully rendered - waveform, playheads, loop shading, marks, cues and the live-record waveform are already on screen. Draw on top of them; do not redraw them. x/y/w are the widget's current on-screen rect; the height is not passed (five parameters is the gateway ceiling) - it is the value given to tape_timeline_setup(), and the callback's drawing is clipped to the widget's actual box either way. Pass NULL to remove; the firmware also clears the hook when the app is unloaded.