CECS Home | ANU Home | Search ANU
The Australian National University
ANU College of Engineering and Computer Science
School of Computer Science
Printer Friendly Version of this Document

UniSAFE

Introduction to Computer Systems

Assignment 1 Specification - Digital Audio Editor

The aim of this assignment is to give you some more experience in developing c programs. The basic part of this assignment aims to be simple enough for most students to be able to complete in less then 5 hours. The assignment also aims to provided a more open ended and challenging programming task for the students who wish to gain extra experience (and a higher mark).

The assignment will be marked out of 100. And is worth 10% of the final mark. A late penalty of 10% per day applies (these are working days and apply from after the assignment is collected. The assignment will be collected some time after midnight on the Friday it is due. Also note this penalty is caped so it does not take your final mark for this assignment below 40 out of 100. Assignment work will not be accepted after the last day of semester. Extensions are possible in documented exceptional cases (e.g. medical certificate).

Part 1 - Command line digital audio editor - trimming canonical WAVE files - 40 marks

A command line digital audio editor enables a user to process and modify audio files using the command line. Generally an audio editor would enable a user to: join, fade, record, playback, mix, amplify, compress, flange, reduce noise, apply equalisation, convert between formats, etc. An example of such a program is the SoX digital audio editor. However, in the basic part of this assignment your audio editor is only required to be able to trim the ends off an audio clip. Also your program only needs to be able to work using a restricted form of the canonical WAVE file format.

The "WAVE" format is a sub-format of the "RIFF" file format. In the "RIFF" format files a partitioned into a number of 'chunks', these 'chunks' may contain a number of sub-chunks. You may assume the audio file you use has single "RIFF" chunk which is formatted as a "WAVE" chuck which contains 2 sub-chunks. The first sub-chunk is of type "fmt ", this contains information about the audio format (for this basic part you may assume the audio format is: PCM, Mono, sample rate of 44100, 16 bits persample, byte rate of 88200, blockalign of 2). The second sub-chunk is of type "data" and contains the sampled data of the audio (in this case 16 bit samples).

If you do a simple search on the web you should be able to track down how WAVE files are formatted. I have found the following site useful https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ .

The program works from the command line and you provide it with the input and output file names along with the amount you wish the file to be trimmed. The program is call 'audioedit' and has the following man page (this is to let you know how the command line parameter are to be formatted):

NAME
   audioedit - command line program for editing WAVE audio files.

SYNOPSIS
   audioedit -help
   audioedit -version
   audioedit [-tb n] [-te m] -i inputfile.wav -o outputfile.wav

DESCRIPTION
   This program enables the basic audio editing of restricted canonical wave audio files.

OPTIONS
    -help     display the command line options
    -version  display the version number
    -tb n     trim n samples from the beginning for the audio clip
    -te m     trim m samples off the end of the audio clip
    -i file   provide the input file name
    -o file   provide the output file name (overwriting an existing file) 
Your program should display an error message and exit if there some problems with the options given or the format of the file provided.

A wave audio file which needs some trimming is available from: trimends.wav .

This basic part of your program should be written in c without the use of 3rd party audio libraries or programs.

Part 2 - README file - 20 marks

Write a 1 to 2 page README document that contains the following:
  • Your name and uni id.
  • Copyright and license associated with your software. (the license is optional)
  • A summary of your programs working.
  • How to compile and run your program.
  • The testing you did.
  • Optional extensions you did and what makes them deserving of a high mark.
  • Limitations of your program and what you would do next to improve the program.

Part 3 - Optional Extension - 40 marks

In this part of the assignment you are free to explore a number of possible extensions to your audio editor program. These include:
  • make the program work on other audio formats (e.g. get it working with stereo)
  • add an audio filter such as: amplification, compression, echo effects, equaliser, noise reduction, ...
  • add the ability to join clips one after the other
  • add the ability to mix two clips (merging them)
  • add the ability to record or play clips

You are also free to dream up some other extensions. Highest marks will be gained a doing one (or two) extensions very well, rather, than doing a lot of them poorly. You may make use of 3rd party libraries for completing this extension part if you like.

Marking

Each part of the assignment will be separately marked. Marks will be given for:
  • Correctness - Does it work?
  • Robustness - Does it fall over if any unusually input is given to it?
  • Clarity - Is the code (and README) simple to understand?
  • Style - Is the coding style consistent? Are variable names well chosen?
  • Formatting - Is the code formatted consistently and using a standard formatting approach?

Individual Assignment

This is an individual assignment. You may help each other, however, the final submission must be original and your own work. Take care not to give parts of your solution to other students.

Assignment Submission

The assignment must be submitted via a computer in the CSIT labs (or remotely via ssh to partch or one of our servers). Submit the assignment using the following command:
submit comp2300 ass1 README audioedit.c otherProgramFiles.c 

A few hits for submission:

  • Don't have spaces in your file names. (the submit program does not like them!)
  • Copy the files to your home directory, rather, than having them mounted on a USB drive.
  • You may submit as many times as you like, I will mark the most recent one that is not late.
  • If you are in comp6300 then use comp6300 rather than comp2300 in the above command.