Skip to content

leeMeredith/bbox

Repository files navigation

bbox

A Max UI external for spatial event detection and coordinate tracking.

bbox accepts coordinates from either mouse interaction or external data sources such as Jitter, OSC, OpenCV, MediaPipe, or custom tracking systems. It reports enter/exit events, continuous position tracking, and optional motion-analysis data from a rectangular region.

Features

  • Mouse-driven spatial interaction

  • Coordinate-stream input via list x y

  • Enter and exit detection

  • Continuous position tracking

  • Multiple coordinate spaces:

    • Local
    • Patcher
    • Screen
  • Motion follower output:

    • Position
    • Velocity
    • Acceleration
    • Angle
    • Moving / Stopped detection
  • Named send/receive integration

  • Inspector support and help documentation

Quick Start

  1. Install bbox.mxo into your Max Packages or search path.
  2. Create a bbox object in a patch.
  3. Unlock the patch and resize the object to define the active region.
  4. Connect the outlets to your patch logic.

Outlet 0 outputs:

  • 1 when a point enters the region
  • 0 when a point exits the region

Outlet 1 outputs:

  • x y coordinates of the tracked point

Outlet 2 outputs tagged follower messages:

  • pos
  • vel
  • accel
  • angle
  • moving

Input Modes

Mouse Mode

bbox tracks the mouse cursor automatically.

List Mode

Send coordinates directly:

[list x y]

Examples:

  • Jitter blob tracking
  • OSC tracking systems
  • OpenCV
  • MediaPipe
  • Custom sensors

Attributes

coordspace

Select the coordinate system reported by outlet 1.

  • Local
  • Patcher
  • Screen

continuous

When enabled, bbox continuously outputs while inside the region.

When disabled, bbox outputs only on enter/exit transitions.

follow

Follower mode:

  • Off
  • Inside
  • Both

Provides smoothed motion-analysis data on outlet 2.

Building

bbox is built using the Cycling '74 Max SDK and CMake.

Build the project using Xcode or your preferred CMake workflow.

Documentation

See:

  • bbox.maxhelp
  • Inspector descriptions
  • Reference documentation included with the object

License

bbox is released under the MIT License.

Copyright (c) 2026 JD Clemon Lee Meredith

About

A transparent bounding-box spatial event detector for Max 9

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors