Audacity PEMF tone generators

Then perhaps the pulse shape is not particularly important in terms of effectiveness ?

I presume that the intensity of the magnetic flux is important (otherwise they would run the device with lower power). So for your home-made equipment which has limited power, higher flux is better, right?

As Robert mentioned earlier, running an audio amp flat out with a square pulse risks frying components in the amp.
I’m also imagining your neighbours wondering why they keep getting “tick tick tick” on their TV / radio. Have you tested for RF interference produced by the equipment?

Regardless of whether your amp blows up, or whether you ruin your neighbour’s evening in watching TV, we know that we want to efficiently produce discrete pulse of high magnetic flux. So perhaps a good way to proceed would be to test different shaped pulses, keeping everything constant except for the pulse shape, and measure the flux produced. So the amp needs to be set the same for each test, the pulses to have the same peak amplitude (a limiting factor on how much voltage gain the amp can provide), and measurements made in the same way.

Some ideas:

Square and trapezoid pulses can be made easily with PWL (as you have been doing).

A raised cosine pulse can be easily produced using something like:

(setf dur 0.1)
  (mult 0.5
    (sum 1 (osc (hz-to-step (/ dur)) dur *sine-table*  -90))))

This gives a nice “Gaussian” bell-shaped pulse:

(defun pulse (y n)
"n is the number of samples returned"
  (setf y (float y))
  (setf arpulse (make-array n))
  (let* ((ln (1- (length arpulse))) ;arrays are zero indexed
         (step (/ 2.0 ln))
         (offset (/ y))
         (norm (/ (- 1 offset))))
    (do ((x -1.0 (+ x step))
         (index 0 (1+ index)))
        ((> index ln)(snd-from-array 0 44100 arpulse))
      (setf val (power y (- (* x x))))
      (setf (aref arpulse index) (* norm (- val offset))))))

(setf pulse (pulse 2000 451))
(setf hz 10)
(seqrep (i 100) (at-abs (/ i (float hz)) (cue pulse)))