DIY XLR A/B switch box

During the last weeks I finished another little DIY project: an XLR A/B switch box. This thingy has two balanced stereo XLR inputs and one balanced stereo XLR output. Together these are four mono input channels and two mono output channels. It’s a great tool if you need to switch between two input sources like e.g. two DAC’s etc. It’s also ideal for A/B comparison of various input devices. Since it’s a completely passive design it shouldn’t affect the sound. Also the stereo channels are completely physically separated.

The main work was to build the case which was made from aluminium rest of another DIY project.

internals
internals

The wiring and soldering is pretty simple. Here is the wiring scheme:

wiring scheme
wiring scheme

The input connectors are Neutrik NC3 FXX, the output connectors are Neutrik NC3 MXX. The ground wires of the first channel (A1,B1,C1) and second channel (A2,B2,C2) are soldered together, but not connected to the case. Also there’s no ground connection between channel 1 and channel 2.

Example Use Cases

  1. Stereo A/B Input Switch: A1 = A In Left, A2 = A In Right, B1 = B In Left, B2 = B In Right, C1 = Out Left, C2 = Out Right
  2. Stereo A/B Output Switch: A1 = A Out Left, A2 = A Out Right, B1 = B Out Left, B2 = B Out Right, C1 = In Left, C2 = In Right
  3. 2 x Mono A/B Input Switch: A1 = Mono 1 In, B1 = Mono 2 In, C1 = Mono 1 Out, A2 = Mono 3 In, B2 = Mono 4 In, C2 = Mono 2 Out. Both Mono Outputs are physically separated.

More pictures:

standalone
standalone
A/B Switcher rack mounted
rack mounted
A/B Switcher cables
input/output XLR cables
Posted in Production, Tech Stuff | 4 Comments

DIY Headphone Amp Funk LPA-2a

Recently I built myself a High-End DIY headphone amplifier, which is based on modules from german manufacturer Funk Tonstudio Technik. The amp has balanced XLR input sockets and a standard unbalanced stereo headphone output. DIY means: the headphone amp, the unbalancing amplifier and the power supply modules are from Funk, the rest: case, inputs, outputs, connections, soldering, etc. is all DIY.

Pictures

LPA-2a side view
Funk LPA-2a
internals
internals
bottom
bottom
rear
rear

Specifications And Price

The LPA-2a has excellent specifications. Regarding specs it’s one of the best, if not the best, headphone amp available. Soundwise it’s optimized for purest transparency, so no colorful analogue sound here. Since a stepped ALPS attenuator is used, the stereo-balance is very good. The unbalancing board and the power supply module also have execellent specs. And the best thing: in relation to the quality the modules are relatively cheap (round about 250 €, the price for the case and other DIY stuff is round about 150€. That said: there are much cheaper cases available).

Module specifications:

The Case

The case was designed using Frontplatten Designer by Schaeffer AG. Means: the aluminium front plate was milled by Schaeffer AG, also the corner aluminium profiles are from Schaeffer AG. The rest of the case was made from various pieces of sheet metal from blechscout.de. That was much cheaper than ordering directly from Schaeffer AG. Top, bottom and side sheets are 2mm stainless steel. The back plate is a 3mm aluminium sheet. I drilled all holes of the back plate by myself (cheaper). For mounting I used stainless steel hexagon socket screws.

case parts
case parts
front plate
front plate

Electrical Components

Electrical components are the already described Funk modules, various Neutrik signal I/O sockets, power socket, on/off switch, power led, cables and stuff. Finally there’s a DIY connector board that connects everything together (see details below). To assemble the cables some special tools / crimping tools are needed, or at least it’s helpfull to use them.

electric components
electrical components
needed tools
needed tools

Connector Board

In order to connect the power supply, amp and I/Os, I soldered a slightly modified version of Peter Rill’s LPA-2 connector board. Thanks to Peter for the scheme ! Peter’s design also includes a relay which switches on/off the output signal. The relay is controlled by the Funk power supply. Means: 5 seconds after switching on the power supply, the relay closes, and as soon as the power supply is switched off, the relay opens. This protects your headphones and ears from nasty pops and clicks.

connector board top
connector board top
connector board rear
connector board rear

Adjustable Amplification

Depending on the used headphones the LPA-2a and the SIA-5 support various amplification settings ranging from -6 dB … + 18 dB. For more details see specifications.

Posted in Production, Tech Stuff | 8 Comments

UADE multichannel audio support

