1. #creativePact This Weekend

    So…yeah…I’m totally failing at #creativePact this weekend, sorry! When I get back to it, I’m gonna add in some walls, then stop PacMan running into those walls. Then add some dots for him to munch on, get his mouth animating as he moves about, and then I’ll worry about the ghosts…

  2. #creativePact Day 6

    Hey PacMan, stop running off the screen where I can’t see you, ma bitch!

    /* Pac-Man */

    Pacman pacMan = new Pacman(8, 10, 10, 20, 20, radians(45), radians(315));

    Redguy redGuy;

    Pinkguy pinkGuy;

    Blueguy blueGuy;

    Slowguy slowGuy;

    void setup() {

      redGuy = new Redguy();

      pinkGuy = new Pinkguy();

      blueGuy = new Blueguy();

      slowGuy = new Slowguy();

      size(620, 560);

      background(0);

      frameRate(30);

    }

    void draw() {

      pacMan.drawPM();

      pacMan.update();

    }

    class Pacman {

      int PacmanRadius, PMXpos, PMYpos, PMWidth, PMHeight;

      float PMStart, PMStop;

      Pacman(int a, int b, int c, int d, int e, float f, float g) {

        // PacManRadius = a;

        PMXpos = b;

        PMYpos = c;

        PMWidth = d;

        PMHeight = e;

        PMStart = f;

        PMStop = g;

      }

      void update() {

        arc(PMXpos, PMYpos, PMWidth, PMHeight, radians(PMStart), radians(PMStop));

        fill(255, 255, 0);

      }

      void drawPM() {

        if (keyPressed) {

          if (key == ‘a’ || key == ‘A’) {

            PMStart = 225;

            PMStop = 495;

            background(0);

            if (PMXpos > PMWidth/2){

            PMXpos -= 10;} else {

            }

          } 

          if (key == ‘d’ || key == ‘D’) {

            PMStart = 45;

            PMStop = 315;

            background(0);

            if (PMXpos < width-(PMWidth/2)){

            PMXpos += 10;} else {

            }

          }

          if (key == ‘w’ || key == ‘W’) {

            PMStart = 315;

            PMStop = 585;

            background(0);

            if (PMYpos > PMHeight/2){

            PMYpos -= 10;} else {

            }

          }

          if (key == ‘s’ || key == ‘S’) {

            PMStart = 135;

            PMStop = 405;

            background(0);

            if (PMYpos < height-(PMHeight/2)){

            PMYpos += 10;} else {

            }

          } 

          else {

          }

        }

      }

    }

    class Redguy extends Ghost {

    }

    class Pinkguy extends Ghost {

    }

    class Blueguy extends Ghost {

    }

    class Slowguy extends Ghost {

    }

    class Ghost {

    }

  3. #creativePact Day 5

    So, it would be really nice if when he changed direction his mouth would face in that direction too, so he can eat all the…uh…dot things? Whatever, here:

    /* Pac-Man */

    Pacman pacMan = new Pacman(8, 10, 10, 20, 20, radians(45), radians(315));

    ;

    Redguy redGuy;

    Pinkguy pinkGuy;

    Blueguy blueGuy;

    Slowguy slowGuy;

    void setup() {

      redGuy = new Redguy();

      pinkGuy = new Pinkguy();

      blueGuy = new Blueguy();

      slowGuy = new Slowguy();

      size(620, 560);

      background(0);

      frameRate(30);

    }

    void draw() {

      pacMan.drawPM();

      pacMan.update();

    }

    class Pacman {

      int PacmanRadius, PMXpos, PMYpos, PMWidth, PMHeight;

      float PMStart, PMStop;

      Pacman(int a, int b, int c, int d, int e, float f, float g) {

        // PacManRadius = a;

        PMXpos = b;

        PMYpos = c;

        PMWidth = d;

        PMHeight = e;

        PMStart = f;

        PMStop = g;

      }

      void update() {

        arc(PMXpos, PMYpos, PMWidth, PMHeight, radians(PMStart), radians(PMStop));

        fill(255, 255, 0);

      }

      void drawPM() {

        if (keyPressed) {

          if (key == ‘a’ || key == ‘A’) {

            PMStart = 225;

            PMStop = 495;

            background(0);

            PMXpos -= 10;

          } 

          if (key == ‘d’ || key == ‘D’) {

            PMStart = 45;

            PMStop = 315;

            background(0);

            PMXpos += 10;

          }

          if (key == ‘w’ || key == ‘W’) {

            PMStart = 315;

            PMStop = 585;

            background(0);

            PMYpos -= 10;

          }

          if (key == ‘s’ || key == ‘S’) {

            PMStart = 135;

            PMStop = 405;

            background(0);

            PMYpos += 10;

          } 

          else {

          }

        }

      }

    }

    class Redguy extends Ghost {

    }

    class Pinkguy extends Ghost {

    }

    class Blueguy extends Ghost {

    }

    class Slowguy extends Ghost {

    }

    class Ghost {

    }

  4. #creativePact Day 4

    So, my PacMan can now move around a bit but, only really works with single keystrokes, and he can fly off the screen too - bad PacMan…wakawakawakawaka

    /* Pac-Man */

    Pacman pacMan = new Pacman(8, 10, 10, 20, 20, radians(45), radians(315));

    ;

    Redguy redGuy;

    Pinkguy pinkGuy;

    Blueguy blueGuy;

    Slowguy slowGuy;

    void setup() {

      redGuy = new Redguy();

      pinkGuy = new Pinkguy();

      blueGuy = new Blueguy();

      slowGuy = new Slowguy();

      size(620, 560);

      background(0);

      frameRate(30);

    }

    void draw() {

      pacMan.update();

      pacMan.draw();

    }

    void update() {

    }

    class Pacman {

      int PacmanRadius, PMXpos, PMYpos, PMWidth, PMHeight;

      float PMStart, PMStop;

      Pacman(int a, int b, int c, int d, int e, float f, float g) {

        // PacManRadius = a;

        PMXpos = b;

        PMYpos = c;

        PMWidth = d;

        PMHeight = e;

        PMStart = f;

        PMStop = g;

      }

      void update() {

        fill(255, 255, 0);

        arc(PMXpos, PMYpos, PMWidth, PMHeight, PMStart, PMStop);

      }

      void draw() {

        if (keyPressed) {

          if (key == ‘a’ || key == ‘A’) {

            background(0);

            PMXpos -= 10;

          } 

          if (key == ‘d’ || key == ‘D’) {

            background(0);

            PMXpos += 10;

          }

          if (key == ‘w’ || key == ‘W’) {

            background(0);

            PMYpos -= 10;

          }

          if (key == ‘s’ || key == ‘S’) {

            background(0);

            PMYpos += 10;

          } 

          else {

          }

        }

      }

    }

      class Redguy extends Ghost {

      }

      class Pinkguy extends Ghost {

      }

      class Blueguy extends Ghost {

      }

      class Slowguy extends Ghost {

      }

      class Ghost {

      }

  5. #creativePact Day 2

    This is my post for September 2nd, unless I don’t make one tomorrow…in which case it’s for tomorrow instead…whatever.

    Here’s some code which doesn’t do anything - it’s more just a skeleton:

    /* Pac-Man */

    Pacman pacMan;

    Redguy redGuy;

    Pinkguy pinkGuy;

    Blueguy blueGuy;

    Slowguy slowGuy;

    void setup(){

    }

    void draw(){

    }

    class Pacman {

    }

    class Redguy extends Ghost {

    }

    class Pinkguy extends Ghost {

    }

    class Blueguy extends Ghost {

    }

    class Slowguy extends Ghost {

    }

    class Ghost {

    }

  6. #creativePact Day 1

    I’m gonna try and make PacMan in Processing - code and stuff to follow, for sure. Thanks!

  7. #creativePact 2011 Day 4

    This is now in Stereo but the Delay is half as loud as the original sound. Maybe tomorrow I’ll look at having multiple repeats or something - I would have done it today but was Dancing with Gerry til 5am :/


    ~gate = Bus.audio(s, 2);

    ~delay = Bus.audio(s, 2);

    {Out.ar([0, 1], DelayN.ar(In.ar(~delay, 2), 5, 2, 0.5))}.play

    {Out.ar([0, 1, ~delay], In.ar(~gate, 2))}.play;

    {Out.ar(~gate, SoundIn.ar)}.play;

  8. #creativePact 2011

    This now has a Delay effect added, providing a two second delay coming out of the Right Hand channel. Lovely.


    ~gate = Bus.audio(s, 2);

    ~delay = Bus.audio(s, 2);

    {Out.ar(1, DelayN.ar(In.ar(~delay, 2), 5, 2))}.play

    {Out.ar([0, ~delay], In.ar(~gate, 2))}.play;

    {Out.ar(~gate, SoundIn.ar)}.play;

  9. #creativePact 2011 - An Expensive Patchcord.

    Here is my first bit of code, you’ll need headphones if you want to avoid feedback. It just takes the first input from your Soundcard (in this case I’m just using the Internal Microphone) and plays it out of the headphones. I’m sending it through a Bus called gate~ which will let me later add more effects and control the wet/dry mix. 

    Run each line of code separately or SuperCollider will cry, which will make you cry.

    ~gate = Bus.audio(s, 2);

    {Out.ar(0, In.ar(~gate, 2))}.play;

    {Out.ar(~gate, SoundIn.ar)}.play;

  10. #creativePact 2011 - what am I doing?

    Last year I tinkered with SuperCollider and Processing, somewhat aimlessly before completely tailing off and failing to reach the end of September.

    This year, I’ve decided to create a live audio FX processor in SuperCollider. I figure if I have some sort of goal I might be tempted to stick with it for longer (this might not work out though, as I intend to be drunk for most of September… oh well!)

    The idea is partly inspired by a MaxMSP project I did in 2nd year which was broadly the same thing…but in Max…