23  PolyObjects

A PolyObject groups SoundObjects inside another Score. Move the PolyObject on the parent Score to move the whole phrase; open it to arrange its contents relative to one another. Use it for a section, a recurring figure, or a group that needs one time behavior or Note Processor chain. PolyObjects can contain other PolyObjects, so a long piece can be organized in levels.

23.1 Create a nested score

Right-click a SoundObject layer and choose Add SoundObject → PolyObject. The new container is empty, so it generates no notes yet. Double-click it to enter its nested Score. Add a SoundObject layer there if the container does not already have one, then place GenericScore, PianoRoll, or other objects as in the main Score.

The path in the Score toolbar shows which container you are editing. Click an earlier segment to return to a parent, or Root to return to the top-level Score. Check the path before editing when several containers have similar names. The Score’s Ruler and Snap controls use the project’s shared time settings while you navigate the path; changing them in a nested view also changes the root view.

To group existing material, select SoundObjects in the parent Score, right-click the selection, and choose Convert to PolyObject. Blue places the new container at the earliest selected start and shifts the children to positions relative to that start. Reopen it to inspect their positions and layers. This is a project-history edit, so use Undo if the grouping is not what you intended. The new container starts in Scale mode, which can change the generated note timing and duration; choose None to keep the child phrase’s original timing. AudioClips cannot be converted this way.

23.2 Understand parent and child time

Each child keeps a position within the PolyObject. For example, a child note at local beat 2 in a PolyObject starting at beat 10 begins at beat 12 on the parent Score, before any scaling or repetition. Moving the PolyObject offsets the whole phrase; moving a child changes only its local position. Resizing the container may do more than change its visible width:

  • Scale fits the generated child phrase to the PolyObject’s Subjective Duration. This is the initial behavior of a new PolyObject.
  • Repeat loops the child phrase to fill the container. Use a Repeat Point when the next pass should begin at a particular interval.
  • Repeat (Classic) repeats complete cycles but includes only whole notes that fit in the last partial cycle.
  • None leaves the child note timing as generated inside the container, regardless of the container’s visible width.

When generating a finite render range, Blue checks nested note starts against the child-local end before adding the PolyObject’s parent placement. This keeps notes inside the selected outer range when the child end has been rebased; a note whose start is exactly at the end remains included, matching the existing inclusive boundary rule. Nested PolyObjects rebase those notes to the render start only after the outer placement is known, so an inner container does not drop them early. SoundObjects that clip their own event duration have their separate behavior described in SoundObjects.

Set these in Score Object Properties while the PolyObject is selected in its parent. To preserve the child phrase’s timing as written, choose None. Then right-click the PolyObject and choose Set Subjective Time to Objective Time to set its duration from the notes currently generated by its children. The command waits for child generation, including Python or Clojure objects and runtime-backed Python processors, then measures the result after the PolyObject’s own Note Processor chain and current Time Behavior. With None, the command measures child output without applying this PolyObject’s scale or repeat; child behavior and the processor chain still affect the result. With Scale, generated notes normally reach the current bar end, so the command generally leaves the duration unchanged. With Repeat, trailing silence in the last cycle can make the generated notes end before the bar, so the command can shorten it. If a required Java runtime is unavailable, generation fails, the project changes while measurement is pending, or the generated output has no positive duration, the command reports the reason and leaves the duration unchanged. Install Java 17 or newer when a child or processor requires it. Repeat the command after changing children or processors. The duration change is undoable with Edit → Undo. The Time chapter explains positions, durations, and ruler views. The nested Score currently shares the project’s ruler and snap state; entering a PolyObject does not give it independent ruler settings.

With Repeat, the repeat point is the interval between cycle starts. If children generate one-beat notes at local beats 0, 1, and 2, a six-beat PolyObject with no repeat point plays that three-beat phrase twice. Set a 2.5-beat repeat point and the cycles instead start at 0, 2.5, and 5. Blue clips the note crossing each cycle boundary; the final cycle contains only the note that starts at beat 5. Inspect the generated CSD when overlapping or truncated repeats matter.

23.3 Process the whole phrase

The PolyObject’s Note Processor chain acts on the notes combined from its children, before the PolyObject’s Time Behavior scales or repeats them. For example, if several children put pitch in p5, an AddProcessor targeting p5 can shift them together. A processor cannot infer that one child’s p5 means frequency while another child’s means something else; check field meaning across the group before applying a shared chain.

Because this chain runs before Repeat, its result is copied into each cycle. To process the complete repeated phrase afterward, place the repeating PolyObject inside a second PolyObject and put the processor on the outer one. The nested layers and the root Score can have their own processor chains too. Use Project → Generate CSD to Screen to verify final values and timing.