Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

notepat-remote: track-color logs + [i] re-emit (same as focus)

Mirrors the focus pattern for track color: live.observer → [i]
storage → sprintf → jweb. requestTrackColor now bangs the [i] so the
current color re-emits into a freshly-mounted piece (initial
observer fire happens before the piece has registered its handler).

window.acSetLiveTrackColor logs every push with the raw int and
decoded rgb so the Max Console reveals whether the track color
pipeline is reaching the piece at all.

+21 -9
+12 -8
oven/bundler.mjs
··· 1096 1096 { box: { id: "obj-live-path-parent", maxclass: "newobj", numinlets: 1, numoutlets: 3, outlettype: ["","",""], patching_rect: [10,570,280,22], text: "live.path this_device canonical_parent" } }, 1097 1097 { box: { id: "obj-live-observe-color", maxclass: "newobj", numinlets: 2, numoutlets: 3, outlettype: ["","",""], patching_rect: [10,600,220,22], text: "live.observer @property color" } }, 1098 1098 { box: { id: "obj-route-track-color", maxclass: "newobj", numinlets: 1, numoutlets: 2, outlettype: ["",""], patching_rect: [10,630,120,22], text: "route color" } }, 1099 - { box: { id: "obj-sprintf-track-color", maxclass: "newobj", numinlets: 1, numoutlets: 1, outlettype: [""], patching_rect: [10,660,480,22], text: "sprintf executejavascript window.acSetLiveTrackColor(%ld)" } }, 1099 + // Stash the track color int in an [i] so requestTrackColor can 1100 + // bang it to re-emit post-boot (mirrors the focus pattern). 1101 + { box: { id: "obj-track-color-i", maxclass: "newobj", numinlets: 2, numoutlets: 1, outlettype: ["int"], patching_rect: [10,655,40,22], text: "i" } }, 1102 + { box: { id: "obj-sprintf-track-color", maxclass: "newobj", numinlets: 1, numoutlets: 1, outlettype: [""], patching_rect: [10,680,480,22], text: "sprintf executejavascript window.acSetLiveTrackColor(%ld)" } }, 1100 1103 // ── Host-window focus detection ───────────────────────────────── 1101 1104 // [active] fires 1 when Live's window becomes the foreground window 1102 1105 // and 0 when it loses focus. Stashed in an [i] so requestFocus can ··· 1119 1122 // the live piece and abandons the bootstrap (chunks never fire). 1120 1123 { patchline: { source: ["obj-route-top", 1], destination: ["obj-goonline-msg", 0] } }, 1121 1124 { patchline: { source: ["obj-goonline-msg", 0], destination: ["obj-jweb", 0] } }, 1122 - // `requestTrackColor` / `requestFocus` from piece: bang the source 1123 - // so it re-emits the current value to jweb (the initial fire can 1124 - // happen before the piece is mounted, so without these the state 1125 - // never lands in the new document). 1126 - { patchline: { source: ["obj-route-top", 2], destination: ["obj-live-observe-color", 0] } }, 1125 + // `requestTrackColor` / `requestFocus` from piece: bang the stored 1126 + // [i] so it re-emits the last value into jweb (the initial fires 1127 + // can happen before the piece is mounted). 1128 + { patchline: { source: ["obj-route-top", 2], destination: ["obj-track-color-i", 0] } }, 1127 1129 { patchline: { source: ["obj-route-top", 3], destination: ["obj-focus-i", 0] } }, 1128 1130 { patchline: { source: ["obj-route-top", 4], destination: ["obj-print-log", 0] } }, 1129 1131 { patchline: { source: ["obj-route-top", 5], destination: ["obj-print-error", 0] } }, 1130 1132 { patchline: { source: ["obj-route-top", 6], destination: ["obj-print-warn", 0] } }, 1131 1133 // Unmatched messages (notedown/noteup/octave/focus/ping) → MIDI router. 1132 1134 { patchline: { source: ["obj-route-top", 7], destination: ["obj-route", 0] } }, 1133 - // Live track color chain: 1135 + // Live track color chain — stashed in [i] so requestTrackColor can 1136 + // bang it to re-emit: 1134 1137 { patchline: { source: ["obj-live-thisdevice", 0], destination: ["obj-live-path-parent", 0] } }, 1135 1138 { patchline: { source: ["obj-live-path-parent", 0], destination: ["obj-live-observe-color", 0] } }, 1136 1139 { patchline: { source: ["obj-live-observe-color", 0], destination: ["obj-route-track-color", 0] } }, 1137 - { patchline: { source: ["obj-route-track-color", 0], destination: ["obj-sprintf-track-color", 0] } }, 1140 + { patchline: { source: ["obj-route-track-color", 0], destination: ["obj-track-color-i", 0] } }, 1141 + { patchline: { source: ["obj-track-color-i", 0], destination: ["obj-sprintf-track-color", 0] } }, 1138 1142 { patchline: { source: ["obj-sprintf-track-color", 0], destination: ["obj-jweb", 0] } }, 1139 1143 // Host-window focus chain: [active] → [i] (storage) → sprintf → jweb. 1140 1144 // requestFocus bangs [i]'s left inlet to re-emit the stored value.
+9 -1
system/public/aesthetic.computer/disks/notepat-remote.mjs
··· 249 249 }; 250 250 window.acSetLiveTrackColor = (colorInt) => { 251 251 const n = Number(colorInt) >>> 0; 252 - if (!Number.isFinite(n)) return; 252 + if (!Number.isFinite(n)) { 253 + try { console.log(`[track-color] max push ignored (bad int ${colorInt})`); } catch {} 254 + return; 255 + } 253 256 liveTrackColor = [(n >> 16) & 255, (n >> 8) & 255, n & 255]; 257 + try { 258 + console.log( 259 + `[track-color] max push ${n} → rgb(${liveTrackColor[0]},${liveTrackColor[1]},${liveTrackColor[2]})`, 260 + ); 261 + } catch {} 254 262 }; 255 263 // Pull the current track color now — the Max patcher's 256 264 // `live.observer` fires once on device load (before this boot
system/public/m4l/notepat.com.amxd

This is a binary file and will not be displayed.