ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - dulltools/ex_jack: JACK interface for Elixir using NIFs.
JACK interface for Elixir using NIFs. Contribute to dulltools/ex_jack development by creating an account on GitHub.
Visit Site

GitHub - dulltools/ex_jack: JACK interface for Elixir using NIFs.

GitHub - dulltools/ex_jack: JACK interface for Elixir using NIFs.

ExJack

Elixir CI Module Version Hex Docs Total Download License Last Updated

JACK audio interface for Elixir using Rustler-based NIF.

The purpose of this library is to provide an audio outlet for Elixir through all platforms. However, if you're on Linux, and don't need JACK outright, it's probably preferable to use ExAlsa and interface with ALSA directly.

Requirements

Tested with:
JACK 2 (see https://github.com/RustAudio/rust-jack)
Elixir 1.12
Rust 1.56.1

Set-up

OSX

brew install jack
brew services start jack

mix test

It may help to view what's going with JACK using a GUI like https://qjackctl.sourceforge.io/. If you want to capture sound this is simplest way to connect until an API is added to assist with this.

See GOTCHAS section for working through issues.

Usage

This is an example of piping your capture to output, be wary of feedback. You have to explicity connect your capture with "ExJackDemo:in", if you're unsure how to do this, install QJackCTL.

$ iex -s mix
> ExJack.Server.start_link(%{name: "ExJackDemo"})
> ExJack.Server.set_input_func(fn frames -> ExJack.Server.send_frames(frames) end)

TODO

Road to stable version 1

The first three are necessary to make this library useable beyond hobby projects.

  • Better support for expected frames per cycle from JACK
  • Handle variable channels with definable sources
  • Handle JACK notifications
  • Handling for cases that drop the JACK client such as underruns.
  • Additional tests in Elixir
  • Additional tests in Rust
  • MCU demo
  • Improve documentation with additional examples
  • Autocorrection for xruns

GOTCHAS

Could not open requested library

You may get something like the following:

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: LoadLibraryError("Could not open the requested library: dlopen(libjack.0.dylib, 0x0005): tried: 'libjack.0.dylib' (no such file), '/usr/local/lib/libjack.0.dylib' (no such file), '/usr/lib/libjack.0.dylib' (no such file), '/Users/adrian/Dev/ex_jack/libjack.0.dylib' (no such file)")', src/lib.rs:45:79
note: run with `RUST_BACKTRACE=1` environment variable to display a RUST_BACKTRACE

To fix, try the following:

$ brew --prefix jack
> /opt/homebrew/opt/jack # this may differ for you, make sure to update the below path if it does...
$ sudo ln -s /opt/homebrew/opt/jack/lib/libjack.0.dylib /usr/local/lib/libjack.0.dylib

Dev

Releases

Taken from https://hexdocs.pm/rustler_precompiled/precompilation_guide.html#the-release-flow

    release a new tag
    push the code to your repository with the new tag: git push origin main --tags
    wait for all NIFs to be built
    run the mix rustler_precompiled.download task (with the flag --all)
    release the package to Hex.pm.

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory