Python Forum
WaveCopy and Amplitude Scaling
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WaveCopy and Amplitude Scaling
#1
In this assignment you will generate code to read a (short) .wav audio file into python, copy and amplitude scale it, before writing it out to a new .wave file.
1. Read a few seconds of .wav file of your choosing into a Numpy array.
2. Duplicate the first or last half of the array and concatenate it onto the end of the original array at half the amplitude.
3. Amplitude scale the whole array to √2-1
4. Plot the resulting audio array.
5. Write the array to a .wav file
Submit .py code and original .wave file
Bonus assignment grade bump:
6. Repeat 2 and 3 a user-determined number of times to produce a
decaying echo effect.


Hello!
first time posting here. I am in an intro to coding, and I was told that this would be the best way of reaching help outside of class.

We usually create the wav. file, but this time we are using an existing wav file and trying to put into an array. I am using a wav. file called "glassbreak.wav" as an example. But I do not understand how to work it through this assignment. Where do I start?

Thanks!
Reply
#2
I don't know how to import sounds and stuff into python but you should learn the following concepts to achieve the rest -
1. Learn how arrays work
2. If I'm correct it said repeat based on how many times the user wants, for that use input
3. For repeating you can use a for loop
repeat = input('Some text - ')
for i in range(1, repeat + 1):
    #Some Code
Reply
#3
We don't usually write code for you, especially if a homework assignment.
Write some code, and ask questions on particular issues.
We will be glad to help.
Reply
#4
(Apr-22-2019, 08:39 PM)Larz60+ Wrote: We don't usually write code for you, especially if a homework assignment. Write some code, and ask questions on particular issues. We will be glad to help.
(Apr-22-2019, 08:39 PM)Larz60+ Wrote: We don't usually write code for you, especially if a homework assignment. Write some code, and ask questions on particular issues. We will be glad to help.
thats exactly what I need help with. I wrote the code for making the wav, but this time we are using a different wav. file.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  quiver plot scaling help StillAnotherDave 1 1,751 Oct-26-2020, 09:17 AM
Last Post: StillAnotherDave
  Scaling random numbers within specific range schniefen 4 3,191 Oct-28-2019, 11:22 AM
Last Post: jefsummers
  Scaling elements of marix. pawlo392 1 2,168 May-16-2019, 11:37 PM
Last Post: michalmonday

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020