Creating and Saving to MIDI

Dec 9, 2010 at 4:49 PM

Hi there,

      I have 2 WAV files and would like to do the following,

1.  Play WAV1. Wait 2 seconds.

2.  Play WAV2. Wait 2 seconds.

3.  Play Wav1 and Wav2 simultaneously.

How do I create a MIDI file out of that?  Thank you very much.  Your library rocks!

Cheers.

Huj

Coordinator
Dec 10, 2010 at 1:33 PM

MIDI files don't play WAV's. What it sounds like is that you would like to create WAVs with concatenated/mixed audio. In this case you simply use the WaveFileWriter. You can then write the contents of existing files to it one after the other. Write zeros for silence. Use the WaveMixerStream32 to do mixing.

Mark

Dec 10, 2010 at 1:46 PM

Thanks Mark for the speedy reply.  Cheers.

Huj

Dec 10, 2010 at 3:11 PM

A follow-up question then.

In Midi, I could do the following,

1. Assign a WAV to an AudioTrack.

2.  Then assign AudioTrack to a MIDI channel.

3.  Then write MIDI commands to run the various MIDI channels. 

If that is true, can I do that with NAudio too?

Thanks.

Huj