Routing an Audio channel thru a specific audio output of a multichannel sound card.

4 visualizaciones (últimos 30 días)
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 comentarios
Daniel Shub
Daniel Shub el 7 de En. de 2012
Do you know when the trigger signal should occur prior to starting the other audio tracks? How much latency/jitter can you tolerate?
Alejandro Bidondo
Alejandro Bidondo el 7 de En. de 2012
Thank you Daniel for your time.
Let's start from the ideal case (no latency) so later I can compensate things for the real case.
The trigger should start at the beginning of the other tracks with no latency. The longest trigger (because there are 2 triggers) is 1.5ms length. The other audio tracks (5) are 3000ms length each, and they all (audio + trigger) should be played at the same time with no latency between them. All these have to be played several times, repeatedly (let's say 200 times).
Problems I have:
1) I should route the triggers thru sound card output 4 (ch4).
2) I should route the other audio channels thru sound card outputs as: Front Left: ch1, Front Right: ch2, Center: ch3, Surround Left: ch5, Surround Right: ch6.
I don't know how to do all the above.
I'll appreciate all suggestions and ideas I could receive.
Than you for your time.
Alejandro.

Iniciar sesión para comentar.

Respuesta aceptada

Alejandro Bidondo
Alejandro Bidondo el 7 de En. de 2012
Thank you Daniel for your time.
Let's start from the ideal case (no latency) so later I can compensate things for the real case.
The trigger should start at the beginning of the other tracks with no latency. The longest trigger (because there are 2 triggers) is 1.5ms length. The other audio tracks (5) are 3000ms length each, and they all (audio + trigger) should be played at the same time with no latency between them. All these have to be played several times, repeatedly (let's say 200 times).
Problems I have:
1) I should route the triggers thru sound card output 4 (ch4).
2) I should route the other audio channels thru sound card outputs as: Front Left: ch1, Front Right: ch2, Center: ch3, Surround Left: ch5, Surround Right: ch6.
I don't know how to do all the above.
I'll appreciate all suggestions and ideas I could receive.
Than you for your time.
Alejandro.

Más respuestas (1)

Walter Roberson
Walter Roberson el 7 de En. de 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.
  1 comentario
Alejandro Bidondo
Alejandro Bidondo el 7 de En. de 2012
Dear Walter:
Thank you for your time and comments.
1) Do I have to use DAToolbox mandatorily? (Pros / Cons?)
2) If I just use a matrix, which column represents each channel?
3) Using a matrix to route the trigger: Do you mean I can put it in column 4 and the other columns (1, 2, 3, 5, 6) in zeros?
4) Absolute latency should not be an issue.
5) What do you mean with "notification" and "transferred"?
6) Maybe I can sync properly if I embed the trigger with the audio channels in the same matrix, before the sound reproduction loop. Then, when playing, all channels are synced.
7) Sound card: How can i do the script to detect automatically the available analog outputs the sound card has? (suposing one can attach any USB sound card to the PC).
Thank you again,
Alejandro.

Iniciar sesión para comentar.

Categorías

Más información sobre Audio I/O and Waveform Generation en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by