Git Product home page Git Product logo

connect-opz's Introduction

Connect OP-Z

Connect OP-Z as an audio device on norns.

This norns program has a single purpose, namely to connect monone norns to teenage engineering OP-Z audio over USB for both input and output.

I hope to improve my setup in the following regards:

  1. Audio signal from OP-Z headphones to norns input is weak and loses in quality when driving OP-Z at full volume. USB audio has more umph
  2. OP-Z reserves the audio in jack of norns shield.
  3. Less is more.

WARNING: Do not disconnect or turn off the OP-Z when it has been connected as an audio device with this program. This will leave processes running wild on the norns, and will produce loud digital noise.

https://llllllll.co/t/using-usb-audio-with-norns-case-op-z/

Requirements

  • norns
  • teenage engineering OP-Z

Purpose

The following storyline illustrates the ambition, and success of this program.

Original setup in which I have monome norns shield running on a Raspberry Pi 3+ powered by a battery pack. Etymōtic ER2XR headphones are connected to norns output, and OP-Z is connected both with a USB cable for MIDI and with an audio cable for audio from OP-Z to norns.

In a simplified setup the USB cable which I'll use anyway also transport audio both ways, removing the audio cable from the setup and also adding sound from norns to OP-Z.

An extended setup, now that the norns audio input is free for using with a PO-28 Robot, PO-16 Factory or smartphone running YouTube, SoundCloud, browser, Spotify, software synths like nanoloop and Caustic, messaging apps etc. fun sound sources.

Function

The way this program works is that is runs alsa_in and alsa_out for the connected OP-Z, and routes them softcut and crone in jack. This manipulates the audio stack under norns, which remains ignorant of these changes.

Enabling input from OP-Z to norns and output from norns to OP-Z are controlled separately.

Further ideas

It would make sense to do this at system level rather than a norns program. This would be done by adding udev rule in /etc/udev/rules.d plus writing a program which starts alsa_in and alsa_out when the OP-Z is plugged in and adds the jack routes, and tears this setup down when the OP-Z is disconnected from USB.

Another idea would be to amend the norns systemd service norns-jackd which is defined in file /etc/systemd/system/norns-jack.service.

It might be worth looking at alternatives to alsa_in and alsa_out, Jack 2 might have something for this.

Last idea would be to get a hardware mixer, rather then user norns as my mixer.

connect-opz's People

Contributors

xmacex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

connect-opz's Issues

This program exists

It is an issue that this program exists. I would rather have it the other way. This could be an udev setup, an amendment of the systemd service norns-jack, part of the norns configuration in SYSTEM > DEVICES or something like that, rather than one of programs which I would rather be about making bleeps and bloops. This is a kind of a workaround, and should go away.

Separate input and output features

This makes the little utility a bit more complicated to use, well double as complicated, but this would help with #1 and be a bit more specific maybe. Output isn't working anyway at this point.

Will there be feedback if both are enabled? If yes, this is harmful to human bodies. If not, yeah for OP-Z sampling and re-sampling and other things.

Should recover from OP-Z disconnect

If the OP-Z disconnects e.g. by removing cable or turning it off while this thing is enabled, the alsa_in process is left confused and start producing errors fast. This slows down norns, so this event needs to be recovered from. udev rules would make so much sense, rather than having a program like this in the first place.

Norns UI becomes laggy when this script is active

The script blocks the main thread as the current status is periodically polled. This is not cool, and e.g. make navigating the main norns menus sluggish. Re-implement the poll as a separate thread.

Reimplement as a systemd service

One idea would be to amend the norns systemd service norns-jackd which is defined in file /etc/systemd/system/norns-jack.service, and change it's -d hw:0 to -d hw:1for alsa.

A variation of the above idea would be to have a different, separate service which connects to -d hw:1 (or by name) to replaces the norns-jack service, perhaps called something like norns-jack-opz.service, and alternate between these two. systemctl --quiet is-enabled norns-jack etc. can be used to programmatically check if a service is currently running.

This would spare running separate processes which eat a lot of CPU. At the same time, this would disable the norns input and output.

It would (partially) make sense to do this at system level rather than a norns program. This would be done by adding udev rule in /etc/udev/rules.d plus writing a program which starts alsa_in and alsa_out when the OP-Z is plugged in and adds the jack routes, and tears this setup down when the OP-Z is disconnected from USB.

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.