[directmusic] Re: Exporting Audio using DirectMusic API

  • From: "James Dooley" <jdooley@xxxxxxxxxxxxx>
  • To: <directmusic@xxxxxxxxxxxxx>
  • Date: Thu, 17 Jun 2004 15:06:50 -0700

Writing a DMO isn't as hard as you think - especially with the audio DMO
wizard that ships in the DirectX SDK (which unfortunately only works on
VC 6.0). See:
http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/direct=
x
9_c/directX/htm/audioeffectdmowizard.asp

Alternatively, you could start with the Gargle DMO sample, also in the
DX9 SDK (in C++\DirectShow\DMO\GargleDMO).

-james

This posting is provided "AS IS" with no warranties, and confers no
rights.

-----Original Message-----
From: directmusic-bounce@xxxxxxxxxxxxx
[mailto:directmusic-bounce@xxxxxxxxxxxxx] On Behalf Of Abhijit Patait
Sent: Thursday, June 17, 2004 2:44 PM
To: directmusic@xxxxxxxxxxxxx
Subject: [directmusic] Re: Exporting Audio using DirectMusic API

Thanks for your answers. Looks like I will dig deeper into writing the
DMO myself (which seems to be a big task due to sharp learning curve on
DirectShow). Per James' suggestion, I have also written an email to
directx@xxxxxxxxxxxxx and requested them to publish the interface for
the FileOutput DMO (even though I have very little hope from that
avenue) :-)
=20
-Abhijit
James Dooley <jdooley@xxxxxxxxxxxxx> wrote:
No - there is currently no published API for that DMO. However, you can
always email directx@xxxxxxxxxxxxx ask ask them to publish the interface
for it.

-james

This posting is provided "AS IS" with no warranties, and confers no
rights.=3D3D20

-----Original Message-----
From: directmusic-bounce@xxxxxxxxxxxxx
[mailto:directmusic-bounce@xxxxxxxxxxxxx] On Behalf Of Scott Morgan
Sent: Wednesday, June 16, 2004 11:09 AM
To: directmusic@xxxxxxxxxxxxx
Subject: [directmusic] Re: Exporting Audio using DirectMusic API

What about the file output DMO that shows up in Producer? Can he use
that?

-Scott Morgan
http://morganstudios.com

-----Original Message-----
From: directmusic-bounce@xxxxxxxxxxxxx
[mailto:directmusic-bounce@xxxxxxxxxxxxx]On Behalf Of James Dooley
Sent: Tuesday, June 15, 2004 5:02 PM
To: directmusic@xxxxxxxxxxxxx
Subject: [directmusic] Re: Exporting Audio using DirectMusic API


You are correct that this is not a trivial task. I can think of two ways
to do this:
1) Using DirectMusic 8 or 9 interfaces, create a DMO that writes the
data it sees to a WAV file (or passes it on to another component that
writes the WAV file). Then, either author a custom audiopath using your
DMO in DirectMusic Producer, or use IDirectSoundBuffer8::SetFX to put
your DMO in a DirectSound buffer directly.
2) Initialize the performance with IDirectMusicPerformance::Init() to
use the DirectMusic 7.0 synthesizer and enable use of the
IDirectMusicSynthSink interface.

See
http://msdn.microsoft.com/library/default.asp?url=3D3D3D/library/en-us/di=
r
e=3D
c
t=3D3D
x
9_c/directX/htm/idirectmusicsynthsinkinterface.asp?frame=3D3D3Dtrue

Note that the comment "To capture output from the later version of the
synthesizer, you must implement a DMO on the primary buffer" is wrong.
The primary buffer isn't used with WDM devices, so you need to implement
a DMO on every buffer in your audiopath (or implement your DMO on a
mixin buffer, have every other buffer send to that one mixin buffer, and
mute all the other buffers).

-james

This posting is provided "AS IS" with no warranties, and confers no
rights.=3D3D20

-----Original Message-----
From: directmusic-bounce@xxxxxxxxxxxxx
[mailto:directmusic-bounce@xxxxxxxxxxxxx] On Behalf Of Abhijit Patait
Sent: Tuesday, June 15, 2004 4:44 PM
To: directmusic@xxxxxxxxxxxxx
Subject: [directmusic] Re: Exporting Audio using DirectMusic API

Since I haven't received any response on this, I assume that this is not
a trivial task. However, has someone on this group done anything similar
before (may be without using DirectX/DirectMusic)? If so, what should I
look for? I wandered (literally) through the DirectX documentation on
MSDN and elsewhere but could not find any useful information. All I can
guess is I have to use DirectSound, IDirectSoundBuffer8,
IDrectMusicSynth or some combination of the above.
=3D3D20
Any pointers will be greatly useful.
=3D3D20
Thank you
Abhijit
Abhijit Patait wrote:
With a lot of help from people on this list, I have finally gotten my
little sequencer application to make sounds as I want it to, using
custom DLS instruments.

My next objective is to export the audio as a WAV file from my sequencer
application. I can easily create a MIDI file. But is there an API to
access the samples generated by the synthesizer and save them as WAV
file (especially since the instruments I am using are from custom DLS)?

Thanks again for you help.

Abhijit

---------------------------------
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger


=3D3D09
---------------------------------
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.





        =09
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!



Other related posts: