Lume
    Preparing search index...

    Class ArcWheel

    ArcWheel generates a twelve-segment circle. Each segment is an arc, with each arc representing a note on the chromatic scale.

    Hierarchy (View Summary)

    Index

    Accessors

    • get noteEnvelope(): ADSREnvelope

      Returns the noteEnvelope, which is used to calculate the color and size of active notes.

      The release property of the envelope is unused, as this drawer does not keep track of notes once they've been deactivated.

      Returns ADSREnvelope

      Default (no argument) instance of ADSREnvelope.

    • set noteEnvelope(value: ADSREnvelope): void

      Sets the value of the noteEnvelope property.

      Parameters

      Returns void

      It is recommended to avoid using the same envelope for different CanvasDrawer components, as Keyboards will automatically set sustain to 0 in order to comply with Lume's style guide.

    • get radius(): number

      Returns the radius of the arc.

      Returns number

      Because of strokeWeight, this value is not technically the center of the circle unless you calculate radius using the center of the arc lines.

      256
      
    • set radius(value: number): void

      Sets the radius of the arc.

      Parameters

      • value: number

      Returns void

      Value must be zero or greater.

    • get segmentGap(): number

      Returns the gap (in degrees) between segments on the wheel.

      Returns number

      8
      
    • set segmentGap(value: number): void

      Sets the gap (in degrees) between segments on the wheel.

      Parameters

      • value: number

      Returns void

      Value must be zero or greater.

    • get sizeBoost(): number

      Returns the amount that the keys increase in size when hit.

      Returns number

    • set sizeBoost(value: number): void

      Sets the amount that the keys increase in size when hit.

      Value must be greater or equal to zero. Setting this value to zero means that the buttons never change in size.

      Parameters

      • value: number

      Returns void

      Value must be zero or greater.

    • get strokeCap(): "round" | "butt" | "square"

      Gets the stroke cap.

      Returns "round" | "butt" | "square"

      The values that strokeCap accepts are technically string literals, derived from constant values declared by p5 directly:

      • P5.ROUND
      • P5.SQUARE
      • P5.PROJECT

      It is recommended to use this constants rather than strings directly.

      P5.ROUND
      
    • set strokeCap(value: "round" | "butt" | "square"): void

      Sets the stroke cap.

      Parameters

      • value: "round" | "butt" | "square"

      Returns void

    Constructors

    Methods

    • Called by the rendering engine on every frame.

      When overriding this method, ensure that the p5 instance is configured properly. For example, rectangles may be drawn incorrectly if a previous CanvasDrawer had modified p5.rectMode(). CanvasDrawer classes are not obligated/expected to use the default p5 attributes.

      See the p5 documentation on attributes for more information: https://p5js.org/reference/#Attributes

      Returns void