W HY Y ET A NOTHER P ROGRAMMING L ANGUAGE ? OR what if it would be - - PowerPoint PPT Presentation

w hy y et a nother p rogramming l anguage
SMART_READER_LITE
LIVE PREVIEW

W HY Y ET A NOTHER P ROGRAMMING L ANGUAGE ? OR what if it would be - - PowerPoint PPT Presentation

I NTRODUCTION M OTIVATION K RONOS AN O VERVIEW C ASE S TUDIES S UMMARY E NDING I NTRODUCING K RONOS : A N OVEL A PPROACH TO S IGNAL P ROCESSING L ANGUAGES Vesa Norilo Centre for Music & Technology SibeliusAcademy Linux Audio


slide-1
SLIDE 1

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

INTRODUCING KRONOS: A NOVEL APPROACH

TO SIGNAL PROCESSING LANGUAGES

Vesa Norilo

Centre for Music & Technology Sibelius–Academy

Linux Audio Conference, 2011

slide-2
SLIDE 2

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

OUTLINE

INTRODUCTION MOTIVATION

The Current State of DSP Programming Why Yet Another Programing Language?

KRONOS – AN OVERVIEW

A Language Specification A Just-in-Time Compiler Type Determinism

CASE STUDIES

Examples

slide-3
SLIDE 3

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

INTRODUCTION

  • Research background: PWGL
slide-4
SLIDE 4

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

INTRODUCTION

  • Research background: PWGL
  • Musical programming environment by Laurson,

Kuuskankare, Norilo, Sprotte

  • High level visual interface to LISP programming
  • Synthesizer component in C++ written by the author:

PWGLSynth

slide-5
SLIDE 5

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

INTRODUCTION

  • Research background: PWGL
  • Musical programming environment by Laurson,

Kuuskankare, Norilo, Sprotte

  • High level visual interface to LISP programming
  • Synthesizer component in C++ written by the author:

PWGLSynth

  • Kronos began as a bunch of aspirations for PWGLSynth 2
slide-6
SLIDE 6

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

INTRODUCTION

  • Research background: PWGL
  • Musical programming environment by Laurson,

Kuuskankare, Norilo, Sprotte

  • High level visual interface to LISP programming
  • Synthesizer component in C++ written by the author:

PWGLSynth

  • Kronos began as a bunch of aspirations for PWGLSynth 2
  • Generic computation engine
  • High level abstraction
  • Great performance
slide-7
SLIDE 7

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

INTRODUCTION

  • Research background: PWGL
  • Musical programming environment by Laurson,

Kuuskankare, Norilo, Sprotte

  • High level visual interface to LISP programming
  • Synthesizer component in C++ written by the author:

PWGLSynth

  • Kronos began as a bunch of aspirations for PWGLSynth 2
  • Generic computation engine
  • High level abstraction
  • Great performance
  • Since then, Kronos has morphed into a standalone

compiler/language

slide-8
SLIDE 8

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

INTRODUCTION

  • Research background: PWGL
  • Musical programming environment by Laurson,

Kuuskankare, Norilo, Sprotte

  • High level visual interface to LISP programming
  • Synthesizer component in C++ written by the author:

PWGLSynth

  • Kronos began as a bunch of aspirations for PWGLSynth 2
  • Generic computation engine
  • High level abstraction
  • Great performance
  • Since then, Kronos has morphed into a standalone

compiler/language

  • Doctoral study project since 2010
slide-9
SLIDE 9

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

MOTIVATION

slide-10
SLIDE 10

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

THE CURRENT STATE OF DSP PROGRAMMING

slide-11
SLIDE 11

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

THE CURRENT STATE OF DSP PROGRAMMING

  • The industry standard for DSP is C
slide-12
SLIDE 12

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

THE CURRENT STATE OF DSP PROGRAMMING

  • The industry standard for DSP is C
  • Plugins and DSP chips tend to have C toolchains
slide-13
SLIDE 13

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

