Question: The function you write will be called highpass _ filter ( num _ samples _ to _ average, audio ) , being audio a tuple.

The function you write will be called highpass_filter(num_samples_to_average, audio), being audio a tuple. The output is
created by averaging nearby samples, but with every alternative sample reversed in sign. This is
illustrated with the following sample usage example:
>>> audio =(1,3,6,8,4,2,-1,-4,-7,-11,-8,-5)
>>> highpass_output = highpass_filter(5, audio) # i.e. create an output by forming
,->(1-3+6-8+4)/5, then (3-6+8-4+2)/5, etc.
>>> highpass_output
(0.0,0.6,-0.2,0.6,-0.4,-1.0,-0.2,-1.0)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!