Void in publicCreative Coding

Intro

This blog is dedicated to my Creative Coding course, where I am going to visualize my learning progress during the studies. I will use this blog as my notebook where I will comment each week tasks and lectures. 

#Term 1

Week 1

The first lesson was dedicated to the explaining of how can we communicate through codes like:


Morse

This code can be used by variety of ways - Light, Sound, Electronically


Lines and dots resemble the length of the signal. The gap resembles the pause between signals.


Semaphore


The same technology can be applied to the Semaphore. By having a definite position of flags we can interpret a letter which is hidden in the code (flag position)

Flags

Flags which are used in the marine field. Each flag covers a situation/message on the ship.

Braille


Can be interpreted as a code, simply because group of dots resembles the letter

Bar (code)

QR (code)


Drum Patterns

This code variety has been used in ancient times to send a message over a distance or to control the army.

Smoke


This code was used a long time ago to send a message over a huge distance. 

Lights/fires

The Same technique is used by using lights and fires. 

This lesson was more like a refreshing trip through my memory. It was nice to remember some books which I have been reading while being in the school about ships and navigation.

Week 2

This lesson was way more informative and covered many fields I have never heard about. We have discussed how the software and computers influenced artists to experiment to create visuals or musical performances created using the computer technology. We also have experimented within groups with a self-made code to make another group to follow the instructions to complete the code. I have also downloaded a Cybernetic Serendipity music album to get a better understanding what it might be and to be honest, didn't really enjoy it. 

We have been watching John Cage performance called "Water Walk" which was quite funny as the unexpected actions were making some sort of a humor. At least for me. 

 

Week 3

Today we have been using a software for making noises called Sonic Pi. Basically, it is the software in which you can create sounds (not so often a music, much widely - noise) like in any other software designed for music production. As I am familiar with FL studio, I was a little bit confused why do we need to make a music in such a perverted manner. The difference is that you are writing a code instead of pushing and rotating knobs to tell the computer what to do with your settings. It was a quite interesting experience and we quickly got immersed in this software. We had a little bit of a tutorial how to produce our first beep (at this moment I started to be super skeptic about this course)

Sonic Pi interface. Here you can see how this software looks and how to make it produce a sound. We had a practice session so we could experiment with different codes by using the "HELP" tab where all the tutorials and explanations for each code are hidden to be found. 

Week 4

Today we strengthened our knowledge of Sonic Pi to become maestros of a code created music world. We disassembled the interface of this magic window to understand where to click and when during our presentations, which are going to be marked as well. Having a background in music production this lesson was very easy to me so I don't even have nothing to mention about it. We have been discussing envelopes, release, attack, and bunch of other designations of particular actions.

Week 5

Here we go. After such a short period of learning this software, we are invited to perform in the front of the class with our musical masterpieces. For myself, I have already noted that I am going to use samples created in FL Studio ( vaw format) as my main structure of the composition. Therefore, I will manipulate the sound using code within the Sonic Pi. I will use effects like: 

Reverb
Slicer
Compressor 

to polish the actual sound during the performance. I have created a composition in the FL studio and then disassembled it in separate samples so each one of them can be manipulated independently. 

THE CODE:


use_bpm 116
###################################################################################################################################
live_loop :noir do
  with_fx :slicer, phase: 0.25, mix: 0.40 do
    with_fx :flanger, mix: 0.90 do
      sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/noir.wav", sustain: 2, amp: 1.2, cutofff: 80, beat_stretch: 10
    end
  end
  sleep 2
end



####################################################################################################################################

live_loop :KICK do
  with_fx :slicer, phase: 0.50, mix: 0.80 do
    sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/deepfill.wav", sustain: 1
    #sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/kick.wav", sustain: 2, amp: 0.70
    #sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/sidechainfill.wav", sustain: 2, beat_stretch: 10, amp: 1
    sleep 4
  end
end

live_loop :BASS do
  #sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/bumbass.wav", sustain: 4, amp: 0.30
  sleep 4
