Showing posts with label acid-py. Show all posts
Showing posts with label acid-py. Show all posts

Monday, March 3, 2014

Feature Update

OK, so just a quick update on the current controller/interface and implemented features. Basically the system has 4 'pages', page one is for note entry, page two is for note tweaking, page three is a mixer, and page four is for changing the live playing pattern for any track from one place. Here is what we have done so far -


BTW, I'm using Google Docs for this kind of stuff, to-do lists etc.

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.


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.


Saturday, January 25, 2014

Full switch test

Ok, so I needed to check every switch and input to MakeyMakey in one go, bit of a mess but everything went ok. Using a lot of temporary clips and hastily crimped cables, but it is still a prototype of course.


Close up of the mess, I may not end up with these switches in the end but they are serving well at the moment.


Common ground, thanks to a bit of foil and some clips, does the job for now. I ran out of clips so part of the test I had to hold the bare wire to the foil, something else to solve down the line.


Here is the MakeyMakey with every available input in use, as far as I know, total of 18. The empty block at the top are the slightly mysterious outputs, the only use I think I may have for that in this project is another flashing led when input is detected but that's not important for now.


Wednesday, January 22, 2014

Prototype box

Well, while I figure out the layout and discover other things along the way (gonna need a bigger box), I used the plastic delivery box some of the bits came in to get things going.


Holes quickly measured and pushed through with screw driver and scissors, hmm should invest in a hobby drill, but for now...


Buttons quickly pressed through, couple of them wired up. Starting to take shape, remember this is just for me to explore the layout and if things work out I'll use this experience to improve the next version.


I also crimped a load of the wires and tested all the switches, more on that next time, but yeah not sure I'm going to be able to cram everything into this size, I know it looks fairly empty above but with the Pi, LCD, MakeyMakey, cables etc...

Saturday, January 18, 2014

Switches and wires

Well, some bits arrived in the post - wires and switches. This is basically everything I need, I think, to take human input and map that via MakeyMakey to functions in Acid-Py on the, erm, Pi.


I quickly hooked at some of the 'push to make' switches to MakeyMakey, using the clips. Once I have a prototype I need to worry about soldering but for now I need to be able to connect/move things about freely.


So with the basics proved, I've updated the software on-board MakeyMakey to map every available input (18 in total, afaik) to the keys I've laid out in a spreadsheet which shows what they are going to do in the software that will be running on the Raspberry Pi.


I tested each input quickly on the PC, so far so good. I didn't test every switch though, yet! The process of having the PC correctly recognize the MakeyMakey, get the Arduino software working, then patch/upload updated software was a little interesting; something for a dedicated post sometime.

Anyway, hope you enjoy the pics!