21 December 2010

Positive About Negative Aberdonian Crusty

NOTE: I edited this a couple of times around 22:16, on 21 December 2010, and the morning of the 22nd.

I wrote a song. Give it a listen!

It's a happy blues song about crust music in Aberdeen.

For the benefit of a couple of friends, here are the tabs:


Positive About Negative Aberdonian Crusty
By John Morrice 2010

This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/3.0/ or send a letter to
Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.

Hi guys!

Tuning is a half step down, Eb Bb Db Gb Bb Eb
Time signature is 6/8 for most of the song, but 4/4 at the end.

Notation:

Next bar: |
Hammer on: h
Pull off: p
Don't play this string: x

Notes:
* I skimp on some work by just saying what chord to play for that part.
* The chords used are given at the end of this file.
* Always listen to the song for the rhythm.
* This tab file does not describe the songs structure, only its riffs.
* I know I wrote the bloody song but these tabs may still not be perfect.

Verse:

Eb|-------------0---------|-------------0-----0-
Bb|---------0h2---2p0-----|---------0h2---2p0---
Gb|-------0---------------|-------0-------------
Db|---0h2-------------2p0-|---0h2---------------
Ab|-0---------------------|-0-------------------
Eb|-----------------------|---------------------

Eb|-------------0---------|-------------------------
Bb|---------0h1---1p0-----|-1p0h1p0h1p0h1p0h1p0h1p0-
Gb|-------0---------------|-------------------------
Db|---0h2-------------2p0-|-------------------------
Ab|-3---------------------|-------------------------
Eb|-----------------------|-------------------------

Eb|-------------0---------|--------------0-----0-
Bb|---------0h2---2p0-----|----------0h2---2p0---
Gb|-------0---------------|--------0-------------
Db|---0h2-------------2p0-|---0h2----------------
Ab|-0---------------------|-0--------------------
Eb|-----------------------|----------------------

For the last two bars, strum Gb6 (see the end of this file)

Chorus rhythm part:

Strum

Ab7
Ab7
Gb6
Cb7

Chorus lead part:

Eb|-9p7---9p7---9p7---9p7---9p7---9p7---9p7---9p7---
Bb|-----8-----8-----8-----8-----8-----8-----8-----8-
Gb|-------------------------------------------------
Db|-------------------------------------------------
Ab|-------------------------------------------------
Eb|-------------------------------------------------

Eb|-----3------3------3------3-
Bb|-3h5----3h5----3h5----3h5---
Gb|----------------------------
Db|----------------------------
Ab|----------------------------
Eb|----------------------------

Back into verse, let ring
Eb|-------------------------|--
Bb|-------------------------|--
Gb|-3p0h3p0h3p0h3p0h3p0h3p0-|-0
Db|-------------------------|--
Ab|-------------------------|--
Eb|-------------------------|--

"Solo", on top of the chorus, goes something a little like:

Eb|-------------------------------------------------
Bb|-------------------------5-5-5-5-5-5-5-5-5-5-5-5-
Gb|-7-7-7-7-7-7-7-7-7-7-7-7-------------------------
Db|-------------------------------------------------
Ab|-------------------------------------------------
Eb|-------------------------------------------------

Eb|-------------------------------------------------
Bb|-------------------------------------------------
Gb|-------------------------5-5-5-5-5-5-5-5-5-5-5-5-
Db|-7-7-7-7-7-7-7-7-7-7-7-7-------------------------
Ab|-------------------------------------------------
Eb|-------------------------------------------------

Eb|-------------------------------------------------
Bb|-------------------------------------------------
Gb|-------------------------------------------------
Db|-------------------------5-5-5-5-5-5-5-5-5-5-5-5-
Ab|-7-7-7-7-7-7-7-7-7-7-7-7-------------------------
Eb|-------------------------------------------------

Eb|-------------------------------------------------
Bb|-------------------------------------------------
Gb|-------------------------------------------------
Db|-------------------------------------------------
Ab|-5-5-5-5-5-5-3-3-3-3-3-3-------------------------
Eb|-------------------------5-5-5-5-5-5-5-5-5-5-5-5-

End part is in 4/4 and goes:

Ab5
Gb5
Cb5
Db5

That's it!

The chords:

