use also the numeric digits
This commit is contained in:
17
text2osc.c
17
text2osc.c
@@ -38,19 +38,28 @@ while (EOF != (caractere=getc(fp))) {
|
||||
|
||||
char_count++;
|
||||
|
||||
if (verbosity) fprintf(stderr, "car = %d\n", caractere);
|
||||
if (verbosity) fprintf(stderr, "car = %4d %c\n",
|
||||
caractere, caractere);
|
||||
|
||||
if (isalpha(caractere)) {
|
||||
/* Play a sound */
|
||||
note=toupper(caractere) - 'A';
|
||||
// fprintf(stderr, "%c -> %3d\n", caractere, note);
|
||||
send_data_button(loa, note, 1);
|
||||
usleep(40*1000);
|
||||
usleep(wait_time*1000);
|
||||
send_data_button(loa, note, 0);
|
||||
usleep(80*1000);
|
||||
usleep(40*1000);
|
||||
}
|
||||
else if (isdigit(caractere)) {
|
||||
note = caractere - '0';
|
||||
send_data_button(loa, note, 1);
|
||||
usleep(wait_time*1000);
|
||||
send_data_button(loa, note, 0);
|
||||
usleep(20*1000);
|
||||
}
|
||||
|
||||
else if (isblank(caractere)) {
|
||||
usleep(300*1000);
|
||||
usleep(200*1000);
|
||||
}
|
||||
else if (caractere == '!') {
|
||||
send_data_id(loa, my_id);
|
||||
|
||||
Reference in New Issue
Block a user