Browse Source

use also the numeric digits

tth 1 year ago
parent
commit
e540df566a
3 changed files with 18 additions and 5 deletions
  1. 5
    1
      README.md
  2. 1
    1
      chuck/pouet.ck
  3. 12
    3
      text2osc.c

+ 5
- 1
README.md View File

@@ -1 +1,5 @@
1
-# Gadgets autou du protocole OSC
1
+# Gadgets autour du protocole OSC
2
+
3
+Oui, je sais, tout ça n'est pas vraiment clair.
4
+
5
+

+ 1
- 1
chuck/pouet.ck View File

@@ -9,7 +9,7 @@ SqrOsc sl 	=> Envelope envl =>	dac.left;
9 9
 SawOsc sr 	=> Envelope envr =>	dac.right;
10 10
 0.5		=> sl.gain => sr.gain;
11 11
 
12
-0.02 => envl.time;	0.10 => envr.time;
12
+0.01 => envl.time;	0.06 => envr.time;
13 13
 
14 14
 OscIn	oscin;		OscMsg	msg;
15 15
 

+ 12
- 3
text2osc.c View File

@@ -38,19 +38,28 @@ while (EOF != (caractere=getc(fp))) {
38 38
 
39 39
 	char_count++;
40 40
 	
41
-	if (verbosity) fprintf(stderr, "car = %d\n", caractere);
41
+	if (verbosity) fprintf(stderr, "car = %4d   %c\n",
42
+				caractere, caractere);
42 43
 	
43 44
 	if (isalpha(caractere)) {
44 45
 		/* Play a sound */
45 46
 		note=toupper(caractere) - 'A';
46 47
 		// fprintf(stderr, "%c -> %3d\n", caractere, note);
47 48
 		send_data_button(loa, note, 1);
49
+		usleep(wait_time*1000);
50
+		send_data_button(loa, note, 0);
48 51
 		usleep(40*1000);
52
+		}
53
+	else if (isdigit(caractere)) {
54
+		note = caractere - '0';
55
+		send_data_button(loa, note, 1);
56
+		usleep(wait_time*1000);
49 57
 		send_data_button(loa, note, 0);
50
-		usleep(80*1000);
58
+		usleep(20*1000);
51 59
 		}
60
+
52 61
 	else if (isblank(caractere)) {
53
-		usleep(300*1000);
62
+		usleep(200*1000);
54 63
 		}
55 64
 	else if (caractere == '!') {
56 65
 		send_data_id(loa, my_id);

Loading…
Cancel
Save