PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Examples
Badge
08 Speech
06 Singing.c
1
/*
2
Singing.c
3
Place C2 before a word to pronounce it using a pitch that's a C note
4
in the second octave. If next note is in the same octave (like D), it
5
doesn't have to be followed by the octave digit. Just make sure it's
6
upper-case. For flat notes, follow the note letter with -, like E-.
7
*/
8
9
#include "
simpletools.h
"
// Include simpletools library
10
#include "
badgetools.h
"
// Include badgetools library
11
#include "
text2speech.h
"
// Include text2speech library
12
13
talk
*spkr;
// Talk process ID/data pointer
14
15
void
main
()
// Main function
16
{
17
badge_setup
();
// Start badge systems
18
spkr =
talk_run
(9, 10);
// Start talk process
19
20
oledprint
(
"C Major\n"
);
// Display scale C Major
21
talk_say
(spkr,
"see m\'ayjer."
);
// Say notes
22
talk_say
(spkr,
"C2doa,Dray,Emee,Ffah,Gsoal,"
);
23
talk_say
(spkr,
"Alah,Btee,C3d%200oa."
);
24
25
oledprint
(
"C Minor"
);
// Display scale C Minor
26
talk_say
(spkr,
"see m\'aener."
);
// Say notes
27
talk_say
(spkr,
"C2doa,Dray,E-mee,Ffah,Gsoal,"
);
28
talk_say
(spkr,
"A-lah,Btee,C3d%200oa."
);
29
}
30
simpletools.h
This library provides convenient functions for a variety of microcontroller I/O, timing,...
talk_say
int32_t talk_say(talk *talkId, char *ptr)
Pronounce speech using strings spelled phonetically. Make sure to look over the function details (fol...
Definition:
talk.c:323
main
int main(void)
Definition:
GraphicsTest.c:20
oledprint
int oledprint(const char *fmt,...)
Use to display strings on the oLED display in a manner similar to displaying combinations of strings ...
Definition:
peb_text.c:4
badge_setup
int badge_setup(void)
Set up all available badge drivers. Call this function at the start of any given program to allow acc...
Definition:
badgealpha.c:29
badgetools.h
This library provides convenient functions for a variety of Parallax eBadge operations.
text2speech.h
Pronounces words spelled out phonemically. This library is a spin2cpp.exe translation of Phil Pilgrim...
talk_run
talk * talk_run(int pin, int npin)
Run a talk process, uses a cog.
Definition:
talk.c:164
talk
Definition:
text2speech.h:101
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17