Ambisource is a MATLAB-based command-line toolkit for detecting and visualizing sound sources using First-Order Ambisonics (FOA). It provides tools for:
- Single-source localization on a sphere
- Multi-source localization
- Space localization using two FOA recorders
- Visualization of detected directional paths
This repository contains a modular CLI (ambisource.m) and all detection and visualization subcommands.
matlab -nodesktopThis opens MATLAB without GUI, ideal for command-line workflow.
Inside MATLAB:
ambisourceThis displays the main help page, lists all detection and visualization commands, and shows usage patterns.
Clone the repository from GitHub:
git clone https://github.com/basemare/ambisource.gitJSON output (full range):
ambisource detect single sphere example_rec.wav 48000 out json res=1 fps=30Creates:
out/directions.json
PNG generation (time-range 1m25s to 1m35s):
ambisource detect single sphere example_rec.wav 48000 out pngs res=1 fps=30 t0=1:25 t1=1:35Creates:
out/frames/*.png
(Not implemented yet, help available)
ambisource detect multiple sphere(Not implemented yet)
ambisource detect single space(Not implemented yet)
ambisource detect multiple spaceVisualization converts directions.json to images.
ambisource visualize single sphere examples/directions.jsonCreates:
directions.png
This is an equirectangular (360×180) point-based path plot of azimuth and elevation.
Help available:
ambisource visualize multiple sphere
ambisource visualize single space
ambisource visualize multiple spaceambisource.m
detect_single_sphere.m
detect_multiple_sphere.m
detect_single_space.m
detect_multiple_space.m
visualize_single_sphere.m
visualize_multiple_sphere.m
visualize_single_space.m
visualize_multiple_space.m
examples/
example_rec.wav
directions.json
- All help messages come from each script’s top comment block.
- Options are passed as
key=value(e.g.,res=2 fps=15). - Time ranges accept seconds or MM:SS formats.