Renardo's `.fadein(n)` method ramps amplitude from 0 to full over n beats
The .fadein(n) method on a Player gradually raises amplitude from 0 to its target value over n beats. This is a one-shot operation — after n beats the player plays at full volume. It is often used to introduce a new layer smoothly, avoiding a jarring entry. The corresponding .fadeout(n) ramps down to 0 and then stops the player. Both methods return the player object, allowing chaining with other player methods. Combined with .eclipse(), they give live coders expressive control over layer dynamics without manual var() construction for amplitude.
Examples
p1 >> pluck([0,2,4,7], amp=0.8)
p1.fadein(32) # 32-beat fade-in
# fade out and stop:
p1.fadeout(16)
Assessment
What is the functional difference between p1 >> pluck([0,2,4], amp=linvar([0,0.8],32)) and p1 >> pluck([0,2,4]); p1.fadein(32)? Which is easier to type live?