Ab7
Eb 0
Bb 2
Gb 0
Db 2
Ab 0
Eb x

Gb6
Eb 0
Bb 3
Gb 0
Db 0
Ab x
Eb 3

(Weird) Cb7
Eb x
Bb x
Gb 3
Db 5
Ab 3
Eb x

Powerchords (Fifths)

Ab5
Eb x
Bb x
Gb x
Db 2
Ab 0
Eb x

Gb5
Eb x
Bb x
Gb x
Db x
Ab 5
Eb 3

Cb5
Eb x
Bb x
Gb x
Db 5
Ab 3
Eb x

Db5

Eb x
Bb x
Gb x
Db 7
Ab 5
Eb x

Have a lot of fun :)

7 December 2010

Wireworld

On my quest for enlightenment, I have completed the Wireworld cellular automaton task on Rosetta code. Smalltalk wasn't on the list, so I gave learning GNU Smalltalk a try, and I experienced some success in this!

I find cellular automata fascinating. It's just the biological nature of it - that it can grow, and where there was previously no life, something suddenly exists! I digress, but there are interesting applications for more traditional mathematics (like finding the contour of the graph).

However, my solution is a bit big - in fact, it's written in both Smalltalk and C, and generates animated GIFs.

Wireworld animation

Also I wanted to write a nice flexible bit of software in Smalltalk, to learn it properly and to find why those in my books rate it so highly, so aye, it grew a bit.

Anyway, here is the README so you can find out about it, with an additional link to the source added there.


NAME
jwgif - Johnny's Wireworld GIF creator.

ABOUT

jwgif is a simulator for the Wireworld cellular automaton. It renders to an animated GIF,
which it sends to stdout.

REQUIREMENTS

gcc
GNU Plotutils
GNU Smalltalk

COMPILATION

./compile.sh

USAGE

jwgif FILENAME GENERATIONS WIDTH HEIGHT SQUARESIZE

OPTIONS

FILENAME is a path to a Wireworld file - see WIREWORLD FILE FORMAT below.

The following must be positive integers:

GENERATIONS determines the number of frames produced.
WIDTH the width of the output GIF, in pixels.
HEIGHT the height of the output GIF, in pixels.
SQUARESIZE the size of the square cells, in pixels.

EXAMPLE

./jwgif arena/cyc3inhib.ww 200 110 50 10 > 3cycle.gif

WIREWORLD FILE FORMAT

Wireworld is a cellular automaton with some similarities to Conway's Game of Life. It is
capable of doing sophisticated computations (e.g., calculating primeness!) with appropriate
programs, and is much simpler to program for.

A wireworld arena consists of a cartesian grid of cells, each of which can be in one of
four states. All cell transitions happen simultaneously. The cell transition rules are this:

Input State Output State Condition
empty empty
electron head electron tail
electron tail conductor
conductor electron head if 1 or 2 cells in the neighborhood of the cell are in the state “electron head”
conductor conductor otherwise

A Wireworld program can be stored in a file using the following notation:

"H" for an electron head
"t" for a tail
"." for a conductor
space for empty.

Here is an example program, which demonstrates two cycle-3 generators and an inhibit gate:

tH.........
. .
...
. .
Ht.. ......

The output for this program is included with the jwgif distribution, with the file name 3cycle.gif

jwgif uses the following convention for colouring cells in the output GIF:

An electron head is red.
A tail is blue.
A conductor is green.
Empty cells are black.

This section was ripped off from http://rosettacode.org/wiki/Wireworld on 6th December 2010. Thanks guys!

LICENSE

jwgif is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

jwgif is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with jwgif. If not, see <http://www.gnu.org/licenses/

Studying

So I got CARPS text mode stable, and I have plans to create a graphical version.

At 10ksloc and with client, server, superserver, use of maths and support for modding, it is the largest and most complex project I've forced to stagger into some sort of fruition. And I faced so many problems, encountered so many things, and I learned this:

I suck! Oh god, I suck. There are so many reasons why I suck, and thankfully I have learned some of them.

So I had a bit of a think, and decided that before I do any more development on this, I really need to improve. I really like the Rosetta Code website! It challenges you to solve tasks in a language of your choice. So I'm going to spend my time learning some new languages, and solving some interesting problems.