Last week I added native multichannel audio output support to UADE. UADE stands for Unix Amiga Delitracker Emulator which is an audio player for old Amiga demo music and game tunes. It is based on a clever client server concept, where the clients (= player frontends) communicate via inter-process communication with the server. The server uses the UAE Amiga emulator to emulate an A500, which executes a native Amiga software that uses Eagleplayer plugins to play the tunes. Finally, Eagleplayer plugins cover over 150+ different audio formats including many exotic custom formats.

Now, all Amigas had four separate 8 bit audio channels which were downmixed to stereo inside the PAULA sound chip. Moreover, old Amiga models before A1200 had an inbuilt static tone-shaping low-pass filter at 4.5 or 5 KHz and an optional LED low-pass filter at 3.3 KHz. These filters were applied to the stereo mix. Of course, the UAE emulator does the same as the hardware: audio output is a stereo mix which is optionally filtered (can be enabled/disabled). The resulting stereo stream is finally sent to the UADE frontend(s). E.g. uade123 frontend can store the stream as two channel wav file.

And that’s the problem: from the mixing and mastering perspective an already downmixed stereo wav file is of course much worse compared to a multichannel wav file. Wouldn’t it be great if one could stream the contents of the original four PAULA channels before they are downmixed to stereo ? Exactly this was what I needed and so I started to study and modify the original UADE source code. The result is a modified UADE 2.13 version with a new uade123 command line option --quadmode. The filters still can be applied, but in quad mode they are applied to each channel separately.

The quad mode audio output stream can either directly be played via soundcard (libao), or saved into a multichannel wav/au file. If the sound system provides multiple hardware channels, media players can usually replay the multichannel file directly. If it’s a stereo setup, most players are able to downmix the four channels to stereo – with different results, though.

If you want to mix a tune: most modern DAW’s can load multichannel wav files. E.g. Cockos Reaper, Logic and so on. I used Reaper 4 and it’s surround mixer for a quick sound check. Reaper can also automatically split up multichannel files into separate mono channel files. If your DAW doesn’t support that, you can use the included split_quad.sh script which does the same. You have to install sox, though.

DOWNLOAD

Source:
uade_2.13q.tar.bz2
SHA1: 670bbc78d6f3f6238920ce9dd44e2a98833acba3 uade_2.13q.tar.bz2

Debian package for Ubuntu Mint 15 64:
uade_2.13q_amd64.deb
SHA1: c36e087cd5cd3e7c2c6063419f6989daeb0bdbc8 uade_2.13q_amd64.deb

INSTALLATION EXAMPLES

# from source (Linux Debian Systems)
sudo apt-get install libao-dev
sha1sum -c uade_2.13q.tar.bz2.sha1
tar -xjf uade_2.13q.tar.bz2
cd uade-2.13q
./configure
make

# optional sound test, plays demo song
make soundcheck 

sudo make install
hash -r # only if bash can not find uade123

# optional regression test, 
# all checksums should be different
# If test fails, enter correct data dir in test_quad.sh.
# e.g.: UADE2_DATA_DIR="/usr/local/share/uade2"
./test_quad.sh 

# From Debian package (only Ubuntu Mint 15 64 !)
sha1sum -c uade_2.13q_amd64.deb.sha1
sudo dpkg -i uade_2.13q_amd64.deb
hash -r # only if bash can not find uade123

USAGE EXAMPLE

# generate multichannel wav file
uade123 --quadmode --filter=none -f output.wav AHX.Cruisin 

# split multichannel file into four mono channel files
split_quad.sh output.wav 

# Have fun 

AUDIO REPLAY HINTS

If audio replay crackles or is kind of slow check the used ao driver, first. For that have a look at /etc/libao.config. If default driver is “alsa” try “pulse” instead. For detailed information remove the “quiet” option and optionally add “debug” option.

Regarding multichannel replay: if you have problems with direct four channel replay (e.g. channels are not hearable, or very quiet, or left/right is wrong), then try to render to file using uade123 --quadmode -f out.wav and replay this file using mplayer or any other media player. There’s a split_quad.sh script included for splitting up the four channel wav file into four mono channel wav files. IMPORTANT: you have to install “sox”, first.

Always remember that all Amiga tunes are actually stereo tunes. Means: the original composers created and mixed them for plain stereo replay. Moreover, most Amigas were connected to crappy monitor-inbuilt speakers, or other crappy little desktop speakers. Means: the usual audio setup didn’t have a wide stereo stage, it was actually more mono than stereo. Now, if you replay such tunes using a quad or surround setup it can sound pretty odd. Especially there is much more channel separation. To fix this, you can e.g. use a surround mixer or auto stereo downmixer or further post processing fx whatever. BTW: the same problem occurs if you replay old Amiga tunes via headphones or a hifi stereo setup. Nonetheless: the strong channel separation can also be pretty charming, because nothing masks and every detail is hearable. For remixers only: remember, good surround mixes should be stereo compatible, good stereo mixes should be mono compatible.

