Skip to content

Distributed WFS implementation for networked Teensies

License

Notifications You must be signed in to change notification settings

hatchjaw/teensy-wfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

teensy-wfs

Distributed WFS implementation for networked Teensy 4.1s.

Built upon on the JackTrip client for Teensy, which is a submodule at lib/jacktrip-teensy.


Building

Faust

DSP is handled by a Faust algorithm, which must be compiled for the Teensy audio library. Consult the parameters in src/faust/WFS_Params.lib and set them to match your system. Compilation requires the faust2teensy utility, which is installed with the Faust compiler. Install Faust as per the instructions, then issue the following command:

./scripts/f2t ./src/faust/WFS.dsp

This will compile WFS.dsp to a Teensy audio library C++ class, which will be placed in src/WFS.

Teensy

Define AUDIO_BLOCK_SAMPLES and NUM_JACKTRIP_CHANNELS to match the settings on your JackTrip server.

PlatformIO

The above flags are set in platformio.ini.

To pull dependencies (TeensyID, for assigning a MAC and IP), build and upload to a Teensy:

pio run -t upload

Or to multiple Teensies (requires tytools):

./scripts/upload.sh

Arduino IDE

You can define NUM_JACKTRIP_CHANNELS in src/main.cpp, but not (as far as I'm aware) AUDIO_BLOCK_SAMPLES; you may need to make a platform.local.txt for your Arduino environment to set that flag.

Anyway, create a sketch, copy src/main.cpp into the .ino file, and add src/WFS/* to that sketch. Open the library manager and add the TeensyID library. Download a .zip of the jacktrip-teensy repository, and import that into the IDE (Sketch > Include Library > Add .ZIP Library...). Select Teensy 4.1 as your board and click Upload.

Running

On boot, the Teensy WFS modules will attempt to initiate a connection to a JackTrip server at 192.168.10.10, which is assumed to be a regular computer, connected via ethernet to a switch, to which Teensy modules are in turn connected. This is the address you should assign to the wired network adapter of the JackTrip server, using manual IPv4 config (i.e. no DHCP).

Run JackTrip as a hub server, with minimal queue buffer, no autopatching, and as many IO channels as defined when you uploaded to your Teensies:

jacktrip -S -q2 -p5 -n[NUM_JACKTRIP_CHANNELS]

For further detail on setting up the server and running Teensy as a JackTrip client, see the readme for the jacktrip-teensy repository.


WFS Controller Application

There is a WFS Controller JUCE app in the wfs-controller directory; head there for build instructions. The WFS controller uses JACK's C API to set up ports and connect to any Teensy JackTrip clients. It notifies the clients of their positions in the WFS array, plus the positions of virtual sound sources, via OSC over UDP multicast.

WFS Controller

About

Distributed WFS implementation for networked Teensies

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages