scitools.sound

scitools.sound.Nothing_Else_Matters(echo=False)[source]
scitools.sound.add_echo(data, beta=0.8, delay=0.1, sample_rate=44100)[source]
scitools.sound.note(frequency, length, amplitude=1, sample_rate=44100)[source]

Generate the sound of a note as an array if float elements.

scitools.sound.play(soundfile, player=None)[source]

Play a file with name soundfile or an array soundfile. (The array is first written to file using the write function so the data type can be arbitrary.) The player is chosen by the programs ‘open’ on Mac and ‘start’ on Windows. On Linux, try different open programs for various distributions. If keyword argument ‘player’ is given, only this spesific commands is run.

scitools.sound.read(filename)[source]

Read sound data in a file and return the data as an array with data type numpy.int16.

scitools.sound.write(data, filename, channels=1, sample_width=2, sample_rate=44100)[source]

Writes the array data to the specified file. The array data type can be arbitrary as it will be converted to numpy.int16 in this function.

Previous topic

scitools.redirect_io

Next topic

scitools.std

This Page