This project has moved and is read-only. For the latest updates, please go here.

Drum Machine

Feb 14, 2013 at 12:54 PM
Edited Feb 14, 2013 at 12:55 PM
Hello,guys I want to make a drum Machine like the one in the examples,but when I open the examples I have 640 errors, so I decided instead reapairing it and trying to modify it, to make my own.
So actually what I did till now is to draw 4x4 matrix and each row is processed from timer which check each position every 100ms, I mean if the timer want to see the third row the value of the integer will be 300ms when I divide - 300/100 = 3 i get the index of the current row.
Then I have 4 wav files loaded and I add them to the mixer if some of the rectangles are clicked then I convert the 32bit mixer output to 16bit again and play it threw DirectSoundOut.
What I dont understand is why the mixer is not mixing my inputs and how to play them more smoothly somehow ?
 void AddToMixer(WaveFileReader file)
            var toAdd = new WaveChannel32(file);
            toAdd.PadWithZeroes = false;
            toAdd.Volume = 1.0f;
Feb 15, 2013 at 11:27 AM
well the drum machine demo is meant to show how I would go about approaching this problem. So long as you are reading from your mixer, it will read from each of its inputs.