Audio Framework
Overview
The Audio Framework (AF) is a collection of tools and libraries that allow efficient development of audio applications on GAP9 platform. It consists in a collection of tools to create graphs from unitary blocks (components). A high-level input graph file can be designed by one of two front ends:
CMCore: a Python library that helps generate and manage component descriptions and graphs, as well as the backend used as an interface between the graph instantiation and the rest of the toolchain.
Graph Designer (GD): A GUI frontend on top of CMCore.
The rest of the Audio Framework consists of the following tools:
Audio Mapping Tool (AMT): Host tool that takes input graph in .graph (JSON) format and converts it to a fully resolved graph that is fed to Runtime Generator (RTG).
Runtime Generator (RTG): Host tool that takes fully resolved graph produced by AMT and produces set of source and configuration files that are to be build for GAP9 target.
Toolchain (TC): A short name for AMT followed by RTG.
Runtime Library (RNT): Target API that enables user applications to load and run graphs produced by the toolchain.
Graph Designer is the main tool used to design audio graphs, filters and other components using a GUI. To facilitate testing and automation, graphs can also be created written in Python or in C, through the API provided as component library.
The graph process flow of the toolchain is as follows:
Users can create and tune a graph using the Graph Designer (to use a GUI) or a Genepy script (through Python API)
The graph is then modified, its contents verified completed from component templates by the Mapping Tool
The Runtime Generator then compiles that graph into compilable C code, managed by the toolchain.
The audio libraries contain premade components that can be used as building blocks to speed design process of audio graphs, as well as a collection of tools to test and secure those blocks.
Development status
Tool |
Status |
---|---|
CMCore |
Usable, feature complete |
Graph Designer |
Usable |
Audio Mapping Tool |
Usable, incomplete |
Runtime Generator |
Usable |
Runtime library |
Usable |
Contents
- Examples
- GAP Audio Framework toolchain
- GAP Audio Framework tools
- Matlab Utilities
- File_io
- WarpTB
- biquad_iir_df1_design - Tools to design SFU ready Biquad DF1 filters
- cic_design - Tools to design SFU ready cic (PDM_Demod) filters
- fir_design - Tools to design SFU ready FIR filters
- iir_design - Tools to design SFU ready IIR filters
- wfir_design - Tools to design SFU ready Warped FIR filters
- polyphase_design - Tools to design SFU ready polyphase filters
Examples
The examples
folder include a number of examples showing how to use the framework. The file_in_out
example (examples/applications/file_in_out/
) is a basic hello world example for audio, showing how to load construct a simple graph and loading/saving audio from file.
Below is a walktrough of the basic workflow of the framework.
1. Generate a graph
Creating a graph is done by assembling components (a graph’s lowest level unit) into a larger audio topology. This can be done using a CMCore script or (in time) the Graph Designer. Here is an example of a script to create a graph using CMCore:
Such a code will create a graph, recognized by its .graph
extension.
Each of its fundamental bricks is a component template, located in one of the component libraries.
The templates in this library are provided in the GWT component library.
Other examples of CMCore usage can be found in cmcore/examples.
2. Pass the graph to the audio toolchain
python3 -m af_toolchain <my_example_graph>.graph [-o <output_directory>]
- Note
Currently, only the mapping tool will run to completion.
Glossary
GD |
Graph Designer |
AF |
Audio Framework |
AMT |
Audio Mapping Tool |
RTG |
Runtime Generator |
TC |
Toolchain (AMT + RTG) |
RNT |
Runtime library |
Audio library
framework The component-based framework, with components written for the host computer and the target,
common A collection of various tools:
graph parameter generators
graph content checkers
test helpers and managers
conversion utilities: fixed and floating point tools, decibel converters, etc.
components The collection of components made available in the GWT audio library.
internal A collection of internal scripts and utilities to manage this repository.