@cfry lol, tunnel vision, got so focused on solving the random problems and missed the obvious solution to all of them. Tee will do everything you need here and be slightly more efficient, the netsend/receive and pdsend/receive ways I would suspect more accurate to timing since it does not really matter when tee completes something as long as it does complete it and does it perfectly. So a final version?
logger-sane.pd
-
advice on how to record data?
-
@oid a version of logger-sane.pd above of this ended up in an installation, and it seems to have worked pretty good, I still have not have had time to look at the last data recorded but it seems to be solid. The only bugger is that if you try to quit Pd with logger/[console] still running Pd will freeze. So if you accidentally hit cmd+q you will loose all edits since last save. But that is only a problem when working with it, not when it is installed and running. So thanks a lot for all the input, it has been a great help. When I get the chance I will start to experiment with using the data to dynamically change the synthesis configuration of the system.
Cheers
-
@cfry Didn't we figure out the cause of the freeze? Don't remember and don't feel like rereading the thread right now. Simple fix is to just unbind command+q or have a [loadbang] send [dirty 1( to the canvas so pd asks you if you want to save before quitting as a gentle reminder.
-
@oid no we didn't since it was assumed that I would put the project on a raspberrypi and this error seemed to be mac osx specific. It turned out that I used a macmini in the end because my (other) code was bloated and I did not have the time to clean it up and be efficient enough for my raspberrypi. Eventually it will be transferred to a rpi.
But I am curious about that [loadbang] to [dirty 1( to canvas. Never heard of it, how does it work?
-
@cfry Dirty 1 is pd's internal message saying the canvas has been altered so if you send that message when the patch is loaded pd will think the canvas has been changed even if it hasn't. It will not prevent you from just hitting enter and saving the patch allowing pd to quit and freeze but it might be enough to remind you that you need to kill tee before quiting. First version only works with recent versions of pd, not sure how new it has to be since it is another one of those features they forgot to mention and never put in the change log, I think it needs 54 but I don't really know, second version works quite a ways back.
You can also try [iemguts/closebang], stick it in the abstraction and have it trigger the killall tee but that may not work and we may have already explored that, don't remember. -
@cfry @oid You can still send the perf message to Pd (in windows... others IDK)....
[;
pd perf 1(
will pop a "really quit?" message for all patch windows and the console, regardless of whether they have been edited.
It used to be (Pd extended) explicitly available from the Pd menu (performance mode), but now it is one of many hidden "features"..
pd perf 0 will turn it off.
David. -
@oid how can I change the save directory of [command]? I would like to have all log recordings in a folder (log-recs).
I tried with the new [file cwd] object but that doesn't seem to work. -
@cfry same way as you would in terminal, specify the full path name with the filename, so instead of log.txt it would be something like home/cfry/pd/log-recs/log.txt.