audio development with haxe & grig
TRANSCRIPT
HAXE & GRIG AUDIO DEVELOPMENT WITH
AUDIO DEVELOPMENT WITH HAXE & GRIG
AUDIO IS SERIOUS BUSINESS
▸ Pro audio is a B2B product
▸ DAWs used in music, game, movie industries
▸ Audio frameworks are a B2B product
▸ Processing audio isn’t just for music applications
▸ Speech recognition
▸ Audio forensics
▸ Seismology
▸ Broadcasting
AUDIO DEVELOPMENT WITH HAXE & GRIG
HAXE HAS A LOT OF POTENTIAL FOR AUDIO APPLICATIONS
▸ Multi-target, multi-environment
▸ Targets multiple languages with vibrant audio communities
▸ Macros allow for compile-time optimizations and checks
▸ Existing community of creatives, game programmers
▸ Type system allows for generic algorithms
▸ Existing functionality for high-level operations such as playing audio files and game audio
AUDIO DEVELOPMENT WITH HAXE & GRIG
…HAXE ALSO HAS SOME DISADVANTAGES
▸ No MIDI I/O (until now)
▸ No pro audio-appropriate Audio I/O (until now)
▸ Garbage collected language, even when targeting C++
▸ Fragmented compiled targets (hxcpp vs hashlink/c)
▸ No equivalent to std::numeric_limits<Type>
▸ Some targets ill-suited for use from target language.
▸ Few libs for machine learning or DSP
▸ Little support for opus format
AUDIO DEVELOPMENT WITH HAXE & GRIG
GRIG OVERVIEW
▸ Set of libs to facilitate making audio applications using haxe
▸ Target neutral as much as possible
▸ Code that’s necessarily target or environment-specific on many targets
▸ Do things the haxe way but let people do things other ways
▸ Early stage of development
AUDIO DEVELOPMENT WITH HAXE & GRIG
GRIG OVERVIEW
▸ grig.audio - Provides audio callback for multiple environments, representation of audio signals
▸ grig.midi - Provides midi callback for multiple environments, ability to load and save midi files
▸ grig.pitch - Provides basic support for calculating pitch for notes for different tunings
▸ grig.plugin - Provides low level API for creating and hosting plugin formats
▸ grig.synth - Provides modular synth components and a port of libfmsynth
▸ grig - Contains examples utilizing the above
▸ grig.tech - haxe-react-based static website for grig https://grig.tech/
AUDIO DEVELOPMENT WITH HAXE & GRIG
ENVIRONMENTS
Audio I/O Midi I/O
cpp/standalone ✔ ✔
cpp/lv2 In progress In progress
js/html5 ✔ ✔
js/nodejs ✘ ✔
python ✔ ✔
heaps ✔ N/A
AUDIO DEVELOPMENT WITH HAXE & GRIG
HAXE+GRIG VS THE COMPETITION
▸ Grig in early stage of development compared to alternatives
▸ …but it uses a good, general purpose programming language
▸ Soul is also early in development, is domain-specific and supports hardware DSP
▸ Faust is a mature domain-specific functional language with many targets
AUDIO DEVELOPMENT WITH HAXE & GRIG
GOING FORWARD
▸ See issues on gitlab
▸ More environments
▸ More flexibility in audio formats
▸ More utility DSP and music theory
▸ Ship relevant functionality as npm modules
▸ Dogfooding
AUDIO DEVELOPMENT WITH HAXE & GRIG
GOING FORWARD