THE CURRENT STATE OF DSP PROGRAMMING

  • The industry standard for DSP is C
  • Plugins and DSP chips tend to have C toolchains
  • AU, VST, LADSPA
  • Motorola 56k
  • etc..
slide-14
SLIDE 14

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

THE CURRENT STATE OF DSP PROGRAMMING

  • The industry standard for DSP is C
  • Plugins and DSP chips tend to have C toolchains
  • AU, VST, LADSPA
  • Motorola 56k
  • etc..
  • C is relatively hostile to casual programmers
slide-15
SLIDE 15

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

THE CURRENT STATE OF DSP PROGRAMMING

  • The industry standard for DSP is C
  • Plugins and DSP chips tend to have C toolchains
  • AU, VST, LADSPA
  • Motorola 56k
  • etc..
  • C is relatively hostile to casual programmers
  • Casual programmers make a lot of musical applications!
  • Getting audio out of C is very difficult for learners
slide-16
SLIDE 16

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

THE CURRENT STATE OF DSP PROGRAMMING

  • The industry standard for DSP is C
  • Plugins and DSP chips tend to have C toolchains
  • AU, VST, LADSPA
  • Motorola 56k
  • etc..
  • C is relatively hostile to casual programmers
  • Casual programmers make a lot of musical applications!
  • Getting audio out of C is very difficult for learners
  • High performance programs are low level
slide-17
SLIDE 17

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

THE CURRENT STATE OF DSP PROGRAMMING

  • The industry standard for DSP is C
  • Plugins and DSP chips tend to have C toolchains
  • AU, VST, LADSPA
  • Motorola 56k
  • etc..
  • C is relatively hostile to casual programmers
  • Casual programmers make a lot of musical applications!
  • Getting audio out of C is very difficult for learners
  • High performance programs are low level
  • Many powerful abstractions have performance penalties
  • Tedious to write for professionals
slide-18
SLIDE 18

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

WHY YET ANOTHER PROGRAMMING LANGUAGE?

OR what if it would be possible to...

slide-19
SLIDE 19

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

WHY YET ANOTHER PROGRAMMING LANGUAGE?

OR what if it would be possible to...

  • easily learn an audio language
slide-20
SLIDE 20

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

WHY YET ANOTHER PROGRAMMING LANGUAGE?

OR what if it would be possible to...

  • easily learn an audio language
  • write abstract, reusable code that runs fast
slide-21
SLIDE 21

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

WHY YET ANOTHER PROGRAMMING LANGUAGE?

OR what if it would be possible to...

  • easily learn an audio language
  • write abstract, reusable code that runs fast
  • design all your algorithms down to the arithmetic primitive
slide-22
SLIDE 22

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

WHY YET ANOTHER PROGRAMMING LANGUAGE?

OR what if it would be possible to...

  • easily learn an audio language
  • write abstract, reusable code that runs fast
  • design all your algorithms down to the arithmetic primitive
  • have a single filter for any combination of single or double

precision, real or complex, mono or multichannel...

slide-23
SLIDE 23

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

WHY YET ANOTHER PROGRAMMING LANGUAGE?

OR what if it would be possible to...

  • easily learn an audio language
  • write abstract, reusable code that runs fast
  • design all your algorithms down to the arithmetic primitive
  • have a single filter for any combination of single or double

precision, real or complex, mono or multichannel... Many of us here are working on a subset of these problems. The final solution is not yet here.

slide-24
SLIDE 24

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

KRONOS

an Overview

slide-25
SLIDE 25

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A LANGUAGE SPECIFICATION

SYNTAX

slide-26
SLIDE 26

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A LANGUAGE SPECIFICATION

SYNTAX

  • Simple syntax
slide-27
SLIDE 27

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A LANGUAGE SPECIFICATION

SYNTAX

  • Simple syntax
  • Familiar function notation

SomeFunction(param1 param2)

slide-28
SLIDE 28

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A LANGUAGE SPECIFICATION

SYNTAX

  • Simple syntax
  • Familiar function notation

SomeFunction(param1 param2)

  • Infix functions for arithmetics

