Lab5 Part 1 Algorithm 1

 We spoke about how to analyse sound and programmatically scale sound input before we started the lab. The process of sound analysis is not particularly unique. Integer and floating point (decimal) numbers used to represent sound input are parsed to perform analysis. Additionally, changing the level simply involves performing an arithmetic operation on each integer contained in the sound sample. And that was the lab's main objective. The objective was not without risk, though. The easiest or most naive way was to perform the procedure by looping through all the numbers. This was a lengthy and ineffective method, though, when done on a mobile device. Because the CPU executes this repeating operation each time the user changes the volume, this drains the battery. Our task was to come up with a more effective technique to accomplish this.

We have sound samples in the lab that are exclusively represented by random numbers between -65,536 and 65,536, or the range. Why those strange digits in between? due to the fact that we were working with a collection of 16-bit floating point values. Let's perform volume up/down operations after the numbers have been generated. Additionally, two algorithms were provided for us to compare and see which one was superior. The first approach used a table of all values between -65,536 and 65.536 that had already been computed, multiplied by a scaling factor. Then, you can look up the sample's corresponding value in a lookup table and use that to represent that specific sample in the output array when you compute the output array or sample with the scaled volume applied.

Since each value in the array represents the index * volume factor, it computes a precomputed table when it is inserted into your pseudocode. Then, after iterating through the sample array, it stores the value from the most recent iteration and uses it to search up the scaled value for that value in the precomputed database. Add the "searched" values to the output array after that. This was the answer that my team came up with. Unfortunately, like with everything, I encountered a problem that I spent some time attempting to resolve but was unsuccessful in doing, and the class swiftly ended. The lab is currently under construction, but we anticipate results soon. We will talk about other, simpler algorithms.

Comments

Popular posts from this blog

ifunc function

Lab2 - 6502 Assembly Language Lab(Calculation)

Lab1 - 2 Open Sources Packages