convert EEG data to audio signal

edited April 2018 in Software
I am new one, how to send the openbci data to speaker(audio card) by matlab software, I want to output the openbci crginal data by the audio card of the PC, then I will get the signal to my other set.

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Profeell, hi.

    I'm unclear about your application needs, but there are a number of ways for sonification of EEG data,


    One avenue that has been pursued by some experimenters, is to use the ability of OpenBCI GUI, to output the data stream in the OSC (Open Sound Control) format. This can then be consumed by free apps such as PureData / PD. And Max. Both of these are sound synthesizer programs.


    Your idea of using Matlab, may not be the simplest route. SInce Matlab may not have the same kind of sound generation capabilities.

    William
  • wjcroftwjcroft Mount Shasta, CA
    Yet another route is with the various VPL (Visual Programming Language) apps such as BioEra, BrainBay, LabView, etc. These all have MIDI or audio output capabilities as well as signal processing element blocks. PureData is also a VPL.

  • Ťhank you, let me try Brainbay to MIDI

  • I don't know how to input the OPENBCI data to the Brainbay, I try it, but no succeed, can you show me how to input the eeg data to Brainaby?Thank you!
  • In fact, I
    don't want to hear the brain electrical audio signal, I want to make the collected
    OPENBCI sampled signal output to other signal amplification devices and the  electrical signals will be the analog signal ,I
    want to do other research, such as  make
    the electrical signal input body again,  but to ensure that the output signal waveform,
    frequency should be consistent with the original signal, not distortion, I
    didn't know what kind of better way, so the thought of using sound card output,
    my question is, according to my purpose, do you have a better way to output
    signal? Thank you.

  • wjcroftwjcroft Mount Shasta, CA
    You do not need other amplification methods. The EEG data is already there at microvolt, even sub-microvolt levels.

    If you want to stream data to other lab software, investigate LabStreamingLayer, which is supported in the GUI.

  • Sorry, I did not speak clear my mean, what I mean
    is to output the original EEG signal by computer to other device, no software,
    or may not be what amplification device, just want to output the original
    signal, with its original frequency waveform. I began to think of the sound
    card, but worry that convert software will lead to signal distortion, so I want
    to find a better way.

  • wjcroftwjcroft Mount Shasta, CA
    Why not just record the data to a file, then send the file to the other machine?

  • I need output the original signal to brain or body(EMG), I want to research the inverse problem,  when I input the same signal to brain or muscle, what feeling will be felt?
  • wjcroftwjcroft Mount Shasta, CA
    You can write a conversion program, that turns the OpenBCI sample stream into a WAV format audio file. Then you can play that audio file. With the proper audio amplifier and voltage reducing resistor divider network, you can achieve any practical output voltage. 



    Easiest may be in Python, since there is also an OpenBCI Python library.

  • Thank you so much, let me try. 
  • Sorry, I am not succeed, I use http://eeghacker.blogspot.com/2014/05/eeg-as-wav-files-go-spectrograms.html  , when I run the sketch in processsing 3.3.7, it display "processing.app.SketchException: Not expecting symbol 0xA9, which is COPYRIGHT SIGN.
    at processing.mode.java.JavaBuild.preprocess(JavaBuild.java:385)
    at processing.mode.java.JavaBuild.preprocess(JavaBuild.java:157)
    at processing.mode.java.JavaBuild.build(JavaBuild.java:124)
    at processing.mode.java.JavaBuild.build(JavaBuild.java:106)
    at processing.mode.java.JavaMode.handleLaunch(JavaMode.java:122)
    at processing.mode.java.JavaEditor.lambda$0(JavaEditor.java:1097)
    at java.lang.Thread.run(Thread.java:748), 
    I don not know why?

  • wjcroftwjcroft Mount Shasta, CA
    Did you use this file? You might have to resolve the changes that happen to Processing language from older to newer versions.

  • I use http://eeghacker.blogspot.com/2014/05/eeg-as-wav-files-go-spectrograms.html  , when I run the sketch in processsing 2.0.3 display'   Cnnot find a class or type named "Table_CSV'   I donot know why? 
  • wjcroftwjcroft Mount Shasta, CA
    convertToWAV.pde, seems to have the most recent date. Is that the file you used?

    You are just going to have to play around with this yourself. I have no experience running this app. You may need to get into the code and see how it works.

    Also, I don't know for a fact that audio playback programs (that read WAV files), can playback one of the WAV files output by this conversion program. Because the sample rate is so low (250 hz), and audio playback is usually done at multi-kilohertz sample rates. But if the playback program is playing the samples at the rate recorded in the file, it should work. Some playback programs may balk or issue a warning with low rates like this. You'll just have to find one that works.

    Good luck. I can't really answer any more questions on this.

  • Thank you, you have done best for me, thank you.
  • wjcroftwjcroft Mount Shasta, CA
    As far as the most fully featured audio players / editors, check out Audacity. It's free and open source.
  • I want to send the eeg_data to USB port, then connect the D/A converter and the signal-amplifier,  the coil, then Reverse the input to electrical signal the brain, the problem is similar to TMS, but I don't know how to send the wave eeg date to USB. The MATLAB need National instruments data acquisition card, the cost is too high, can I have good solution to get my experiment design, I had tried to send the eeg date to sound card, then connect Audio amplifier and the coil, but the Audio amplifier can't  response low 20HZ frequency , the eeg data will lost low frequency, I need the all original signal, so I want to send the eeg data to serial port (usb port).  can you have the available solution? I ma new one, I need your help. Thank you!
  • wjcroftwjcroft Mount Shasta, CA
    There is a Google Advanced Search button in the right column.


  • wjcroftwjcroft Mount Shasta, CA
    Profeell, hi.

    I merged your new thread into this existing one that you opened on the same subject a few weeks ago.

    You don't need to use usb, the existing Cyton dongle or Wifi Shield would work just fine.

    Regards,

    William

  • But how to use the cyton dongle or Wifi to send signal, they are wireless signal, I want to get cable signal, or mybe bluetooth signal will be ok because I have several bluetooth module, the can receive audio signal from PC or other set, I don't know how it can get other wave signal?
  • wjcroftwjcroft Mount Shasta, CA
    Did you read these links I gave previously??

    [modify sound card to bypass output capacitors, turning it into a DC-coupled output]

    You do not need to put the Cyton data stream on usb. Just receive the data as normal over the radio link and then send to your (modified) audio card. The hardware mod will enable the audio card to transmit down to .1 hz or even lower.

    Without the hardware mod, all audio output cards have AC-coupling with a capacitor on each channel. This cuts off the low frequencies below 20 hz.

    William

  • Thank you ,let me check it out.
  • wjcroftwjcroft Mount Shasta, CA
    If you need to amplify the output from the modified sound card, check out some of these links,




Sign In or Register to comment.