-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvisualsynth.pde
70 lines (58 loc) · 2.54 KB
/
visualsynth.pde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
Paul Fernandez 2012
Digital Arts 252
University of Oregon
VISUAL SYNTH
For this project, I was interested in exploring the resonances
that emerge via the constructive self-interference of oscilating
time-based patterns. In the same way that an audio synthesizer
can produce an infinite variety of tones by combining simple
waveforms, this application can be used to generate an infinite
variety of patterns using only a single rotating ellipse. In the
future I plan on expanding it with other visualizations, as well
as adding the capacity to generate unique sounds along with the
images, using the same parameters.
Because this is ultimately intended for use as a performance
instrument, I've written it to incude the option to be controlled
with a Midi controller as an alternative to the on-screen controllers.
This is still under development. Although it currently works with
my M-Audio Oxygen49 keyboard, using a different controller would
involve reassigning the Midi CC values in the "controls" file. Also,
the "note" intervals have not yet been mapped to the Midi keys.
For the required data set, I was looking for something that had
the potential to help locate resonant patterns in the elliptical
oscillations. I chose to use the energetic states of the hydrogen
atom (see http://astro.unl.edu/naap/hydrogen/levels.html.) I set the
energy of a single "bound" electron to 1 (rather than the SI unit of
-13.6 eV) in order to focus on the harmonic properties of the
intervals between the states, leaving only the series
1/1, 1/4, 1/9, ..., 1/n^2. These basic "quanta" of energy are the
basis for all of the macroscopic structure in the universe,
including life, and can be considered truly fundamental; a musical
"scale" certainly worth expressing visually. They are mapped to
buttons ("keys") laid out along the bottom of the screen. When the
speed of rotation is turned all the way up in a given direction
(i.e. with the ROTATE X slider,) the ellipse will oscillate with
a period of 2pi*1/n^2 per frame, with n determined by the button
last clicked.
Required Libraries:
ControlP5: http://www.sojamo.de/libraries/controlP5/
RWMidi: http://ruinwesen.com/blog?id=95
*/
import processing.opengl.*;
void setup() {
size( 1200, 800, OPENGL );
//size(screen.width, screen.height, OPENGL);
hint( ENABLE_OPENGL_4X_SMOOTH );
hint( DISABLE_DEPTH_TEST );
setupControls( "screen" ); // either "screen" or "midi"
}
void draw() {
noFill();
// draw something
funWithEllipse();
// fade out the drawing
fadeOut();
// adjust the speed
changeSpeed();
}