GithubHelp home page GithubHelp logo

cbrown1 / arrow1 Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 2.64 MB

Play and record multi-channel audio using jack.

License: GNU General Public License v3.0

Makefile 0.84% Python 27.09% CMake 5.28% C++ 66.79%

arrow1's Introduction

Build Status

arrow1

Play and record multi-channel audio using Jack.

Prerequisites

  • jack

  • libsndfile

  • Boost - Apart from header libraries libboost-program-options binary is required.

Installing

Download:

git clone https://github.com/cbrown1/arrow1.git

Compile and install:

cd arrow1
make && sudo make install

Or with CMake, which gives more control over the process:

cd arrow1
mkdir build && cd build && cmake .. && make

Usage

Set port aliases in jack for convenience. Afterwards, ports can be called via out1, out2, in1, in2, etc. Aliases do not persist after restarts. (Note: From jack's perspective, capture or record ports are 'output' ports, and vice-versa)

ins=$(jack_lsp -p | awk '/output/{print previous_line}{previous_line=$0}')
i=1
for j in ${ins}; do jack_alias ${j} in${i}; ((i++)); done
outs=$(jack_lsp -p | awk '/input/{print previous_line}{previous_line=$0}')
i=1
for j in ${outs}; do jack_alias ${j} out${i}; ((i++)); done

If you don't want to use aliases, go the hard way. List jack port names (your system will have different names):

$ arrow1 -c
2 Output (playback) channels:
   1: system:playback_1
   2: system:playback_2
2 Input (record) channels:
   1: system:capture_1
   2: system:capture_2
$

Play a two-channel soundfile and record for 5.2s from channel 2 and write to a soundfile:

$ arrow1 -r test/2_channels.wav -o system:playback_1,system:playback_2 -w test.wav -i system:capture_2 -D 5.2
frames read: 132300 (3.004s)
frames written: 229320 (5.204s)
$

The same thing, using aliases created above:

$ arrow1 -r test/2_channels.wav -o in1,in2 -w test.wav -i out2 -D 5.2
frames read: 132300 (3.004s)
frames written: 229320 (5.204s)
$

Play channels 2 and 6 of a 6-channel file:

$ arrow1 -r test/6_channels.wav -o null,system:playback_1,null,null,null,system:playback_2
frames read: 132300 (3.004s)

Record from all available Jack inputs until explicitly stopped with ^C:

$ arrow1 --duration=0 -w foo.wav
^CReactor::signal_handler_(): stopping on signal 2
frames written: 368896 (7.690s)

Notes

  • This project was developed for recording room and head-related impulse responses (RIRs and HRIRs)

  • To be clear, this program is meant for play-and-record, not record-and-play

  • It was originally a fork of recapture, but has since been completely re-written

  • The name is an old Twilight Zone reference

Related Projects

  • ecasound: multitrack audio processing software package

TODO

  • Proper Python wrapper (no temp files, etc)

Authors

License

This project is licensed under the GPLv3 - see the LICENSE.md file for details.

arrow1's People

Contributors

andrzejc avatar cbrown1 avatar

Watchers

 avatar James Cloos avatar

Forkers

andrzejc

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.