hi Roman,

Here is a patch that returns the recording status as good as possible. It checks the order of messages (to writesf~), the current dsp status and if the audio signal going to writesf~ is totally silent.  I hope this patch should be an improvement in 'messy' situations... But I still think that the error messages (in the Pd main window) of writesf~ are a bit confusing and incomplete (and a simple output triggering a '1' or 'yes' would simplify its use).

Hans


On 3/9/21 2:35 PM, Roman Haefeli wrote:
Hi Hans

I don't think [writesf~] is supposed to be or should become a
'batteries included'-recording facility. I think its usage is much more
flexible when it _does not_ report warning and errors under the
circumstances you propose.

Pd - being a programming language - provides all the utilities to write
your own recorder that checks for things like DSP status and whether a
file was already openened or not. I totally understand how in messy
situations some mishaps easily happen. That's why I usually use a
recorder patch that has a single button for everything.

   * first press: open 'save file' dialog
   * second press: start recording
   * third press: stop recording

The button color represents current state. Dark means no file has been
selected. Flashing means a file has been selected and now it is ready
for recording. Light means it is currently recording.

Your recorder might need different features. Anyway, I suggest to build
something that suits your needs.

Roman


On Tue, 2021-03-09 at 11:10 +0100, i...@hansroels.be wrote:
Hello,

I think it's a problem that in 'messy' situations you don't have
feedback from writesf~ to know/see that the recording is happening.
With 'messy' I mean situations where you aren't fully concentrated on
recording, for example: simultaneously performing on stage and making
a multichannel recording, moderating a meeting and at the same time
recording it. I have noticed that after some of these messy
situations, I didn't have a recording or a channel was
missing/silent. I tested writesf~ and here are some observations:

A) if you send a [stop( message to writesf~ after [open( the
recording doesn't start but there is no error message (in the main Pd
window); next, if you send [start( there is an error message and no
recording.
B) if you send [start( -and thus start the recording-, next switch
off the DSP, switch it on again, the recording automatically
continues (from the moment the DSP has been switched on again). No
error message is printed.
C) if during a recording, the DSP is switched off and the patch -with
writesf~- is also closed, the recording stops of course but no panic:
the recorded file is OK and available to be read. No error message is
printed.
D) If you send a second [start( message during the recording, an
error message is printed but in fact the recording continues without
any problems.

E) If you send [open(, next  [start( when the DSP is off, the
recording doesn't start but no error message is printed. Next, when
you switch on the DSP, the recording automatically starts.

F) If the signal connection going to writesf~ is broken, the
recording starts without an error message, but the recorded file will
be useless: it only has zeroes.

G) If no signal at all is connected to writesf~ it still records
(zeroes) if the DSP is on. No error message or warning is printed.

B) & C) & E) are great ! I think D) & A) are a bit strange and in
situation F) & G) it would be better that the recording wouldn't
start or at least give some kind of error or warning message).

So here is my  feature request:

writesf~ has an output which displays if the recording is happening.
writesf~ doesn't record or outputs a 'no input' warning message when
the (upstream) signal leading to writesf~ is broken or missing
Hans



_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


--

_www.hansroels.be_ /gsm:/ _+32 474 707849 _

_www.woeha.be_ /audio voor podcasts en installaties/