Multichannel channel assignment under Linux and in general is a mess. There are so many factors/components: libao, audio drivers, different multimedia players and so on. Each component handles multichannel audio order slightly different: some players just omit channels 3+4, others play them but treat them as center channels etc. and thus distort the original stereo image. Then, if you don’t have a real multichannel soundcard, stereo downmix is handled differently and so on. I tried several combinations as described in libao documentation, but each matrix had it’s disadvantages. It turned out that omitting any specific matrix seems to be the best solution. A really suitable surround matrix for correct Amiga stereo imaging (L=1+3, R=2+4) doesn’t exist anyway, though classic quadraphonic matrix L,R,BL,BR and matrix L,R,CL,CR are theoretically useable. Funny: it turned out, that Windows Media Player did the best job regarding multichannel stereo summing. It was the only player that did it correctly.

It’s theoretically possible to set libao options via uade123 command line. E.g.: uade123 --ao-option=matrix:"L,R,CL,CR". Probem is: somehow it didn’t have any effect ?

Posted in Amiga, Software, Tech Stuff | 19 Comments

SIMTUR – a Turing machine simulator in ANSI-C

Years ago during my studies I developed a small Turing Machine simulator in ANSI-C which was never released to public. It seems to work nicely, so I finally decided to publish it.

SIMTUR simulates a fully functioning deterministic Turing Machine. Two stacks are used to simulate an infinite read/write tape. It’s possible to execute any state transition function (= program). During execution it’s possible to monitor the machine’s progress in single step mode. This can help the interested to verify state transition functions and analyze how complex Turing machines work.

Also tapes – like the Turing Machine (program) itself – can be initially be loaded (data input), and the resulting tape can be stored (data output). Thus, rudimentary data I/O processing is possible. Of course the whole program has a more “experimental academic” character, but maybe it’s useful  nonetheless.

Some example programs are included, too.  E.g.:

  • NOT-function for binary numbers
  • ADD-function for binary numbers
  • [pmath]a^n b^n c^n[/pmath] Acceptor
  • experimental converter: DOS to Unix text

