Skip to main content

enharm

enharm(
@x ? ## required
@y ? ## required
) -> llll/null
note

enharm is a built-in function in the bell programming language and is not unique or exclusive to bellplay~.

Given some pitch @x and a diatonic step @y relative to @x, returns the corresponding enharmonic value or respelling of that @x.


Arguments

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

Output

Enharmonic pitch [llll/null]

warning

enharm will return null without raising an error if required arguments are not provided.


Usage

enharm(E4, 1); ## returns Fb4
enharm(C4, -1); ## returns B#3