top of page
  • Writer's pictureJack Chen

Fast Fun: Arduino MIDI to Unity

Based on the setup from this week's lesson, I created a new controller for my cube dropping game in Unity. This time, two potentiometers control the position of the two cubes in the game:

Using the Arduino midi USB library and the midi jack Unity plugin, CC midi data was able to be created based on the potentiometers and sent to unity.

On the Unity side, input from the potentiometers (called by "MidiMaster.GetKnob(1)" is mapped to a transform range for the cube: (c# doesn't seem to come with a map function so it was manually done with the math.lerp lines below)

20 views0 comments

Recent Posts

See All
bottom of page