Returns the boost threshold.
The boost threshoold refers to the time (in milliseconds) that it takes a newly formed diamond to go from it's boosted size to it's normal size.
Sets the boost threshold.
Sets the color for held notes.
Returns the color used for activated notes.
Sets the note
Returns the stroke width of the lines that form each diamond.
Sets the stroke width for the diamond.
Determines the maximum note value that DiamondChord will accept.
Notes that exceed this value will have DiamondChord lower the value of all the notes until all notes are equal or lower than the maximum note value.
Returns the size multipler.
Sets the size multipler property.
The size multiplier is multiplied with a midi note to help determine it's base size.
Returns the size offset.
Sets the size offset property.
The size offset property is added onto the size of all diamonds, increasing their sizes by a flat amount.
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
Invoked by the rendering engine to generate a frame.
DiamondChord generates a hollow diamond for each currently active MIDI note. The size of each diamond is determined by the MIDI note values, with smaller values producing a smaller value, and vice versa.
Remarks
The properties that determine the sizes of the diamonds are sizeOffset, sizeMultiplier, and maximumNoteValue. The formula used is a linear equation where sizeOffset is the constant, and sizeMultiplier is the slope. The property maximumNoteValue overrides this functionality if there are any note values above it, to ensure that the diamonds never exceed a certain size.