/
goto80_openfunksores.pde
101 lines (85 loc) · 2 KB
/
goto80_openfunksores.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*
* Demonstrates the use of the GifAnimation library.
* the left animation is looping, the one in the middle
* plays once on mouse click and the one in the right
* is a PImage array.
* the first two pause if you hit the spacebar.
*/
import crayolon.portamod.*;
import gifAnimation.*;
PortaMod mymod;
PImage[] animation;
Gif loopingGif;
boolean pause = false;
boolean loading = true;
String[] tracklist;
public void setup() {
size(480, 272);
frameRate(100);
/*
tracklist = new String[15];
tracklist[0] = "3kr";
tracklist[1] = "5pyhun73r 3l337 v3r";
tracklist[2] = "aaf";
tracklist[3] = "alias";
tracklist[4] = "audiorosputnick";
tracklist[5] = "bong-fogel";
tracklist[6] = "datagroove";
tracklist[7] = "deluxe-ecs";
tracklist[8] = "fonkyspenat";
tracklist[9] = "getdowndafunkme";
tracklist[10] = "influensa";
tracklist[11] = "klassfest";
tracklist[12] = "renonsdags-skit";
tracklist[13] = "square&enjoy";
tracklist[14] = "thismachinethinks";
randomSeed(minute()+second()+1337);
loading = true;*/
//param("track");
startthis( param("track"));
}
void stopthat() {
//loopingGif.dispose();
mymod.mute();
loading = true;
draw();
}
void startthis(String thisfile) {
//String thisfile = tracklist[parseInt(random(15))];
// loopingGif = new Gif(this, thisfile+".gif");
//loopingGif.loop();
mymod = new PortaMod(this);
mymod.doModLoad(thisfile+".mod", true, 6.020f);
mymod.loopSong();
loading = false;
}
void draw() {
if (loading) {
//println("hello world");
background(0);
//println("hello world2");
} else {
background(255 / (float)height * mouseY);
// image(loopingGif, 0, height / 2 - loopingGif.height / 2);
}
}
/*
void mousePressed() {
stopthat();
startthis();
// nonLoopingGif.play();
}
void keyPressed() {
if (key == ' ') {
if (pause) {
//loopingGif.play();
mymod.play();
pause = false;
}
else {
//loopingGif.pause();
mymod.pause();
pause = true;
}
}
}*/