Aug 20, 2015

Akai’s MPC series are great for some hands on, out-of-the-box immediacy. The MPC1000 has a USB port, which will mount as a standard external volume. You can use it to quickly load samples, programs, and sequences.

MPC Maid is a handy Java app for editing programs if you like a GUI.

MPCs prefer .wav and .aiff files in 16 bit / 44.1 khz format. If you’ve got a big sample library, it can be tedious to convert audio files to this format. Here’s a script that uses the FFMPEG utility to convert an entire folder of samples to 16/44.1.

Usage is $ bash convert.sh ~/path/to/folder
Use at your own risk.

#!/bin/bash

BLUE='\033[0;34m'
NC='\033[0m'

cd $1

echo
printf "${BLUE}These files will be converted to 16bit 44.1khz and saved to $2${NC}"
echo Invalid files will be skipped.
echo
for i in *; do
	if [[ $i == *".wav"* ]]
	then
		echo $i;
	fi
done
printf "${BLUE}"
read -p "Continue? (y or n) " CONT
printf "${NC}"
if [ "$CONT" == "y" ]; then
	mkdir "$1"/converted
	for i in *; do
		if [[ $i == *".wav"* ]]
		then
			printf "Converting $i... "
			ffmpeg -i "$i" -ar 44100 -ab 4k "$1"/converted/"$i"
			printf "${BLUE}"
			echo "OK."
			printf "${NC}"
		fi
	done
else
	echo "Conversion canceled";
	exit 0;
fi

echo Done!
Aug 1, 2015

The quest for the ultimate control surface never ends. This quest has brought me to the Vestax VCM-600, which is very close to what I need. The built-in MIDI Remote Script in Live 9.2 is nice, but there is some functionality I’d like to have, and other functionality I don’t need.

I’ve been able to recreate much of the functionality I want with Max for Live. It works, but it’s clunky. A custom remote script would be much better.

The remote scripts in Live are compiled Python scripts. Julian Bayle has kindly provided a repository of these scripts, decompiled for our convenience. However, it seems that due to the version of Python Live uses and the version of Python that was used to decompile these scripts, there are some syntactical errors that prevent the scripts from compiling properly.

Three scripts for the VCM-600 did not work: MixerComponent.py, TrackEQComponent.py, and ViewTogglerComponent.py. Live’s startup log (~/Library/Preferences/Ableton/Live 9.2/log.txt) recorded similar errors for these scripts:

8800 ms. RemoteScriptError: raise index in range(len(self._track_eqs)) or AssertionError

8800 ms. RemoteScriptError: TypeError
8800 ms. RemoteScriptError: :
8800 ms. RemoteScriptError: exceptions must be classes, instances, or strings (deprecated), not bool

Here’s the stanza in MixerComponent.py containing the line the error points to:

def track_eq(self, index):
        raise index in range(len(self._track_eqs)) or AssertionError
        return self._track_eqs[index]

I know little Python, but after some light reading, it seems that the syntax was incorrect for the version of Python Live 9.2 uses. Using ‘assert’ instead of ‘raise’ solves the problem and the script compiles properly:

def track_eq(self, index):
        #raise index in range(len(self._track_eqs)) or AssertionError
        assert index in range(len(self._track_eqs)) or AssertionError
        return self._track_eqs[index]

Feb 1, 2015

Nov 23, 2014

We had a party last weekend and one of the RCA cables went out on a turntable. The pop up light has also been broken forever. Since the deck must be disassembled anyway, why not give it some TLC?

This weekend, we will be replacing the old yellow neon pop up light with a white LED. Thanks to Viperfrank on Youtube for providing a base with his tutorial videos.

To convert the pop up light to a LED you will need the following items:

  • A 3mm LED of your favorite color
  • A 7508 voltage regulator
  • A resistor, 200-1.5k ohms, depending on how bright you want your LED to be
  • Black and red stranded wire
  • Small and large screwdrivers
  • A soldering iron, solder, and braid
  • Heatshrink tubing or electricians tape
  • A towel or pillow
  • Some perfboard or busboard
  • Helping hands (nice to have)

