Trying to make a function to convert text into morse code and play the sound. Have it pretty much completed, but I cannot get mathematica to emit no sound so I can have a pause between the dots and dashes. I have defined each letter in terms of dots and dashes, with spaces in between. For example:
a := {dot, ps, dash, lps};
b := {dash, ps, dot, ps, dot, ps, dot, lps};
c := {dash, ps, dot, ps, dash, ps, dot, lps};
ps is a pause between dots and dashes, while lps is a pause between letters. Currently they are defined as:
ps = EmitSound[Play[Sin[400 t], {t, 0, .2}]]
lps := EmitSound[Play[Sin[1/200 t], {t, 0, .5}]];
This emits a small beat sound, but I want to get away to have that just be silence. For spaces in between words I have used
space := EmitSound[Sound[None]];
and used StringReplace to replace " " with "space", and that works, but it doesn't work when trying to define ps and lps.