This talk uses live coding in Clojure to demonstrate how functional programming can model musical composition. The speaker builds increasingly complex musical structures, from simple sine waves to a rendition of a Baroque cannon, showcasing how abstract concepts like scales and canons can be elegantly represented in code. The presentation emphasizes the power of functional programming to create, manipulate, and analyze musical data, highlighting the parallels between software development and musical composition. The speaker critiques the software industry's tendency to focus on self-created problems instead of addressing real-world issues. He uses the naming conventions of software solutions ("immutability," "IOT security") to illustrate this point, advocating for a shift towards software development that prioritizes solving global problems. This segment highlights the immense responsibility software developers bear in shaping the world, emphasizing the need for greater maturity and consideration of the impact of software on various aspects of life, rather than solely focusing on technical challenges. This segment delves into the concept of musical scales and their representation in code. The speaker explains how different scales (major, minor, blues, pentatonic) are defined by patterns of note intervals and demonstrates how these patterns can be algorithmically generated and played using the live coding environment, highlighting the mathematical and cultural aspects of music. This segment showcases a live coding demonstration, progressively building a more realistic sound by layering sine waves and incorporating harmonic series. This demonstrates how simple building blocks can be combined to create complex and nuanced audio output. This segment uses musical notation as an analogy to explain the limitations of certain programming languages. The speaker argues that while musical notation is effective for its purpose, it lacks the flexibility to easily extend or modify its symbolic system, unlike programming languages. He introduces the concept of using programming languages as a medium for musical expression, setting the stage for the live coding demonstration. This segment details the creation of custom functions ("drum" function) to represent recurring musical patterns (adjacent notes forming a "mountain range"), enabling more concise and intuitive music notation. The example demonstrates how this approach mirrors a musician's natural way of thinking about and describing musical phrases. The speaker explains the concept of a "cannon" in music and how it can be elegantly represented using higher-order functions. Different types of cannons (simple, interval, mirror, crab, table) are defined through functional transformations applied to a melody, illustrating the power of functional programming in representing musical structures. This segment showcases the application of the previously described functional approach to render a piece of music ("bark piece"). The piece is deconstructed into its core components (melody and functional transformations), demonstrating how these transformations (interval cannon, mirror cannon, simple cannon) create a complex and layered sound. The resulting audio clearly illustrates the impact of the functional composition. This segment shows the parallel between iterative program development and real-time music composition. The presenter builds a piece of music incrementally, making changes and adding elements in a way that directly mirrors the process of refining and improving a program. This provides a unique and insightful demonstration of the connection between programming and music creation. The presenter demonstrates how the programmatic representation of music allows for multiple representations (audio, visual graph) and easy experimentation. The ability to instantly change tempo and key highlights the flexibility and control offered by this approach. The speaker compares the learning curves of traditional instrument playing and the presented programming approach to music creation. The discussion highlights the unique advantages of the programming approach, such as instant feedback, version control, and the ability to experiment with complex structures that would be difficult or impossible to achieve with a physical instrument. All right, so this is the beep. this is the bell. In fact we can do slightly better because what I've done so far you can even see with a commented out bit of code is give you pure harmonics that are exact multiples of the base frequency But turns out that bells because of the way they built the higher frequencies are actually not following the harmonic series exactly.