playNote
Canonical ID: music.playNote. Nederlands: speelNoot.
Plays an individual synthesized note without replacing other audio. A rest uses the note text R.
This function plays one pitch. Use a score with startMelody or startOrchestra for chords and tempo changes.
Signature
playNote(note, beats = 1, tempo = 120, instrument = "chip")
Example
# language: en
playNote("C4", 2, 120, "bell")
playNote("E4", 2, 120, "bell")
playNote("G4", 2, 120, "bell")
wait(1)
Values and host support
Audio calls return None and do not block. Volumes are finite numbers from 0 to 100. Track names are case-sensitive text, 1–64 Unicode code points, with no control characters and not only whitespace. There are at most 16 named tracks and 32 simultaneous voices. Notes use C4, C#4, Bb3 or R; a score adds :beats. Beats range from 1/64 to 64; tempo is 20–400. Instruments include chip, bell, pluck, flute, drums and the 128 exact gm. instrument IDs in the instrument picker. See the music guide for score bounds and lifetime.
Sounds use packaged project paths, not arbitrary files or URLs. A WAV example requires that asset in the .bipli project. Native Windows/Linux/Pi supports bounded PCM WAV; other codecs depend on the IDE/browser. Synthesis requires no asset. The text-only CLI and phone preview do not play this audio.