Sounds are loaded into the sampler via folders in the same directory containing .wav files with names numbered between 0-15. See the included 808 folder for an example of this. EVERY subfolder with samples should look identical to one another.

The index of MIDI inputs in the array noteList corresponds exactly to the .wav file name.

For example:

when you trigger the MIDI note stored in noteList[0] the wav file 0.wav would play.

the wav file would play. when you trigger the MIDI note stored in noteList[8] the wav file 8.wav would play.

I did this in part so that every single MIDI controller could be set up easily to work with the script, and also so I could easy extend or limit the sample and input number, as well as organize the files and the script so the kick drum sounds, for instance, would always be saved as 0.wav and would be triggered by the first MIDI note.

I've chosen 16 values somewhat arbitrarily to correspond to the 16 inputs on my controller, so if you would prefer to make a sequencer with only 1 sample, or with many more, all you would have to do is number the audio files accordingly and subtract or add the numbers stored within the noteList array to match.

If the included 808 kit works properly but you have trouble with your own samples the solution would most likely be to alter the sample rate of the files to match PyGame's 22,050khz sample rate and bit depth of 16. You can do this in Audacity or any other Audio editing software. They should work perfectly from there!