#MidiBus noob :P

7 messages · Page 1 of 1 (latest)

stone whale
#

Hi! I'm trying to get a head start at school for a big assignment, but I'm struggling to use my MIDI keyboard's input just to draw a circle.

import themidibus.*;

MidiBus myBus;

void setup() {
  size(400, 400);
  background(255);
  noStroke();

  //MidiBus.list(); //Input 1 Output 4
  myBus = new MidiBus(this, 1, 4);
}

void draw() {
}

void controllerChange(int channel, int number, int value) {
  println("ch: "+channel+" #: "+number+" v: "+value);

  if (number==74) {
    fill(255, 255, 0);
    ellipse(100, 100, 100, 100);
  }

  //#1 Modifier Wheel
  //#74-77 Knob 1-4
}

This is the code, does anyone see why I just see the white background and no ellipse when I move the knob?
Tried doing something with changing its color and size first but the ellipse didn't even draw :C
Thanks for helping in advance 🙂

grim kite
grim kite
stone whale
#

Sorry bout that, school 😅

#

Yea so I kinda figured it out but I wonder if theres another way to do it, ill send the code once I get home

#

Also curious about the native MIDI API, what are the diffirences?

grim kite