After the alpha and beta magnitudes are computed, the signals each go through separate averaging blocks. These are running averages that are set at ~ 300 milliseconds each. Generally neurofeedback programs time average the raw values for a small amount of time such as this. This is in order to smooth out some of the jaggedness of the raw signals before being presented as feedback.
After the Averagers, alpha and beta magnitudes are plotted on the Trend scope. This scope is like other scopes you've seen, except the "Drawing Interval" inside the dialog box has been changed from a small value such as 1 or 2 samples, to 250 samples. This means that on the Trend graph, points will only be plotted every second. Accomplishing the long term view we are looking for.
The output from the alpha Averager goes to an Expression Evaluator block, to the A input. This block can compute any arbitrary symbolic arithmetic expression, which is entered in it's dialog box. In this case it is computing "A - B": the magnitude of the alpha MINUS the magnitude of the beta (scaled). As you can see the beta does not go to the evaluator directly, but is first scaled by the block labeled "beta weight", which is a Mixer block.
The Mixer takes it's channel 1 input (averaged beta magnitude), and multiplies it by a scale factor. In this case 65% or .65. This is an arbitrary value we are using, but is intended to compensate for the relative sizes of the two bands we are comparing. The beta range we are measuring includes 15 Hz of bandwidth, whereas the alpha range is only 4 Hz. Without some reduction in the beta "weighting", it would tend to swamp out the alpha effects.
So the Mixer control can be set wherever it feels comfortable for you. When set at 0%, then no beta inhibition is being used.
After the "A - B" expression evaluation, the output of that expression can go negative if the beta outweighs the alpha. We want to limit that output to positive values. Particularly since this value is going to control the audio volume control. So the Limiter stage following the expression, prevents the value from dropping below the value of 2 microvolts.
This low limit will also be the "background" level of the "flowing water" creek sound, when no reward is being given. In other words, we don't want the feedback sound to simply disappear when no reward is preset, but to always have a background sound / 'soothing' effect. If the sound abruptly disappeared, this would be jarring.
Output of the Limiter goes to another Expression, where the microvolt value is multiplied by a constant of 40. This gets us into a reasonable range for the volume control on the MediaPlayer block.
Designs based on the Threshold object
The design example here uses a direct live feedback based on audio volume. This is actually quite intuitive and readily understood by the CNS. It's more aligned with those forms of feedback that are not "pushing" the system in one way or another. But rather have a more "reflective" approach to just "mirror" back to the CNS what is going on. And let the system itself adapt and make the changes it desires.
Another approach that is perhaps more widely used in the neurofeedback field is to use what is called a "Threshold". BrainBay has an object like this. A threshold measures a certain magnitude being trained, and dynamically adjusts a threshold level. So that the output of that block (what is called the reward signal, a binary value) -- is always rewarding at say a 70% rate. If the magnitude slowly increases over time, the threshold will track it automatically and still only reward at the 70% rate.
You can read more about the Brainbay threshold object in the manual. Brainbay's version of threshold is somewhat more complex and hard to understand than that you would find in Bioexplorer for example. But is capable of similar functions.
A downside of thresholds is that their output is generally an on/off type of trigger signal. This is fine, and can be used with a sound such as a bell. Or to control the brightness level of a video playing.
____
Running the design:
If the bottom window button / status area ever becomes hidden, you can re-expose it with F6 function key.
As before with the previous design, you need to ensure that your COM port is set in the EEG block. Open it with a right click and use the pulldown to set that to the correct port. Click the Connect button, and that should result in the checkbox coming on.
Your channel 1 sensor / electrode should be as before, for example at O2 or Pz, etc. Reference and Bias at left / right ears or mastoids. Dongle inserted, blue light showing on. Then OpenBCI powered up with it's blue light on.
The MediaPlayer block needs to be setup with the audio file you downloaded at the start of this page. Right click on the MediaPlayer and press the "Select MCI File" button. Point it to the Serene Water mp3 file.
You may want to keep your Brainbay media and con files in a constant fixed location rather than your desktop. That way the "C:\xxx" path will not change and need to be updated in the con file. So you could setup such a folder, for example in C:\BrainBay" or wherever is convenient. And place all these con and mp3 files there.
BrainBay installation does create a set of folders in %LocalAppData%\BrainBay . But this is sometimes hard to navigate to. That '%' environment variable corresponds to:
Windows XP: C:\Documents and Settings\<username>\Local Settings\Application Data
Windows 7+: C:\Users\<username>\AppData\Local
After setting your COM port and media file in the design, you will want to save the con file as a new file name to preserve your changes. Otherwise you would have to make these changes each time you load your design.
Once you are ready to start the training, just press your Play button at the lower left and close your eyes. Relax as much as possible. There is no trying, just 'being'. Another approach used by Les Fehmi's Open Focus training, is to imagine the quality of 'space'. This spaceousness produces abundant alpha.