a + b * 3 / Sqrt(c)

slide-29
SLIDE 29

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A LANGUAGE SPECIFICATION

SYNTAX

  • Simple syntax
  • Familiar function notation

SomeFunction(param1 param2)

  • Infix functions for arithmetics

a + b * 3 / Sqrt(c)

  • Algebraic data structure yields pairs, lists and trees

list = (a b c d)

slide-30
SLIDE 30

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A LANGUAGE SPECIFICATION

SYNTAX

  • Simple syntax
  • Familiar function notation

SomeFunction(param1 param2)

  • Infix functions for arithmetics

a + b * 3 / Sqrt(c)

  • Algebraic data structure yields pairs, lists and trees

list = (a b c d)

  • Tie-in allows for partial decomposition too

(first-element other-elements) = list

slide-31
SLIDE 31

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A LANGUAGE SPECIFICATION

CLASSIFICATION

slide-32
SLIDE 32

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A LANGUAGE SPECIFICATION

CLASSIFICATION

  • Functional Programming
slide-33
SLIDE 33

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A LANGUAGE SPECIFICATION

CLASSIFICATION

  • Functional Programming
  • No state
slide-34
SLIDE 34

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A LANGUAGE SPECIFICATION

CLASSIFICATION

  • Functional Programming
  • No state
  • No variables
slide-35
SLIDE 35

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A LANGUAGE SPECIFICATION

CLASSIFICATION

  • Functional Programming
  • No state
  • No variables
  • Similar to audio signal routing
slide-36
SLIDE 36

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A LANGUAGE SPECIFICATION

CLASSIFICATION

  • Functional Programming
  • No state
  • No variables
  • Similar to audio signal routing
  • Powerful abstraction
slide-37
SLIDE 37

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A LANGUAGE SPECIFICATION

CLASSIFICATION

  • Functional Programming
  • No state
  • No variables
  • Similar to audio signal routing
  • Powerful abstraction
  • Reactive Paradigm
slide-38
SLIDE 38

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A LANGUAGE SPECIFICATION

CLASSIFICATION

  • Functional Programming
  • No state
  • No variables
  • Similar to audio signal routing
  • Powerful abstraction
  • Reactive Paradigm
  • Action is followed by reaction
slide-39
SLIDE 39

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A LANGUAGE SPECIFICATION

CLASSIFICATION

  • Functional Programming
  • No state
  • No variables
  • Similar to audio signal routing
  • Powerful abstraction
  • Reactive Paradigm
  • Action is followed by reaction
  • Reactive graphs are used to optimize signal rates
slide-40
SLIDE 40

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A LANGUAGE SPECIFICATION

CLASSIFICATION

  • Functional Programming
  • No state
  • No variables
  • Similar to audio signal routing
  • Powerful abstraction
  • Reactive Paradigm
  • Action is followed by reaction
  • Reactive graphs are used to optimize signal rates
  • Implicit inferral of control and audio signals
slide-41
SLIDE 41

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A LANGUAGE SPECIFICATION

AN EXAMPLE

Listing 1: Fold, a higher order function for reducing lists with example replies.

Fold(folding-function x) { Fold = x } Fold(folding-function x xs) { Fold = Eval(folding-function x Fold(folding-function xs)) } /* Add several numbers */ Fold(Add 1 2 3 4) => 10 /* Multiply several numbers */ Fold(Mul 5 6 10) => 300

slide-42
SLIDE 42

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A JUST-IN-TIME COMPILER

slide-43
SLIDE 43

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A JUST-IN-TIME COMPILER

  • Kronos compiles programs on the fly to native x86
  • Some enhancements to SoftWire, a LGPL dynamic

assembler written by Nicolas Capens

slide-44
SLIDE 44

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A JUST-IN-TIME COMPILER

  • Kronos compiles programs on the fly to native x86
  • Some enhancements to SoftWire, a LGPL dynamic

assembler written by Nicolas Capens

  • Programs are configured on the fly for the present I/O

