{"title":"NNdef: livecoding digital musical instruments in SuperCollider using functional reactive programming","authors":"M. Negrão","doi":"10.1145/3242903.3242905","DOIUrl":null,"url":null,"abstract":"The SuperCollider audio synthesis environment allows the definition of Synths, digital instruments which generate sound using a graph of interconnected unit generators. In SuperCollider the definition of a Synth is mostly declarative, on the other hand the logic for controlling parameters of a Synth using musical controllers is usually implemented in a different context using callbacks and explicit state. This paper presents a different approach where functional reactive programming (FRP) is used to define the control logic of the instrument, taking inputs from musical controllers, mobile apps or graphical user interface (GUI) widgets and sending outputs to the audio graph. Both audio and FRP graphs are defined in the same context and compiled simultaneously avoiding a hard division between audio and control logic. An FRP implementation is used in the NNdef class to enable livecoding of both audio and FRP code, with hot-swap allowing an interactive workflow. Also included is a system to persist the state in the FRP network in order to save and recall the instrument at a later time.","PeriodicalId":199077,"journal":{"name":"Proceedings of the 6th ACM SIGPLAN International Workshop on Functional Art, Music, Modeling, and Design","volume":"41 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2018-09-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 6th ACM SIGPLAN International Workshop on Functional Art, Music, Modeling, and Design","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3242903.3242905","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5
Abstract
The SuperCollider audio synthesis environment allows the definition of Synths, digital instruments which generate sound using a graph of interconnected unit generators. In SuperCollider the definition of a Synth is mostly declarative, on the other hand the logic for controlling parameters of a Synth using musical controllers is usually implemented in a different context using callbacks and explicit state. This paper presents a different approach where functional reactive programming (FRP) is used to define the control logic of the instrument, taking inputs from musical controllers, mobile apps or graphical user interface (GUI) widgets and sending outputs to the audio graph. Both audio and FRP graphs are defined in the same context and compiled simultaneously avoiding a hard division between audio and control logic. An FRP implementation is used in the NNdef class to enable livecoding of both audio and FRP code, with hot-swap allowing an interactive workflow. Also included is a system to persist the state in the FRP network in order to save and recall the instrument at a later time.