SFML community forums

Help => Audio => Topic started by: da_coolest on February 01, 2012, 08:21:49 am

Title: Capture a signal through the sound card
Post by: da_coolest on February 01, 2012, 08:21:49 am
Hi, I want to find a mechanism to capture an input signal through the sound card (not an audio signal). The signal is being produced in intervals and my goal is to determine the calculate the pulses per minute ratio and to use it accordingly. Any suggestions/tips would be highly appreciated as I'm new to programming.
Title: Capture a signal through the sound card
Post by: eXpl0it3r on February 01, 2012, 11:00:27 am
What kind of input does your audio card allow that's not an audio signal?  :shock:

If you want to deal with audioinput check out the sf::SoundRecorder (http://www.sfml-dev.org/documentation/2.0/classsf_1_1SoundRecorder.php) class.
Title: Capture a signal through the sound card
Post by: da_coolest on February 01, 2012, 12:21:35 pm
Quote from: "eXpl0it3r"
What kind of input does your audio card allow that's not an audio signal?  :shock:

If you want to deal with audioinput check out the sf::SoundRecorder (http://www.sfml-dev.org/documentation/2.0/classsf_1_1SoundRecorder.php) class.


My aim is to create a medical instrument that records heart pulses. The device has electrodes to pick up signals and an opamp to amplify. If I connect the output to the sound card, is it possible to get amplitude/frequency information of the input signals? my aim is to produce a graph similar to an ECG report.
Title: Capture a signal through the sound card
Post by: Laurent on February 01, 2012, 01:13:02 pm
Whatever you connect to the microphone input of your sound card, SFML will provide it as audio samples. Then it's up to you to interpret them the way you want, for example running a FFT on it if you want to extract the frequencies.
Title: Capture a signal through the sound card
Post by: da_coolest on February 02, 2012, 11:11:56 am
Quote from: "Laurent"
Whatever you connect to the microphone input of your sound card, SFML will provide it as audio samples. Then it's up to you to interpret them the way you want, for example running a FFT on it if you want to extract the frequencies.


Thank you for the reply. I did not know about that.