Exposition Development Recapitulation The Shepard Tone and Higher-Order Multi-rate Synchronous Data-Flow Programming in S IG ◮ Baltasar Trancón y Widemann Markus Lepper Ilmenau University of Technology semantics GmbH FARM 2015-09-05 Trancón y Widemann, Lepper Shepard @ S IG 0 / 15
Exposition Development Recapitulation S IG Shepard Agenda Exposition 1 Main Theme: S IG in a Nutshell Countertheme: The Shepard Tone Development 2 Higher-Order Stream Programming Multi-rate Stream Programming Recapitulation 3 Putting Things Together Conclusion Trancón y Widemann, Lepper Shepard @ S IG 0 / 15
Exposition Development Recapitulation S IG Shepard Spoiler Synchronous Functional Data-Flow Language Similar but not quite FRP New features under development Classical sound construction Small but nontrivial synthesis problem Ideal application of new features Trancón y Widemann, Lepper Shepard @ S IG 1 / 15
Exposition Development Recapitulation S IG Shepard Spoiler Synchronous Functional Data-Flow Language Similar but not quite FRP New features under development Classical sound construction Small but nontrivial synthesis problem Ideal application of new features Trancón y Widemann, Lepper Shepard @ S IG 1 / 15
Exposition Development Recapitulation S IG Shepard Agenda Exposition 1 Main Theme: S IG in a Nutshell Countertheme: The Shepard Tone Development 2 Higher-Order Stream Programming Multi-rate Stream Programming Recapitulation 3 Putting Things Together Conclusion Trancón y Widemann, Lepper Shepard @ S IG 1 / 15
Exposition Development Recapitulation S IG Shepard Context: The S IG Language Total Functional no effects, events, recursion Clocked Synchronous variables are mutated regularly Data Flow control flow by data dependency Real-time execution model pull-based, ultra-low latency Applications: embedded control, simulation, audio , . . . Backends: JVM (C, DSP , FPGA, . . . ) Layered design Core language with simple compositional semantics Functional frontend: ADTs, pattern matching, higher order Advanced features: physical units, multi-rate Semantics of higher layers by transformation Trancón y Widemann, Lepper Shepard @ S IG 2 / 15
Exposition Development Recapitulation S IG Shepard Context: The S IG Language Total Functional no effects, events, recursion Clocked Synchronous variables are mutated regularly Data Flow control flow by data dependency Real-time execution model pull-based, ultra-low latency Applications: embedded control, simulation, audio , . . . Backends: JVM (C, DSP , FPGA, . . . ) Layered design Core language with simple compositional semantics Functional frontend: ADTs, pattern matching, higher order Advanced features: physical units, multi-rate Semantics of higher layers by transformation Trancón y Widemann, Lepper Shepard @ S IG 2 / 15
Exposition Development Recapitulation S IG Shepard Context: The S IG Language Total Functional no effects, events, recursion Clocked Synchronous variables are mutated regularly Data Flow control flow by data dependency Real-time execution model pull-based, ultra-low latency Applications: embedded control, simulation, audio , . . . Backends: JVM (C, DSP , FPGA, . . . ) Layered design Core language with simple compositional semantics Functional frontend: ADTs, pattern matching, higher order Advanced features: physical units, multi-rate Semantics of higher layers by transformation Trancón y Widemann, Lepper Shepard @ S IG 2 / 15
Exposition Development Recapitulation S IG Shepard Context: The S IG Language Total Functional no effects, events, recursion Clocked Synchronous variables are mutated regularly Data Flow control flow by data dependency Real-time execution model pull-based, ultra-low latency Applications: embedded control, simulation, audio , . . . Backends: JVM (C, DSP , FPGA, . . . ) Layered design Core language with simple compositional semantics Functional frontend: ADTs, pattern matching, higher order Advanced features: physical units, multi-rate Semantics of higher layers by transformation Trancón y Widemann, Lepper Shepard @ S IG 2 / 15
Exposition Development Recapitulation S IG Shepard Basic Example: Cumulative Sum � � � � x → s x → s s := 0 � ( s + x ) s := ( 0 � s ) + x Trancón y Widemann, Lepper Shepard @ S IG 3 / 15
Exposition Development Recapitulation S IG Shepard Basic Example: Cumulative Sum � � � � x → s x → s s := 0 � ( s + x ) s := ( 0 � s ) + x δ + s + s δ x x Trancón y Widemann, Lepper Shepard @ S IG 3 / 15
Exposition Development Recapitulation S IG Shepard Basic Example: Cumulative Sum � � � � x → s x → s s := 0 � ( s + x ) s := ( 0 � s ) + x + s + s x x Trancón y Widemann, Lepper Shepard @ S IG 3 / 15
Exposition Development Recapitulation S IG Shepard Basic Example: Cumulative Sum � � � � x → s x → s s := 0 � ( s + x ) s := ( 0 � s ) + x 0 0 + s 0 + s 0 x 0 x 0 + s 1 x 1 + s 1 x 1 . . . . . . Trancón y Widemann, Lepper Shepard @ S IG 3 / 15
Exposition Development Recapitulation S IG Shepard Basic Example: Cumulative Sum � � � � x → s x → s s := 0 � ( s + x ) s := ( 0 � s ) + x 0 0 s 0 = 0 s 0 = x n + s 0 + s 0 x 0 x 0 s n + 1 = s n + x n s n + 1 = s n + x n + 1 � � s n = x i s n = x i + s 1 i<n i � n x 1 + s 1 x 1 . . . . . . Trancón y Widemann, Lepper Shepard @ S IG 3 / 15
Exposition Development Recapitulation S IG Shepard Agenda Exposition 1 Main Theme: S IG in a Nutshell Countertheme: The Shepard Tone Development 2 Higher-Order Stream Programming Multi-rate Stream Programming Recapitulation 3 Putting Things Together Conclusion Trancón y Widemann, Lepper Shepard @ S IG 3 / 15
Exposition Development Recapitulation S IG Shepard What is it? Psychoacoustic illusion (Shepard 1964; Risset 1986) Contradictory short/long-term pitch perception Auditory strange loop, analog of this. . . or that. . . Small but nontrivial sound synthesis problem Full S IG code in the paper! Trancón y Widemann, Lepper Shepard @ S IG 4 / 15
Exposition Development Recapitulation S IG Shepard What is it? Psychoacoustic illusion (Shepard 1964; Risset 1986) Contradictory short/long-term pitch perception Auditory strange loop, analog of this. . . or that. . . Small but nontrivial sound synthesis problem Full S IG code in the paper! Trancón y Widemann, Lepper Shepard @ S IG 4 / 15
Exposition Development Recapitulation S IG Shepard What is it? Psychoacoustic illusion (Shepard 1964; Risset 1986) Contradictory short/long-term pitch perception Auditory strange loop, analog of this. . . or that. . . Small but nontrivial sound synthesis problem Full S IG code in the paper! Trancón y Widemann, Lepper Shepard @ S IG 4 / 15
Exposition Development Recapitulation S IG Shepard What is it? Psychoacoustic illusion (Shepard 1964; Risset 1986) Contradictory short/long-term pitch perception Auditory strange loop, analog of this. . . or that. . . Small but nontrivial sound synthesis problem Full S IG code in the paper! Trancón y Widemann, Lepper Shepard @ S IG 4 / 15
Exposition Development Recapitulation S IG Shepard Specification Pitch ( 2r + 1 voices) t 1 � �� � p max � ivl p base p min Time r · ivl Amplitude � �� � 1 � �� � ivl p min p base p max Pitch Trancón y Widemann, Lepper Shepard @ S IG 5 / 15
Exposition Development Recapitulation S IG Shepard Specification Pitch ( 2r + 1 voices) t 1 � �� � p max � ivl p base p min Time r · ivl Amplitude � �� � 1 � �� � ivl p min p base p max Pitch Trancón y Widemann, Lepper Shepard @ S IG 5 / 15
Exposition Development Recapitulation S IG Shepard Specification Pitch ( 2r + 1 voices) t 1 � �� � p max � ivl p base p min Time r · ivl Amplitude � �� � 1 � �� � ivl p min p base p max Pitch Trancón y Widemann, Lepper Shepard @ S IG 5 / 15
Exposition Development Recapitulation Higher-Order Multi-rate Agenda Exposition 1 Main Theme: S IG in a Nutshell Countertheme: The Shepard Tone Development 2 Higher-Order Stream Programming Multi-rate Stream Programming Recapitulation 3 Putting Things Together Conclusion Trancón y Widemann, Lepper Shepard @ S IG 5 / 15
Exposition Development Recapitulation Higher-Order Multi-rate Agenda Exposition 1 Main Theme: S IG in a Nutshell Countertheme: The Shepard Tone Development 2 Higher-Order Stream Programming Multi-rate Stream Programming Recapitulation 3 Putting Things Together Conclusion Trancón y Widemann, Lepper Shepard @ S IG 5 / 15
Exposition Development Recapitulation Higher-Order Multi-rate Lambdas Got (Too Much) Rhythm Higher-order functions increase expressivity Combination with time-varying values nontrivial (Uustalu and Vene 2005) At odds with S IG paradigms Every variable is a stream Streams are synchronized Counterexample: Currying Trancón y Widemann, Lepper Shepard @ S IG 6 / 15
Exposition Development Recapitulation Higher-Order Multi-rate Lambdas Got (Too Much) Rhythm Higher-order functions increase expressivity Combination with time-varying values nontrivial (Uustalu and Vene 2005) At odds with S IG paradigms Every variable is a stream Streams are synchronized Counterexample: Currying Trancón y Widemann, Lepper Shepard @ S IG 6 / 15
Recommend
More recommend