This is the code for the interactive brainwave app I am working on.