end
###################################################################################################################################
live_loop :HATS do
  
  with_fx :slicer, mix: 0.99r, phase: 0.50 do
    #sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/traintext.wav", sustain: 2, beat_stretch: 10
    #sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/hihats.wav", sustain: 1, amp: 1.1
    sleep 2
  end
end

live_loop :clap do
  #sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/clap.wav", sustain: 2
  #sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/beforesnare.wav", sustain: 2
  sleep 4
end
################################################################################################################################
live_loop :middle do
  sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/bass.wav", sustain: 2
  #sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/superbasss.wav", sustain: 1
  #sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/timp.wav", sustain: 16
  with_fx :echo, mix: 0.20 do
    with_fx :slicer, phase: 0.50, mix: 0.99 do
      #sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/perc.wav", sustain: 1, attack: 0, rate: 1, beat_stretch: 10
      sleep 2
    end
  end
end




During the presentation, I and the rest of the audience noticed that the CPU power of my classmate's laptop is definitely not enough to handle so many samples created in external software so I had to decrease the number of effects and release times to save the machine from the ignition. In overall I was quite happy and full of beans after my first ever presentation in the front of a crowd.

Worth mentioning - This was just a training session basically so the actual performance which is going to be marked more seriously than today.

Week 6


Progressing on our performances and gathering additional knowledge. The whole lesson I was experimenting with sounds.

Week 7

Today we have been discussing the origins of the computing and the computer culture.
We have been talking about such a nice a widely used instrument for making calculations and how it works. 

Abacus is a device for making calculations × It consisting of a frame with rods × Each rod has a specific number of balls/beads, which are free to move × Each rod represents a unit in the decimal system × Each bead represents a digit/ specific number of digits



We also have discussed how the technolugy of the communication can be used in war. How radio technology helped to communicate between units to avoid the communication cable cutting. 

WW2 1939-1945 1939 - David Packard and Bill Hewlett found their company in a garage in Palo Alto, California. Their first product, the HP 200A Audio Oscillator, quickly became a popular piece of test equipment for engineers. Walt Disney Pictures ordered eight of the 200B model to test recording equipment and speaker systems for the 12 specially selected and equipped theatres that allowed "Fantasia" in 1940.

1941 - Built as an electromechanical means of decrypting Nazi ENIGMA-based military communications during World War II, the British Bombe was designed by Alan Turing and Harold Keen. Hundreds of Bombes were built, their purpose being to ascertain the daily rotor start positions of Enigma cipher machines, which in turn allowed the Allies to decrypt German messages. It was estimated that this work saved over 14 million lives, shortening the war by more than 2 years!

(Stolen from the lecture slideshow)

In the present day, we take a lot of this history for granted 
× A lot of the historical knowledge is embedded in our culture via music, film, TV, radio... 
× If we understand this, and are able to analyze and critique our culture and media, we can start to pick apart what we see, hear and experience in our everyday lives 
× More importantly by doing this we can, as creatives, come up with new ways of creating media and experiences as professionals in this field.

The rest of the session was dedicated to the improvement of the existing compositions that we are going to present in our final presentation. 



Week 8 

The bit rate is calculated using the formula: Frequency x bit depth x channels = bit rate 44,100 samples per second x 16 bits per sample x 2 channels = 1,411,200 bits per second (or 1,411.2 kbps) A four-minute (240 second) song at this bit rate would create a file size of: 240 x 14,411,200 = 338,688,000 bits (or 40.37 megabytes) (8 bits = 1 byte / kilobyte = 1024 bytes) http://bit-calculator.com

CD-quality uncompressed audio is sampled at 44.1 KHz (kilohertz) which means 44,100 samples per second. This is also known as a ‘sample rate’ 

‘bit depth’ is the number of bits of data available for each sample. The higher the bit depth, the higher the quality of the audio. Bit depth is usually 16 bits on a CD and 24 bits on a DVD.
‘bit rate’ is a number of bits of data processed every second. It is measured in kilobits per second (kbps).

Today we have been discussing how to calculate the bitrate of the composition and how can we use samples in the sonic pi. Basically, it was a recap of the already known things for me.

Week 1 of term 2.