PDF Documentation is in German only, sorry :-(, but program has english language output

DOWNLOAD:
simtur_1_13_windows.zip (Win32/64, ANSI-C sourcecode included)
SHA1:cdf869f0abdde83863a0021c5f89ddde28bd1aee simtur_1_13_windows.zip

If you want to run this program on a different platform/OS just recompile the sourcecode with a C compiler. It should be really easy. E.g. for Linux: gcc simtur.c.

Posted in Software, Tech Stuff | 3 Comments

Cockos Reaper “A/B Switcher” for Mastering Purposes

Everybody involved into mastering audio knows how important A/B track referencing is. Thus said, there are various techniques and setups depending on your DAW and studio hardware. Some people use hardware monitor controller systems which provide input switching, some use DAW internal switching methods, other people control their DAC/Soundcard directly via midi, and so on. There are cheap and very expensive solutions and the sky is the limit. Anyway, this article describes a flexible and cheap way to achieve A/B/C track referencing using just Cockos Reaper DAW and a standard external midi controller.

The principle is simple:

  • midi ctrl button A mutes all reference tracks, unsolos original track and starts playback: original track is hearable
  • midi ctrl button B solos reference track 1, unsolos all other tracks and starts playback: reference track 1 is hearable
  • midi ctrl button C solos reference track 2, unsolos all other tracks and starts playback: reference track 2 is hearable

Installation (Windows Version, but Mac should be similar ?):

  • Create three tracks in Reaper
  • Track “A”: the track you’re working on
  • Track “RF1”: the first reference track (must be named RF1 !)
  • Track “RF2”: the second reference track (must be named RF2 !)
  • Download Python and register python3x.dll in Reaper preferences. Hint: if it doesn’t work try to run Reaper as Administrator !
  • Save the attached Python scripts as play_not.py and play_rf1.py to a folder on your system. Best folder is the REAPER/scripts folder in your Windows profile
  • Copy play_rf1.py to play_rf2.py
  • Open Reaper Actions dialog and click on “ReaScript New/Load”. This creates a new Custom action. Open play_not.py
  • Do the same for play_rf1.py and play_rf2.py
  • Select the Costum action for play_rf2.py and click on “ReaScript Edit”. Edit line “refsig=”RF1” into “refsig=”RF2”
  • Assign the new three Custom actions to you favorite midi buttons or keyboard keys
  • Have fun and modify as you like.

HINT: it’s possible to add more reference tracks. Just create a new play_rfX.py Custom action for each reference track. Also it’s worthwile to mention that it’s possible to use e.g. the “RF1” track name for other tracks, too. In this case these tracks will be treated like reference track 1.

# Mute and unsolo all reference Tracks
# (C) Airmann 2/2013

refsig = "RF"
debug = False

# Unsolo all tracks
RPR_Main_OnCommand(40340, 0)

# iterate over all tracks and find reference track signature
numTracks = RPR_CountTracks(0)
i = 0
mute = 0.0
for i in range (0, numTracks): 

	# get track attributes
	tr = RPR_GetTrack(0,i) # 0 is current project !?
	name = RPR_GetSetMediaTrackInfo_String(tr, "P_NAME","", False)[3]	
	mute = RPR_GetMediaTrackInfo_Value(tr, "B_MUTE")

	if debug :
		RPR_ShowConsoleMsg("Name: "+name+"  MUTE: "+str(mute)+"\n")

	start = name[:2]

	if start == refsig:

		if debug :
			RPR_ShowConsoleMsg("FOUND SIGNATURE\n")

		# Switch Mute On
		if mute != 49.0 :  # why 49 ?
			if debug :           
				RPR_ShowConsoleMsg("MUTE ON\n")
			RPR_GetSetMediaTrackInfo_String(tr,"B_MUTE","1",True)				

	i += 1

# Play
RPR_Main_OnCommand(1007, 0)
# Play Reference Track 1
# (C) Airmann 2/2013

# reference Start Signature. Hint: length must be 3 chars. 
# Multiple tracks using signature are allowed (grouping)
refsig = "RF1"   
debug = False

# Unsolo all tracks
RPR_Main_OnCommand(40340, 0)

# iterate over all tracks and find reference track signature
numTracks = RPR_CountTracks(0)
i = 0
solo = 0.0
mute = 0.0
for i in range (0, numTracks): 

	# get track attributes
	tr = RPR_GetTrack(0,i) # 0 is current project !?
	name = RPR_GetSetMediaTrackInfo_String(tr, "P_NAME","", False)[3]
	solo = RPR_GetMediaTrackInfo_Value(tr, "I_SOLO")
	mute = RPR_GetMediaTrackInfo_Value(tr, "B_MUTE")

	if debug :
		RPR_ShowConsoleMsg("Name: "+name+" SOLO:"+str(solo)+"  MUTE: "+str(mute)+"\n")

	start = name[:3]
	if start == refsig : # Valid Signature ?	
		if debug :
			RPR_ShowConsoleMsg("VALID SIGNATURE: "+start+"\n")

		# Switch Mute On
		if mute != 49.0 :  # why 49 ?
			if debug :           
				RPR_ShowConsoleMsg("MUTE ON\n")
			RPR_GetSetMediaTrackInfo_String(tr,"B_MUTE","1",True)

		# Switch To Solo
		if solo != 50.0 : # why 50 ?
			if debug :
				RPR_ShowConsoleMsg("SOLO ON\n ")
			RPR_GetSetMediaTrackInfo_String(tr,"I_SOLO","2.0",True)							

	i += 1

# Play
RPR_Main_OnCommand(1007, 0)
Posted in Production, Software | 1 Comment

Best Of Amiga Demos 1988 video exceeds 10.000 hits

Wow,  I never thought that so many people are still interested in good old Amiga demo stuff. Not surprisingly, most of them are male and 35 years of age or beyond :). I compiled this video in 2006, but published it quite recently. Check it out. It contains some really wonderfull tunes from heros like Karsten Obarski et al. These guys laid the foundation of nowadays tracking scene.

Posted in Amiga, Videos | Leave a comment

Renoise tool AutoColors v1.02

Today I’ve released a new Renoise tool called “AutoColors”. It observes track names and automatically assigns colors to tracks by predefined filter rules. It’s comparable to Reapers SWS auto color extension. How it works is best explained by example:

  • E.g. filter is: kick, snare, hihat, drums -> color red
  • E.g. filter is: synth[0-9], lead -> color green

Now, if any track name contains the string “snare”. E.g. snare1, softsnare,hardsnare,… it’s color will automatically be changed to red. Beside this very simple filter, it’s also possible to define multiple filters using more complex filter strings that may include wildcards / regular expressions. For more details have a look at the PDF manual.

Download:
http://www.renoise.com/tools/autocolors

Source:
http://code.google.com/p/airmann-mixing-tools/

