Shop OBEX P1 Docs P2 Docs Learn Events
Emic & Arduino - Problems, Solutions & Bohemian Rhapsody — Parallax Forums

Emic & Arduino - Problems, Solutions & Bohemian Rhapsody

Theman8631Theman8631 Posts: 3
edited 2013-10-10 14:22 in Accessories
I've run into some problems with the Emic2 w/Arduino Uno and wanted to share what I've found and the code I've used to solve those problems,
  • Normally, the X command to stop speech doesn't work when passed to the Emic as a string, but will work if sent a different way.
  • Keeping track of lines of code to check if the Emic is ready and making sure to send a \n after every command is tedious and a pain to keep track of,
  • Each string is passed to RAM and long strings QUICKLY fill up RAM and break stuff
  • Per the documentation other dectalk text should work such as the songs at, http://www.theflameofhope.co/SONGS.html but some of the phonetic formats have changed with dectalk updates.
Unlike the other commands the X command will only work when passed a certain way, when passed using the individual char method I put in the PrintEmicNoWait it works, perhaps someone can tell me why, I would assume emic would see an individual character from string.charAt the same as an individual string character but apparently not.

When EMIC doesn't understand something in dectalk you'll hear "Command error in file name". If your looking to update older dectalk texts you can find correct formatting in the dectalk 5.01 documentation @ http://www.parallax.com/sites/default/files/downloads/30016-Emic-Epson-Fonix-DECTalk-501-Users-Guide.pdf on page 60 on. I wish I could find a list of alphabetical phonetics but the best I've found so far are hunting through those pages, but it's good enough to update any dectalk stuff I've found. FYI the most common update I've seen needed is replacing older dectalk's accepted "L"'s with "LL"'s.

I wanted painless functions I could pass strings to the Emic without worrying if it was ready or not, and that could use strings loaded from flash memory instead of filling up RAM, and along the way I found a method to send the X command that the Emic would register, and this is the template I've made, hopefully other's can get some use out of it

TL;DR Bohemian Rhapsody.
// EMIC2 Template
#include <SoftwareSerial.h>
#include <avr/pgmspace.h>  //Needed for progmem objects

#define rxPin 2    // Serial input (connects to Emic 2 SOUT)
#define txPin 3    // Serial output (connects to Emic 2 SIN)
#define ledPin 13  // Most Arduino boards have an on-board LED on this pin
SoftwareSerial emicSerial =  SoftwareSerial(rxPin, txPin); // set up a new serial port

char buffer[675];    // Size of largest string I'd like to hog memory to send to EMIC, slight pause between strings sent.

