I'm selecting all 12 tracks and running the PitchReport plugin.
The first time the plugin is run it looks for the existence of a PitchReport property on *SCRATCH* and if not found creates it with a value of t and prints a project header.
All the subsequent 11 invocations skip printing the project header.
The problem occurs if I run the plugin again. The PitchReport property on *SCRATCH* is still set.
Is there a way the plugin can tell when it is invoked on the last track? If so I could then remove the property then.
If not I'll probably need to create a separate plugin just to remove that property.
Here's what the current code looks like:
Code: Select all
(defun print-project-header () (putprop '*SCRATCH* t 'PitchReport) (format t "~a~%window-time\t~a~%sample-time\t~a~%sample-step-time\t~a~%~%" (get '*project* 'name ) window-time sample-time sample-step-time)) (defun generate-frequency-table () (if (not (get '*SCRATCH* 'PitchReport)) (print-project-header)) ... (generate-frequency-table)