7 #include "simpletools.h" 16 print(
"C6, ch 0, volume = 127\n");
20 print(
"C6, ch 0, volume = 0\n");
23 print(
"C6, ch 0, volume = 64\n\n");
27 print(
"All f = 0\n\n");
31 print(
"ch 0, volume = 127\n (default for all channels)\n\n");
35 print(
"ch 0, f = 3000\n");
36 print(
"ch 1, f = 3003\n");
40 print(
"All f = 0\n\n");
70 print(
"All f = 0\n\n");
75 print(
"ch0-C6, ch1-E6, ch2-G6\n");
82 print(
"All f = 0\n\n");
89 print(
"C6 waveforms\n");
115 print(
"All f = 0\n\n");
123 print(
"All f = 0\n\n");
132 print(
"Chord array - not working, debugging info\n");
133 print(
"=========================================\n");
140 HOLD0, 0.125, 0.125, 0.125, 0.5,
143 HOLD1, 0.125, 0.125, 0.125, 0.5,
151 sound_playChords(audio, chords);
#define END
Notes player end.
void sound_volume(sound_t *device, int channel, int volume)
Set volume for one of the sound process' four channels.
#define HOLD0
Notes player hold channel 0.
#define BEAT_VAL
Notes player beat value.
#define CH1
Notes player channel 1.
#define SQUARE
Square wave.
Functions for creating tones. 4 channels, tone waveform options include sine, square, triangle, and saw. Incorporates Spin to C translation of sound components from Brett Weir's LameStation package.
#define HOLD2
Notes player hold channel 2.
sound_t * sound_run(int pin, int npin)
start a talk process, uses a cog.
#define HOLD1
Notes player hold channel 1.
void sound_wave(sound_t *device, int channel, int wave)
Set the waveform of one of the process' four channels.
#define CH2
Notes player channel 2.
void sound_freq(sound_t *device, int channel, int freq)
Set Hz the frequency transmitted by one of the sound process' four channels.
#define CH0
Notes player channel 0.
#define TEMPO
Notes player tempo rate.
#define TRIANGLE
Triangle wave.
void sound_note(sound_t *device, int channel, int note)
Make one of the sound process' four channels play a note.