Macaw OS C reference

Function note

#include <macaw.h>
double note(const char *name);

Works out the pitch of a named note, to give to tone.

Parameters

nameconst char *
The note's name, like "A4", "C#5" or "Eb3", in capitals or small letters.

Returns double

The note's pitch in hertz (note("A4") is 440), or 0 if it can't read the name.

In Sound, with sfx, play, tone, stop, music.