diff_months: 21

 Control-sand input Constructor Function - IT Assignment Help

Flat 50% Off Order New Solution
Added on: 2022-08-20 00:00:00
Order Code:
Question Task Id: 404112
  • Country :

    United Kingdom

Assignment Task

 


Audio visualiser
In this case study you will be completing a simple music visualisation program that contains three separate visualisations.
To turn the sound into something that can be visualised p5.js provides a Fast Fourier Transform object. Take a look at its description in the p5.sound documentation.
For todays exercise you don’t need to be able to understand the full technicalities of this object or its methods. However, in putting this case study together we have used the following methods.
FFT.analyze() returns an array of 1024 values between 0 and 255. Each value represents the amplitude (loudness) of a small frequency range (pitch of the sound).
FFT.waveform() returns an array of 1024 values between -1 and 1. Each value represents the amplitude of the sound for a tiny portion of time.

Tasks
Playback and fullscreen [2 marks]

  • In the ControlsAndInput constructor function (in the controlsAndInput.js file) complete this.mousePressed().
  • Using the playbackButton object check if the mouse click is on the play button (check out the PlaybackButton constructor function and find the method which does this). When you have called this method clicking the playback button should start the music and display a visualisation.
  • If the click isn’t on the playback button toggle the display between window and fullscreen (check out the p5.js documentation on how to do this.)

Visualisation menu
In the ControlsAndInput constructor function complete this.menu(). Write a for loop that iterates over the array stored in the visuals property of the Visualisations object, which itself is stored in the global vis variable declared in sketch.js, writing each visualisation name to the screen. You can check if your menu is displayed correctly by pressing the space bar while the app is running. When complete it should look like the following:

Spectrum analyser
Take a look at the Spectrum() constructor function. The fast Fourier transform analyse function (i.e. p5.FFT.analyse()) returns an array of amplitude values for 1024 audible frequency values. The amplitude value is between 0 and 255. The visualisation draws a rectangle for each of these frequencies, the height of the rectangle is determined by the amplitude value for that frequency.
Change the visualisation so that visualisation is horizontal not vertical. Therefore, the bars emerge from the left hand side of the screen not from the bottom, as in the following image. You should do without using the rotate() function [2 marks]

Change the colour of each bar such that it gradually changes from green to red based on the amplitude value

  • An amplitude value of 0 the colour values are R:0, G:255 and B:0.
  • An amplitude value of 127 colour values are R:127, G:127 and B:0
  • An amplitude value of 255 colour values are R:255, G:0 and B: 0
  • HINT: Both amplitude and colour are represented using the same range of numbers (0–255). So the amplitude number can be passed directly as an argument to the red parameter to control the amount of red colour. For the green argument you will need to calculate the correct value from the amplitude number.

 

    

This IT Assignment has been solved by our IT Experts at Exam Question Bank. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
    

Be it a used or new solution, the quality of the work submitted by our assignment Experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

  • Uploaded By : Katthy Wills
  • Posted on : March 02nd, 2020
  • Downloads : 0
  • Views : 216

Order New Solution

Can't find what you're looking for?

Whatsapp Tap to ChatGet instant assistance

Choose a Plan

Premium

80 USD
  • All in Gold, plus:
  • 30-minute live one-to-one session with an expert
    • Understanding Marking Rubric
    • Understanding task requirements
    • Structuring & Formatting
    • Referencing & Citing
Most
Popular

Gold

30 50 USD
  • Get the Full Used Solution
    (Solution is already submitted and 100% plagiarised.
    Can only be used for reference purposes)
Save 33%

Silver

20 USD
  • Journals
  • Peer-Reviewed Articles
  • Books
  • Various other Data Sources – ProQuest, Informit, Scopus, Academic Search Complete, EBSCO, Exerpta Medica Database, and more