Aist2010 Midterm2023
Aist2010 Midterm2023
Name:
Student ID #:
Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Total
Score
Q1.
When storing digital audio, storage space and sound quality may or may not depend on
the following actions. Briefly discuss the effects by these actions on the storage space
requirements, and the faithful representation of what can be heard. (12%)
Q2.
DFT and STFT are widely used transforms for audio analysis. What are they
respectively? Discuss the difference in results you can obtain if you apply these two
transforms on a 3-minute audio waveform of a song. (8%)
Q3.
Look at this piece of Python code:
1 import numpy as np, matplotlib.pyplot as plt
2 import librosa.display
3 t = np.linspace(0, 1, 8000)
4 x = np.sin(2 * np.pi * 3000 * t) + np.sin(2 * np.pi * 1000 * t)
5 y = abs(librosa.stft(x, n_fft=1024, center=False))
6 librosa.display.specshow(y, y_axis='linear', x_axis='time', sr=8000)
7 plt.show()
What kind of plot would be generated? What kind of line(s) would appear, and where?
(You do not need to draw it.) (2%)
Which line in the code should be edited to achieve the following changes, and how? (6%)
a) The sound should have a fundamental frequency of 500 Hz with the same timbre
Line _______:
Line _______:
AIST2010 Midterm 2023 Page 4 of 7
Q4.
Give three examples of frequency domain (spectral) features that can be extracted from
a 1-second sound. Briefly discuss the potential acoustic/physical meanings of each. (9%)
Q5.
What is being measured in this plot?
How are these measurements useful for?
Discuss briefly. (8%)
AIST2010 Midterm 2023 Page 5 of 7
Q6.
Here are two SuperCollider synths.
Synth a Synth b
( (
SynthDef(\syntha, { |freq=440| SynthDef(\synthb, {|freq=440|
Out.ar(0, Mix([ var carrfreq, modfreq, carrier,
SinOsc.ar(freq, mul:0.4), modulator, ratio, index, moddepth;
SinOsc.ar(freq*2, mul:0.1), ratio = 1/4;
SinOsc.ar(freq*3, mul:0.2), index = 1;
SinOsc.ar(freq*4, mul:0.2), carrfreq = freq;
SinOsc.ar(freq*5, mul:0.1), modfreq = carrfreq * ratio;
]) )}).add; moddepth = modfreq * index;
) Out.ar(0, SinOsc.ar(carrfreq +
Synth(\syntha, [\freq, 100]); (moddepth*SinOsc.ar(modfreq)), 0,
0.25));
}).add;
)
Synth(\synthb, [\freq, 400]);
Sketch the spectrum of the two synths. You may draw the amplitude peaks with obvious
different length, without notating the amplitude values. Notate the frequencies. (8%)
Synth a Synth b
In order to create a brighter sound with Synth b, which parameter should be adjusted?
Should it be increased or decreased? What difference would it introduce to the
spectrum? (6%)
AIST2010 Midterm 2023 Page 6 of 7
Q7.
Look at this piece of SuperCollider code:
1 (
2 x = Pshuf([Pxrand([2,3,4],3), 0, 1, Prand([5,6],4)], 2).asStream;
3 Pbind(
Usage of SuperCollider Pattern UGens
4 \dur, 0.5.rand,
• Pseq(): Follow the order of a list
5 \midinote, 60+(x*3) • Prand(): Random member of the list
6 ).play • Pxrand(): Random member but not
7 ) repeating the member before
What are the meanings of the following lines? (4%) • Pwrand(): Random member with a
a) Line 2: Pxrand([2,3,4],3) weight of importance
• Pshuf(): Random order of the list
Input parameters: [list of items], number
of repeats
How many music notes are played after executing the code above once? (2%)
Q8.
Look at this piece of JavaScript code:
1 let audioCtx = new AudioContext();
2 let biquadFilter = audioCtx.createBiquadFilter();
3
4 let wave = audioCtx.createOscillator();
5 wave.frequency.value = 261;
6 wave.type = "square";
7 wave.start();
8 wave.connect(biquadFilter);
9 biquadFilter.connect(audioCtx.destination);
10
11 biquadFilter.type = "notch";
12 biquadFilter.frequency.value = 261;
How does the value in line 12 affect the output sound, comparing to the wave node? (6%)
AIST2010 Midterm 2023 Page 7 of 7
Q9.
What kind of data is needed to effectively build the following systems with machine
learning and artificial intelligence? Give examples with reasons. (9%)
a) Music recommendation
c) Music transcription
Q10.
Indicate clearly whether the following statements are True or False. Write down a
correction if the statement is false. (16%)
a) In this MaxMSP patch on the right, the upper cable
transfers in audio rate, while the lower cable transfers in
control rate.
c) In the ADSR envelope, D refers to the time of decrease of energy after the peak.
~ END OF PAPER ~