Kinarm | Interactive Robotics Brain Injury Research

  • Products
  • Clinical Applications
  • News
  • Support
  • About Us
  • Contact

Mobile nav

Play Sound File in Real-Time

Play Sound File in Real-Time

Posted on May 29, 2017

[featured_image]
Download
Download is available until [expire_date]
  • Version
  • Download 124
  • File Size 1.43 MB
  • File Count 1
  • Create Date May 29, 2017
  • Last Updated January 31, 2020

Play Sound File in Real-Time

The purpose of this task is to demonstrate how to produce sounds in real-time using analog outputs as part of KINARM Lab.

For an alternatively method that does NOT play sounds in real-time, but instead works through the Dexterit-E computer, please see the other sample task entitled Tone player – non real-time

This task produces sounds by sending a pre-defined waveform over one analog channel output. If that output is connected to a speaker, then the user will hear the sound.

In order to make sounds in real-time, the following are required:

  • one or more analog outputs connected to the Robot computer (e.g. via a PCI card such as NI-6229 connected to a BNC-2090A panel)
    • You will need one analog channel for each independent speaker
  • speakers with built-in amplifiers (e.g. headphones, or computer speakers)
  • method to connect the analog output(s) to the speaker(s)
    • e.g. if connecting two channels of a BNC-2090A panel to speakers that have a single 3.5 mm stereo jack, the following would work:
      • 2 BNC to RCA/phono jacks - e.g. Newark (54M7978) or Digikey (367-1013-ND)
      • An adapter with 2 RCA/phone plugs to a single 3.5 mm stereo jack - e.g. from Radioshack or the Source
  • vector containing the waveform(s) of the desired sound (e.g. download one from the internet, record one yourself, etc)
  • MATLAB R2015a is recommended, but not necessary: because Task Programs are run at 4 kHz for R2015a and later, vs 2 kHz for R2013a and prior, using R2015a doubles the frequency range of sounds that are reproduceable

How to use this task:

  1. process the desired sound using the attached processWaveformForKINARM.m
    • please read the comments in the code for how to do use this script
    • a sample waveform of a piano keyboard is included
  2. connect your speaker(s) to the analog output(s) and turn the speakers on
    • the sample code in this example uses a single analog output (DAC0OUT) of a PCI-6229 card
    • Note: if you have a different analog output card, you will need to modify the task to use the Simulink block corresponding to your card
  3. build the task and run it
    • during the build process, the sound waveform becomes embedded in the sample code. So if a different waveform is required, the Task Program will have to be re-built.

This task was built using R2015a SP1, and was compiled for Dexterit-E 3.6.2

Support

  • User Guides & Documentation
  • Software Downloads
  • Install/Maintain Your KINARM Lab
  • Training Videos
  • New User Training
  • Creating Custom Tasks
  • Sample Custom Tasks
  • Q&A Forum
  • Publications by Research Area

Products

  • Platform Comparison
  • Kinarm Exoskeleton Lab
  • Kinarm End-Point Lab
  • Kinarm Standard Tests
  • Dexterit-E
  • Dexterit-E Explorer
  • NHP Kinarm Exoskeleton Lab

Clinical Applications

  • Clinical Applications
    • Stroke and TIA
    • Traumatic Brain Injury (TBI)
    • Neurological Disease
    • Pediatric
    • Primarily Non-Neurological
  • Clinical Research Sites
  • Publications

News

  • Kinarm News
  • Events
    • Neuroscience
    • Kinarm Camp
  • Product Notices
  • @KinarmLab Twitter Feed
  • Open Jobs

Support

  • Kinarm Help & Support
  • User Guides & Documentation
  • Software Downloads
  • Installing & Maintaining Your Kinarm Lab
  • Training Videos
  • New User Training
  • Creating Custom Tasks
  • Sample Custom Tasks
  • Q&A Forum

About Us

  • About Us
  • Our People
  • Quality
  • Supplier Requirements
  • End-User License Agreement
  • Intellectual Property
  • Privacy & Terms

Contact

  • Contact Kinarm
    • International Sales Agents
  • Request an Account
footer-logo

140 Railway St. Kingston, ON K7K 2L9 Canada Toll Free: (888) 533-4393 Phone: (613) 507-4393 info@kinarm.com

© Copyright BKIN Technologies. All Rights Reserved

Quality | Privacy Policy | Web design/development by 1dea Design + Media Inc.