[comp.sys.atari.st] Alpha brain wave inducer

logajan@pnet51.cts.com (John Logajan) (03/25/89)

Rem   GFA BASIC PROGRAM
Rem
Rem            By John Logajan, March 1989.  john@logajan.mn.org
Rem     Inspired by Mark Worley's April 1989 Radio-Electronics article.
Rem
Print "Alpha Brain-Wave Stimulator -- Via Photic Stimulation"
Print
Print "CAUTION: Persons susceptible to epileptic seizures should not use this!"
Print
Print "Beta:    14-30  Hz.  Wide awake -- eyes open."
Print "Alpha:    7-14  Hz.  Meditating -- eyes closed."
Print "Theta:  3.5-7   Hz.  Problem solving, or sleep."
Print "Delta:  0.5-3.5 Hz.  Sleep."
Print
Print "To use, adjust flash rate during operation in the range desired by"
Print "pressing the appropriate number key 0-9.  3.75-12 Hz available range."
Print
Print "Close eyes -- allow light to enter through eye-lids.  This may require"
Print "a darkened room or approaching the monitor more closely."
Print
Print "Key =   0    1     2     3     4     5     6     7     8     9    (ESC)"
Print "Hz  = 12.0  9.85  7.5   6.7   6.0   5.45  4.95  4.3   4.0   3.75   Stop"
Print "      ***************   ****************************************"
Print "          ALPHA                           THETA"
Print
Print "-- Press any key to start flashing (at 9.85 Hz.) --"
While Not Inp?(2)
Wend
X=Inp(2)
On Break Gosub Done
X%=4
Do
  If Inp?(2)
    A=Inp(2)
    If A=27
      Gosub Done
    Endif
    X%=A-48
    X%=Min(X%,9)
    X%=Max(X%,0)
    X%=X%+3
  Endif
  Vsync
  Setcolor 0,0,0,0
  Pause X%
  Vsync
  Setcolor 0,7,0,7
Loop
Procedure Done
  Setcolor 0,7,7,7
  End
Return
Rem   GFA BASIC PROGRAM

UUCP: {amdahl!bungia, uunet!rosevax, chinet, killer}!orbit!pnet51!logajan
ARPA: crash!orbit!pnet51!logajan@nosc.mil
INET: logajan@pnet51.cts.com

logajan@pnet51.cts.com (John Logajan) (03/27/89)

Here is an improved version of the alpha brain wave stimulator.  The earlier
one had some sort of subfrequency component.  I went to using vsync's entirely
for timing.

REM GFA BASIC PROGRAM
Rem
Rem            By John Logajan, March 1989.  john@logajan.mn.org
Rem     Inspired by Mark Worley's April 1989 Radio-Electronics article.
Rem
Print "Alpha Brain-Wave Stimulator -- Via Photic Stimulation"
Print
Print "CAUTION: Persons susceptible to epileptic seizures should not use this!"
Print
Print "Beta:    14-30  Hz.  Wide awake -- eyes open."
Print "Alpha:    7-14  Hz.  Meditating -- eyes closed."
Print "Theta:  3.5-7   Hz.  Problem solving, or sleep."
Print "Delta:  0.5-3.5 Hz.  Sleep."
Print
Print "To use, adjust flash rate during operation in the range desired by"
Print "pressing the appropriate number key 0-9.  4.3-12 Hz available range."
Print
Print "Close eyes -- allow light to enter through eye-lids.  This may require"
Print "a darkened room or approaching the monitor more closely."
Print
Print "Key =   0     1    2     3     4     5     6     7     8     9    (ESC)"
Print "Hz  = 12.0  10.0  8.57  7.5   6.67  6.0   5.54  5.0   4.6   4.3   Stop"
Print "      *********************   *********************************"
Print "              ALPHA                         THETA"
Print
Print "-- Press any key to start flashing (at 10.0 Hz.) --"
While Not Inp?(2)
Wend
X=Inp(2)
On Break Gosub Done
X%=5
Do
  If Inp?(2)
    A=Inp(2)
    If A=27
      Gosub Done
    Endif
    A=A-48
    If A>=0 And A<=9
      X%=A+4
    Endif
  Endif
  Vsync
  Setcolor 0,0,0,0
  For J%=1 To X%
    Vsync
  Next J%
  Setcolor 0,7,0,7
Loop
Procedure Done
  Setcolor 0,7,7,7
  End
Return
Return


UUCP: {amdahl!bungia, uunet!rosevax, chinet, killer}!orbit!pnet51!logajan
ARPA: crash!orbit!pnet51!logajan@nosc.mil
INET: logajan@pnet51.cts.com