Tuesday, February 25, 2014

New image

(Note: old post, published late, reference only)

Right, well, as Acid-Py is coming along I need to get it running on it's own SD card. I've hacked around on my 'main' SD card and I'm concerned I don't know how to do this from the ground up and I'd rather keep Acid-Py related stuff on it's own card that auto loads Acid-Py up, that kind of thing.

Also I want to set up a backup card and image it, that kind of stuff, I've been backing up the source code with WinSCP, but I need an image backup especially as Acid-Py now has auto load and shutdown, I think it's implemented in a safe way, but I heard about SD cards getting corrupted accidentally so better safe than sorry.

So, documenting the steps from the ground up, for my reference, but others may find something useful :)

Base install

Download and install the Raspbian OS to a new SD card

Download 2014-01-07-wheezy-raspbian.zip from:
http://www.raspberrypi.org/downloads

Prep the SD card and install the image using this guide:
http://elinux.org/RPi_Easy_SD_Card_Setup

Config bits, part 1 (on the PC)

Headless setup, so plug into router and connect with putty:
Check/find out the IP address using IP scanner

My putty profile has a few things disabled to make curses/tty work, esp. with numeric pad
Disable application keypad mode
Disable remote-controlled terminal resizing
Disable remote-controlled window title changing
Deselect X11 forwarding

Config bits, part 2 (on the Pi)

Login and run 'sudo raspi-config':
Expand Filesystem
Do User Password stuff
Exit and 'reboot now'

Login and check filesystem has expanded and we've got an IP address:
df -h
ifconfig

Update the distribution:
sudo apt-get update
sudo apt-get upgrade

Update the firmware:
sudo rpi-update
sudo reboot

Acid-Py and dependent stuff

Acid-Py

Copy over the source code and sounds using WinSCP

Adafruit i2c 16x2 LCD Pi Plate

sudo /etc/modules and add:
i2c-bcm2708
i2c-dev
sudo reboot

Python

SMBUS Python modules needed to talk to LCD:
sudo apt-get install python-smbus

Auto Login

sudo nano /etc/inittab
comment out "1:2345:respawn:/sbin/getty --noclear 38400 tty1"
add "1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1"
(note: won't auto-login putty session but does for standalone mode)

Start-up script to launch Acid-Py

Create acid_py_prompt.sh:

#!/bin/bash
echo "Enter . to run Acid Py, anything else to exit"
read myinput
if [ "$myinput" = "." ]
then
        echo "Start Acid-Py"
        sudo python acid.py
fi
        echo "End."
exit 0

Set to executable:
chmod +x acid_py_prompt.sh

Run that script at start-up:
nano ~/.bashrc
add "cd AcidPy" and
add "./acid_py_prompt.sh" to the end

After testing, create a backup image:
win32diskimager
name your image file
be sure to select the right input device (your SD card)
press "read"

Useful Links

Adafruit LCD
http://learn.adafruit.com/adafruit-16x2-character-lcd-plus-keypad-for-raspberry-pi/usage

Future?

overclock in favour of CPU (headless)

See it, hear it

Right, well I've delayed long enough, and I am always guilty with these projects of not actually sharing what things sound like. So, here is a quick lo-res video of the thing in action at this point in time.


...and a pic of the lot to muse over and try to guess what's going on in the UI...


Friday, February 21, 2014

Filters and keypads

Right, well the "FX" chain of the Acid line is going to pass through distortion and a filter. Finding small/cheap things to cram into a box at some point is difficult and a little expensive. However, in terms of keeping everything as components to break out for future projects, and for other use, I finally had an excuse to buy a Monotron.

I want the MS-20 filter for this project, and it has audio in to do that, but having just had a noodle around with this it's a cool piece of kit in it's own right. Plus it's small, light, and battery powered. Need to test it properly but here it is fresh out the box.


In terms of controls, firmly set in the idea of a numeric keypad now, but I had some headaches with the first one (a little bit self induced) but anyway I've gone in for a slightly odd pad found on Amazon that has no numlock but instead has a tab button. I can easily map all of these in Python using curses and it's leading me down a minimal design for data entry and UI navigation.

I've made a sheet in Google docs to start to map out the functions, here's the template, waiting for the post to turn up and to actually try the pad, hope it works with Linux.


Monday, February 17, 2014

On the case...

Ok, so while I want to get everything contained in one box at the end, I'd like to keep the main parts as self contained components, within reason; so I picked up a wonderful extension to the Pibow case on eBay which gives extra protection to the LCD and seals the Pi and LCD together nicely.


I also ordered a case for the MakeyMakey, long overdue as I was always very careful handling the board directly, but now I can use it and not worry too much about damage.


This clear case also leaves all the various points exposed. Ironically I may not be using the MakeyMakey in this project (it has many other uses so it isn't a waste), I'm starting to favor a USB numeric keypad to get around the whole pain and size of housing cables and switches everywhere, as fun as that's been, it's getting in the way now.


Saturday, February 8, 2014

Messy and tidy

This is messy. I know I didn't cut the cables, I know I didn't solder, and the result is this rather fine looking mess that is much simpler than it looks. Anyway, made me label things up and work stuff out, so served its purpose.


This is tidy. It's a rather nice pill box that is actually a two channel passive mixer. So it takes two audio inputs and blends them into one output. Ideal for this project as I'm going to include some kind of dismantled effects pedal and need a way to merge sounds without the overhead of an actual mixer. It's tiny (see the 2p top right), lite, and no batteries, awesome.


Friday, February 7, 2014

It's alive!

Well, first prototype is complete. Below is the rather larger than planned controller, the Pi with LCD running the software, and a speaker, all connected up and running together for the first time.


Close up of the software, plenty of refinement to be done, but the basic UI does it's job, shown here the top row is the current track and you can see a bunch of notes in there. The line underneath is a summary of track, buffer, octave and a few other things, really just a debug output for now but you get the idea.


Ah the delivery box turned controller in all it's hacked-together glory. Well, this taught me roughly what controls I need, how they might hang together, that push-to-make works fine with makeymakey and a bunch of other things about crimping and cables. I'm not sure I'm going to progress with these chunky buttons for the next revision.