ctlin

Output video duration after read

This example shows how to automatically retrieve several information data regarding a loaded video on jit.qt.movie. In this case we are taking advance of the message read filename 1 that is output on the second outlet after a successful file load, and using that to trigger several get messages which will also be output out the second outlet and then routed to their proper place using the route object.

MIDI stream to exponential curve

In this patch the zmap object changes the scale of the incoming number stream from the ctlin object from the standard range of MIDI (0-127) – the 0 is bypassed so that it is translated properly once the range is mapped back to linear amplitude – to a specified range in decibels – in the case of the example from -63 to 0 dB.

MIDI-DMX conversion

DMX data is encoded with “channel” information similarly to MIDI so that each receiving device can pay attention only to particular information. Each channel can carry a value from 0-255. Note that it’s therefore easy to convert the standard MIDI range 0-127 to the DMX range 0-255 just by multiplying values by 2 (or by shifting the number one bit to the left).

Exponential mapping

A linear fade-in or fade-out of audio is okay for quick changes that take place in a fraction of a second, but for slower fades one should generally take into account that our subjective sense of loudness more closely conforms to an exponential change in amplitude. This patch allows you to use the slider (or the mod wheel from a MIDI controller) to control the amplitude of white noise in one of three different ways: with straight linear mapping, exponentially (with an exponent of 4), or using a range of 60 decibels.