MUSIC 208 Install Octave on Windows

Updated text in bold green font.

Update 1        Update 2

Install Notepad++

Notepad++ will be the default Octave editor. Download from

http://notepad-plus-plus.org/download/v6.5.3.html

notepad 1

When the download is finished, double click the npp6.5.3 Installer.exe icon.

npp 2

When you get to this screen choose to install a Desktop icon.

notepad 3

When you get to the last dialog click Finish and go ahead and run the program.

npp 3

Quit from Notepad++.

Install Octave 3.6.4

Download

http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.4%20for%20Windows%20Microsoft%20Visual%20Studio/

Double click the octave-3.6.4-vs2010-setup.exe icon to begin the install.

octave installer icon

When I ran the installer it asked for Microsoft Runtime Libraries before continuing.

vc runtime not found

If that happens to you download vcredist_x86.exe. Click the No Thanks button, you don't need any of the extras.

no thanks to extras

When the download is complete, double click the vcredist_x86.exe icon to install. Accept all defaults.

vc redistributal dialog

When that install is finished retry the octave install.

Double click octave-3.6.4-vs2010-setup.exe and try again.

Click Run

octave install 0

Click Next >

octave install 1

Change to Generic (works on all systems)
Click Next >

octave install 2

Click Next >

octave install 3

Make sure it's Gnuplot
Click Next >

octave install 4

IMPORTANT: Change the working directory to C:\octave364!!!

Just type it in. Future steps depend on it.

octave install 5

Click Install

octave install 6

Click Finish to Run the program.

octave install 7

Test Plot

Double click the Octave icon on your Desktop.

Execute the sombrero() command.

octave install 8

It may take 1-2 minutes for the plot to show up on the first run.

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

sombrero plot

Create a Folder for Your MUSC208 files

I created an m208 folder at the top level of the C:\ drive. The following directions use this pathname.

m208 directory

Make Notepad++ the default Octave editor

Open Notepad++, navigate to C:\octave364\share\octave\site\m\startup\ and open octaverc

octaverc directory

ORIGINAL VERSION worked for me.

Copy/paste these lines into the octaverc file.

edit editor "C:\\Program Files\\Notepad++\\notepad++.exe %s"; 
edit mode async;
## this will become the Octave working directory
cd C:\\m208;

Test Option 1, Option 2, and m208 Fix. Send me an email with your results.

Option 1 worked for me. Change line 1 to this. Changed \\ to \ and changed " to '.

 edit editor 'C:\Program Files\Notepad++\notepad++.exe %s'; 

Option 2 worked. Change line 2 to this. Changed edit editor to EDITOR.
Added parentheses. Changed \\ to \ and changed " to '. Removed %s.

 EDITOR('C:\Program Files\Notepad++\notepad++.exe'); 

Fix: Add single quotes to line 4 and change \\ to \.

 cd 'C:\m208'; 

Save and close the file.

Install a Sound File Player for Octave to use

Download sWavPlayer.zip.

Unzip it and move the executable sWavPlayer.exe to the Octave folder C:\octave364\bin\

sWavPlayer

Add the playsamples Octave function file I wrote to the appropriate Octave folder

Download and unzip this file playsamples.m.zip

Copy the playsamples.m file into: C:\octave364\share\octave\site\api-v48+\m\

Test sound

Open Octave-3.6.4 application and execute these commands.

pwd shows that the Octave working directory is C:\m208

edit sinetest.m

Executing the "edit sinetest.m" command should open a new editing window in Notepad++.

Replace any existing text with this (copy/paste):

SR = 44100;
T = 1/SR;
f = 440;

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

Save the file.

Execute this Octave command.

execute sinetest

You should hear the sound and see this plot.

sinetest plot

==== End Octave Windows Install