Showing posts tagged university

Ok so I have finished the code;

Here is the code for the computer based instructions for Your Music Taste On Canvas that I mentioned here.

If anyone is interested that is, the assignment is coded in the SCALA programming language, I have never coded anything before this subject so it’s really easy to pick up!

start

def start(): Unit = {

println(“****************************************************************”)
println(“*                  YOUR MUSIC TASTE ON CANVAS                  *”)
println(“****************************************************************”)
println(“Hello and welcome to Your Music Taste On Canvas!”)
println(“”)
println(“This very simple process will attempt to provide you with”)
println(“a visual representation of your taste in music!”)
println(“”)
println(“You will need: A camera, pen & paper, 5 paints (Green, Red,”)
println(“Blue, Yellow & Black) a small canvas and an iTunes Library.”)
println(“”)
println(“Simply choose a song on your iTunes and follow the instructions”)
println(“of the program. Once you have skipped 50 times you should have”)
println(“an artwork! Each time you skip be sure to write down the song,”)
println(“artist and photograph the canvas after you paint”)
println(“each shape or object!”)
println(“”)
println(“Where an object is ‘solid’ simply colour the entire shape in”)
println(“”)
println(“If you are ready to start press (a)”)

val choice: Char = readChar
if (choice == ‘a’) {
genre
}
else {
(“Try again”)
}

}

def genre(): Unit = {

println(“****************************************************************”)
println(“Please tell me the which of these genres best describes”)
println(“the current song!”)
println(“”)
println(“Rock/Alternative/Indie (a) Hip-Hop/Rap (b) Pop (d)”)
println(“Dance/Drum & Bass/Techno (e) Metal/Hardcore (f)”)
println(“”)
println(“Or, if you’ve skipped 50 songs we can end (g)”)
println(“****************************************************************”)

val choice: Char = readChar
if (choice == ‘a’) {
rock
}
else if (choice == ‘b’) {
rap
}
else  if (choice == ‘d’) {
pop
}
else  if (choice == ‘e’) {
dance
}
else  if (choice == ‘f’) {
metal
}
else  if (choice == ‘g’) {
end
}
else {
(“Try another input”)
}

}



def rock(): Unit = {

import scala.util.Random
val ran: Random = new Random()

val rai: Array[String] = new Array[String](5)
rai(0) = “paint a solid square”
rai(1) = “paint a wavy line”
rai(2) = “paint a solid triangle”
rai(3) = “paint a solid circle”
rai(4) = “paint two straight lines in parallel”

val loc1: Array[String] = new Array[String](5)
loc1(0) = “top left of”
loc1(1) = “top right”
loc1(2) = “middle area”
loc1(3) = “bottom right”
loc1(4) = “bottom left”

println(“In Green, you must ” + rai(ran.nextInt(5)))
println(“in the ” + loc1(ran.nextInt(5)) + ” of your canvas.”)

genre

}

def rap(): Unit = {

import scala.util.Random
val ran: Random = new Random()

val hhr: Array[String] = new Array[String](5)
hhr(0) = “paint a solid cicle”
hhr(1) = “paint a smiley face”
hhr(2) = “paint a solid star”
hhr(3) = “paint a solid square”
hhr(4) = “paint a dollar sign”

val loc2: Array[String] = new Array[String](5)
loc2(0) = “top left of”
loc2(1) = “top right”
loc2(2) = “middle area”
loc2(3) = “bottom right”
loc2(4) = “bottom left”

println(“In Red, you must ” + hhr(ran.nextInt(5)))
println(“in the ” + loc2(ran.nextInt(5)) + ” of your canvas.”)

genre

}

def pop(): Unit = {

import scala.util.Random
val ran: Random = new Random()

val pp: Array[String] = new Array[String](5)
pp(0) = “paint a solid star”
pp(1) = “paint a straight line”
pp(2) = “paint a solid square”
pp(3) = “paint a solid circle”
pp(4) = “paint a solid lightning bolt”

val loc3: Array[String] = new Array[String](5)
loc3(0) = “top left of”
loc3(1) = “top right”
loc3(2) = “middle area”
loc3(3) = “bottom right”
loc3(4) = “bottom left”

println(“In Yellow, you must ” + pp(ran.nextInt(5)))
println(“in the ” + loc3(ran.nextInt(5)) + ” of your canvas.”)

genre

}

