Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Network & Security Expert

You must write the 6 programs described below. All of these are command-line tools that follow the Unix style of passing switches and arguments on the command line. As such, your programs should never prompt the user for anything. You may assume that all switches appear before the first argument. The requirements below are minimal requirements; you may provide extra functionality or handle extra cases as you choose. For example, you might include a --debug switch that causes extra debugging information to be written to standard error. As a general rule, your programs should be user friendly". That means they should print useful error messages whenever possible. Additionally, your programs should print any messages or diagnostic information to standard error, with standard output reserved for sound output. I do not require that your programs be absolutely \quiet", but take care that the default behaviour prints at most a few messages.

All programs should handle the following 2 formats for sound files: .cs229 format, and .wav format, described in Appendix B. Similarly, all programs should accept the -h switch, which causes the program to display a "help" screen and then terminate. The help screen should describe the program, its usage, and all legal switches (including any extra ones you implemented).

1.0 sndinfo

This program reads all sound files passed as arguments, and for each one, displays the following.

 The file name

 The file type (.cs229 or .wav)

 The sample rate

 The bit depth

 The number of channels

 The number of samples

 The length of the sound (in seconds)

If no files are passed as arguments, then the program should read from standard input. The only required switch for this program is -h.

1.1 sndcat

This program reads all sound files passed as arguments, and writes a single sound file that is the concatenation of the inputs. If no files are passed as arguments, then the program should read from standard input. You must support the following switches.

-h: show the help screen.

-o file: specify the output file name; if omitted, write to standard output.

-w: output in .wav format instead of .cs229 format

1.2 sndchan

This program reads all sound les passed as arguments, and produces a single sound le where each channel corresponds to one of the input le channels (channel order should be preserved). For instance, if the first sound le has 2 channels and the second sound le has 3 channels, then this produces a sound le with 5 channels. If no les are passed as arguments, then the program should read from standard input. You must support the following switches.

-c n : output channel n only; otherwise all channels

-h : show the help screen.

-o file : specify the output le name; if omitted, write to standard output.

-w : output in .wav format instead of .cs229 format.

1.3 sndmix

This program reads all sound les passed as arguments, and "mixes" them into a single sound le. The program is invoked as

sndmix [switches] mult1 file1 ...multn filen

where the sample data of filei is multiplied by multi (a real value between -10 and 10); the scaled data is summed to produce the output le. You must support the following switches.

-h : show the help screen.

 -o file : specify the output le name; if omitted, write to standard output.

-w : output in .wav format instead of .cs229 format.

1.4 sndgen

This program is a mess of switches. It produces a sound of a specified frequency and waveform, using a simple ADSR envelope (see Appendix D). You must support the following switches.

-h : show the help screen.

-o file: specify the output le name; if omitted, write to standard output.

-w: output in .wav format instead of .cs229 format

--bits n : use a bit depth of n

--sr n : use a sample rate of n

-f r : use a frequency of r Hz

-t r : total duration of r seconds

-v p : Peak volume. 0  p  1

-a r : attack time of r seconds

-d r : decay time of r seconds

-s p : sustain volume. 0  p  1

-r r : release time of r seconds

--sine : generate a sine wave

--triangle : generate a triangle wave

--sawtooth : generate a sawtooth wave

--pulse : generate a pulse wave

--pf p : Fraction of the time the pulse wave is "up"

Note that the volume parameters are given as the percentage of the maximum volume.

1.5 sndplay

This program reads a music file in .abc229 format and produces a sound file of that music.

You must support the following switches.

-h : show the help screen.

-o file : specify the output file name; if omitted, write to standard output.

-w: output in .wav format instead of .cs229 format

--bits n: use a bit depth of n

--sr n : use a sample rate of n

--mute n : do not play instrument n

Computer Network & Security, Computer Science

  • Category:- Computer Network & Security
  • Reference No.:- M9524153

Have any Question?


Related Questions in Computer Network & Security

This is from a practical exercise the answers are below but

This is from a practical exercise. The answers are below BUT, I do not know how they came up with them. I'd like a step-by-step explanation of how they got the answers. Practical Exercise 1: Assume the demand for teacher ...

It networking assignment -major lab scenario -assessment

IT Networking Assignment - Major Lab Scenario - Assessment Requirements: Subnet an address space with given requirements. Assign appropriate addresses to interfaces and document them in the address table. Build the netwo ...

Network project management assignment -purpose of the

Network Project Management Assignment - Purpose of the assessment - The purpose of this assignment is to build a clear understanding of project management fundamentals and their application, specifically: demonstrate pro ...

What are three ways that even every forecast model should

What are three ways that even every forecast model should be evaluated to obtain the best forecast result.

Since quotas do not raise revenues but have the same trade

Since quotas do not raise revenues but have the same trade effects as do tariffs, why not just have tariffs? Why would the government impose quotas when tariffs not only would reduce imports but also bring in new revenue ...

Assume that the number of customers who arrive at a water

Assume that the number of customers who arrive at a water ice stand follows the Poisson distribution with an average rate of 6.4 per 30 minutes. What is the probability that more than one customer will arrive during the ...

You need to prepare packet tracer fileattached pdf contains

You need to prepare packet tracer file attached pdf contains topology and required configurations and assigned ip address. In packet tacer file you need to include banner, router and switches. 1. VLSM Design a) As first ...

1 these assignments need to be properly supported with

1. These assignments need to be properly supported with references to the scientific literature. 2. Use a 12pt font for the body of your assignment. 3. The assignment many be up to four (4) pages long, including any appe ...

Network requirement analysis and planpurpose of the

Network requirement analysis and plan Purpose of the assessment (with ULO Mapping) Main objective of this assignment is to enable student to understand networking devices, gather requirements for a given business case st ...

Suppose after collecting data on an existing firms actual

Suppose, after collecting data on an existing firm's actual short-run ouput, the following production function is found to match the data: TP = Q = 5*L + 0.6*L2 - 0.01*L3 1. Using the equation above, find the following e ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As