parent
fdecf79c9f
commit
ed369e188b
@ -1,6 +1,6 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
const char * char_to_morse(char letter);
|
const char* char_to_morse(char letter);
|
||||||
char * string_to_morse(char* string);
|
void string_to_morse(char* string, char* result);
|
||||||
const char morse_to_char(const char* morse);
|
const char morse_to_char(const char* morse);
|
||||||
char * morse_to_string( const char* morse);
|
void morse_to_string(const char* morse, char* result);
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# REQUIRES: play
|
|
||||||
|
|
||||||
# TODO: write using play libraries in C. Not sure if possible, but would be nice.
|
|
||||||
# ... even if just for compatibility reasons.
|
|
||||||
|
|
||||||
FILENAME="$1"
|
|
||||||
FILE_CONTENTS="$(cat $FILENAME)"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
while read -n1 character; do
|
|
||||||
if [ "$character" == "-" ]; then
|
|
||||||
play -q -n synth 0.15 sine 850 vol 0.5
|
|
||||||
elif [ "$character" == "." ]; then
|
|
||||||
play -q -n synth 0.05 sine 850 vol 0.5
|
|
||||||
elif [ "$chracter" == "" ]; then
|
|
||||||
sleep 0.2
|
|
||||||
elif [ "$character" == "/" ]; then
|
|
||||||
sleep 0.5
|
|
||||||
fi
|
|
||||||
done < <(echo -n "$FILE_CONTENTS")
|
|
Loading…
Reference in new issue