configuration

slide-45
SLIDE 45

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A JUST-IN-TIME COMPILER

  • Kronos compiles programs on the fly to native x86
  • Some enhancements to SoftWire, a LGPL dynamic

assembler written by Nicolas Capens

  • Programs are configured on the fly for the present I/O

configuration

  • Good runtime performance using SSE4.2
slide-46
SLIDE 46

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

A JUST-IN-TIME COMPILER

  • Kronos compiles programs on the fly to native x86
  • Some enhancements to SoftWire, a LGPL dynamic

assembler written by Nicolas Capens

  • Programs are configured on the fly for the present I/O

configuration

  • Good runtime performance using SSE4.2
  • Comparable and often superior to an optimizing C-compiler
slide-47
SLIDE 47

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

TYPE DETERMINISM

...OR THE CATCH

  • ...too good to be true?
slide-48
SLIDE 48

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

TYPE DETERMINISM

...OR THE CATCH

  • ...too good to be true?
  • To achieve performance, a rigorous constraint;
slide-49
SLIDE 49

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

TYPE DETERMINISM

...OR THE CATCH

  • ...too good to be true?
  • To achieve performance, a rigorous constraint;
  • TYPE DETERMINISM
slide-50
SLIDE 50

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

TYPE DETERMINISM

...OR THE CATCH

  • ...too good to be true?
  • To achieve performance, a rigorous constraint;
  • TYPE DETERMINISM
  • The result type of an expression can only depend on

argument type

slide-51
SLIDE 51

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

TYPE DETERMINISM

...OR THE CATCH

  • ...too good to be true?
  • To achieve performance, a rigorous constraint;
  • TYPE DETERMINISM
  • The result type of an expression can only depend on

argument type

  • Complete dataflow analysis of the entire program
slide-52
SLIDE 52

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

TYPE DETERMINISM

...OR THE CATCH

  • ...too good to be true?
  • To achieve performance, a rigorous constraint;
  • TYPE DETERMINISM
  • The result type of an expression can only depend on

argument type

  • Complete dataflow analysis of the entire program
  • Result type can’t depend on data!
slide-53
SLIDE 53

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

TYPE DETERMINISM

...OR THE CATCH

  • ...too good to be true?
  • To achieve performance, a rigorous constraint;
  • TYPE DETERMINISM
  • The result type of an expression can only depend on

argument type

  • Complete dataflow analysis of the entire program
  • Result type can’t depend on data!
  • No dynamic containers!
slide-54
SLIDE 54

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

TYPE DETERMINISM

...OR THE CATCH

  • ...too good to be true?
  • To achieve performance, a rigorous constraint;
  • TYPE DETERMINISM
  • The result type of an expression can only depend on

argument type

  • Complete dataflow analysis of the entire program
  • Result type can’t depend on data!
  • No dynamic containers!
  • Minimal branching!
slide-55
SLIDE 55

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

TYPE DETERMINISM

...OR THE CATCH

  • ...too good to be true?
  • To achieve performance, a rigorous constraint;
  • TYPE DETERMINISM
  • The result type of an expression can only depend on

argument type

  • Complete dataflow analysis of the entire program
  • Result type can’t depend on data!
  • No dynamic containers!
  • Minimal branching!
  • No good for writing a word processor
slide-56
SLIDE 56

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

TYPE DETERMINISM

...OR THE CATCH

  • ...too good to be true?
  • To achieve performance, a rigorous constraint;
  • TYPE DETERMINISM
  • The result type of an expression can only depend on

argument type

  • Complete dataflow analysis of the entire program
  • Result type can’t depend on data!
  • No dynamic containers!
  • Minimal branching!
  • No good for writing a word processor
  • Designed for DSP inner loops
slide-57
SLIDE 57

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

CASE STUDIES

slide-58
SLIDE 58

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

SIGNAL GENERATION

  • Delay is a first-class unary operator
  • Recursion permitted via delays
  • Recursion can be turned into an osc by clocking a section
  • f the loop
  • IO:Audio-Gen(sig) provides signal updates at the audio rate

