p5.score

*

p5.score *

Workshop

📘 API Documentation

🕺Dancer Class —

The Dancer class represents a performer in a choreographic score. Each dancer follows a sequence of timed movements defined by position arrays and durations.

🧱 Constructor

new Dancer(x, y, durations, positions, color)

Creates a new dancer object.

Parameters:

  • x (Number): Initial x-coordinate.

  • y (Number): Initial y-coordinate.

  • durations (Array of Number): Duration of each movement in milliseconds.

  • positions (Array of Number): Sequence of x/y positions. Must be in [x1, y1, x2, y2, ...] format.

  • color (String): Color used to render the dancer.

Example:

let dancer = new Dancer(200, 200, [1000, 2000], [300, 300, 400, 400], "magenta");

🕒 Methods

moves()

Initializes the dancer’s movement sequence. This method schedules the dancer’s transitions based on the durations and positions provided.

Usage:

dancer.moves();

show()

Renders the dancer on the canvas at its current position. Typically called inside the draw() loop.

Usage:

function draw() {

dancer.show();

}

🎭 Stage Direction

The p5.score library includes built-in functions that return key stage positions as coordinate objects. These functions help choreographers place dancers using familiar stage terminology.

Each function returns an object with .x and .y properties corresponding to canvas coordinates.

Available Functions:

  • center() — Center stage

  • ul() — Upstage left

  • uc() — Upstage center

  • ur() — Upstage right

  • cl() — Center left

  • cr() — Center right

  • dl() — Downstage left

  • dc() — Downstage center

  • dr() — Downstage right

Usage:

let centerStage = center();

let upRight = ur();

let upCenter = uc();

let upLeft = ul();

let centerLeft = cl();

let centerRight = cr();

let downRight = dr();

let downCenter = dc();

let downLeft = dl();

🧪 Example: Multiple Dancers with Custom Timing and Paths

This sketch demonstrates how to choreograph three dancers using custom position arrays and durations. Each dancer follows a unique path and timing, creating layered movement across the canvas.

🔗 View this sketch on the p5.js Web Editor

🧠 What This Demonstrates

  • Three dancers with different starting positions and movement paths.

  • Custom timing for each dancer using millisecond durations.

  • Position arrays that define where each dancer moves over time.

  • A grid background for spatial reference .

📌 Notes

  • The dancer() class is where the magic happens

  • The moves() method likely schedules the dancer's movement based on the provided durations and positions.

  • The show() method renders the dancer at its current position.

p5.score Workshop

Are you a choreographer curious about code? Do you want to explore how computational thinking can expand your creative practice?

We invite movement artists to participate in p5.score, a workshop series that merges dance and code through the creative use of p5.js, a JavaScript library for visual and interactive programming. This project explores how code can generate visual iconography and dynamic environments for performance, offering new ways to think about choreography, improvisation, and the role of technology in dance-making.

This workshop takes place over two days, exploring movement scores, coding in p5.jsand beta testing the new p5.score library, currently in development.

What to Expect:

  • Hands-on sessions introducing p5.js as a choreographic tool

  • Experiments in algorithmic choreography and visual score generation

  • Collaborative exploration of the relationship between movement, code, and visual form

  • A supportive environment for artists of all technical backgrounds—no prior coding experience required!

Who Should Apply:

  • Choreographers and movement-based artists interested in interdisciplinary practice

  • Artists eager to explore new tools and rethink the role of the computer in creative processes

  • Those open to experimentation, collaboration, and play

Workshop Details:

Workshop Lead: Kate Sicchio

Dates: Sept 27 & 28th

Location: Richmond, VA

Participation: No cost to participants. Accommodation and travel stipend will be provided to selected participants.

Application Deadline: September 5, 2025


Can’t participate this time? No problem! This is an open source project and materials will be shared soon!

Two dancers moving with a floor projected score