//Put the long strings you wish to pass to the emic here and add them to the strings table.  
//Instead of only having a very few long messages you can pass before filing up and breaking RAM they will stay in flash and load to the above object "buffer" in RAM.
prog_char cheers0[] PROGMEM = "s[:phone arpa speak on][:rate 130][:n0][:dv gn 73][MEY<150,20> KIH<100> NX<50> YXOR<300> WEY<300> IH<100> N<50> DHAX<150> WRR<150,22> LL'<100> D<50> TUW<300,20> DEY<300> TEY<200> KS<100> EH<200> V<100> RIY<300> THIH<200,25> NX<100> YU<200> V<100> GAO<1100,27> T<100> TEY<150,20> KIH<100> NX<50> AX<300> B R EY<200> K<100> FRAH<200> M<100> AO<200,22> LX<100> YXOR<300,24> WRR<300,22> RIY<200,20> Z<100> SHRR<300> WUH<200> D<100> HXEH<150,25> LL<100> P<50> AX<300> LL AW<1100,27> T<100> ][:n0]"; 
prog_char cheers1[] PROGMEM = "S[:phone arpa speak on][:rate 130][:n0][WUH<150,27> DEN<75> N<50> T<25> YU<300> LL AY<200,26> K<100> TUW<300> GEH<200,27> T<100> AX<300,29> WEY<300,22> EY<300,17> EY<300,18> EY<300,22> EY<300,29> EY<300,30> EY<600,27> _<800> SAH<200,29> M<100> TAY<150>M<100> Z<50> YU<300,27> WAO<150,29> N<100> T<50> TUW<300,30> GOW<300,32> WER<300> EH<200> V<100> RIY<300> BAH<300,34> DXIY<300,32> NOW<200,30> Z<100> YXOR<300,29> NEY<450,30> EY<150,27> EY<800,25>EY<800,24> EY<400,25> EY<250,27> M<150>][:n0]";
prog_char cheers2[] PROGMEM = "S[:phone arpa speak on][:rate 130][:n0][AE<150,32> N<100> D<50> DHER<300> AO<200,34> LX<100> WEY<200,32> Z<100> G LL AE<200,30> D<100> YU<300,30> KEY<450,30> EY<150,27> EY<800,25> EY<800,24> EY<400,25> EY<250,27> M<150>][:n0]";
prog_char cheers3[] PROGMEM = "S[:phone arpa speak on][:rate 130][:n0][YU<300,32> WAO<150> NAX<150> GOW<300> WER<300,29> YU<300,27> KAE<200,25> N<100> SIY<450> AR<50> TRAH<150,32> BEL<100> Z<50> AR<300> AO<200> LX<100> DHAX<300,29> SEY<300,27> EY<600,25> M<300> YU<300,32> WAO<75> N<50> T<25> TUW<150> BIY<300> WER<300,29> EH<100,27> V<50> RIY<150,25> BAH<150> DXIY<150> NOW<500,27> Z<300> YXOR<300,25> NEY<450> EY<150,17> EY<150,20> EY<150,25> EY<150,29> EY<700,27> M<300>][:n0]";
prog_char cheers4[] PROGMEM = "S[:phone arpa speak on][:rate 130][:n0][YU<300,32> WAO<75> N<50> T<25> TUW<150> GOW<300> WER<300,29> PIY<300,27> PEL<300,25> NOW<800> PIY<150,32> PEL<150> AR<300> AO<200> LX<100> DHAX<300,29> SEY<300,27> EY<600,25> M<300> YU<300,32> WAO<75> N<50> T<25> TUW<150> GOW<300> WER<300,29> EH<100,27> V<50> RIY<150,25> BAH<150> DXIY<150> NOW<500,27> Z<300> YXOR<300,25> NEY<200> M<100>][:n0]";
prog_char stopdemo5[] PROGMEM = "SThis is text-to-speech please feel free to interrupt me before I finish this long speech."; 
prog_char phillip6[] PROGMEM = "SMaybe each human being lives in a unique world, a private world different from those inhabited and experienced by all other humans. . . If reality differs from person to person, can we speak of reality singular, or shouldn't we really be talking about plural realities? And if there are plural realities, are some more true (more real) than others? What about the world of a schizophrenic? Maybe it's as real as our world.";
prog_char phillip7[] PROGMEM = "SMaybe we cannot say that we are in touch with reality and he is not, but should instead say, His reality is so different from ours that he can't explain his to us, and we can't explain ours to him. The problem, then, is that if subjective worlds are experienced too differently, there occurs a breakdown in communication, and there is the real illness";
prog_char queen8[] PROGMEM = "S[:phone arpa speak on][:rate 200][:n0][:dv gn 75] [IH<200,23>Z<100>DHIH<200>S<100>DHAH<300>RIY<450>LL<150>LLAY<450>F<150>_<500>IH<200>Z<100>DHIH<200>S<100>JHAH<200>ST<100>FAE<200>N<100>TAH<300>SIY<600,20>_<400>KAO<200,22>T<100>IH<300>NAX<300>LLAE<400,23>N<150>D<50>SLLAY<500,22>D<100>NOW<150,18>AH<150>SKEY<200,23>P<100>FRAH<200>M<100>RIY<300>EH<300>LLAH<300,22>TTIY<600,18>_<500>OW<300,15>PAH<200>N<100>YXOR<300>AY<750>Z<150>LLUH<300>KAH<200>P<100>TUW<300>DHAX<300,16>SKAY<600,18>Z<150>AE<300,11>N<200>D<100>SIY<2400,20>][:n0]";
prog_char queen9[] PROGMEM = "S[:phone arpa speak on][:rate 200][:n0][:dv gn 73][AY<200,20>M<100>JHAH<300>STAX<300>POW<300>OR<300>BOY<600>_<300>AY<300,18>NIY<250>D<50>NOW<300,20>SIH<200,18>M<100>PAH<300,16>THIY<300,13>KAH<300,22>ZAY<200,23>M<100>IY<300,24>ZIY<300>KAH<450,23>M<150>IY<300,22>ZIY<300>GOW<600,23>LL IH<300,24>TEL<300>HXAY<600,23>LL IH<300,22>TEL<300>LLOW<600,23>EH<300,20>NIY<300>WEY<300>DHAX<300>WIH<300,18>N<150>D<50>BLLOW<450,23>Z<150>DAH<300,17>ZAH<150>N<100>T<50>RIH<300>LLIY<300>MAE<600,18>DXRR<300,6>TUW<300,10>MIY<1200,22>_<300>TUW<300,10>UW<300,11>MIY<1500>_<1000>][:n0]";
prog_char queen10[] PROGMEM = "S[:phone arpa speak on][:rate 200][:n0][:dv gn 73][MAO<300,15>MAX<1500>_<300>JHAH<200,11>ST<100>KIH<150,13>LL<100>D<50>AX<300,15>MAE<900>N<300>_<300>PUH<150,13>TAX<150,15>GAH<300,16>NAX<300,18>GEH<150,16>N<100>ST<50>HXIH<200,15>Z<100>HXEH<500,13>D<100>PEL<200>D<100>MAY<300,15>TRIH<300,16>GRR<300,18>NAW<300,16>HXIY<200,15>Z<100>DEH<500,13>D<100>_<600>MAO<300,15>MAX<1500>LLAY<200>F<100>HXAE<200,18>D<100>JHAH<200,22>ST<100>BIY<300,20>GAH<900>N<300>_<300>BAH<200>T<100>NAW<300,23>AY<200>V<100>GAO<200>N<100>AE<150>N<100>D<50>THROW<200>N<100>IH<200,20>T<100>AO<200,16>LX<100>AX<300,15>WEH<900,13>EY<900>_<300>][:n0]";
prog_char queen11[] PROGMEM = "S[:phone arpa speak on][:rate 200][:n0][:dv gn 73][MAO<300,20>MAX<1500>UW<300,18>UW<200,20>UW<150,21>UW<1800,20>_<300>DIH<150>DEN<100>T<50>MIY<200,21>N<100>TUW<300,20>MEY<300>KYU<300,18>KRAY<900>IH<300,11>FAY<200>M<100>NAO<200,18>T<100>BBAE<300>KAX<300,20>GEH<200>N<100>DHIH<200,21>S<100>TAY<200>M<100>TUW<300,23>MAR<300,21>OW<600,20>KEH<150,18>RIY<150,20>AO<700,23>N<200>KEH<150,18>RIY<150,20>AO<700,16>N<200>AE<150,11>ZIH<100>F<50>NAH<300,12>THIH<200,14>NX<100>RIH<300,13>LLIY<300,15>MAE<300,12>DXRR<1200,11>Z<300>_<300>][:n0]";
prog_char queen12[] PROGMEM = "S[:phone arpa speak on][:rate 200][:n0][:dv gn 73][TUW<300,15>LLEY<1400>T<100>_<300>MAY<300,11>TAY<200,13>M<100>HXAE<200,15>Z<100>KAH<900>M<300>_<300>SEH<150,13>EH<75,15>N<50>D Z<25>SHIH<300,16>VRR<200,18>Z<100>DAW<200,16>N<100>MAY<300,15>SPAY<450,13>N<150>BAO<300>DXIY<200,15>Z<100>EY<300,16>KIH<200,18>NX<100>AO<200,16>LX<100>DHAX<300,15>TAO<300>AY<200,13>M<100>_<600>GUH<200,15>D<100>BAY<600>EH<200>V<100>RIY<150,13>BAH<150,13>DXIY<300,15>_<300>AY<200,18>V<100>GAO<200,22>T<100>TUW<300,20>GOW<1200>_<300>GAO<150>DXAX<150>LLIY<300,23>VYU<300>AO<200>LX<100>BIY<300>HXAY<200>N<100>DAE<150,20>N<100>D<50>FEY<200,16>S<100>DHAX<300,15>TRUW<1700,13>TH<100>_<300>][:n0]";
prog_char queen13[] PROGMEM = "S[:phone arpa speak on][:rate 200][:n0][:dv gn 73][MAO<300,20>MAX<1500>UW<300,18>UW<150,20>UW<150,21>UW<1800,20>_<300>AY<600,21>DOW<150,20>N<100>T<50>WAO<300>NAX<300,18>DAY<900>AY<300,11>SAH<200>M<100>TAY<150,18>M<100>Z<50>WIH<300>SHAY<200,20>D<100>NEH<150>VRR<150>BIH<200,21>N<100>BOR<200>N<100>AE<200,23>T<100>AO<450,20>LX<150>][:n0]";
prog_char queen14[] PROGMEM = "S[:phone arpa speak on][:rate 200][:n0][:dv gn 72][AH<300,20>AH<300,11>AH<300,20>AH<150,18>AH<150,16>AH<900,23>AH<600,18>AH<300,20>AH<1500,25>AH<150,27>AH<150,28>AH<300,25>AH<150,27>AH<150,28>AH<900,30>AH<300,25>AH<150,30>AH<150,32>AH<150,33>AH<150,35>AH<600,37>AH<150,35>AH<150,33>AH<150,32>AH<150,33>AH<150,32>AH<150,30>AH<150,32>AH<150,30>AH<150,28>AH<150,30>AH<150,28>AH<150,27>AH<150,28>AH<150,27>AH<150,25>AH<150,27>AH<150,25>AH<150,23>AO<600>_<150>AH<150>AH<150,25>AH<150,27>AH<75,28>AH<75,30>AH<75,32>AH<75,33>AH<300,35>][:n0]";
prog_char queen15[] PROGMEM = "S[:phone arpa speak on][:rate 200][:n0][:dv gn 72][AH<150,23>AH<150,25>AH<150,27>AH<75,28>AH<75,30>AH<75,32>AH<75,34>AH<300,35>AH<900,37>AH<150,27>AH<150,28>AH<300,25>AH<150,27>AH<150,28>AH<300,25>AH<150,27>AH<150,28>AH<900,30>WAO<150,18>AO<150,20>WAO<600,22>WAO<600,30>WAO<900,21>WAO<600,14>_<300>WAO<300>WAO<300>WAO<300>_<3000>][:n0]";
prog_char queen16[] PROGMEM = "S[:phone arpa speak on][:rate 200][:n0][:dv gn 73][AY<300,15>SIY<150,13>AX<150>LLIH<150,12>DXEL<150>SIH<150,13>LLOW<150>EH<150,15>TOW<150>AH<150,13>VAX<150>MAE<200,12>N<100>] [:dv gn 72][SKAR<150,5>AX<150>MUW<200,10>CH<100>SKAR<150,5>AX<150>MUW<200,10>CH<100>WIH<100,3>LX<50>YU<150>DUW<150,4>DHAX<150>FAE<200,5>N<100>DAE<200,8>NX<100>GOW<200,5>][:n0][:dv gn 73][THAH<100,18>N<50>DRR<150>BOW<100>LL<50>TAE<75>N<50>D<25>LLAY<200,16>T<100>NIH<200>NXVEH<150,20>RIY<150>VEH<150>RIY<150>FRAY<200,17>T<100>NIH<200,21>NX<100>MIY<200,22>][:n0]";
prog_char queen17[] PROGMEM = "S[:phone arpa speak on][:rate 200][:n0][:dv gn 72][GEH<150,29>LLIH<150>LLEY<150,30>OW<100,29>][:dv gn 75][GEH<150,22>LLIH<150>LLEY<150,23>OW<100,22>][:dv gn 72][GEH<150,29>LLIH<150>LLEY<150,30>OW<100,29>][:dv gn 75][GEH<150,22>LLIH<150>LLEY<150,23>OW<150,22>GEH<150>LLIH<150>LLEY<150,23>OW<150,22>FIH<150,20>GAH<150,18>ROW<150,17>FIH<150>GAX<150,23>ROW<300,20>OW<300,16>OW<150,12>OW<100,11>][:dv gn 73][AY<200,23>M<100>JHAH<100>ST<50>AX<150>POR<300,21>BOY<150,23>AE<75>N<50>D<25>NOW<300,24>BAH<150,23>DXIY<150>LLAH<200,22>VZ<100>MIY<200,23>][:n0]";
prog_char queen18[] PROGMEM = "S[:phone arpa speak on][:rate 200][:n0][:dv gn 72][HXIY<200,37>Z<100>JHAH<100,35>ST<50>AX<150>POR<300,34>BOY<300,35>FRAH<150,37>MAX<150>POR<300,35>FAE<150,34>MAH<150>LLIY<300,35>SPER<300,37>HXIH<100,33>M<50>HXIH<100,35>Z<50>LLEY<200,32>F<100>FRAH<100>M<100>HXIH<100>Z<50>NAO<200,30>N<100>STRAO<150>SIH<150>TTIY<300,35>_<2700>][:n0]";
prog_char queen19[] PROGMEM = "S[:phone arpa speak on][:rate 200][:n0][:dv gn 73][IY<150,24>ZIY<150>KAH<200,23>M<100>IY<150,22>ZIY<150>GOW<300,23>WIH<100,24>LX<50>YU<150>K=LLEH<100,23>T<50>MIY<150>GOW<200,22>][:dv gn 72] [BIH<200,11>S<100>MIH<300,16>LLAH<300,11>NOW<900,16>WIY<150,6>WIH<100>LL<50>NAO<100,8>T<50>LLEH<150,9>TYU<150,8>GOW<100,6>][:dv gn 72][LLEH<100,28>T<50>HXIH<100>M<50>GOW<350>][:dv gn 72] [BIH<200,11>S<100>MIH<300,16>LLAH<150,11>WIY<150,18>WIH<100>LL<50>NAO<100,20>T<50>LLEH<100,21>T<50>YU<150,20>GOW<100,18>][:dv gn 72][LLEH<100,28>T<50>HXIH<100>M<50>GOW<350>][:n0]";
prog_char queen20[] PROGMEM = "S[:phone arpa speak on][:rate 200][:n0][:dv gn 72][BIH<200,11>S<100>MIH<300,16>LLAX<150,11>WIY<150,18>WIH<100>LL<50>NAO<100>T<50>LLEH<150,21>TYU<150,20>GOW<100,18>][:dv gn 72][LLEH<100,28>T<50>HXIH<100>M<50>GOW<100>][:dv gn 72] [WIH<100,18>LL<50>NAO<100>T<50>LLEH<100,21>T<50>YU<150,20>GOW<100,18>][:dv gn 73][LLEH<100,16>T<50>MIY<150>GOW<100>][:dv gn 72] [WIH<100,18>LL<50>NAO<100,20>T<50>LLEH<100,21>T<50>YU<150,20>GOW<100,18>][:n0]";
prog_char queen21[] PROGMEM = "S[:phone arpa speak on][:rate 200][:n0][:dv gn 73][LLEH<100,16>T<50>MIY<150>GOW<100>][:dv gn 72][AH<300,27>AH<300,23>AH<300,19>AH<300,17>] [:dv gn 72][NOW<300,15>NOW<300,16>NOW<300,19>NOW<300,21>NOW<300,23>NOW<300,27>NOW<100,28>] [:dv gn 73][OW<150,23>MAO<150>MAX<150>MIY<150,25>AX<150,23>MAO<150>MAX<150>MIY<150,25>AX<100,23>] [:dv gn 72] [MAO<150,11>MAX<150>MIY<150,13>AX<150,11>LLEH<100,9>T<50>MIY<150,8>GOW<200,6>][:n0]";
prog_char queen22[] PROGMEM = "S[:phone arpa speak on][:rate 200][:n0][:dv gn 72][BIY<300,23>EH<300,28>LL<150>ZAH<150>BAH<200>B<100>HXAE<150>ZAX<150>DEH<150,27>V'LL<150>PUH<150>TAE<150>SAY<200,32>D<100>FOR<300>MIY<900,23>FOR<300,20>MIY<1200,25>IY<300,23>FOR<300,32>MIY<1200,35>IY<900>_<5000>] [:dv gn 73] [SOW<300,32>YU<150>THIH<200>NX<100>KYU<150>KAE<100>N<50>STOW<200,30>N<100>MIY<150>AE<75>N<50>D<25>SPIH<300,28>TIH<100>N<50>MAY<150>AO<150,27>AO<150,28>AY<900,30>_<1350>SOW<300,32>YU<150>THIH<200>NX<100>KYU<150>KAE<100>N<50>LLAH<200,30>V<100>MIY<150>AE<75>N<50>D<25>LLIY<200,28>V<100>MIY<150>TUW<150>DAO<150,32>AO<150,35>AY<900,37>][:n0]"; 
prog_char queen23[] PROGMEM = "S[:phone arpa speak on][:rate 200][:n0][OW<150,20>OW<1050,23>BEY<300,20>BIY<600,18>IY<300,20>_<300>KAE<75,21>N<50>T<25>DUW<150>DHIH<200>S<100>TUW<150,20>MIY<150>BEY<300>BIY<600,18>IY<300,20>JHAH<200,16>ST<100>GAO<150>DXAX<150>GEH<200>T<100>AW<500,18>T<100>JHAH<200,16>ST<100>GAO<150>DXAX<150>GEH<200>T<100>RAY<200,18>T<100>AW<150,16>TAH<100,15>V<50>HXIY<150,16>IR<450>][:n0]";
prog_char queen24[] PROGMEM = "S[:phone arpa speak on][:rate 200][:n0][:dv gn 72][AH<300,23>AH<300,18>AH<150,20>AH<150,18>AH<300,21>AH<300,18>AH<1500,11>AH<150,16>AH<150,11>AH<150,16>AH<150,20>AH<1500,23>_<150>AH<150,13>AH<150,16>AH<150,20>AH<300,25>AH<600,20>AH<225,15>AH<75,18>AH<450,16>AH<300,18>AH<150,20>AH<150,21>AH<300,20>AH<150,20>AH<150,21>AH<150,24>AH<300,20>AH<300,15>AH<600,23>][:n0]";
prog_char queen25[] PROGMEM = "S[:phone arpa speak on][:rate 200][:n0][:dv gn 73] [NAH<300,33>THIH<200,32>NX<100>RIH<300,28>LLIY<300,20>MAE<300,23>DXRR<300>Z<150>EH<300,32>NIY<300,30>WAH<200,28>N<100>KAE<200,27>N<100>SIY<600,23>NAO<300,32>THIH<200,28>NX<100>RIH<300,30>LLIY<300,32>MAE<300,28>DXRR<300,24>Z<150>_<900>] [:dv hs 80 br 50 ap 110 as 100 pr 100 ] WELL, AT LEAST IN MY LIFE, THAT I CAN RECALL, NOTHING, EVER REALLY MATTERED TO  [MIY<1000>] [:dv gn 73] [_<2400>EH<200,23>NIY<300>WEY<300,22>DHAX<300>WIH<300,21>N<200>D<100>BLLOW<450,30>Z<550>_<10000>][:n0]";

