NABRO

From OpenSourceRadio
Jump to: navigation, search

Nabro is an open source project to develop a real-time broadcast compressor/limiter to assist in keeping transmitter modulation within required limits.

Link to video of prototype booting up: https://www.youtube.com/watch?v=r9RK7q2Q9tE&list=UUjgecYJ8j1gMgRE3gQniIFw

Calf Multiband Compressor Settings

Calf Plugins

    • Calf Gate - used as noise gate
    • Calf Filter - configured as low pass <15kHz
    • Calf Filter - configured as high pass >30Hz
    • Calf Multiband Compressor
    • Calf Compressor - set a bit harder than multiband
    • Calf Limiter - overmodulation insurance!
Calf Jack Host
  • Use calfjackhost as a "rack" to manage and monitor the plugins
    • Uses xml files for storing 'presets' and 'sessions'
    • Dependencies:
      • calf-plugins
      • jack
      • GTK+
Claudia Jack Session Manager
  • Use Claudia from KXStudio project to manage jack session
    • This autostarts calfjackhost
    • loads predetermined calfjackhost file
    • makes all audio routing connections
    • Dependencies:
      • ladish
      • cadence-tools
      • Qt4

While this gives us the overhead of X.org and widget toolkits the UI is VERY nice. Calf project has excellent html documentation available. Live changes can made and monitored in realtime and then saved to presets and sessions so that you can choose between them. Presets and sessions can be saved, uploaded, downloaded and exchanged with other users!

Current

I started a fresh OS install on an old x61-tablet thinkpad laptop. CPU is an L7700 core2duo. Testing with the onboard sound card I have latency to imperceptible levels. I have loaded as many as 8 effects/filters chained together processing stereo (two channels), including an 8 voice multi chorus and multiband compressor. I have yet to see the overall cpu load go over 45% and temp is 58C. The recipe at this stage...

  • Debian Jessie "minimal" install
  • amd64-rt kernel from debian repositories (linux-image-rt-amd64)
  • no recommended or suggested packages installed unless manually and listed below.
  • Additional packages
    • alsa-utils
    • xserver-xorg
    • calf-plugins
    • jackd
    • ladish (not yet using)
    • dbus-x11
    • xinit
    • xserver-xorg-input-kbd
    • xserver-xorg-input-mouse
    • xserver-xorg-video-intel
    • xserver-xorg-video-fbdev
    • xserver-xorg-video-vesa
    • xterm
    • gtk2-engines-pixbuf
    • openbox
    • python-xdg
    • avahi-daemon (for vnc advertisement)
    • x11vnc
    • Xpra (remote configuration access)

Memory use:

$ free -m
             total       used       free     shared    buffers     cached
Mem:           942        285        656         98          9        177
-/+ buffers/cache:         98        844
Swap:            0          0          0

Disk use:

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2        55G 1018M   52G   2% /
udev             10M     0   10M   0% /dev

Create /etc/jackdrc to set the default realtime priority and decreased period size for less latency

/usr/bin/jackd -R -P 85 -d alsa -p 128 -n 2 -d hw:1

Create ~/.calfpresets

<presets>
<preset bank="0" program="1" plugin="filter" name="test-lowpass">
  <param name="freq" value="14876.5" />
  <param name="res" value="0.707" />
  <param name="mode" value="2" />
  <param name="inertia" value="5" />
</preset>
<preset bank="0" program="2" plugin="filter" name="test-highpass">
  <param name="freq" value="30.1204" />
  <param name="res" value="0.707" />
  <param name="mode" value="5" />
  <param name="inertia" value="5" />
