QOrchestra and FlowML. High-level audio synthesis tools on top of SAOL
respawned
8 views
31 slides
Jun 19, 2024
Slide 1 of 31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
About This Presentation
High-level audio synthesis tools on top of SAOL
Size: 2.5 MB
Language: en
Added: Jun 19, 2024
Slides: 31 pages
Slide Content
Bert Schiettecatte, VUB
QOrchestra & FlowML
High-level audio synthesis tools
on top of SAOL
Introduction (1)
This presentation:
•Introduce an audio synthesis diagram format
(FlowML)
•Present a compiler from FlowML to SAOL
(FlowML2SAOL)
•Present a high-level authoring tool for SAOL
(QOrchestra)
Introduction (2)
The SA (Structured Audio) standard of Mpeg-4
audio consists of 5 elements:
•SAOL (SA Orchestra Language):a signal-
processing language for describing
musical instruments
•SASL (SA Score Language):a language
for describing a performance using the
instruments of a SAOL program
Introduction (3)
•SASBF (SA Sample Bank Format):allows
transmission of sample banks
•Scheduler description:used to translate
MIDI or SASL to events internally, in a
decoder
•Reference to MIDI:supported MIDI
messages and their meaning
Available technology (1)
Command-line encoders, decoders, profilers:
•saolc:reference implementation of
encoder/decoder
•sfront:SAOL-to-C compiler with realtime
I/O and some profiling support
•sarun:compiles SAOL to a program for a
virtual machine with a special instruction
set, for efficient decoding
Available technology (2)
Authoring tools:
•QOrchestra:high-level synthesis diagram
tool with SAOL export function, “non-
realtime”, supports re-use of diagrams
•CPS:low-level software synthesis tool
with SAOL save function, “realtime”
•VisOrc:Similar to CPS, with integrated
sequencer
Available technology (3)
IDEs:
•SFX:SAOL editing environment with
syntax highlighting, auditioning, some
profiling support
QOrchestra (1)
•Goal:experimental visual authoring tool for
SAOL (GPL license), drawing space with
primitive building blocks, connection tool,
library for new blocks, …
•Main idea:tool for people who don’t know
SAOL, or don’t want to write SAOL code
•Also a goal:case study of a complex
diagram editor and object-oriented
programming technology
QOrchestra (2)
QOrchestra is NOT:
•A low-level SAOL editor (e.g. CPS)
•A complete SA authoring environment
•A real-time software synthesis application
•An IDE
•Finished
QOrchestra (3)
FlowML (1)
•QOrchestra project requirement: save, load
and re-use synthesis diagrams
•Available storage technology: XML
(eXtensibleMarkup Language), a way to add
meta-information to information (e.g.
<author>Bert Schiettecatte</author>)
FlowML (2)
•Tags for a specific document class are
described in an XML DTD(document type
definition)
•XML technology is freely available, tested,
reliable, very easy to use, …
•FlowML = XML DTDsdescribing synthesis
diagram formats on a high level + collection
of synthesis constructs + synthesis
environment-specific extension mechanism
(~ C++ pragma’s)
FlowML (3)
•Solved storage problems in QOrchestra: store
diagrams and libraries as FlowML
•Generating SAOL code from FlowML is
relativelyeasy
•Very easy to understand (stored as text file)
•Could be a bridgebetween various software
synthesis systems
•Could be the right high-level tool for
describing bigsynthesis systems (<> SAOL)
FlowML (4)
•“Web-friendly”: easy to create browser plugins
•Is nota programming language, but a high-
level modelling language, in a way similar to
UML (methodology for structuring OO designs)
•FlowML is open and free
•Extensions for future versions can be proposed
and will be examined prior to becoming official
(same license as HTML)
FlowML (5)
FlowML diagram rules (informal):
•Multiple outputs per block
•Multiple connections per output
•Multiple inputs per block
•Only one connection per input
•All signals are mono
FlowML (6)
FlowML diagram rules (informal):
•Every component instance has a unique ID
used for referring
•Every definition contains a description and a
unique nameused for instantiating
•2 types of signals: audio and control
•Diagram/component I/O is done through
special primitivesdefined in the standard
FlowML (7)
Audio synthesis diagram example: Reverbmixer
lvl1
lvl2
in1
in2
out
delay
audio_in
time_in
out
xfade
in1
in2
x
out
audio_in
out
out
audio_outin
in
time_in
out
fback_in
out
level
out
drywet
out
SAOL Generator (1)
•Originally intended to be a part of
QOrchestra, but now a separate program
•Reads FlowML synthesis diagrams and
generates SAOLcode with the behaviour
of the diagram
•Uses libraries of SAOL opcodes to
simplifygenerated code: every block in
the diagram translates to an opcode call
SAOL Generator (2)
•Will support libraries containing FlowML
diagrams and SAOL code (currently only
FlowML)
•Generated code will require preprocessing
(e.g. #include)
•Problem:separation authoring tool (including
synthesizer) & code generator can cause
differences in resulting sound
SAOL Generator (3)
•Problem: Integrating software
synthesizer/code generator might cause a
problem: what about intellectual property?
SAOL Generator (6)
else
add(InstsDone, N)
ifisGraphPrototype(N) and notcontains(DeclsDone, N)
add(DeclsDone, N)
add(Program, generateOpcDecl(N, Program, DeclsDone))
Params = newList
ConnectionsTo = getConnectionsTo(N)
foreachX inConnectionsTo
add(Params, generateOpcResult(Prototype, getFrom(X),
getFromConnector(X), Program,
VarDecls, Code, DeclsDone,
InstsDone))
A = makeOpcCall(N, Params)
R = getRate(N, C)
S = getNrOutputs(N)
Code generation: opcode result (2/3)
Instance in middle of diagram
Satisfy instance inputs
SAOL Generator (7)
if hasMultipleOutputs(N) or hasMultipleConnectionsPerOutput(N)
add(Code, makeAssignment(last(N), next(N)))
add(Code, makeAssignment(next(N), A)
if hasMultipleOutputs(N)
add(Vars, makeArrayDecl(last(N), R, S))
add(Vars, makeArrayDecl(next(N), R, S))
return makeArrayLookup(last(N), getNumber(N, C))
else
if hasMultipleConnectionsPerOutput(N)
add(Vars, makeVarDecl(last(N), R))
add(Vars, makeVarDecl(next(N), R))
return makeVarRef(last(N))
else
return A
Code generation: opcode result (3/3)
SAOL Generator (8)
aopcode revbfilt(asig audio_in, ksig drywet, ksig fback_in,
ksig level, ksig time_in)
{
asig dly_next, dly_last;
dly_last = dly_next;
dly_next = delay(mixer(audio_in, level, dly_last, fback_in), time_in);
return xfade(drywet, audio_in, dly_last);
}
Generated SAOL code (reverb diagram)mixer
lvl1
lvl2
in1
in2
out
delay
audio_in
time_in
out
xfade
in1
in2
x
out
audio_in
out
out
audio_outin
in
time_in
out
fback_in
out
level
out
drywet
out
The future
•FlowML needs inputto mature and
become really interesting
•Free software (e.g. FlowML parser, SAOL
and CSound code generators, …) needs
to be developed
•Serious authoring tools are needed to
make Mpeg-4 popular
•Artists need to make a difficult transition
Conclusion (1)
•FlowML might be interesting as a bridge
between synthesis systems
•FlowML hides much of the engineering side
of audio synthesis and provides a high-level
description format for musicians
•FlowML allows to prototypea synthesizer
quickly before optimizing it (e.g. compile to
SAOL and hand-optimize)
Conclusion (2)
•The popularity of SAOL will depend on its
support in commercially available
software synthesis applications
References and contact info
•FlowML and QOrchestra
http://www.bertschiettecatte.com/
•Mpeg-4 SA at the MLG, MIT Media Lab
http://sound.media.mit.edu/mpeg4/
•Mpeg-4 SA book at Berkeley
http://www.cs.berkeley.edu/~lazzaro/