13.07.2015 Views

Tutorials and Topics - Peabody Computer Music

Tutorials and Topics - Peabody Computer Music

Tutorials and Topics - Peabody Computer Music

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Tutorial 18MIDI Control:Mapping MIDI to MSPThe umenu sends the chosen item number to gate to open one of its outlets, thus directingthe controller values from the mod wheel to a specific place in the signal network.gate directs the control messages to a specific place in the signal networkWe will look at the special mapping requirements of each parameter individually. Butfirst, let’s review the formula for linear mapping.Linear mappingThe problem of linear mapping is this: Given a value x which lies in a range from xmin toxmax, find the value y that occupies a comparable location in the range ymin to ymax.For example, 3 occupies a comparable location within the range 0 to 4 as 0.45 occupieswithin the range 0 to 0.6. This problem can be solved with the formula:y = ((x - xmin) * (ymax - ymin) ÷ (xmax - xmin)) + yminFor this tutorial, we designed a subpatch called map to solve the equation. map receives anx value in its left inlet, <strong>and</strong>—based on the values for xmin, xmax, ymin, <strong>and</strong> ymax receivedin its other inlets—it sends out the correct value for y. This equation will allow us to mapthe range of controller values—0 to 127—onto various other ranges needed for the signalnetwork. The map subpatch appears in the upper right area of the Patcher window.The contents of the map subpatch: the linear mapping formula expressed in an expr object150

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!