</preset>
<preset bank="0" program="1" plugin="multibandcompressor" name="test-multicomp">
  <param name="bypass" value="0" />
  <param name="level_in" value="1" />
  <param name="level_out" value="1" />
  <param name="meter_inL" value="0" />
  <param name="meter_inR" value="0" />
  <param name="meter_outL" value="0" />
  <param name="meter_outR" value="0" />
  <param name="clip_inL" value="0" />
  <param name="clip_inR" value="0" />
  <param name="clip_outL" value="0" />
  <param name="clip_outR" value="0" />
  <param name="freq0" value="120" />
  <param name="freq1" value="1000" />
  <param name="freq2" value="10033.4" />
  <param name="mode" value="1" />
  <param name="threshold0" value="0.707107" />
  <param name="ratio0" value="2.19543" />
  <param name="attack0" value="10.5096" />
  <param name="release0" value="522.296" />
  <param name="makeup0" value="1" />
  <param name="knee0" value="8" />
  <param name="detection0" value="0" />
  <param name="compression0" value="1" />
  <param name="output0" value="0" />
  <param name="bypass0" value="0" />
  <param name="solo0" value="0" />
  <param name="threshold1" value="0.707107" />
  <param name="ratio1" value="2.19543" />
  <param name="attack1" value="10.5096" />
  <param name="release1" value="522.296" />
  <param name="makeup1" value="1" />
  <param name="knee1" value="8" />
  <param name="detection1" value="0" />
  <param name="compression1" value="1" />
  <param name="output1" value="0" />
  <param name="bypass1" value="0" />
  <param name="solo1" value="0" />
  <param name="threshold2" value="0.707107" />
  <param name="ratio2" value="2.19543" />
  <param name="attack2" value="10.5096" />
  <param name="release2" value="522.296" />
  <param name="makeup2" value="1" />
  <param name="knee2" value="8" />
  <param name="detection2" value="0" />
  <param name="compression2" value="1" />
  <param name="output2" value="0" />
  <param name="bypass2" value="0" />
  <param name="solo2" value="0" />
  <param name="threshold3" value="0.707107" />
  <param name="ratio3" value="2.19543" />
  <param name="attack3" value="10.5096" />
  <param name="release3" value="522.296" />
  <param name="makeup3" value="1" />
  <param name="knee3" value="1" />
  <param name="detection3" value="0" />
  <param name="compression3" value="1" />
  <param name="output3" value="0" />
  <param name="bypass3" value="0" />
  <param name="solo3" value="0" />
  <param name="notebook" value="3" />
</preset>
<preset bank="0" program="1" plugin="compressor" name="test-comp">
  <param name="bypass" value="0" />
  <param name="level_in" value="1" />
  <param name="meter_in" value="0" />
  <param name="meter_out" value="0" />
  <param name="clip_in" value="0" />
  <param name="clip_out" value="0" />
  <param name="threshold" value="0.812253" />
  <param name="ratio" value="4.29497e+09" />
  <param name="attack" value="0.561487" />
  <param name="release" value="31.5268" />
  <param name="makeup" value="1" />
  <param name="knee" value="1" />
  <param name="detection" value="1" />
  <param name="stereo_link" value="0" />
  <param name="compression" value="1" />
  <param name="mix" value="1" />
</preset>
<preset bank="0" program="1" plugin="limiter" name="test-limiter">
  <param name="bypass" value="0" />
  <param name="level_in" value="1" />
  <param name="level_out" value="1" />
  <param name="meter_inL" value="0" />
  <param name="meter_inR" value="0" />
  <param name="meter_outL" value="4.58137e-26" />
  <param name="meter_outR" value="4.58137e-26" />
  <param name="clip_inL" value="0" />
  <param name="clip_inR" value="0" />
  <param name="clip_outL" value="0" />
  <param name="clip_outR" value="0" />
  <param name="limit" value="1" />
  <param name="attack" value="3.9308" />
  <param name="release" value="10.3507" />
  <param name="att" value="1" />
  <param name="asc" value="0" />
  <param name="asc_led" value="0" />
  <param name="asc_coeff" value="0.5" />
  <param name="oversampling" value="1" />
</preset>
<preset bank="0" program="0" plugin="gate" name="test-gate">
  <param name="bypass" value="1" />
  <param name="level_in" value="1" />
  <param name="meter_in" value="0" />
  <param name="meter_out" value="0" />
  <param name="clip_in" value="0" />
  <param name="clip_out" value="0" />
  <param name="range" value="0.06125" />
  <param name="threshold" value="0.125" />
  <param name="ratio" value="2" />
  <param name="attack" value="20" />
  <param name="release" value="250" />
  <param name="makeup" value="1" />
  <param name="knee" value="2.82843" />
  <param name="detection" value="0" />
  <param name="stereo_link" value="1" />
  <param name="gating" value="1" />
</preset>
</presets>

Bash script xmitt-processor.sh (remember to make executable)

#! /bin/bash

## This script starts calfjackhost with the plugins and presets that we want for the
## compressor/limiter appliance. It also uses the '!' to identify how the plugins
## should route the audio. The leading and trailing '!' are for the system default
## audio interface input and output respectively.

calfjackhost ! gate:test-gate ! filter:test-lowpass ! filter:test-highpass ! multibandcompressor:test-multicomp ! compressor:test-comp ! limiter:test-limiter !

Add to /etc/xdg/openbox/autostart


To Do

  • additions to user interface:
    • Ability to schedule presets
    • Set sound card # 1, 2, 3,...
    • facility to upload preset files
  • implement monitoring/alerting ?
  • fix USB latency
    • tried alsa period number @ 1, 2, and 3
    • try kernel with 1000Hz tick?
    • research clock changes to USB drivers