Cool Things to DO in 4.2

Video Project- Audio Responsive Rotary Gauge.

This project allows an audio cue to control the rotation of a pointer in response to its audio level using the new in 4.2  OSC message:

/cue/{cue_number}/liveRotation/Zaxis {number}

Prior to 4.2 the only way to set the rotation of a video or text cue, was as a Quarternion. The difficulties of doing this are expressed very succinctly in the QLab OSC documentation.

/cue/{cue_number}/quaternion {number number number number}

If four numbers are given, set the rotation of the specified cue. If not, return an array of four numbers representing the cue’s rotation as a quaternion. number can be any decimal number. Caution: you need to understand quaternion math to make any meaningful use of this method. Quaternion math is really hard. Good luck!

To avoid the mathematical complexity, the easiest method has been to follow a video cue with a 0 time fade cue that sets the rotation in a single plane immediately after the video is displayed. Fade cues allow setting of single plane rotations whereas video and text cues do not.

displayRotatedVideo

The new OSC message

/cue/{cue_number}/liveRotation/Zaxis {number}

(or Yaxis or Xaxis), allows a temporary  additional single plane rotation to be specified in addition to the 3D Quarternion settings. This means you can set the orientation of a graphic with the 3D rotation controls, and then control a single plane rotation using  OSC, or as in this demo an OSC query.

Here it is in action:

An audio cue has the audio meter level of slider 1 queried with an OSC cue which drives the rotation of a pointer graphic on top of a dial. Because the normal 3D quarternion geometry is still available independently, we can use this to alter the perspective of the gauge graphic elements continuously as an added visual interest. The level of the audio cue, and the related level of the pointer can be adjusted by fade cues in a cart.

How it Works:

steamdemoWorkspace

A ‘fire all group cue’ starts video cues which display dial and pointer graphics. It also starts a looping audio cue of a steam effect (which has some Apple AU Audio Effects added).

OSCrotatecue

A Network cue set to an OSC message with an OSC query gets the current audio level of the sound effect audio cue, using the query (the bit between the hash symbols) in this OSC message:

/cue/point/liveRotation/Zaxis #/cue/steam/liveAverageLevel/1 720 0#

It uses the result of that query to set the Z-axis live Rotation of the cue numbered point.

The Network cue has a long duration and is set to resend its value 30 times per second for as long as it is running.

Finally, a looping group fades the 3D quarternion values of the video cues,  (by targeting the enclosing group), independently of the live rotation,  to simulate the perspective change of a camera movement.

You can download the workspace for this project here

Here’s another example, where you can see the OSC values changing. It replaces the original linear indicator used in the chapter  controlling-procedural-and-physical-modelling-plug-ins with a dial.

Chapter Author: Mic Pool.

Gauge graphics licensed  under a Creative Commons 0 license from pxhere.com

Audio file used in Gauge  example from MrJmix at freesound.org
Licensed under a Creative Commons Attribution 3.0 Unported License
Creative Commons License

MenuGraphic