Screenshot:
autocolors

Posted in Production, Software | Leave a comment

Renoise driver for Presonus Faderport DAW controller

Renoise is a digital audio workstation (DAW) and Presonus Faderport a nice DAW hardware controller providing a motorized fader. Unfortunately there existed no Renoise driver for the Faderport. Thus I decided to develop a driver using the new Renoise LUA scripting interface.

faderport

Beside Renoise I also use Reaper DAW which already supports Faderport. Fortunately Reaper’s driver Code is open source, so I used it as tutorial and as a starting point. The resulting Renoise driver has more and slightly different features than the default Reaper driver. The driver inc. extensive PDF manual is available at Google code:

http://code.google.com/p/airmann-faderport-driver/

You also can download xrnx files via the Renoise tool browser:

http://www.renoise.com/tools/airmann-s-faderport-driver

Supported features

  • support of all FaderPort buttons, touch-sensitive motor fader, endless pan control and lights (full bidirectional communication)
  • Footswitch support for hands-free operation. You can connect an usual on/off footswitch to the FaderPort. Footswitch has the same function as transport play. It’s especially useful for hands-free recording of audio and midi data.
  • transport: play, play from position, stop, panic stop, forward, rewind, record / edit, loop, block loop, block loop forward/backward
  • track: mute, solo, select next track, select previous track, select master track, jump to song start / end, record sample
  • pre-fx / post-fx volume / pan, and any DSP device parameter can be controlled
  • currently selected track is automatically bound to FaderPort. Binding is displayed in status bar
  • currently selected device/plug-in etc. can automatically be bound to FaderPort
  • customizable navigation through device / plug-in parameters. Relevant device parameter lists can be defined via preferences. Presets for all native devices are included.
  • full automation envelope support: read, write, touch, latch mode
  • 10 bit high resolution (1024 steps) for fader values (allows for precise mixing)
  • endless pan control support with speed feature, adjustable virtual resolution (default 7 bit, 128 steps), auto down scaling and adjustable “anti-suck” protection
  • fader and pan controller can be swapped (e.g. fader controls stereo panning)
  • fader value can be reset to Renoise default value (e.g. volume to 0 dB)
  • fine trim mode: fader values can be fine trimmed via shift+pan control
  • switch between views: mixer, pattern editor, sample editor
  • sticky mode support: FaderPort controls can be sticked / bound to a specific track or device
  • undo / redo support
  • Renoise status bar support (displays parameter bindings and value changes

Watch these YouTube tutorials to get an idea about the Renoise-integration:

Posted in Production, Software, Tech Stuff, Videos | 2 Comments

Replot v0.3: a function based envelope generator for Renoise DAW

Today I’ve released a new external Renoise utility called “Replot”. It is a Java application which is based on the open source (GPLv3) FuncPlotter: http://funcplotter.sourceforge.net/ © 2005-2008 by Andy Morgan-Richards.

With RePlot you can define functions and value ranges. The values are copied as Renoise-compatible XML document into the clipboard. From the clipboard you can paste the values into a Renoise automation envelope. Just start Renoise, execute the jar file, open a function and paste the clipboard content into an automation envelope.

With this tool you can create alternative fades, crossfades, or nice oscillation curves, whatever. The sky is the limit. Just download the attached ZIP archive and start the jar file. There’s also a demo song included which contains different crossfade envelopes that were created with RePlot. It demonstrates the “equal gain crossfade” vs. “equal power crossfade”.

Hints:

  • Be warned: everything is pretty alpha status, so don’t expect too much ! It’s more a developer tool than a stable production tool
  • All functions have a comment with usefull information. Just open the comment view in RePlot (strg-m)
  • Inbuilt math functions are: ABS, ACOS, ACOSH, ACOT, ACSC, ASEC, ASIN, ASINH, ATAN, ATANH, CEIL, COS, COSH, COT, CSC, EXP, FLOOR, LG, LN, ROUND, SEC, SIN, SINH, SQRT, TAN, TANH, PLUS, MINUS, DB
  • the DB function is the Renoise dB-Function
  • for more information have a look at the FuncPlotter documentation
  • Not supported, right now: bipolar envelopes, quantum envelopes, other envelopes (LFO, instrument)

Download:
RePlot_0_3.zip
Demo song: equal_gain_vs_equal_power_ogg.zip

Screenshots:

crossfade equal gain sigmoid
crossfade equal gain sigmoid

crossfade equal power sin cos
crossfade equal power sin cos
a generated Renoise envelope
a generated Renoise envelope
damped sine
damped sine
Posted in Production, Software, Tech Stuff | Leave a comment