Macaw OS C reference

Function music_note

#include <macaw.h>
void music_note(int channel, int instrument, double n, double volume);

Plays one note on the music chip straight away, with an instrument from the last song played. Use it for music that answers what the player does.

Parameters

channelint
Which of the chip's 16 channels plays it, from 0 to 15. A new note on a channel takes over from the last.
instrumentint
Which of the song's instruments plays it, from 0 to 15. If no song has set it up, nothing plays.
ndouble
The note's number, as notenumber gives it: 49 is C-4, middle C. Fractions fall between two notes.
volumedouble
How loud, from 0 to 1. Any number below 0 means 1.

In Songs and the music chip, with playsong, stopsong, loadsong, playloadedsong, freesong, music_volume, music_release, notenumber, notename.