Here is the deck in question. It’s a Technics SL-1200M3D. As you can see the deck needs some love. The record on the platter is Chris Vareland – Universal Language EP.

popup0popup1
popup2popup3

The very first step is to remove your cart and secure the tonearm, and carefully remove the platter. Heed the warning sticker’s suggestions. After removing the platter, carefully remove the plastic shield. Take care not to lose or misplace the screws.

popup4popup5
popup6

Removing the shield will expose the main PCB, motor, spindle, power supply, and other components. At this point you can use compressed air to remove any detritus.

popup7popup8

Flip the deck over onto the towel or pillow. Take extreme care to position the towel so that the weight of the deck is not resting on any components of the tonearm assembly. Remove the feet.

popup9popup10

There are 21 screws, all of various length. Make note of their positions and remove them. You can then sort of peel the rubber base away from the plastic case. The pop up light assembly is held in place by 2 screws.

popup11popup12

+5 and ground wires go directly to the neon bulb from the main PCB. The pop up light assembly is pretty neat. It is activated by means of a bolt that pushes a leaf switch. It works in a similar fashion to a clicky pen.

popup13popup14
The resistor measured to be 1.46k ohm. Its placement suggests it may be a pulldown resistor.

popup15popup16

The voltage regulator is necessary because the original neon lamp uses about 20v. 20v will immediately fry a typical LED. We could put a larger resistor inline with the LED, but I think this is a better solution because we can be sure we will always get clean 5v to the LED. The LEDs are typical super bright 3mm LEDs. You could also use 5mm LEDs of any color. They are rated for around 3-4v, so we must use a resistor. Take note of the tiny screw that attaches the top of the assembly to the base. Do not lose this screw.

popup17popup18

Remove the top of the assembly and clip any wires as close to the switch as possible, so we can preserve the length going to the connector. Pull the old neon light straight out. Save it for a future project if you would like. Take note of how this is disassembled these parts. You will need to reassemble it in exactly the same order.

popup19popup20

Desolder the resistor and use some solder braid to clean up the switch. I decided to save this resistor for reuse since when paired with the LED, the brightness was sufficient.

popup21popup22

Here is a rough schematic of the circuit. I had some scrap prototype PCB in my parts box, so I decided to make a small board for this project. I cut the piece with a Dremel. You can also simply solder the wire directly to the voltage regulator. As you can see, the resistor is inline with the LED, the LED is connected to the output voltage and ground on the regulator, and the main PCB is connected to the input voltage and ground on the voltage regulator. The wires are soldered directly to the LED, and I used some extra housing and electrician’s tape in lieu of shrink tubing to insulate the wires. You can also use shrink tubing, and it is probably a better option.

popup23popup24
popup25

The most difficult part of this project is snaking the LED wires through the pop up light housing. It is necessary to remove the small bolt so you can access the whole housing, and then use whatever technique you like to carefully thread the LED and wires, and reassemble the pop up light. You remember how you took it apart, right?

popup26popup27
popup28popup32
popup33

Now that we have the whole thing assembled, let’s give the voltage regulator some voltage and see what happens.

popup34

If it works, the next step is to include the switch. Clip one of the wires near the switch terminals, and solder so that the switch now interrupts the wire. Test again to make sure the switch works. If the LED is not centered, you can remove the tiny screw, rotate the pop up light housing until the LED points in the right direction, and then replace the tiny screw.

popup35popup36

Finally, replace the pop up light housing. Snake the cable assembly back near the main PCB connector as needed. My wires were a little too short, so I routed them underneath the main PCB. There is a little room available on a heatsink near the top of the main PCB where you can conveniently mount the voltage regulator.

popup36popup37

Put your deck back together.

popup39popup40

Looks pretty good in the dark. I may adjust the angle of the LED up a little more, but the color and brightness are spot on for my tastes.

popup41popup42

In the future, I may revisit this mod and replace the long wires since they are subject to some mechanical stress from the movement of the switch, adding some heatshrink and giving them some more slack. Adding connectors instead of directly soldering wires to the components might also be better in case the part needs to be replaced again someday.

Next time, we will replace the built in RCA cables with jacks, and possibly add an internal ground. If you know someone who can cut 14g sheet metal into discs, please send me an email at fred at fake computer music dot com.

Nov 20, 2013

I scooped up an Akai APC40 on Craigslist for $80. The seller said he worked for a live production company and was using it to trigger lighting scenes before it stopped working. Plan A is to fix it and sell it. Plan B is to cannibalize the APC for parts and reuse them for prototyping. Here are pictures of the teardown and internals.

The bottom of the APC40 has a bunch of screws. Some of these screws are under the plastic feet on the front edge of the unit After removing the bottom casing, there are more screws securing the PCB to the top casing. These screws are coarsely threaded into plastic, so care was taken when removing and inserting them as to not strip the threads.

The button pads are a decent translucent material. They are secured by their weight and by some plastic posts.

The square button pads are 15mmx15mm, and the rectangular ones are about 15mmx7mm. Each button connects using the 4 pieces of conductive material on each corner. Underneath each pad is a bi-color orange/green SMD LED.

I assumed the rotary controls were encoders, and that these were just strange with 4 pins. It turns out they are actually endless rotary potentiometers. The model is “OB2.5k”, presumably a 2.5k endless dual potentiometer.

The line faders appear to be typical slide potentiometers. The model is “10KB2X2”, presumably a standard 10k slide potentiometer.

There are 16 SMD LEDs surrounding all but the Cue Level pot. The LEDs are brought to the top panel using light pipes (clear plastic tubes), arranged in a circular array. These light pipe arrays seem to be a custom part built for Akai.

On the front panel, there are translucent and solid buttons. The buttons snap into the PCB. The edge of the button touches a tactile switch soldered to the PCB. The tactile switches have a satisfying click to them. The button caps are custom built for Akai, but http://www.mpcstuff.com sells replacements of slightly different material.

There is enough room under the buttons for a through-hold 3mm LED to be mounted. The LED is soldered through the board and the height increased using a spacer. The switches appear to be compatible with Omron B3F-1000, with a 4.3mm plunger height.

The main chip presumably managing all the top panel controls and LEDs is a Lattice LCMXO256C FPGA. The other chip is a Texas Instruments AHCT541octal buffer/line driver. The line buffer might protect the FPGA from high currents required by all the LEDs.

There are a total of 3 pairs (only 2 pairs are pictured) of Texas Instruments 74HC4051 shift register chips. Since there are so many inputs (controls) and outputs (LEDs) on the top panel, each pair of 4051s may be multiplexed, their states controlled by the FPGA.

The top panel PCB is connected to the larger PCB using a 50 pin FFC cable. Another cable using a 10 pin rectangular connector is also used. The FFC cable likely carries data, while the other cable may carry just voltages (The faulty USB jack has been removed, and R36 and R37 have burnt off).

The sticker on the microcontroller reveals that this APC is running version 1.02 of the software, released on August 6th 2010. The first number may be an internal part number. The main chip is a STMicroelectronics STM32F102. This chip uses a Cortex-M3 core. The maximum speed is 48mhz and this particular model (RBT6) appears to have 128kb of flash memory, 16kb of RAM, 51 general I/Os, and 16 A/D converters (according to the manufacturer). It likely runs on 3.3v.

The left side of the main PCB contains all the necessary power components, including a typical 7805 voltage regulator and the rectangular connecters that probably provide power rails to the front panel PCB.

The right side of the main PCB contains connectors for data. The two large TRS jacks connect to foot pedals and the FFC connector connects the data lines of the main PCB to the front panel PCB. There is also a 20 pin JTAG connector.

May 31, 2013

At this point, the main board and code has been tested. The next step is to return to the original concept: Modularization.

In an attempt to further modularize the controller, and reduce the complexity of the wiring in the case, it was necessary to make modifications and build custom connector interfaces.

The Sanwa OBSN-24 buttons used in this controller are durable, easy to mount, and simple pushbuttons. The only problem is that they require blade connectors, which can be problematic for attaching pin headers. Instead, a slight modification makes them fit nicely into a small piece of protoboard.

The pushbutton has only two connectors, but we need three:

  • 1. Ground
  • 2. Signal
  • 3. Ground (Through to next control)

This will enable us to daisy-chain the ground to each pushbutton, thereby reducing the wires needed in the case.

First, the blade connector was cut in half with a pair of wire cutters.

Then, each half was cut down to the size of a normal pin using a Dremel.

Next, the pins were carefully bent so they fit into a small piece of protoboard.

Finally, the modified pins were soldered into the piece of protoboard.

Here are 4 modified pushbuttons with right angle pin headers attached. They are mounted to the front panel.

Then next post will contain information about emulations of the “Combo LED Knobs” like on the Pioneer DJM-350 mixer.

May 6, 2013

The wiring is complete. As you can see, there are many jumpers on the bottom of the board to bring the analog inputs of each multiplex chip to the edge of the board so it will fit nicely in the case.

The single jumpers running perpendicular to the rest supply the microcontroller with analog data from the multiplex chips:

Here is a close up shot of the board. Right angle pin headers have been soldered in and bent to a 30 degree angle to accomodate the length of the plastic connectors for the pushbuttons. Vertical pin headers do not fit since the case is only 3″ high.

The next post will detail the wiring of the buttons and potentiometers.

May 6, 2013

It was necessary to add another CD4067BE multiplex chip to the board to accomodate additional analog inputs (faders and potentiometers). So the layout of the board had to be adjusted and additional wiring added.

Here is the new version of the board with PCB sockets and +5v/ground wires installed:

Board v 2.0

Multiplex chip wiring detail:

The large bundle of green wires send a binary digit to the pins, telling them which analog pin to read and send back to the microcontroller. Since the microcontroller sends the same data to each chip simultaneously, the wires can “daisy chain” off each other:


(It’s a little cluttered)

Here is a shot of the board with all wires connected. A single multiplex chip is seated in its socket. Along each edge are 2.54mm right angle pin headers. These pin headers are necessary to connect the analog inputs of each multiplex chip to an analog control (potentiometer).

Since there will be so many wired connections from the analog input pins of each multiplex chip, it is necessary to use the bottom of the board. Here, one chip is connected via jumper cables. (The other half of the chip is soldered to the board, directly connected to the right angle pin headers):

Here, two multiplex chips are wired to the right angle pin headers at the end of the board. The single wires running almost perpendicular bring analog data to the microcontroller:

The next post will contain more pictures of the final build, as well as a short video of some of the controls in action.

Feb 13, 2013

A while back, Fuzzy Wobble outlined the construction of a MIDI controller, and is even building a brain for the Teensy++. This brain should prove very useful when it is released.

In the meantime, something similar must be built.


(Sharp eyes will notice that Chip A is soldered into the wrong pins. This has been corrected.)

Version 1.5 of this brain includes a slightly cleaner layout than the original. Standoffs raise it up a few millimeters, while right angle header pins connect the necessary controls without increasing vertical space requirements.

The Teensy++ only has 8 analog inputs, and this project requires quite a few more, a multiplex chip is used to read analog input and send it to the microcontroller. The Texas Instruments CD4067BE multiplex chips provide 16 analog inputs/outputs per chip, while only requiring 1 analog and 4 digital per chip to the microcontroller.

The code for the multiplex chip sends a binary digit via pins ABCD, querying the state of the appropriate pin. The chip then sends the analog value to one of the microcontroller’s analog inputs. This happens very quickly, of course. The microcontroller’s job is to convert that analog data into useful MIDI data. It is briefly described in the code.

Please feel free to use this code in your own project, or continue following. Future posts may be easier to understand.

Psuedocode:
>Send binary 0000 to the mux chip
>Receive analog data from pin 0
>Send binary 0001 to the mux chip
>Receive analog data from pin 1
>(repeat for all pins, and loop)

Actual code:

/*-----------------------------------------------------------------------------------
Pot Mux Module

This sketch is based on Skot McDonald's code, found at http://artifactory.org.au/ .
It is also based on example sketches from http://www.arduino.cc .

It tells a CD4067BE analog multiplexer to send data from 1-16 analog sources (knobs)
attached to a single analog input. It then sends usb midi data out, with each knob
assigned CC# based on the sequence in the cc4knob array.

Be careful if you use an "Auto Format" function, as it breaks the arrays!

http://www.fakecomputermusic.com
-----------------------------------------------------------------------------------*/

//Sets up which pins are used
#define muxPinA 10
#define muxPinB 11
#define muxPinC 12
#define muxPinD 13
#define analogReadPin 38

#define midiChannel 1

// Sets pot smoothing tolerances
#define sensorTolerance 16
#define ccTolerance 2

int knobAmount = 3; //How many knob are available. Don't forget to change the array!
int cc4knob[3] = {1, 2, 3}; //CC1, CC2, CC3 ...

//example for 16 knobs:
//int cc4knob[16] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};

int ccValue[8]; // Value of the knob (MIDI CC range: [0,127]
int sensorValue[8]; // value from the analog input (Analogue Input range [0,1023])

// Sets inital values for bitReads
int r0 = 0;
int r1 = 0;
int r2 = 0;
int r3 = 0;

//==============================================================================
void setup()
{
// Setup the 4 input selection control pins
pinMode(muxPinA, OUTPUT);
pinMode(muxPinB, OUTPUT);
pinMode(muxPinC, OUTPUT);
pinMode(muxPinD, OUTPUT);

pinMode (analogReadPin, INPUT);

Serial.begin(9600);
}

//==============================================================================

void loop()
{
for (int i = 0; i < knobAmount; i++) { // Loads values into "r" variables r0 = bitRead(i,0); r1 = bitRead(i,1); r2 = bitRead(i,2); r3 = bitRead(i,3); // Writes bits to each pin, based on "r" digitalWrite(muxPinA, r0); digitalWrite(muxPinB, r1); digitalWrite(muxPinC, r2); digitalWrite(muxPinD, r3); int newSensorValue = analogRead(analogReadPin); // Smoothing if (abs(newSensorValue - sensorValue[i]) > sensorTolerance) // Checks to see if knob has been moved
{
sensorValue[i] = newSensorValue;
int newCCValue = sensorValue[i] / 8; // Divides value by 8 for MIDI (0-127)

if (abs(newCCValue - ccValue[i]) > ccTolerance)
{
ccValue[i] = newCCValue;
usbMIDI.sendControlChange(cc4knob[i], newCCValue, midiChannel); // Sends USB MIDI
} //if abs(newCCvalue...
} // ifabs(newSensorValue...
} // for knobAmount...
} //void loop

Jan 5, 2013

New DJ mix completed

Right click to download:
“126 bpm Ought to be Enough for Anybody”

Tracklisting:

  1. Kimeko – High
  2. Midwest Express – Lickin Shots (Kinky Movement Mix)
  3. Dino Lenny, Harddrive – A DJ Deep Inside (Pirupa Dub)
  4. Giano – King Of The Scene (Original Mix)
  5. Metro Area – Honey Circuit (Original Version)
  6. Jimmy Edgar – Heartkey (Original Mix)
  7. Tiga – What You Need (A-Trak Remix)
  8. AIMES – Step Away (Chordashian Remix)
  9. Marcus Schössow & Thomas Sagstad – Moog Me
  10. Lifelike, Popular Computer – Getting High
  11. Kap10Kurt – Speed Demon (Justin Faust Remix)
  12. Mimo – Running Out (VEGA Italo Dub Remix)
  13. Marc Fisher – Flamingo Disco (Mike 303 Superfunk Remix)
  14. Hercules And Love Affair – Release Me (Remix By Andrew Butler And Mark Pistel)
  15. Alex Terzakis – L’amour Toujours (Back In Paris Remix)
  16. Mittekill – Schlangen (E-Kreisel’s Errorbig Remix)

This is a promotional mix. It is not for sale.
All tracks copyright their respective owners.