MUSC 208 Lab 2 - Macintosh Install Octave software

Updated text in bold green font. Update 1

Install TextWrangler

http://www.barebones.com/products/textwrangler/download.html

Then from the TextWrangler menu choose Install Command Line Tools

TextWrangler command line tools

Install Octave

Click here for Mac 10.6 instructions

Macintosh 10.7 10.8 10.9 - Octave 3.6.4

1. Download and Install XCode 5.02

https://developer.apple.com/xcode/

After the install completes you need to install the XCode command line tools from Preferences, Download Tab

2. Install XQuartz 2.7.5 at
https://xquartz.macosforge.org/landing/

3. Install Homebrew
http://brew.sh/

Copy this ruby commnd found on the Homebrew page. Open Terminal, paste the ruby command, and type enter. Homebrew should install itself.

homebrew install script


4. Continue following the instructions at:
http://ntraft.com/getting-octave-to-work-on-mountain-lion/

You've already done steps 1 and 2.

Do step 3.

brew tap homebrew/science
brew install octave

Do step 4.

brew install gnuplot

DO NOT do step 5. Instead do this.

5a) Copy the text of "playsamples.m" into a new TextWrangler document. Save it to the Desktop as playsamples.m.
Important: for this next command to work you must have saved playsamples.m to the Desktop. Double check.
Execute this command in the Terminal

cp ~/Desktop/playsamples.m /usr/local/Cellar/octave/3.6.4/share/octave/site/api-v48+/m

5b) Copy the text of "octaverc" into a new TextWrangler document. Save it to the Desktop as octaverc (no .extension)
Important: for this next command to work you must have saved octaverc to the Desktop. Double check.
Execute this command in the Terminal

cp ~/Desktop/octaverc /usr/local/Cellar/octave/3.6.4/share/octave/site/m/startup

Do Step 6.
Reboot

Do Step 7

Test playsamples

Open Terminal

Type octave. At the octave prompt execute this command

TextWrangler should open with a new document. Delete all existing text and copy/paste the following text into musc208ocataveTest.m.

SR = 44100;
T = 1/SR;
f = 440;
n = 0 : SR-1;
nT = n*T;
wav = sin( 2 * pi * f * nT );
plot ( wav ( 1 : 500 ) );
playsamples( wav );

Save and test.

octave test

You should hear the sound and see the plot.

Additional Installs

Au Lab

In the course Common folder in the AuLab_Ten8_Ten9

Audacity 2.0.5

http://audacity.sourceforge.net/download/

s(M)exoscope

http://bram.smartelectronix.com/plugins.php?id=4
Download VST and AU versions:
Mac OSX 
Mac OSX Audio Unit Version Kindly provided by apulSoft

FreqAnalyst

http://www.bluecataudio.com/Products/Product_FreqAnalyst/
Download VST and AU versions:
MacAU 
MacVST

Copy AU plug-ins into /Library/Audio/Plug-Ins/Components

    BC FreqAnalyst 2 AU(Mono).component
    BC FreqAnalyst 2 AU(Stereo).component
    s(M)exoscope.component

Copy VST plug-ins into /Library/Audio/Plug-Ins/VST

    BC FreqAnalyst 2 VST(Mono).vst
    BC FreqAnalyst 2 VST(Stereo).vst
    s(M)exoscope

Macintosh 10.6 - Octave 3.4.0

Download and install Octave 3.4.0
http://sourceforge.net/projects/octave/files/Octave%20MacOSX%20Binary/2011-04-21%20binary%20of%20Octave%203.4.0/

OctaveScreenshot

Copy octave.dmg/Extras/GnuPlot to /Applications

Octave dmg folder

Open the Extras folder double click the gnuplot-4.4.3-aqua-i386.dmg icon.

gnuplot dmg icon

Copy the Gnuplot application to /Applications

Right click and hold the Gnuplot.app icon. Choose Show Package Contents from the popup menu.

gnuplot show package contents

Right click Resources/bin/gnuplot and choose Open ... then select TextWrangler

gnuplot open with TextWrangler

Follow these steps from SourceForge page

================

Repair the Gnuplot-4.4.3 included with Octave-3.4.0 DMG      
Open /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot in a text editor.
Use the editor search-and-replace feature to replace "DYLD_LIBRARY_PATH" with "DYLD_FALLBACK_LIBRARY_PATH". 
There are four instances that need to be replaced.

  gnuplot find replace


Open Terminal. Then open .bashrc

edit .bashrc

append these lines at the end of .bashrc.

CLICOLOR="1";
export CLICOLOR;
export TERM=xterm-color;
export GNUTERM='X11';
export EDITOR=/usr/local/bin/edit
alias gnuplot="/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot"; 

OCTAVE 3.8.0 Fix on Mac OS X 10.9. Change the Editor line. Delete the alias gnuplot line.

CLICOLOR="1";
export CLICOLOR;
export TERM=xterm-color;
export GNUTERM='X11';
EDITOR('/usr/local/bin/edit');

Save and close bashrc. Then quit from Terminal.

Copy the text of "playsamples.m" into a new TextWrangler document. Save it to the Desktop as playsamples.m.
Important: for the next command to work you must have saved playsamples.m to the Desktop. Double check.
Copy paste this command into Terminal and execute.

cp ~/Desktop/playsamples.m /Applications/Octave.app/Contents/Resources/share/octave/site/api-v47+/m

Copy the text of "octaverc" into a new TextWrangler document. Save it to the Desktop as octaverc (no file extension)
Important: for this next command to work you must have saved octaverc to the Desktop. Double check.
Copy paste this command into Terminal and execute.

cp ~/Desktop/octaverc /Applications/Octave.app/Contents/Resources/share/octave/site/m/startup/

Right click and hold the Octave.app icon. Choose Show Package Contents from the popup menu. Expand the folders to verify the files were copied into the correct folders.

octave 340 package contents

Close the Finder window.

Test Octave

Run double click /Applications/Octave to run the program. Type this to test.

sombrero command

You should see this. Press, hold, and move the left mouse button to rotate the graphic. Move the mouse scroll wheel.

sombrero pict

Test playsamples

Open Terminal

Type octave. At the octave prompt type: edit musc208ocataveTest.m

play samples test

TextWrangler should open with a new document. Delete the default text and copy, paste the following text into musc208ocataveTest.m.

SR = 44100;
T = 1/SR;
f = 440;
n = 0 : SR-1;
nT = n*T;
wav = sin( 2 * pi * f * nT );
plot ( wav ( 1 : 500 ) );
playsamples( wav );

Save and test.

octave test

You should hear the sound and see the plot.

Additional Installs

Au Lab

In the course Common folder in the AuLab_Ten6_Ten7

Audacity 2.0.5

http://audacity.sourceforge.net/download/

s(M)exoscope

http://bram.smartelectronix.com/plugins.php?id=4
Download VST and AU versions:
Mac OSX 
Mac OSX Audio Unit Version Kindly provided by apulSoft

FreqAnalyst

http://www.bluecataudio.com/Products/Product_FreqAnalyst/
Download VST and AU versions:
MacAU 
MacVST

Copy AU plug-ins into /Library/Audio/Plug-Ins/Components

    BC FreqAnalyst 2 AU(Mono).component
    BC FreqAnalyst 2 AU(Stereo).component
    s(M)exoscope.component

Copy VST plug-ins into /Library/Audio/Plug-Ins/VST

    BC FreqAnalyst 2 VST(Mono).vst
    BC FreqAnalyst 2 VST(Stereo).vst
    s(M)exoscope