function url = makeTuneWavFileOnWeb_v1(notes,vol,sampRate,bitsPerSamp,dir,file)
% makeWavFileOnWeb   take samples and put on the web as a wave file
%
% Consumes:
%    notes    a cell array of notes.
%   vol         scalar number, volume: volume, in range [0,1)
%                should be strictly less than 1 to avoid clipping/distortion
%   sampRate   scalar number, the number of samples per second (e.g. 44100)
%   bitsPerSamp   scalar number, the number of bits per sample   (e.g. 16)
%   dir        char string, the directory in which to put the file
%                 this directory will be created if it doesn't
%                 exist, and chmod'ed to make it readable
%               directories above this one are assumed to already
%               be readable--if not, they need to be chmod'ed manually.
%   file       char string, the filename for the wave file
%  
% Produces:  
%  
%    url:     the URL of the file that contains the samples
%  
% Example:
%
%  >> notes = {'B','A','G','A','B','B','B'}
%  >> makeWavFileOnWeb(notes,0.9,44100,16,'cisc106/10.31','mary.wav')
%  ans =
%
%      http://copland.udel.edu/~pconrad/cisc106/10.31/mary.wav
%
%  >>
%  
% P.Conrad for CISC106, 10/31/2007
  
  % define some constants

    noteDur = 0.5; % assume all quarter notes, 0.5 sec each
    soundFrac = 0.75; % assume each note is 3/4 sound, 1/4 silence
    
  % create the samples
  %  THIS CODE IS WRONG... just a place holder !!!   

  howManyNotes = length(notes);
  
  howManyOnesAndZerosPerQuarterNote = sampleRate * noteDur; 
     % e.g. 44100 * 0.5 gives me 22050

  howManyOnesPerQuarterNote = ... 
      floor(howManyOnesAndZerosPerQuarterNote * soundFrac);

  howManyZerosPerQuarterNote = ...
      howManyOnesAndZerosPerQuarterNote - howManyOnesPerQuarterNote;
  
  
    samples = vol * sineWavVector(sampRate,440,1);

  % 
  
    url = makeWavFileOnWeb(samples,sampRate,bitsPerSamp,dir,file);
    
    return;

end % function
    