Spinner- an exercise in UI development. Spin a record Clicking

Similar documents
AN ARTISTIC TECHNIQUE FOR AUDIO-TO-VIDEO TRANSLATION ON A MUSIC PERCEPTION STUDY

Max and MSP The DSP Status Window

MIDI Time Code hours minutes seconds frames 247

Pre-processing of revolution speed data in ArtemiS SUITE 1

R H Y T H M G E N E R A T O R. User Guide. Version 1.3.0

Linkage 3.6. User s Guide

The BAT WAVE ANALYZER project

Max and MSP. Max and MSP 1

Credits:! Product Idea: Tilman Hahn Product Design: Tilman Hahn & Dietrich Pank Product built by: Dietrich Pank Gui Design: Benjamin Diez

USER MANUAL FOR DDT 2D. Introduction. Installation. Getting Started. Danley Design Tool 2d. Welcome to the Danley Design Tool 2D program.

Fraction by Sinevibes audio slicing workstation

ECE 5765 Modern Communication Fall 2005, UMD Experiment 10: PRBS Messages, Eye Patterns & Noise Simulation using PRBS

Chapter 40: MIDI Tool

Liquid Mix Plug-in. User Guide FA

NanoGiant Oscilloscope/Function-Generator Program. Getting Started

Reason Overview3. Reason Overview

Sequential Logic Notes

EDL8 Race Dash Manual Engine Management Systems

User Guide. Version 2.0.0

Audacity Tips and Tricks for Podcasters

Transmitter Interface Program

Sonoris Meter VST 2.0

PS User Guide Series Seismic-Data Display

PHY221 Lab 1 Discovering Motion: Introduction to Logger Pro and the Motion Detector; Motion with Constant Velocity

Technical Information and Tips on Torq s Vinyl Control System. by Chad Carrier

INDIVIDUAL INSTRUCTIONS

XDFilt 1r0 July 23, XDFilt 1r0. Instructions. Copyright 2007, Steven A. Harlow 1

Users Manual FWI HiDef Sync Stripper

StepSequencer64 J74 Page 1. J74 StepSequencer64. A tool for creative sequence programming in Ableton Live. User Manual

Keyboard Music. Operation Manual. Gary Shigemoto Brandon Stark

Syrah. Flux All 1rights reserved

(Skip to step 11 if you are already familiar with connecting to the Tribot)

ECE3296 Digital Image and Video Processing Lab experiment 2 Digital Video Processing using MATLAB

Torsional vibration analysis in ArtemiS SUITE 1

Tiptop audio z-dsp.

Cover Page for Lab Report Group Portion. Boundary Layer Measurements

CM-T10-PRO and PRO-E. Wireless Control for ColorMaker Series LED Fixtures with ColorRoll Technology User s Manual

Experiment 9A: Magnetism/The Oscilloscope

Recommended Operations

14/09/98 Martin Casemanual (Version 6.21) The effect generator PRESS : $, 7

The MPC X & MPC Live Bible 1

FPGA Laboratory Assignment 4. Due Date: 06/11/2012

A few white papers on various. Digital Signal Processing algorithms. used in the DAC501 / DAC502 units

Transducers and Sensors

Basic FM Synthesis on the Yamaha DX7

Background. About automation subtracks

USB Mini Spectrum Analyzer User s Guide TSA5G35

Formatting Dissertations or Theses for UMass Amherst with MacWord 2008

Pictures To Exe Version 5.0 A USER GUIDE. By Lin Evans And Jeff Evans (Appendix F By Ray Waddington)

Gramophone records (78s and LPs)

Mini Gear Indicator Manual SW024

y POWER USER MUSIC PRODUCTION and PERFORMANCE With the MOTIF ES Mastering the Sample SLICE function

Digital Circuits 4: Sequential Circuits

Table of Contents Introduction

A Matlab toolbox for. Characterisation Of Recorded Underwater Sound (CHORUS) USER S GUIDE

AE16 DIGITAL AUDIO WORKSTATIONS

Analyzing and Saving a Signal

MAutoPitch. Presets button. Left arrow button. Right arrow button. Randomize button. Save button. Panic button. Settings button

Step 1 - shaft decoder to generate clockwise/anticlockwise signals

NAVIGATOR OWNER S MANUAL

TV Synchronism Generation with PIC Microcontroller

Design of a Binary Number Lock (using schematic entry method) 1. Synopsis: 2. Description of the Circuit:

PulseCounter Neutron & Gamma Spectrometry Software Manual

ECT 224: Digital Computer Fundamentals Digital Circuit Simulation & Timing Analysis

User Guide Version 1.1.0

NI-DAQmx Device Considerations

MICROSOFT WORD FEATURES FOR ARTS POSTGRADUATES

Figure 1: Feature Vector Sequence Generator block diagram.

Pole Zero Correction using OBSPY and PSN Data

Application Note AN-708 Vibration Measurements with the Vibration Synchronization Module

III Phrase Sampler. User Manual

L+R: When engaged the side-chain signals are summed to mono before hitting the threshold detectors meaning that the compressor will be 6dB more sensit

ECE 402L APPLICATIONS OF ANALOG INTEGRATED CIRCUITS SPRING No labs meet this week. Course introduction & lab safety

Machinery Diagnostic Plots Part 1 ORBIT Back-to-Basics: What does the data really tell us?

Dave Jones Design Phone: (607) Lake St., Owego, NY USA

Linrad On-Screen Controls K1JT

NetLogo User's Guide

Tutorial 11 ChipscopePro, ISE 10.1 and Xilinx Simulator on the Digilent Spartan-3E board

Capstone screen shows live video with sync to force and velocity data. Try it! Download a FREE 60-day trial at pasco.com/capstone

Assessing and Measuring VCR Playback Image Quality, Part 1. Leo Backman/DigiOmmel & Co.

Software Audio Console. Scene Tutorial. Introduction:

EE178 Spring 2018 Lecture Module 5. Eric Crabill

BER MEASUREMENT IN THE NOISY CHANNEL

A few quick notes about the use of Spectran V2

11: PC MACs RealTime Pulldown

Copyright and Disclaimer

Lab 1 Introduction to the Software Development Environment and Signal Sampling

Patchmaster. Elektronik. The Pulse generator. February 2013

CRT Dynamics. A report on the dynamical properties of CRT based visual displays

Veeco Dektak 6M Profilometer

WaveView. and. WaveCal

ALGORHYTHM. User Manual. Version 1.0

CDHD Servo Drive. Technical Training Manual. Manual Revision: 2.0 Firmware Version: 1.3.x Software Version: 1.3.x.x

Bionic Supa Delay Disciples Edition

A Matlab-Based Teaching Tool for Digital Logic

Laboratory Exercise 7

Dual Looping Delay from 4ms Company Eurorack Module User Manual 1.1c (2017-January-11) Firmware version 5

Logisim: A graphical system for logic circuit design and simulation

Programs. onevent("can", "mousedown", function(event) { var x = event.x; var y = event.y; circle( x, y, 10 ); });

Proper installation of included power cable on module. Please note the RED BAND.

Transcription:

- an exercise in UI development. I was asked to make an on-screen version of a rotating disk for scratching effects. Here's what I came up with, with some explanation of the process I went through in designing it. Spin a record I started with fairly standard patch that displays an image with an arbitrary rotation. Jit.rota is the key object here. The theta message sets a rotation angle, expressed in radians. 3.141592654 gives a half turn counter clockwise, and! will turn it a half turn the other way. Figure 1. Send and receive objects are here to connect to other portions of the patch. Clicking The next problem is to connect the image rotation to mouse action. This is discussed in Jitter Tutorial 15, and I'm taking a similar approach. A click in the pwindow produces a message such as "mouse 217 171 1 1 0 0 0 0". The first value is the horizontal location in Peter Elsea 10/13/07 1

the pwindow, the second the vertical location (counting from the top) and the third is a 1 if the mouse button is down and a 0 if the mouse button is up. If you set Idle Mouse Reporting in the pwindow inspector, you will get messages whenever the mouse is over the window. In the default case messages are sent as long as the button is down, with one extra after the button is released. This extra message has the same coordinates as the final button down message. There are 5 more values in the mouse message, indicating the state of the modifier keys. Figure 2 shows a way to convert this information to an angle. I have encapsulated this to keep the main window uncluttered. This subpatch attaches to the right outlet of the pwindow. Figure 2. Mouse click to angle. The route object filters out any other messages the pwindow may provide. The Lswaps break out the data I am interested in. The button state is just sent to an outlet. The X and Y coordinates go through some transformation. First the coordinates of the center are subtracted to make them relative to the center, then the Y value is negated make upward motion positive. Finally the handy cartopol object does the trigonometry and provides the angle. Cartopol considers the 3:00 position to be 0 radians. Clockwise from there is negative down to!. There is a jump from! to! at 9:00. We will have to deal with that at some point. This angle can be sent to the [r angle] object at the top of the patch and the rotation will nicely follow the mouse. Peter Elsea 10/13/07 2