Listing 2: A Simple Phasor Oscillator

Phasor(freq) { next-phase = IO:Audio-Gen(z-1(’0 phase + freq)) phase = next-phase - Truncate(next-phase) Phasor = phase + phase - 1 }

slide-59
SLIDE 59

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

FAST −cos(πx) FOR x ∈ [−1, 1]

  • Source is the math definition of series approximation!

Listing 3: Taylor-series Cosine

Sine-Coef(n) { Sine-Coef = Crt:pow(Pi n * #2 - #1) * Crt:pow(#-1 n + #1) / Factorial(n * #2 - #1) } Fast-Cos(x order) { Use Algorithm xm = Abs(x) xp = xm - 0.5 coefs = Map(Sine-Coef Count-To(order)) Fast-Cos = xp * Horner-Polynomial(xp * xp Reverse(coefs)) }

slide-60
SLIDE 60

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

SINUSOID OSCILLATOR

  • Combining the −cos(πx) mapper and the phasor, a sine
  • scillator is created
  • With higher order functions, oscillator banks can be

constructed from a list of frequencies! Listing 4: Sinusoid oscillation by mapping the phasor

FSin(freq) { FSin = Fast-Cos(Phasor(freq) #8) } /* Example of using higher order functions */ Osc-Bank = Reduce(Add Map(FSin freq1 freq2 freq3 freq4))

slide-61
SLIDE 61

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

SIN-OSC APPLICATIONS

  • Additive and FM Synthesis are easily constructed

Listing 5: Sinusoid Synthesis

Suppress-Alias(f0 amp) {Suppress-Alias = (f0 < 0.4) & amp} Additive(f0 num-harmonics harmonic-coef harmonic-spread) { Use Algorithm freqs = Map(Curry(Mul f0) Expand(num-harmonics Curry(Add harmonic-spread) 1)) amps = Expand(num-harmonics Curry(Mul harmonic-coef) 1)

  • scs = Zip-With(Mul(Map(FSin freqs) Zip-With(Suppress-Alias freqs amps)))

Additive = Reduce(Add oscs) } FM(f0 ratio mod feedback) { modulator = FSin(f0 * ratio) * mod carrier = FSin((1 + modulator + feedback * z-1(’0 carrier)) * f0) FM = carrier }

slide-62
SLIDE 62

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

INTERFACING WITH CONTROL

  • Other clocks besides audio generators can be used
  • Resonator coefficient computations are clocked from OSC
  • Only recomputes coefs when OSC signal arrives!

Listing 6: OSC-controlled Resonator Bank

Reson(x0 freq reson) { x1 = z-1(’0 x0) x2 = z-1(’0 x1) y1 = z-1(’0 y0) y2 = z-1(’0 y1) r = Crt:pow(reson 0.125) y0 = x0 - x2 + y1 * 2 * r * Crt:cos(freq) - y2 * r * r Reson = y0 * 0.5 * (1 - r * r) } Reson-Bank() { Use Algorithm params = ((IO:OSC-Input("cutoff1" Float) IO:OSC-Input("reson1" Float)) (IO:OSC-Input("cutoff2" Float) IO:OSC-Input("reson2" Float)) (IO:OSC-Input("cutoff3" Float) IO:OSC-Input("reson3" Float))) Reson-Bank = Reduce(Add Map(Curry(Reson Noise()) params)) }

slide-63
SLIDE 63

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

SCHROEDER REVERBERATION

  • Classic Schroeder reverberation can be concisely

expressed Listing 7: Classical Schroeder Reverb

Feedback-for-RT60(rt60 delay) { Feedback-for-RT60 = Crt:pow(#0.001 delay / rt60) } Basic(sig rt60) { Use Algorithm allpass-params = ((0.7 #221) (0.7 #75)) delay-times = (#1310 #1636 #1813 #1927) feedbacks = Map(Curry(Feedback-for-RT60 rt60) delay-times) comb-section = Reduce(Add Zip-With(Curry(Delay sig) feedbacks delay-times)) Basic = Cascade(Allpass-Comb comb-section allpass-params) }

slide-64
SLIDE 64

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

FDN REVERBERATION

  • Some highlights from a FDN reverberator

Listing 8: Snippets of a 16th order FDN reverberator

/* Orthogonal matrix multiply - Householder Algorithm */ Feedback-Mtx(input) { Use Algorithm Feedback-Mtx = input (even odd) = Split(input) even-mtx = Recur(even) odd-mtx = Recur(odd) Feedback-Mtx = Append(Zip-With(Add even-mtx odd-mtx) Zip-With(Sub even-mtx

  • dd-mtx))

} /* 16-channel feedback signal recursively passed through a unit delay operator */ feedback-vector = z-1(’(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) Zip-With(Mul loss-coefs Zip-With(Filter:OnePole Feedback-Mtx(delay-vector) filter-coefs)))

slide-65
SLIDE 65

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

SUMMARY

slide-66
SLIDE 66

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

SUMMARY

  • Kronos combines high level audio programs with high

performance – for both beginners and professionals

slide-67
SLIDE 67

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

SUMMARY

  • Kronos combines high level audio programs with high

performance – for both beginners and professionals

  • The tradeoff of Type Determinism enables this unusual

combination

slide-68
SLIDE 68

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

SUMMARY

  • Kronos combines high level audio programs with high

performance – for both beginners and professionals

  • The tradeoff of Type Determinism enables this unusual

combination

  • Kronos will be released as a C-callable library. Licensing
  • ptions including dual-licensing with GPL are being

investigated.

slide-69
SLIDE 69

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

SUMMARY

  • Kronos combines high level audio programs with high

performance – for both beginners and professionals

  • The tradeoff of Type Determinism enables this unusual

combination

  • Kronos will be released as a C-callable library. Licensing
  • ptions including dual-licensing with GPL are being

investigated.

  • Outlook
slide-70
SLIDE 70

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

SUMMARY

  • Kronos combines high level audio programs with high

performance – for both beginners and professionals

  • The tradeoff of Type Determinism enables this unusual

combination

  • Kronos will be released as a C-callable library. Licensing
  • ptions including dual-licensing with GPL are being

investigated.

  • Outlook
  • Development is in early stages. Debugging the compiler

and designing the run time libraries are ongoing

slide-71
SLIDE 71

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

SUMMARY

  • Kronos combines high level audio programs with high

performance – for both beginners and professionals

  • The tradeoff of Type Determinism enables this unusual

combination

  • Kronos will be released as a C-callable library. Licensing
  • ptions including dual-licensing with GPL are being

investigated.

  • Outlook
  • Development is in early stages. Debugging the compiler

and designing the run time libraries are ongoing

  • A graphical user interface to the language should be

created

slide-72
SLIDE 72

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

SUMMARY

  • Kronos combines high level audio programs with high

performance – for both beginners and professionals

  • The tradeoff of Type Determinism enables this unusual

combination

  • Kronos will be released as a C-callable library. Licensing
  • ptions including dual-licensing with GPL are being

investigated.

  • Outlook
  • Development is in early stages. Debugging the compiler

and designing the run time libraries are ongoing

  • A graphical user interface to the language should be

created

  • The signal rate optimization should be further improved
slide-73
SLIDE 73

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

SUMMARY

  • Kronos combines high level audio programs with high

performance – for both beginners and professionals

  • The tradeoff of Type Determinism enables this unusual

combination

  • Kronos will be released as a C-callable library. Licensing
  • ptions including dual-licensing with GPL are being

investigated.

  • Outlook
  • Development is in early stages. Debugging the compiler

and designing the run time libraries are ongoing

  • A graphical user interface to the language should be

created

  • The signal rate optimization should be further improved
slide-74
SLIDE 74

INTRODUCTION MOTIVATION KRONOS – AN OVERVIEW CASE STUDIES SUMMARY ENDING

THANK YOU!

...questions?