0% found this document useful (0 votes)
13 views7 pages

Aist2010 Midterm2023

algorithmic music midterm

Uploaded by

dhaxezeyij
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views7 pages

Aist2010 Midterm2023

algorithmic music midterm

Uploaded by

dhaxezeyij
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

AIST2010 Midterm 2023 Page 1 of 7

AIST2010 Introduction to Computer Music


Midterm Exam
2 November 2023
14:40–15:55 (75 minutes)

1. There are 7 pages in total and 100 marks.


2. Answer all questions. You may use a pencil or a pen. No calculator.
3. Write legibly. Keep your answers to-the-point:
Be precise and concise! Manage your time wisely.
4. Feel free to put down any assumption you consider necessary. You
may add charts, tables or other forms of data if you think that
could help your explanations.
5. If you need more space, write on the back of the last sheet and
mark it clearly for grading. Yet, going beyond the given space
may imply that you are giving an answer too long.
6. You are allowed to use a written cheat sheet of A4 double side.

Name:

Student ID #:

Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Total
Score

/12 /8 /8 /9 /8 /18 /6 /6 /9 /16 /100


AIST2010 Midterm 2023 Page 2 of 7

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%)

a) Decreasing sampling rate

b) Decreasing quantization level

c) Using uncompressed audio instead of compressed

d) Using a different ADC


AIST2010 Midterm 2023 Page 3 of 7

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 _______:

b) Log frequency should be used in the plot

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]);

________________ Synthesis ________________ Synthesis


Name the synthesis method in each of the blanks above. Why is one of them considered
more lightweight than the other? (4%)

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

b) Line 5: \midinote, 60+(x*3)

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

b) Music instrument recognition

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.

b) Reverberation is an audio effect which reduces noise in the


room echo by removing early reflected sounds.

c) In the ADSR envelope, D refers to the time of decrease of energy after the peak.

d) CQT is better than STFT as it can reduce frequency resolution at lower


frequencies, so the frequency bins get larger in the low end.

~ END OF PAPER ~

You might also like