[music-dsp] Re:Thanks Matt
fatboy at vodafone.net
Tue Jun 29 06:23:34 EDT 2004
Glad it worked! Dead easy...
There are two fairly easy ways to achieve what you're asking. The first
would be to combine your mono sound files into stereo sound files in an
editor and feed the stereo signal from the wave read block to your
stereo output block.
The second requires a bit of signal management in Simulink:
1. In the library browser, under DSP Blockset > Signal Management >
Buffers, drag the Buffer and Unbuffer blocks to your model. Also drag
the Mux block from Simulink > Signal Routing. This should be set to two
inputs and one output. If you can't find any blocks, use the search
panel at the top of the library browser.
2. Copy the Unbuffer block so that you have two. Feed the outputs of
both wave read blocks into their corresponding Unbuffer blocks.
3. Then feed the output of the unbuffer blocks to the inputs of the Mux.
4. Feed the output of the mux into the input of the Buffer block.
5. Feed the output of the Buffer to the input of your Platform Output
If you select Format > Signal Dimensions from the simulink menus you
will see each signal path labelled with it's dimensions. Play with the
buffer sizes to see their effect.
Incidently, there may be a more elegant solution to the above, or not. I
didn't really investigate. Either way, it would be easy to build an
S-Function that did the mux job in a frame-based way.
As for your previous question about sound cards. You'll need a four
channel sound card if you want to play four different sounds to four
different speakers. There's nothing you can do about this! You may be
able to get away with two stereo cards but I can't imagine the timing
would be particularly accurate. Cheap good quality cards are now easily
obtainable. I can recommend the Event/Echo stuff because I know lots of
users (incl myself) who have never had problems with their products.
Btw: I think those documents you linked to are PDF versions of the
standard Simulink documentation as the examples look very familiar.
Easier to print though!
From: music-dsp-bounces at ceait.calarts.edu
[mailto:music-dsp-bounces at ceait.calarts.edu] On Behalf Of Shalen
Sent: 29 June 2004 02:19
To: a list for musical digital signal processing
Subject: Re: [music-dsp] Re:Thanks Matt
Or to be naive: lets say I remove two of those block diagrams. Now I
only 2 diagrams with each digaram representing a wav file to a wave
since I have only 2 speakers Left and Right. Is there a way I can play
sound in left and one in right.
There should be a way common sense says so but I cannt find it.
Give me Some insight!
Shalen <schhabra at cs.ucr.edu> said:
> HI Matt,
> Thanks a ton for that spendid step by step introduction to the
> tried that and it works fine. I even changed the delays and heard all
> files I recorded. Yes this works!!! "Thanks"
> Now heres the question:
> I want to play the 4 sounds on 4 different speakers. As of now I had
> this "Logitech speakers" which has only 2 speakers and one subwoofer.
> When I click on the "To Wav Device" Block a window pops up where I see
> 1. default audio device
> 2. SoundMAX Digital Audio
> I enabled "SoundMAX Digital Audio" one in the pull down menu.
> When I hit that triangular button for "simulation" it was playing the
> in both the 2 speakers and subwoofer together. For ex: If I had
> this "horn1.wav", "horn2.wav", "horn3.wav", "horn4.wav" files when I
> it was playing "horn1.wav" in both the speakers+subwoofer and then
> in all the speakers etc. I have not tested this with 4 speakers as you
> the Multichannel.mdl file you sent but would it be possible for me to
> the 4 wav files in 4 speakers with 1 speaker assigned to each wav
> yes then how is this achieved or will this be done automatically if I
> speakers? or I have to find some special speakers which has inputs to
> channels kind of thing etc....
> If yes! then it would be perfect and I can get my things done. What do
> think Matt?
> Also, I found these interesting links for Simulink and S Functions:
> Thanks Again and lets go ahead with our discussions,
> Matt Avent <fatboy at vodafone.net> said:
> > ------=_NextPart_001_0089_01C45D5A.FAE94D50
> > Content-Type: text/plain;
> > charset="us-ascii"
> > Content-Transfer-Encoding: 7bit
> > Hi Shalen and Adamcool
> > Here's a multichannel simulink model.
> > You can add any processing you want in between the I/O devices.
> > If you want to design your own blocks have a look at the Writing
> > S-Functions documentation. Easiest is to start with the S-Function
> > builder which automates the process, but it doesn't take much to
> > over to writing your own from scratch in C. If you look at the C
> > created in your work directory after building the S-Function you'll
> > a pretty good idea as to how things work.
> > Good luck, and let me know how you get on!
> > M
> dupswapdrop -- the music-dsp mailing list and website:
> subscription info, FAQ, source code archive, list archive, book
"Future Belongs To Those Who Realize The Beauty Of Their Dreams"!
Graduate Student in Computer Science,
University of California, Riverside
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews,
More information about the music-dsp