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.

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

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.

Prototype principal et paramètres

Les notes sont définies par leur fréquence en Hertz, soit avec un simple int.

Constantes

La CRC definit les constantes suivantes, représentant les notes de musique standard:

  • 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 La première lettre (A, B, C, etc.) defines the définit la note, the optional S denotes if the note is sharp and the number defines the octavele S optionnel signale si la note est dièze et le nombre définit l’octave.

Note

Note is a type that includes a pitch and a duration, used for a tune played by the CrcDuino est un type qui inclut un ton et une durée, utilisé pour la mélodie jouée par la CRCduino. Note::END indicates the end of the tune indique la fin d’une mélodie.

Note

Make sure to add Assurez-vous d’ajouter Note::END at the end of your pattern, else very weird tune will be played.

Use it as such

à la fin de votre mélodie, ou une mélodie très étrange sera jouée.

Utilisez le ainsi:

Code Block
// DefineDéfinissez aune tunemélodie. Prenez Noticenote thedu Note::END atà thela endfin.
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"