Skip to main content

degree

degree(
@x ## required
) -> llll/null

Converts a pitch or MIDI cents value to the C-based diatonic scale degree as an integer (0-based).


Arguments

  • @x [int/float/llll] Numeric llll.(required)

Output

Diatonic scale degree [llll/null]

warning

degree is a built-in function in the bell programming language and is not unique or exclusive to bellplay~. As such, degree will return null without raising an error if required arguments are not provided.


Usage

degree(c5 e5 g5) ## 0 2 4