PROGMEM const char *strings_table[] =  // table to refer to your long stuff you don't want to hog RAM
{ 
  cheers0,cheers1,cheers2,cheers3,cheers4,stopdemo5,phillip6, phillip7, queen8, queen9, queen10, queen11, queen12, queen13, queen14,queen15,queen16,queen17,queen18, queen19, queen20,queen21,queen22,queen23,queen24,queen25};

void PrintEmic(String emiccmd){ //Function to prep string to send to EMIC when it's ready
  while (emicSerial.read() != ':');  //Rdy for talks?
  emicSerial.print(emiccmd);  //Send to EMIC
  emicSerial.print('\n');  //Rdy!
}
void PrintEmicNoWait(String emiccmd){ //Function to prep string to send to EMIC right now.  
  for (int chardex = 0; chardex != emiccmd.length(); chardex++){  //Sends as individually chars one after another(EMIC requirement for 'X' Stop command to work)
    emicSerial.print(emiccmd.charAt(chardex));
  }   
  emicSerial.print('\n');  //Rdy!
}
void PrintEmicTbl(int strindex){ //Prep strings_table item to send to EMIC(Specify string undex #)
  while (emicSerial.read() != ':');  //Rdy?
  emicSerial.print(strcpy_P(buffer, (char*)pgm_read_word(&(strings_table[strindex]))));  // Put that string in RAM then print it
  emicSerial.print('\n');  //Rdy!
}
void PrintEmicTbl(int strindex, int totstrings){ //Prep strings_table item to send to EMIC(strindex specifies string undex #, totstrings specifies # of strings to play proceeding original string, including original)
  for (; totstrings != 0; totstrings--){
    while (emicSerial.read() != ':');  //Rdy?
    emicSerial.print(strcpy_P(buffer, (char*)pgm_read_word(&(strings_table[strindex]))));  // Put that string in RAM then print to emic
    strindex++;
    emicSerial.print('\n');  //Rdy!
  }
}

