Posts

Physical Computing, Final Project

Image
Physical Computing Final Project Technical Details For my final project, I have made a set of analog synthesizers. What I mean by analog is that I haven’t used any microcontrollers for this project. I will only be working with 9V batteries and a series of different IC’s ( Integrated circuits ). These are the IC chips I have used for my final build: CD4046 CD40106 CD4066 CD4017 LM386 The Synthesizer This is a very simple circuit that is generating a square wave. The small yellow 0.1uF capacitor is the capacitor that is setting the frequency range of the oscillator. The potentiometer is adjusting the fundamental frequency. First oscillator prototype This is how the oscillator sounds: https://youtu.be/j2es7WL2imU The next step is to add more effects to the synthesizer so it sounds a bit more interesting. Next I am setting up another oscillator using the CD40106 chip. The CD40106 is a Hex Schmitt Trigger or more eas

Particle Swarm Optmisation

Image
I have always been very interested in the visual aspect of programming. I love to use it as a tool to create and generate things on the screen. What I liked about both PSO ( Particle Swarm Optimisation ) and DFO ( Dispersive Flies Optimisation ) is that you can display a visual representation of their behaviour. You can assign problems for them to solve and you can see how they behave based of the assigned problem. Here is the fundamental behaviour in my PSO application. Inside this function is where the position of each particle is being updated. Inside my ofApp.cpp file I evaluate both the personal best position and the best neighbour position. These vectors are then being passed as arguments into my particle class. In this application the personal best position or _pBest is set the the x and y position of the mouse. So by moving the mouse across the canvas the best position will update. I //-------------------------------------------------------------- void Pa

Analysis to implementation

PART 1: f(ch) = (x 0 + x 1 ) − (x 2 + x 3 ) + (x 4 + x 5 ) − (x 6 + x 7 ) This problem is a maximisation problem. In this scenario we initially have a population of four chromosomes as shown below: ch 1 = (6, 5, 4, 1, 3, 5, 3, 2) ch 2 = (8, 7, 1, 2, 6, 6, 0, 1) ch 3 = (2, 3, 9, 2, 1, 2, 8, 5) ch 4 = (4, 1, 8, 5, 2, 0, 9, 4) // fitness calculations Ch1 = f(ch) = ( 6 + 5 ) - (4 + 1 ) + ( 3 + 5 ) - ( 3 + 2 ) = 9 Ch2 = f(ch) = ( 8 + 7 ) - (1 + 2 ) + (6 + 6 ) - (0 + 1 ) = 23 Ch3 = f(ch) = ( 2 + 3 ) - (9 + 2 ) + (1 + 2 ) - (8 + 5 ) = -16 Ch4 = f(ch) = ( 4 + 1 ) - (8 + 5 ) + (2 + 0 ) - (9 + 4 ) = -19 Sort: Ch2 ( 23 ) Ch1 ( 9 ) Ch3 ( - 16 ) Ch4 ( - 19 ) 1 ) child 1 = ( 6, 5, 4, 1 |  6, 6, 0, 1 )   child 2 = ( 8, 7, 1, 2 | 3, 5, 3, 2 )   2 ) Ch1 = (6, 5, 4, 1, 3, 5 , 3, 2) child 1 = ( 6, 5, 9, 2, 1, 2 , 3, 2  ) Ch3 = ( 2, 3, 9, 2, 1, 2 , 8, 5) child 2 =  ( 2, 3, 4, 1, 3, 5 , 8, 5 ) 3 ) C