Skip to main content

makepitchsc

makepitchsc(
@steps ? ## required
@cents ? ## required
) -> llll/null
note

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

Generates a pitch, given a number of @steps along the C-based diatonic scale, and the desired MIDIcents value in @cents.


Arguments

  • @steps [llll] (required)
  • @cents [llll] (required)

Output

Generated pitch value(s) [llll/null]

warning

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


Usage

$steps = 7 * 5; ## 7 diatonic steps * 5 octaves = C5
$target = 5900; ## B4 in midicents
makepitchsc($steps, $target) ## Returns Cb5