scholarly journals Combining Effects in a Music Programming Language based on Patterns

2019 ◽  
Author(s):  
Andre Du Bois ◽  
Rodrigo Ribeiro

HMusic is a domain specific language based on music patterns that can be used to write music and live coding. The main abstractions provided by the language are patterns and tracks. Code written in HMusic looks like patterns and multi-tracks available in music sequencers, drum machines and DAWs. HMusic provides primitives to design and combine patterns generating new patterns. The objective of this paper is to extend the original design of HMusic to allow effects on tracks. We describe new abstractions to add effects on individual tracks and in groups of tracks, and how they influence the combinators for track composition and multiplication. HMusic allows the live coding of music and, as it is embedded in the Haskell functional programming language, programmers can write functions to manipulate effects on the fly. The current implementation of the language is compiled into Sonic Pi [1], and we describe how the compiler’s back-end was modified to support the new abstractions for effects. HMusic can be and can be downloaded from [2].

1999 ◽  
Vol 9 (5) ◽  
pp. 483-525 ◽  
Author(s):  
PETER THIEMANN

We present a general method to transform a compositional specification of a specializer for a functional programming language into a set of combinators that can be used to perform the same specialization more efficiently. The main transformation steps are the transition to higher-order abstract syntax and untagging. All transformation steps are proved correct. The resulting combinators can be implemented in any functional language, typed or untyped, pure or impure. They may also be considered as forming a domain-specific language for meta-programming. We demonstrate the generality of the method by applying it to several specializers of increasing strength. We demonstrate its efficiency by comparing it with a traditional specialization system based on self-application.


2014 ◽  
Vol 24 (03) ◽  
pp. 1441003 ◽  
Author(s):  
Marcel Köster ◽  
Roland Leißa ◽  
Sebastian Hack ◽  
Richard Membarth ◽  
Philipp Slusallek

A straightforward implementation of an algorithm in a general-purpose programming language does usually not deliver peak performance: Compilers often fail to automatically tune the code for certain hardware peculiarities like memory hierarchy or vector execution units. Manually tuning the code is firstly error-prone as well as time-consuming and secondly taints the code by exposing those peculiarities to the implementation. A popular method to avoid these problems is to implement the algorithm in a Domain-Specific Language (DSL). A DSL compiler can then automatically tune the code for the target platform. In this article we show how to embed a DSL for stencil codes in another language. In contrast to prior approaches we only use a single language for this task which offers explicit control over code refinement. This is used to specialize stencils for particular scenarios. Our results show that our specialized programs achieve competitive performance compared to hand-tuned CUDA programs while maintaining a convenient coding experience.


Author(s):  
James Farrow

IntroductionMany currently extant generic tools for performing bulk linkage were developed last century and while they have accreted features to improve their utility they have failed to fully exploit modern computing architectures. Custom highly-parallelised and distributed solutions exist but there is a need for a modern generalised linkage toolkit. Objectives and ApproachThe aim of this project has been to design, from the ground up, a modern flexible, i.e. scriptable, linkage suite which also takes advantage of contemporary computing architectures to address issues such as distribution of computation, parallelisation of computation and cloud-based computation. Rather than being a monolithic linkage tool or a programming suite, a domain specific language has been developed to specifically describe linkage tasks. Linkage tasks written in this language are then 'executed' or 'compiled and run' to perform pair-wise calculations on data elements. Since linkage tasks are generally bespoke, scriptability has been an important consideration. ResultsDeveloping a domain specific linkage language has enabled problem specification to be more descriptive and flexible than a monolithic linkage application. The shift in focus from a programming language to a linkage language has enabled a corresponding shift in focus to linkage-related effort (such as blocking and comparison strategies) away from distracting 'glue' code which relates not to linkage tasks under consideration but rather to the distracting bookkeeping aspects of programme execution. The same linkage task may be compiled against different back ends and languages, e.g. FEBRL (python), swift, Amazon lambda (go). The architecture has enabled otherwise idle computing resource to be utilised as well as cloud-based computing facilities for increased throughput and performance. The architecture of the linkage system will be shown with examples. Conclusion/ImplicationsContemporary advances in computing sciences can and must be leveraged in modern linkage tools. By providing a custom scriptable linkage language, tasks may be more clearly specified in a manner more flexible than monolithic linkage applications and by uncoupling linkage specification from execution, linkage may be performed optimally across multiple machines and resources.


Author(s):  
Jessica Ray ◽  
Ajav Brahmakshatriya ◽  
Richard Wang ◽  
Shoaib Kamil ◽  
Albert Reuther ◽  
...  

Sign in / Sign up

Export Citation Format

Share Document