pygame documentation | || Home || Help Contents || || pygame || cdrom || constants || display || draw || event || || font || image || joystick || key || mixer || mixer_music || || mouse || movie || sndarray || surfarray || time || transform || || CD || Channel || Clock || Font || Joystick || Movie || || Rect || Sound || Surface || || cursors || sprite ||

## pygame.sndarray

Contains routines for mixing numeric arrays with sounds

array | - get an array copied from a sound
make_sound | - create a new Sound object from array data
samples | - get a reference to the sound samples

array
`pygame.sndarray.array(Sound) -> Array`

Creates an array with a copy of the sound data.

make_sound
`pygame.sndarray.make_sound(array) -> Sound`

Create a new playable Sound object from array data the Sound will be a copy of the array samples.
The array must be 1-dimensional for mono sound, and. 2-dimensional for stereo.

samples
`pygame.sndarray.samples(Surface) -> Array`

This will return an array that directly references the samples in the array.