The final performance day where we are going to perform in the front of the audience. My piece was designed using the same technology which I have used for my previous successful presentations. I have created another track in the FL studio to separate the layers in samples to be able to play them in the Sonic Pi. For this performance, I have decided to use my own machine as I thought it is powerful enough to handle the number of samples which I am going to use in this performance. 

THE CODE:


#######################################################################################
use_bpm 116
live_loop :intro do
  with_fx :slicer, phase: 0.50, mix: 0.80 do
    sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/deepfill.wav", sustain: 2
    sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/kick.wav", sustain: 16
    sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/sidechainfill.wav", sustain: 4
    sleep 16
  end
end
live_loop :fill do
  #sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/bumbass.wav", sustain: 4
  with_fx :gverb, mix: 0.80 do
    with_fx :slicer, pre_mix: 0.80, mix: 0.50, phase: 0.25 do
      #sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/houl.wav", sustain: 16, amp: 0.25
    end
  end
  sleep 4
end
#######################################################################################
live_loop :filltwo do
  sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/hihats.wav", sustain: 2, amp: 1.1
  with_fx :slicer, mix: 0.90, phase: 0.50 do
    sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/traintext.wav", sustain: 2
  end
  sleep 2
end
#######################################################################################
live_loop :middle do
  sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/bass.wav", sustain: 2
  sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/superbasss.wav", sustain: 1
  #sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/timp.wav", sustain: 16
  with_fx :echo do
    with_fx :slicer, phase: 0.25, mix: 0.99 do
      sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/perc.wav", sustain: 2, attack: 0.30, rate: 1
    end
  end
  #sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/vox.wav", sustain: 16
  sleep 2
end
#######################################################################################
live_loop :noir do
  with_fx :slicer, phase: 0.25, mix: 0.90 do
    with_fx :flanger, mix: 0.90 do
      #sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/noir.wav", sustain: 2, amp: 0.99
    end
  end
  sleep 2
end
#######################################################################################
live_loop :clap do
  sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/clap.wav", sustain: 16
  sample "C:/Users/thera/Desktop/loops for the sonic pi presentation/beforesnare.wav", sustain: 16
  sleep 16
end

The whole idea behind this track has been previously described in the essay which we wrote to explain what sort of idea we have put in the music we are making so I don't think it is worth to mention all of that revelation here.

Conclusion 

As I can speak only for myself, I will be honest as possible. I would like to say, that the tremulous attitude towards students is truly amazing. I have enjoyed how we have been taught new things and shown new fields. But to counterweight the good things I need to say, that the actual course is for an amateur practice. I don't like the Sonic Pi and I don't think that I would like to be involved in this again, but seems like I will need to...

#TERM 2


Week 2

PROCESSING!!!


What is Processing? 
• Processing is a combination of a coding “front end” (usually referred to as an IDE, or Integrated Development Environment) and a programming language, based on Java. 
• It is used extensively in the visual arts, and is also used to teach coding :)

Why are we using it? 
• Bit of a long, complicated story…
• (NOTE TO RYAN - TELL LONG COMPLICATED STORY) • It enables us to create visuals without too much “drama” around learning a new coding language 
• It builds up our abilities • It acts as a gateway to other visual environments such as Unity Download and In

So we have been introduced a new software which is going to create amazing visuals for us if we will type in a super complex code. So, this software uses the same principles as the Sonic PI does. You type in the code which is going to be processed and you will have the output on your screen. 

Task • So, you have a new set of skills - time to put them to the test • Use a combination of rect, ellipse and the commands we have seen for color to produce an avatar for yourself - try not to go beyond 300x300 pixels 

I have typed in the coordinates for every single pixel to get something like this - 


Actually, I have used this image as a reference. The most annoying this about this is the number of lines which you need to type in at the coloring technique. Everything that goes underneath the line of code which says what sort of colour is going to be used now is going to be coloured in that specific color. So in theory, you need to get all the red squares underneath that like which says - " Colour the pixel in red" 

Week 3

