# ลองให้ Mathematica เล่นเพลงมหาจุฬาลงกรณ์

ลองให้ Mathematica เล่นเพลงมหาจุฬาลงกรณ์ครับ
คำสั่งที่ใช้คือ SoundNote กับ Sound

โน้ตเพลงที่ผมได้มานี้อาจไม่ถูกครับ แต่มีคนบอกว่ามันใกล้เคียง

notes = {“C2”, “A”, “C2”, “E”, “A”, “G”, “G”, “C2”, “A”, “E”, “A”,
“G”, “D”, “D”, “E”, “D”, “E”, “A2”, “C”, “D”, “C”, “D”, “E”, “G”,
“C2”, “A”, “C2”, “E”, “A”, “G”, “G”, “C2”, “A”, “E”, “A”, “G”, “D”,
“D”, “G”, “E”, “G”, “D”, “E”, “G”, “G2”, “A2”, “D”, “C”, “A”, “G”,
“A”, “E”, “A”, “G”, “E”, “D”, “E”, “D”, “E”, “A2”, “C”, “D”, “E”,
“D”, “E”, “G2”, “A2”, “C”, “C2”, “A”, “C2”, “E”, “A”, “G”, “G”,
“C2”, “A”, “E”, “A”, “G”, “D”, “D”, “G”, “E”, “G”, “D”, “E”, “G”,
“G2”, “A2”, “D”, “C”, “A”, “G”, “A”, “E”, “A”, “G”, “E”, “D”, “E”,
“D”, “E”, “A2”, “C”, “D”, “E”, “D”, “E”, “G2”, “A2”, “C”, “C2”,
“A”, “C2”, “E”, “A”, “G”, “G”, “C2”, “A”, “E”, “A”, “G”, “D”, “D”,
“G”, “E”, “G”, “D”, “E”, “G”, “G”, “A”, “C2”, “C2”};

culength = {3, 3, 3, 3, 3, 3, 18, 3, 3, 3, 3, 3, 3, 18, 3, 3, 3, 6, 6,
18, 6, 9, 3, 18, 3, 3, 3, 3, 3, 3, 18, 3, 3, 3, 3, 3, 3, 18, 3, 3,
3, 6, 6, 15, 6, 9, 3, 18, 6, 9, 3, 18, 6, 9, 3, 18, 3, 3, 3, 6, 6,
18, 3, 3, 3, 6, 6, 18, 3, 3, 3, 3, 3, 3, 18, 3, 3, 3, 3, 3, 3, 18,
3, 3, 3, 6, 6, 15, 6, 9, 3, 18, 6, 9, 3, 18, 6, 9, 3, 18, 3, 3, 3,
6, 6, 18, 3, 3, 3, 6, 6, 18, 3, 3, 3, 3, 3, 3, 18, 3, 3, 3, 3, 3,
3, 18, 3, 3, 3, 6, 6, 15, 6, 9, 3, 18};

cusong = Table[SoundNote[notes[[ i]], culength[[ i]], “Guitar”], {i, 1, Length@notes}];
Sound[cusong, 60]