Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Capture a signal through the sound card  (Read 3292 times)

0 Members and 1 Guest are viewing this topic.

da_coolest

  • Newbie
  • *
  • Posts: 19
    • View Profile
Capture a signal through the sound card
« 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10991
    • View Profile
    • development blog
    • Email
Capture a signal through the sound card
« Reply #1 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 class.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

da_coolest

  • Newbie
  • *
  • Posts: 19
    • View Profile
Capture a signal through the sound card
« Reply #2 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 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Capture a signal through the sound card
« Reply #3 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.
Laurent Gomila - SFML developer

da_coolest

  • Newbie
  • *
  • Posts: 19
    • View Profile
Capture a signal through the sound card
« Reply #4 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.