% Script PlayScale
% Plays scales using the function OmegaTable

% Sample rate, note duration, sample times...
  Fs = 32768;
  Tfinal = .25;
  t = 0:(1/Fs):Tfinal;
  
  F = OmegaTable;
  for j = 1:5  % Stop at Octave 5; skip 6
%    Play each note in Octave j ...
%    Depending on your computer/sound card, octaves 1 and 2 can be pretty
%        poor.
     for k=1:12
%       Play the k-th note in Octave j
        f = F(k,j);
        y = sin(2*pi*f*t);
        sound(y,Fs)
        pause(1.2*Tfinal)
     end
  end
