Git Product home page Git Product logo

teensy-adat-toslink's Introduction

teensy ADAT toslink output

ADAT Toslink output for Teensy 3.1/3.2

What I've created here is a Teensy ADAT Toslink optical output encoder. The ADAT signal can carry 8 channels of 24bits audio at 44.1kHz or 48kHz. The Teensy audio library defaults to 16 bit 44.1kHz audio which is stuffed in the 24bits. Internally is uses a I2S masterclock which can be changed in the sourcecode to support 48kHz. SMUX is not yet implemented, but should be doable.

The encoding is done using NZRI encoding in packets of 8 bit for which 4 lookup tables are made, so that the memory needed for the lookup for NZRI encoding is 4KB. In the encoding of a frame (containing 8ch 16 bit audio) a frame contains 256 bits, which is twice the datarate of the SPDIF output in the Teensy audio library. In order to support that I used multipliers at a samplerate speed twice as high as compared to the SPDIF example. There is a lot bitshifting and XORring involved, so the ADAT output object is relatively CPU-expensive to use (I guess). I am relatively new to C++ and the Teensy, so if anyone has some optimalisations or improvements, please let me know!

For a real demonstration see : https://youtu.be/e5ov3q02zxo

Happy audio programming for the Teensy!

teensy-adat-toslink's People

Contributors

ejayf avatar

Stargazers

Max Genson avatar  avatar Sean Stevens avatar Denis Terekhov avatar  avatar Max Neupert avatar Chichi Draveng avatar Nic Newdigate avatar Rui Barreiros avatar Dimitrij Kotrev avatar  avatar Paul Mallon avatar Oscar Morante avatar dvnmk avatar  avatar  avatar Gllmar avatar Gerad Munsch avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.