In the course of developing the envelope viewing application in MATLAB, I wrote several utility functions for general tasks like reading a sound file, reading a partial file and the like. As these can be useful for other people as well, I will document them here. They can be found in schwarz/src/viewenv/util.
loadsf.m: Uses a pipe for fromsf to write a stream of samples to, reads samples from the pipe. The sampling rate is obtained by calling querysf. If the file does not exist, an error message is printed and the call exits.
Usage:
[sig, sr] = loadsf (filename)Loads the (IRCAM sf or aiff) sound file into the vector sig, returns the sampling rate in sr.
Further extensions (if there is the need for it):
MEX-file loadpartials.c