From e540df566a1810ed87629e76ccca30a347631d21 Mon Sep 17 00:00:00 2001 From: tth Date: Wed, 28 Aug 2019 23:08:53 +0200 Subject: [PATCH] use also the numeric digits --- README.md | 6 +++++- chuck/pouet.ck | 2 +- text2osc.c | 17 +++++++++++++---- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ea47709..5e65556 100644 --- a/README.md +++ b/README.md @@ -1 +1,5 @@ -# Gadgets autou du protocole OSC \ No newline at end of file +# Gadgets autour du protocole OSC + +Oui, je sais, tout ça n'est pas vraiment clair. + + diff --git a/chuck/pouet.ck b/chuck/pouet.ck index 99a749e..9750b70 100644 --- a/chuck/pouet.ck +++ b/chuck/pouet.ck @@ -9,7 +9,7 @@ SqrOsc sl => Envelope envl => dac.left; SawOsc sr => Envelope envr => dac.right; 0.5 => sl.gain => sr.gain; -0.02 => envl.time; 0.10 => envr.time; +0.01 => envl.time; 0.06 => envr.time; OscIn oscin; OscMsg msg; diff --git a/text2osc.c b/text2osc.c index 6093325..1feafe1 100644 --- a/text2osc.c +++ b/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);