home/ atoms/ renardo-player-synthdef-syntax

Renardo players receive SynthDef instructions via the `>>` operator and play patterns continuously

In Renardo (inheriting from FoxDot), pre-created Player objects (p1, d1, b1, etc.) are assigned instrument instructions using Python’s bitshift >> operator overridden to mean ‘play this’. The right side is a SynthDefProxy created by calling an instrument name as a function: p1 >> pluck([0, 2, 4]). The player loops the pattern indefinitely until reassigned or stopped. Reassigning with >> swaps the instruction live without a gap. Stopping uses p1.stop() or Clock.clear() to stop all players. Pre-created player variables mean you never need to instantiate a class — just pick a two-character name and use it.

Examples

p1 >> pluck([0, 2, 4, 7])    # plays a loop
p1 >> pluck([0, 1, 2], dur=0.5)  # reassign live
p1.stop()                    # stop just p1
Clock.clear()                # stop everything

Assessment

What does p1 >> bass([0, 3, 7]) do that p1 = bass([0, 3, 7]) does not? How do you change what p1 plays without stopping the music?

“Instances of `Player` are given instructions to generate music using the `>>` syntax, overriding the bitshift operator, and should be given an instance of `SynthDefProxy`.”
corpus · renardo-python-over-supercollider-foxdot-successor-with-buil · chunk 76