Mapping

Why mapping?

  • When building an interface, we often need to form relationships between different action spaces.
  • In the input space, we operate with data from sensors, buttons, status of interface devices, audio, video, as well as data sets (for example meteorological or stock market data).
  • The output space can consist of, for example: sound, lights, visuals, words, motors and actuators.
  • Sometimes we operate in the ideal situation that our output space is equal to our input space.
  • More often than not, we need to transform data from one space to another.

Different kinds of mapping

mapping
a. One-to-one
b. One-to-many
c. Many-to-one
d. Many-to-many
e. Null

One-to-one mapping

  • Directly mapping one input to one output.
  • Mathematical functions of the form: y(x).
  • Scaling and transforming data.
  • Exercise: Control a servo with a potentiometer.

One-to-many mapping

  • Using limited controls for a more complex system.
  • Mathematically similar to the one-to-one mapping.
  • This can create conceptual difficulties for the interface. Possible solutions:
    • Extracting features from the input.
    • Switches and indicators.
    • Splitting the input data.
  • Here are two Pd patches we’ll use for extracting sound features to control the Arduino. Here is the Arduino patch for reading Serial input.

Many-to-one mapping

  • Sometimes it makes sense to control a single output device with many inputs.
  • For example, our input data might be higher-dimensional than our output data, or we want more accurate or faster controls than is possible with a single control device.
  • Mathematical functions of the form: y(x1,x2,x3,…,xn).
  • Exercise: make a pot change the brightness of an LED, and a button turn it on and off.

Many-to-many mapping

  • Mathematically similar to the many-to-one mapping.
  • Conceptually you need to think about the relationship between your outputs as well as inputs.

Notes:

  • In this Pd patch you can find some basic math objects to get you started with manipulating objects in Pd.
  • Machine learning and other statistical methods are one way to approach mapping.
    • Especially useful with complex problems and cases that are hard to solve with regular functions.
    • Problems can be divided to regression and classification.
    • The result depends on learning data.
    • Harder to implement and “get right”.