void setup() 
{
  pinMode(ledPin, OUTPUT);
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
  emicSerial.begin(9600);
  PrintEmicNoWait("X"); //If your talking, shutup already (& send ready signal: all PrintEmic functions return \n).
  PrintEmic("R");  // Reset stuff
  PrintEmic("V12"); //-12 Girlfriend, 12 No Girlfriend
  emicSerial.flush();
}

void loop() 
{
  PrintEmicTbl(5); //Stop Demo
  delay(4000);
  PrintEmicNoWait("X"); 

  PrintEmic("P0");  // Bohemian Rhapsody by Queen
  PrintEmicTbl(8,18); 
  PrintEmic("P1");
  
  PrintEmic("P0");  //Cheers Theme Song
  PrintEmicTbl(0,5);  
  PrintEmic("P1");
}                     





Comments

  • ercoerco Posts: 20,253
    edited 2013-10-10 14:22
    Thanks for logging your discoveries. Joe Grand (who made EMIC2) checks into the Forum occasionally, he may weigh in.

    It would be interesting to hear your EMIC2 sing. Can you Youtube it?
  • Thanks for the code
    Check this out to hear what it sounds like :
    Working on a modular synth : https://www.muffwiggler.com/forum/viewtopic.php?t=142506
  • Thanks for recording it! I'm having a reason to go back to this project and I forgot how proud I was of the work I put into this. Thanks again!

  • Thank you Theman8631 for the code.

    Thank you deladrière for recording the audio and uploading it.

    That was a lot of fun.
  • Very impressive Theman8631. I've been playing around with my Emic 2 and found your blog. Loaded it up on an Arduino Uno (with a little editing) and WOW! You really worked out with Bohemian Rhapsody. Very fun.

    Cheers,
    Dave
Sign In or Register to comment.