Routing an Audio channel thru a specific audio output of a multichannel sound card.
3 views (last 30 days)
Show older comments
Dear all: I need to route a trigger signal (1 audio channel) to a certain output of a multichannel USB sound card (M-Audio), and I don't know how. Simultaneously I need the other sound card channels (5 channels) to be playing other audio tracks. Do you have any clue? Thanks in advance. Alejandro.
2 Comments
Daniel Shub
on 7 Jan 2012
Do you know when the trigger signal should occur prior to starting the other audio tracks? How much latency/jitter can you tolerate?
Accepted Answer
More Answers (1)
Walter Roberson
on 7 Jan 2012
Provided that you use the Data Acquistion Toolbox:
"routing" to a particular channel should not be difficult: you addchannel() the appropriate channels, and you putdata() or the equivalent a matrix of data with one column per channel.
For the audio channels of the same frequency, the above should solve intra-channel latency. It will not solve absolute latency or jitter though.
Designating the channel for the trigger should again not be hard.
You want your trigger to be synchronized with everything else even though you have relatively few samples to send for the trigger: that could be much more difficult. Repeats could also be tricky. You can get notification after the audio is transferred and you can re-send the trigger and audio repeat at that time, but that could lead to a time of empty buffers.
Your opportunities for synchronization are increased if you use MATLAB R20011b (or later) with an NI device and the new Session-based interface.
See Also
Categories
Find more on Audio I/O and Waveform Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!