Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Purpose

To define a note to play on the

Objectif

Définir une note à jouer sur le buzzer.

When to use

When you want to play something.

Where to use

Typically at the top of the file, in a color pattern, or when calling SetColor

Quand l’utiliser

Quand vous voulez jouer quelque chose.

Où l’utiliser

Typiquement en début de fichier, dans une mélodie, ou lors de l’appel de PlayTune.

Main prototype and parameters

Notes are defined using their frequency in Hertz, as you would with a simple int.

Constants

The CRC defines the following constants, which represents the standard musical notes:

  • NOTE_B0

  • NOTE_C1

  • NOTE_CS1

  • NOTE_D1

  • NOTE_DS1

  • NOTE_E1

  • NOTE_F1

  • NOTE_FS1

  • NOTE_G1

  • NOTE_GS1

  • NOTE_A1

  • NOTE_AS1

  • NOTE_B1

  • NOTE_C2

  • NOTE_DS8

The first letter (A, B, C, etc.) defines the note, the optional S denotes if the note is sharp and the number defines the octave

Note

Note is a type that includes a pitch and a duration, used for a tune played by the CrcDuino. Note::END indicates the end of the tune.

Note

Make sure to add Note::END at the end of your pattern, else very weird tune will be played.

Use it as such:

Code Block
// Define a tune. Notice the Note::END at the end.
const Note TUNE_METRO[]
    = { { 500, NOTE_FS4 }, { 500, NOTE_B4 }, { 800, NOTE_FS5 }, Note::END };
Filter by label (Content by label)
sorttitle
excerptTyperich content
cqllabel = "ar-crclib_funct_utilities"