Unit 35: Review

unit 35

unit 34

unit 33

unit 32

unit 31

unit 30

unit 29

unit 28

unit 27

unit 26

unit 25

unit 24

unit 23

unit 22

unit 21

unit 20

unit 19
Some review stuff.
The AI is borrowed from the movie Ex Machina, where Ava is played by Alicia Vikander. Since Apple calls one of the voices Ava and Ava is a palindrome, I use Ava. She is also ``One", the first one. You see part of the interview here and also some math (primes) appearing in a programming part.
Here are the basic harmonies of the 1a song! I believe the harmonies are original but there are not many songs of that shortness possible and 90 percent of all pop songs are constructed from such simple harmonies. The numbers are the Midi numbers.
S=Sound; SN[{a_,t_}]:=SoundNote[a,t];T=4; 
U=S[{S[{"Piano",SN/@A},{0,T}],S[{"Viola",SN /@B},{T,2T}]}];
Here is the MP3 file produced.
And here is Ava's first song. I (the human) cleaned out notation (if you compare with the slides). While having lost the contest, we humans still proud ourselves to write beautiful and poetic code. Machines just do not have good taste! (Yet ...)
s1=Sound[{"Flute", SN/@rise[a1]},{0T,1T}]; s2=Sound[{"Guitar",SN /@down[a2]},{0T,1T}];
s3=Sound[{"Viola", SN/@rise[a1]},{1T,2T}]; s4=Sound[{"Harp",  SN /@down[a2]},{1T,2T}];
s5=Sound[{"Violin",SN/@rise[b1]},{2T,3T}]; s6=Sound[{"Piano", SN /@down[b2]},{2T,3T}];
s7=Sound[{"Viola", SN/@rise[b1]},{3T,4T}]; s8=Sound[{"Cello", SN /@down[b2]},{3T,4T}];
The MP3 produced. (Mathematica file)
The MP3 of stochastic version.
And here are some details on composing with Mathematica from 2018 (Math 21b course).
Finally, here are some review slides. (The beginning a bit infantile. But we take these days things too seriously anyway. It is also a bit to honor Gonick, who did not find Harvard a very fertile ground for humor when he was here. (See this.) Be warned as it is silly. If you do not find it funny, it is not Harvard's fault. )