def dance(): Unit = {

import scala.util.Random
val ran: Random = new Random()

val dab: Array[String] = new Array[String](5)
dab(0) = “paint a sad face”
dab(1) = “paint a solid musical note”
dab(2) = “paint a solid square”
dab(3) = “paint a solid circle”
dab(4) = “paint an exclamation mark”

val loc4: Array[String] = new Array[String](5)
loc4(0) = “top left of”
loc4(1) = “top right”
loc4(2) = “middle area”
loc4(3) = “bottom right”
loc4(4) = “bottom left”

println(“In Blue, you must ” + dab(ran.nextInt(5)))
println(“in the ” + loc4(ran.nextInt(5)) + ” of your canvas.”)

genre

}

def metal(): Unit = {

import scala.util.Random
val ran: Random = new Random()

val hxc: Array[String] = new Array[String](5)
hxc(0) = “paint a non-religious/satanic cross”
hxc(1) = “paint a zig-zag line”
hxc(2) = “paint a solid hexagon”
hxc(3) = “paint a solid square”
hxc(4) = “paint a solid circle”

val loc5: Array[String] = new Array[String](5)
loc5(0) = “top left of”
loc5(1) = “top right”
loc5(2) = “middle area”
loc5(3) = “bottom right”
loc5(4) = “bottom left”

println(“In Black, you must ” + hxc(ran.nextInt(5)))
println(“in the ” + loc5(ran.nextInt(5)) + ” of your canvas.”)

genre

}

def end(): Unit = {

println(“****************************************************************”)
println(“*         THANK YOU AND ENJOY YOUR ARTWORK!               *”)
println(“****************************************************************”)

}

For those of you who are interested;

I’m in the process of completing my Creative Arts major work, (due tomorrow, duh) and I will likely be posting the results on here at a later date. The assignment was to create a real-world artwork using virtual instructions. Whereby we code a set of instructions put forward by a computer, and then are acted upon by YOU.


My concept involves music and painting. I am giving you the ability to see your music taste on canvas, determined by genre and the computer programs ability to randomise an array of outcomes and locations on the canvas. The user must load their iTunes, and follow the programs instruction, which will be to skip fifty times on shuffle, each time recording the song, inputting the genre into the program, painting the requested outcome and photographing the canvas each time. Due to time and cost restraints I’ve had to scale it back considerably, but I feel the ability to enhance this concept is there and would provide interesting results.


The user must define the selected song to the genre it is closest to. This is the first instance of real world and cyber world clashing in the creation of an artwork. Each genre will have five outcomes randomly chosen from and matched with five possible locations on the canvas, top left, top right, middle, bottom left, bottom right. The user has control over the final definition of the selected songs genre, and the exact location of the required outcome to be painted.


The outcomes are (crude I know) as follows:


Rock/Alternative/Indie - Green in Colour

·       Solid square

·       Wavy line

·       Solid triangle

·       Solid circle

·       Two straight lines in parallel


Hip-Hop/Rap - Red in Colour

·       Solid circle

·       Smiley face

·       Solid star

·       Solid square

·       Dollar sign


Pop - Yellow in Colour

·       Solid star

·       Straight line

·       Solid square

·       Solid Circle

·       Solid lightning Bolt


Dance/Drum&Bass/Techno - Blue in Colour

·       Sad face

·       Solid musical note

·       Solid square

·       Solid circle

·       Exclamation mark


Metal/Hardcore - Black in Colour

·       Cross (non-religious/satanic a simple cross)

·       Zig-zag line

·       Solid hexagon

·       Solid square

·       Solid circle

(When I determine that an object is solid I simply mean to paint it fully coloured in, not 3D etc.)


After completing fifty skips, the user will have a list of fifty different songs, a collection of fifty different images of the canvas’ progress and a canvas with fifty shapes in five different locations and colours. Using the images and list I will create a stop-motion video of each step, spliced over each image I will place a small snippet of the song that created it, resulting in a video of fifty songs over fifty images documenting the creation of the users music taste on canvas. The reason I decided to add this step of my own manipulation is to ensure a greater audience of the final work and a great accompaniment to the completed real-world canvas.


Wish me luck guys!


Also, let me know if you’d be interested in taking part/further developing the concept with me at a later date.

(Source: dickismymiddlename)

Tonight I’m completing a part of my Creative Arts Assignment.

Which involves completing a instructional ‘artwork’ whereby I get my friends together and film us playing kings and completing ridiculous dares. Unilyf.

International Suit-up day, post motorbike riding and university.

Dressing for the weather, and my 5.30 tutorial.