Resonant Beauty: Mathematical Foundations in Music with Loop38