Spectutils installing tips for MacOS and Homebrew

Spectutils is currently developed and tested in MacOS. We have used the Homebrew version of Octave. See the Octave for MacOS X wiki page for general installaing Octave with Homebrew.

Spectutils needs Octave to be compiled and installed with the audioread function. In some earlier Octave versions (i.e., pre-4.2), audioread.m was not included in the precompiled Homebrew installation and had to be compiled from source. In the current (2016-12-20) Homebrew version, Octave must be built from source code and installed with the '--with-libsndfile' flag.

Here are some instructions to help you in installing the Homebrew version of Octave and Gnuplot. They may require system administrator privileges. Follow Homebrew's instructions and help messages for more info.

  1. Install Homebrew and GNU Octave. See the Octave for MacOS X wiki page.
  2. Re-install Octave from source code:
    1. Execute in the Terminal:
      brew edit octave
      
    2. Change these lines from ':optional' to ':build':
      depends_on "libsndfile"          => :build
      depends_on "portaudio"           => :build
      
      and these from 'build.with' to 'build.without':
      args << "--with-portaudio"           if build.without? "portaudio"
      args << "--with-sndfile"             if build.without? "sndfile"
      
      Then save changes and exit.
    3. In the Terminal, type:
      brew uninstall octave
      brew install octave --build-from-source
      
      The latter command should show something like:
      ==> Installing octave from homebrew/science
      ==> Installing dependencies for homebrew/science/octave: libsndfile
      ==> Installing homebrew/science/octave dependency: libsndfile
      ==> Downloading https://homebrew.bintray.com/bottles/libsndfile-1.0.26.sierra.bottle.tar.gz
      ...
      
  3. If octave installation succeeds, add these lines to /usr/local/share/octave/site/m/startup/octaverc:
    setenv('GNUTERM','qt')
    pkg load spectutils
    
  4. Start Octave and install Spectutils:
    1. Download Spectutils
    2. Start octave from the same folder where you have the Spectutils package. (Or start Octave and cd to that folder.)
    3. Install Spectutils within Octave, e.g.:
      pkg install spectutils-3.0.0.tgz
      
      or in a multiuser environment:
      pkg install -global spectutils-3.0.0.tgz
      
    4. Quit and restart Octave
More information on the Octave audio support problem on this page.
University of Helsinki Music Research Laboratory home page