Auto rotation Figure 3. Figure 3 shows a simple mechanism to spin the picture. Lcount in float mode will add the increment (first argument) to the current angle with each bang. With an increment of 0, there is no motion. An increment of 0.1047 will turn the image clockwise at 33.33 RPM. Here's a bit of math: 1 revolution takes 60000 ms /33.33333 = 1800 ms In 1 ms a record turns 6.283185307/1800 = 0.003490658 radians In 30 ms the image turns 0.104719755 radians. The tick arrives each 30 ms and Lcount provides the angle to rotate the image. Note in figure 1 the tick is sent before the image is passed through jit.rota. This mechanism gives a smooth rotation, and is appropriate anywhere radians are used. Calculating increments The next step is to connect the mouse to the lcount somehow. Figure 4 shows the portion of the patch that does that. The click angle we just found is stored in a float object. The mouse messages are sent at irregular intervals ranging from 5 to 60 ms, and we need to synchronize this with the drawing clock. The [r tick] object will bang the most recent angle when it's time to draw a new frame. This bang is switched by the mouse button, because we don't want that last coordinate of the mouse up. This coordinate is sent twice, and would ( as you will see in a moment) cause the disk to stop. The new angle is packed into a list with the previous angle by the llast object. Applying this list to the!- object gives the difference between the new angle and the last, which is exactly the increment needed by lcount. Note that llast is cleared when the mouse button is released. This prevents a big jump that would happen if the next click is not in the same region of the picture. Peter Elsea 10/13/07 3

Figure 4. The behavior of this is kind of entertaining. The disk rotation will follow a mouse drag, and if you stop the mouse before releasing the button, the disk will stop. However, if the button comes up as the mouse is moving, the disk will coast with the direction and velocity of the final motion. Some refinements are desirable. One issue is that when the mouse is in the left side of the image, there will be that occasional discontinuity when the angle wraps from! to!. This wouldn't necessarily be visible, but it would be audible when we finally get around to controlling sound. To fix it I replaced the!- object with the subpatch shown in figure 5. Peter Elsea 10/13/07 4

Figure 5. Fixing the angle wrap problem. There's nothing tricky here. I just detect out of range values and fix them. Another refinement is to add a feature so the disk rotates at normal speed when the button is released. This is done by attaching a default increment to the button up selector. These additions are in figure 6. Figure 6. Peter Elsea 10/13/07 5

Making it play Now we need to connect this to audio. It's not too hard, as the increment we are using to turn the image is similar to the play rate required by groove~. Figure 7. Playback In figure 7, you see a fairly standard buffer~ with groove~ set to play it back. Groove~ is loadbanged into loop mode. The value from [r incr] merely has to multiplied by a constant to convert 33.33 RPM clockwise (-0.1047 you will remember) into a signal with value of 1.0. This is massaged slightly to prevent pops as the image is scrubbed. The line~ provides a short envelope to smooth rate transitions. This is also applied to the amplitude to fade when playback is stopped and started. This makes the volume sensitive to speed of playback. Since real records behave the same way 1, this is not objectionable. The clip~ object prevents the signal from distorting when playback is faster than normal. The complete patcher (with one or two other options) is shown in figure 8. One invisible option is I added an output to the findclickangle subpatch to give a 1 when a modifier is down. This is used to gate the normal speed setting on mouse up. I like the coasting effect. 1 One thing that is missing is the bass boost you get when playing records slowly. This is because vinyl is recorded with a reduced bass (de-emphasis) to keep the grooves from getting too wide. On playback, the bass is boosted (RIAA curve), so if the speed is not 33.33, the wrong frequency band is boosted. You could sort of simulate this by adding a shelving filter below 500 Hz and manipulating the gain. Peter Elsea 10/13/07 6

Figure 8. The complete Patch Peter Elsea 10/13/07 7

File Playing Version Groove~ is limited to fairly short files, of course. However, with recent improvements to sfplay~ the same principles can play a file directly from disc. All that is necessary is a modification to the playback part of the patch: Figure 9. Spinning sound files. The receive start object gets a 1 or 0 from the play and stop buttons in the main patch. Peter Elsea 10/13/07 8