#N canvas 232 298 779 594 12;
#X obj 124 122 savepanel;
#X msg 124 178 open \$1.wav;
#X obj 36 315 writesf~ 1;
#X obj 124 150 symbol;
#X obj 124 98 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 34 131 noise~;
#X msg 249 174 start;
#X msg 333 175 stop;
#X obj 34 158 bp~ 300 4;
#X obj 158 501 bng 30 500 50 0 empty empty empty 17 7 0 10 -1 -24198
-262144;
#X obj 34 353 dac~;
#X obj 35 248 *~ 0.5;
#X obj 239 10 cnv 15 440 110 empty empty empty 20 12 0 14 -203541 -66577
0;
#X obj 31 20 bng 30 500 50 0 empty showbang recording_status 35 14
0 12 -1 -24198 -1;
#X obj 159 471 select 1 0 -1;
#N canvas 13 461 656 594 check-rec4 0;
#X obj 28 30 inlet~;
#X text 79 28 same signal as the one going to writesf~;
#X obj 206 61 inlet;
#X text 249 65 same messages as the ones going to writesf~;
#N canvas 612 152 715 693 check-order 0;
#X obj 36 24 inlet;
#X text 86 25 messages being sent to writesf~;
#X msg 148 77 start;
#X obj 102 272 f;
#X obj 141 272 + 1;
#X obj 120 240 0;
#X obj 88 195 t b b b;
#X msg 96 81 open;
#X obj 168 215 t b b;
#X obj 141 306 f;
#X obj 89 338 2;
#X obj 89 370 *;
#X text 117 339 ID-number for message open;
#X obj 329 339 10;
#X text 361 340 ID-number for message start;
#X obj 328 401 *;
#X text 123 371 ID * order number \, should be 2 for open \, 20 for
start;
#X floatatom 89 499 5 0 0 0 - - -;
#X floatatom 328 482 5 0 0 0 - - -;
#X obj 127 555 expr $f1 == 20 && $f2 == 2;
#X obj 328 450 change;
#X msg 248 423 set -799;
#X obj 377 616 outlet;
#X text 64 643 ? to do: send a warning if an open message is sent without
a name (for the file);
#X text 397 426 set -799: 2 start messages after an open message produce
an error in Pd console but in fact the recording continues without
problems., f 43;
#X obj 89 169 route open start stop;
#X obj 607 340 0;
#X msg 207 80 stop;
#X obj 525 582 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-262144 -1 -1 0 256;
#X obj 89 463 f;
#X text 257 167 [stop( also triggers the counter \, to avoid [open(
[stop( [start( mistake;
#X connect 0 0 25 0;
#X connect 2 0 25 0;
#X connect 3 0 4 0;
#X connect 4 0 3 1;
#X connect 4 0 9 0;
#X connect 5 0 3 1;
#X connect 6 0 10 0;
#X connect 6 1 3 0;
#X connect 6 2 5 0;
#X connect 6 2 21 0;
#X connect 7 0 25 0;
#X connect 8 0 13 0;
#X connect 8 1 3 0;
#X connect 9 0 11 1;
#X connect 9 0 15 1;
#X connect 10 0 11 0;
#X connect 11 0 29 0;
#X connect 13 0 15 0;
#X connect 15 0 20 0;
#X connect 17 0 19 1;
#X connect 18 0 19 0;
#X connect 19 0 22 0;
#X connect 20 0 18 0;
#X connect 21 0 20 0;
#X connect 25 0 6 0;
#X connect 25 1 8 0;
#X connect 25 2 26 0;
#X connect 25 2 3 0;
#X connect 26 0 22 0;
#X connect 27 0 25 0;
#X connect 29 0 17 0;
#X restore 206 116 pd check-order;
#X text 310 119 check the correct order of messages to writesf~;
#N canvas 816 429 450 300 check-dsp 0;
#X obj 71 20 inlet;
#X text 122 21 bang;
#X obj 71 44 t b b;
#X obj 71 74 delay 10;
#X obj 71 112 snapshot~;
#X obj 71 136 outlet;
#X msg 156 77 set 0;
#X obj 16 77 sig~ 1;
#X text 69 159 1 or 0;
#X connect 0 0 2 0;
#X connect 2 0 3 0;
#X connect 2 1 6 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 6 0 4 0;
#X connect 7 0 4 0;
#X restore 246 210 pd check-dsp;
#X obj 206 141 t f f;
#X obj 170 199 select 0;
#N canvas 161 416 382 318 check-amp 0;
#X obj 46 63 inlet~;
#X obj 131 37 inlet;
#X obj 46 97 abs~;
#X obj 46 146 snapshot~;
#X obj 46 170 > 1e-05;
#X obj 131 94 metro 1000;
#X obj 45 222 outlet;
#X text 102 224 0 = silent;
#X obj 152 171 print;
#X obj 131 61 change;
#X connect 0 0 2 0;
#X connect 1 0 9 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 6 0;
#X connect 5 0 3 0;
#X connect 9 0 5 0;
#X restore 166 314 pd check-amp;
#X obj 165 343 f;
#X obj 246 235 t f f;
#X obj 244 262 select 0;
#X obj 205 244 0;
#X obj 245 169 metro 1000;
#X obj 120 312 - 1;
#X text 338 211 check current dsp status;
#X text 260 315 check for a silent audio signal;
#X obj 89 479 outlet;
#X text 147 478 -1 = no recording \, 1 = recording OK \, 0 = recording
OK but the incoming audio is totally silent;
#N canvas 1 83 450 300 visualize-this 0;
#X obj 56 10 inlet;
#X obj 52 236 bng 30 500 50 0 empty empty empty 17 7 0 10 -1 -24198
-262144;
#X obj 54 181 select 1 0 -1;
#X obj 54 55 t f f;
#X obj 86 78 change;
#X obj 86 102 select 1 0;
#X msg 121 156 color 22 14 0;
#X msg 87 135 color 22 16 0;
#X obj 94 222 s showbang;
#X msg 220 198 \; showbang color 22 \$1 0;
#X obj 231 138 16;
#X obj 266 162 14;
#X obj 192 33 bng 30 500 50 0 empty showbang recording_status 35 14
0 12 -1 -24198 -1;
#X connect 0 0 3 0;
#X connect 2 0 1 0;
#X connect 2 0 8 0;
#X connect 2 1 1 0;
#X connect 2 1 8 0;
#X connect 3 0 2 0;
#X connect 3 1 4 0;
#X connect 4 0 5 0;
#X connect 5 0 7 0;
#X connect 5 0 10 0;
#X connect 5 1 6 0;
#X connect 5 1 11 0;
#X connect 6 0 1 0;
#X connect 7 0 1 0;
#X connect 10 0 9 0;
#X connect 11 0 9 0;
#X restore 180 380 pd visualize-this;
#X connect 0 0 9 0;
#X connect 2 0 4 0;
#X connect 4 0 7 0;
#X connect 6 0 11 0;
#X connect 7 0 8 0;
#X connect 7 1 14 0;
#X connect 8 0 13 0;
#X connect 8 0 15 0;
#X connect 9 0 10 0;
#X connect 10 0 18 0;
#X connect 11 0 12 0;
#X connect 11 1 9 1;
#X connect 12 0 15 0;
#X connect 13 0 9 1;
#X connect 14 0 6 0;
#X connect 15 0 10 0;
#X restore 158 316 pd check-rec4;
#X obj 77 222 hsl 64 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 1200 1;
#X obj 83 238 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-262144 -1 -1 0.190476 256;
#X obj 159 345 t f f;
#X obj 191 368 change;
#X obj 191 392 select 1 0;
#X msg 226 446 color 22 14 0;
#X msg 192 425 color 22 16 0;
#X obj 199 512 s showbang;
#X text 31 546 Caution: The check-rec4 subpatch doesn't warn you when
there is no audio signal going to writesf~. Thus \, the orange blinking
may indicate a silent input but also an absent input !!, f 91;
#X text 249 18 The 'recording status' bang should flicker green when
you are recording \, it turns orange when you are recording but the
input is silent. Black (no flickering) = no recording.;
#X obj 336 428 16;
#X obj 371 452 14;
#X msg 325 488 \; showbang color 22 \$1 22;
#X text 250 70 Test the recording: send messages to writesf~ in the
wrong order \, switch off the DSP (before or during recording) \, silence
the audio signal to writesf~ \, etc.;
#X text 261 317 -> check the recording status;
#X connect 0 0 3 0;
#X connect 1 0 2 0;
#X connect 1 0 15 1;
#X connect 3 0 1 0;
#X connect 4 0 0 0;
#X connect 5 0 8 0;
#X connect 6 0 2 0;
#X connect 6 0 15 1;
#X connect 7 0 2 0;
#X connect 7 0 15 1;
#X connect 8 0 11 0;
#X connect 11 0 2 0;
#X connect 11 0 15 0;
#X connect 14 0 9 0;
#X connect 14 0 23 0;
#X connect 14 1 9 0;
#X connect 14 1 23 0;
#X connect 15 0 18 0;
#X connect 16 0 11 1;
#X connect 16 0 17 0;
#X connect 18 0 14 0;
#X connect 18 1 19 0;
#X connect 19 0 20 0;
#X connect 20 0 22 0;
#X connect 20 0 26 0;
#X connect 20 1 21 0;
#X connect 20 1 27 0;
#X connect 21 0 9 0;
#X connect 22 0 9 0;
#X connect 26 0 28 0;
#X connect 27 0 28 0;
_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to