Generating Music from Flocking Dynamics

  • Cristián HuepeEmail author
  • Marco Colasso
  • Rodrigo F. Cádiz


We explore the connection between complex systems and music by studying different approaches for generating music based on a flocking system. By developing software that links the dynamics of a standard flocking algorithm to a set of sound wave generators and to a musical score, we study how each approach reflects sonically the transition to collective order and which produces musically interesting results. First, we consider three qualitatively different ways to translate the flocking dynamics into music: (1) A direct approach that maps agent positions to sounds, (2) a synchronization approach where each agent has an oscillator that couples to neighboring agents, and (3) a physics-inspired approach that mimics the sound that would result from an effective friction between neighboring agents. We then discuss Ritmos Circadianos, a musical composition for a robot orchestra that is generated entirely from flocking dynamics in real-time, as an actual application of the proposed mapping algorithms. We find that all approaches allow the listener to discriminate between the ordered and disordered states of the flocking system and that the second and third approaches are particularly well suited for generating musically interesting and appealing results.


Swarms Flocking Collective motion Self-organization Generative music Algorithmic music Computer music Robotic art Sonification Complex systems Control theory 



The work of C. H. was supported by the U.S. National Science Foundation under Grant No. PHY-0848755. The work of R. F. C. and M. C. was supported by Fondecyt under Grant No. 11090193 and by the Fondo de Fomento de la Música, Consejo Nacional de la Cultura y las Artes, under grant No. 15872-0, Government of Chile.


  1. 1.
    Mazzola G, Park J, Thalmann F (2011) Musical Creativity: strategies and tools in composition and improvisation. Springer, HeidelbergGoogle Scholar
  2. 2.
    Panish J (1997) The color of jazz: race and representation in postwar American culture. University Press of Mississippi, JacksonGoogle Scholar
  3. 3.
    Barskii V (1996) Chromaticism. Harwood Academic Publishers, AmsterdamGoogle Scholar
  4. 4.
    Olfati-Saber R, Murray R (2004) Consensus problems in networks of agents with switching topology and time-delays. IEEE Trans Autom Control 49(9):1520–1533CrossRefMathSciNetGoogle Scholar
  5. 5.
    Blondel VD, Hendricks JM, Olshevsky A, Tsitsiklis JN (2005) Convergence in multiagent coordination, consensus, and flocking. In: Proceedings of joint 44th IEEE conference on decision control Eurupean Control Conference, Seville, Spain, pp 2996–3000Google Scholar
  6. 6.
    Scardovi L, Leonard N, Sepulchre R (2007) Stabilization of collective motion in three dimensions: a consensus approach. In: Proceedings of the 46th IEEE conference on decision and control, New Orleans, LA, pp 2931–2936Google Scholar
  7. 7.
    Jadbabaie A, Lin J, Morse AS (2003) Coordination of groups of mobile autonomous agents using nearest neighbor rules. IEEE Trans Autom Control 48(6):988–1001CrossRefMathSciNetGoogle Scholar
  8. 8.
    Freeman RA, Yang P, Lynch KM (2006) Distributed estimation and control of swarm formation statistics. In: Proceedings of the American control Conference, Minneapolis, MN, pp 749–755Google Scholar
  9. 9.
    Sepulchre R, Paley D, Leonard N (2008) Stabilization of planar collective motion with limited communication. IEEE Trans Autom Control 53(3):706–719CrossRefMathSciNetGoogle Scholar
  10. 10.
    Gueron S, Levin SA, Rubenstein DI (1996) The dynamics of herds: From individuals to aggregations. J Theoret Biol 182:85–98CrossRefGoogle Scholar
  11. 11.
    Couzin ID, Krause J, James R, Ruxton GD, Franks NR (2002) Collective memory and spatial sorting in animal groups. J Theoret Biol 218(1):1–11CrossRefMathSciNetGoogle Scholar
  12. 12.
    Couzin ID, Krause J, Franks NR, Levin SA (2005) Effective leadership and decision-making in animal groups on the move. Nature 433(7025):513–516CrossRefGoogle Scholar
  13. 13.
    Buhl J, Sumpter DJT, Couzin ID, Hale JJ, Despland E, Miller ER, Simpson SJ (2006) From disorder to order in marching locusts. Science 312(5778):1402–1406CrossRefGoogle Scholar
  14. 14.
    Codognet P, Pasquet O (2009) Swarm intelligence for generative music. In: 11th IEEE international symposium on multimedia, IEEE Computer Society Washington, DC, pp 1–8Google Scholar
  15. 15.
    Brady R, Bargar R, Choi I, Reitzer J (1996) Auditory bread crumbs for navigating volumetric data. In: Proceedings of the late breaking hot topics of IEEE visualization ’96, San Francisco, CA, pp 25–27Google Scholar
  16. 16.
    Kaper HG, Tipei S, Wiebel E (1999) Data sonification and sound visualization. Comput Sci Eng 1(4):48–58CrossRefGoogle Scholar
  17. 17.
    Cullen C, Coyle E (2005) TrioSon: a graphical user interface for pattern sonification. 11th meeting of the international conference on auditory display., ICAD 05Limerick, Ireland, pp 6–9Google Scholar
  18. 18.
    Yeo WS, Berger J, Lee Z (2005) SonART: a framework for data sonification, visualization and networked multimedia applications. In: Proceedings of the 2004 international computer music conference, ICMC 2004, Miami, FLGoogle Scholar
  19. 19.
    Davis T, Rebelo P (2005) Hearing emergence: towards sound-based self-organisation. In: Proceedings of international computer music conference, Barcelona, SpainGoogle Scholar
  20. 20.
    Reynolds C (1987) Flocks, herds, and schools: a distributed behavioural model. SIGGRAPH’ 87 21(4):25–34Google Scholar
  21. 21.
    Spector L, Klein J (2002) Complex adaptive music systems in the Breve simulation environment. In: Proceedings of the 8th international conference on the simulation and synthesis of living systems, Artificial Life VIIIGoogle Scholar
  22. 22.
    Tang E, Shiffman D (2003) Musical flocking box,
  23. 23.
    Blackwell T (2007) Swarming and music. In: Reck Miranda E, Biles JA (eds) Evolutionary computer music. Springer, Berlin, pp 194–217Google Scholar
  24. 24.
    Davis T (2011) Complexity as practice: a reflection on the creative outcomes of a sustained engagement with complexity. Leonardo 45(2):106–112CrossRefGoogle Scholar
  25. 25.
    Unemi T, Bisig D (2005) Music by interaction among two flocking species and human. In: Proceedings of the third international conference on generative systems in electronic arts, Melbourne, Australia, pp 171–79Google Scholar
  26. 26.
    Davis T (2010) Complexity as process: complexity inspired approaches to composition. Organised Sound 15(2):137–146CrossRefGoogle Scholar
  27. 27.
    Vicsek T, Czirók A, Ben-Jacob E, Cohen I, Shochet O (1995) Novel type of phase transition in a system of self-driven particles. Phys Rev Lett 75(6):1226–1229CrossRefGoogle Scholar
  28. 28.
    Huepe C, Aldana M (2004) Intermittency and clustering in a system of self-driven particles. Phys Rev Lett 92(16):168701CrossRefGoogle Scholar
  29. 29.
    Puckette M (1988) The patcher. In: Proceedings of the 14th international computer music conference, Koln, Germany, pp 420–429Google Scholar
  30. 30.
    Zicarelli D (1998) An extensible real-time signal processing environment for max. In: Proceedings of the international computer music conference, Ann Arbor, Michigan, pp 463–466Google Scholar
  31. 31.
    Davis T, Karamanlis O (2007) Gestural control of sonic swarms: composing with grouped sound objects. In: Proceedings of the SMC’07., 4th sound and music computing conference Lefkada, Greece, pp 192–195Google Scholar
  32. 32.
    Blackwell T, Young M (2004) Swarm granulator. In: EvoWorkshops 2004, Coimbra, Portugal, pp 399–408Google Scholar
  33. 33.
    Blackwell TM, Bentley P (2002) Improvised music with swarms. In: Proceedings of congress on evolutionary computation, Piscataway, NJ, pp 1462–1468Google Scholar
  34. 34.
    Kim-Boyle D (2005) Sound spatialization with particle systems. In: Proceedings of the 8th international conference on digital audio effects (DAFX-05), Madrid, Spain, pp 65–68Google Scholar
  35. 35.
    Bisig D, Neukom M, Flury J (2007) Interactive swarm orchestra. In: Proceedings of the generative art conference, Milano, ItalyGoogle Scholar
  36. 36.
    Wilson S (2008) Spatial swarm granulation. In: Proceedings of the international computer music conference, Belfast, Northern IrelandGoogle Scholar
  37. 37.
    Schacher JC, Bisig D, Neukom M (2011) Composing with swarm algorithms—creating interactive audio—visual pieces using flocking behaviour. In: Proceedings of the international computer music conference, University of Huddersfield, UKGoogle Scholar
  38. 38.
    Laura M, Godfried-Willem R, Troy R (2011) The man and machine robot orchestra at logos. Comput Music J 35(4):28–48Google Scholar
  39. 39.
    Strogatz SH (1987) Human sleep and circadian rhythms: a simple model based on two coupled oscillators. J Math Biol 25:327–347CrossRefzbMATHMathSciNetGoogle Scholar
  40. 40.
    Ramírez JCF (2013) Chileno lanza sorprendente concierto para orquesta de robots, La Segunda, Santiago, Chile. 15 Jan 2013 Accessed 25 Sep 2013
  41. 41.
    Kauffman S (1993) The origins of order: self-organization and selection in evolution. Oxford University Press, OxfordGoogle Scholar
  42. 42.
    Bak P (1999) How nature works: the science of self-organized criticality. Copernicus, New YorkGoogle Scholar
  43. 43.
    Balleza E, Alvarez-Buylla ER, Chaos A, Kauffman S, Shmulevich I, Aldana M (2008) Critical dynamics in genetic regulatory networks: examples from four kingdoms. PLoS ONE 3(6):e2456CrossRefGoogle Scholar
  44. 44.
    Mora T, Bialek W (2011) Are biological systems poised at criticality? J Stat Phys 144(2):268–302CrossRefzbMATHMathSciNetGoogle Scholar
  45. 45.
    Ribeiro TL, Copelli M, Caixeta F, Belchior H, Chialvo DR, Nicolelis MAL, Ribeiro S (2010) Spike avalanches exhibit universal dynamics across the sleep–wake cycle. PLoS ONE 5(11):e14129CrossRefGoogle Scholar
  46. 46.
    Plenz D (2013) The critical brain. Physics 6:47CrossRefGoogle Scholar
  47. 47.
    Lewin R (2000) Complexity: life at the edge of chaos. The University of Chicago Press, ChicagoGoogle Scholar
  48. 48.
    Strogatz S (2000) From Kuramoto to Crawford: exploring the onset of synchronization in populations of coupled oscillators. Physica D 143(1–4):1–20CrossRefzbMATHMathSciNetGoogle Scholar
  49. 49.
    Peltola L (2004) Analysis, parametric synthesis, and control of hand clapping sounds. Master of Science Thesis, Helsinki University of TechnologyGoogle Scholar
  50. 50.
    Mizumoto T, Otsuka T, Nakadai K, Takahashi T, Komatani K, Ogata T, Okuno HG (2010) Human-robot ensemble between robot thereminist and human percussionist using coupled oscillator model. In: Proceedings of the 2010 IEEE/RSJ international conference on intelligent robots and systems, Taipei, Taiwan, pp 1957–1963Google Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Cristián Huepe
    • 1
    • 2
    Email author
  • Marco Colasso
    • 3
    • 4
  • Rodrigo F. Cádiz
    • 4
  1. 1.CHuepe LabsChicagoUSA
  2. 2.Northwestern Institute on Complex SystemsNorthwestern UniversityEvanstonUSA
  3. 3.Center for Research in Audio TechnologiesMusic InstituteSantiagoChile
  4. 4.Computer Science DepartmentSchool of Engineering Pontificia Universidad Católica de ChileSantiagoChile

Personalised recommendations