The function here is simply a container for a number of different commands. It is labeled (here with f:) which means that we can call this function (i.e. execute it) by running the name. So, in Processing, we can write rect and it will know that we wish to draw a rectangle. However, calling that function does not give Processing enough information to know HOW to draw the rectangle. So we need further detail for the function to work. To understand this, let’s look at a more simple example first - that of line

Arguments or parameters are extra bits of information we feed into a function so that it can work. In this picture, it is designated by the INPUT X label, although this is a little misleading as functions can have more than one argument, as we shall see. We will look at these in more detail when we make our own functions, but for the moment just remember that these are extra bits of information that we have to supply for the function to work.


This is an explaing of how the function can be visualized. By placing certain points in the right x,y coordinates we can draw an image using these pixels. 

We also learned how to colour the image using fill function which can resemble RGB channels.

Week 4


Today we kept practicing with Processing and learned few new things like Variables and how they work. To explain this briefly - Variables are designed to be changed as your code runs; therefore, setting up a variable in our circle code would be a great way of changing the way it works

Time in Processing


Time in processing can be measured using specific commands, such as second() 
• The vast majority of these commands measure time using the built in clock of your machine, with the main outlier being millis() which tells you a number of milliseconds that has passed since the sketch was started

Having these skills in our pocket we are able to move shapes around the plane and even control their movement speed and direction. 

Matrix Transformations 

• There is another way we can move objects in our sketches - we can use matrix transformations 
• These mean that we can move multiple shapes at the same time, rather than having to move them individually • To do this, we use two commands: pushMatrix() and popMatrix() 
• These allow us to pick up and move multiple objects that are drawn between these two commands

Week 5

Today we continued the studying of the Processing. And the topic was about sound and image manipulation. 

At this lesson, we learned how to load the image ( let's say JPEG ) and how we can manipulate its characteristics. A Photoshop feature basically with some more advanced image manipulation techniques in real life. So the image can be affected by the sound or camera and make the changes depending on your code line which is quite interesting. We also are able to create own filters for the image like Photoshop does. But it is clear that this is just to have some coding practice and practically I would use Photoshop for the image manipulation rather than Processing.

We also have been split into the groups to make our own project with some theme in it. I very quickly found a group trying to avoid being in the same group where I was previously as I knew our vision about this task is going to be different so I need someone who is into the things I like. After a short discussion, we already became with the idea, where we will use unity to visualize the shapes (like triangles, rectangles and other) while the Sonic Pi will provide us with the sound.


The group work starts from here!


We had another lecture today about the image manipulation and we have tried to mix different techniques together. I remember been focusing on the group project more. One of the lessons was dedicated to the Unity, so we clearly knew that Unity is going to be that software which is going to be used in our performance. After we have formulated our idea we became up with some crucial changes in our project. Now we wanted to make an endless runner type game where you can collect (or you don't if don't want to) shapes flying towards you and the moment of the impact is producing the sound which is controlled by the Sonic Pi. Ed, my group mate was responsible;e for creating fantastic sounds for the game. In my opinion, he succeeded in this as the sound effects he produced could be easily used in some mobile games already. I and Thomas were responsible for the map creation and assets design. We found a basic endless runner game and extracted its source code so we can do our own stuff inside that code. Of course, we won't be able to create our own game out of nothing due lack of the knowledge. We have changed the whole game completely so we have our own unique game. 



This is the texture and the map we have used for the game. After the texture was set and everything seemed to be fine. We realized that the texture, which should constantly be in motion towards the player does some random rotations and movement so for the final version we have used a simpler version of the map where only cylinders were markers of the track territory. 

The sound worked completely and we also have cheated the audience in a good sense of course. The problem was with the ability to link the Sonic Pi with the Unity project. IN reality, it was nearly impossible. So we pre-recorded sound effects made in Unity and placed them into the Game project folder and By using components linked the sound to the particular behavior of the game. As I was creating a unique soundtrack for our game we have decided to play it first in the front of the audience to introduce the code of the Sonic Pi before we jump into the game. All the files and the visuals are described in the Project folder which has been uploaded on Moodle and handles every single detail we have used in the game. 

Comments