Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
cb924b6
helloIPM
iriaPM Mar 13, 2024
31716fc
helloiria
iriaPM Mar 13, 2024
e8c12a1
wissam commit
Mar 13, 2024
ec1c18e
first commit wissy
Mar 13, 2024
ea5aeb5
moonies first comiit
stellarmoon Mar 13, 2024
a8ce67e
amber test
C22400154 Mar 20, 2024
fb03a3c
moonie
stellarmoon Mar 20, 2024
0dafd3f
song
iriaPM Mar 20, 2024
4c65da5
added first version of song
Mar 20, 2024
ad58df1
switch_statement
iriaPM Mar 20, 2024
98d8583
1st try cube
iriaPM Mar 20, 2024
2139fc2
packages
iriaPM Apr 8, 2024
4a2bbf8
cube
iriaPM Apr 10, 2024
81d7098
coordinatewithmusic
iriaPM Apr 10, 2024
47f55af
bubble
iriaPM Apr 10, 2024
371a7c5
coconut
iriaPM Apr 10, 2024
621182f
coconut2
iriaPM Apr 10, 2024
66b5496
three coconuts
iriaPM Apr 10, 2024
504ed90
morecase2
iriaPM Apr 14, 2024
6fa9ff6
songremix
iriaPM Apr 17, 2024
b3e30b5
remix
iriaPM Apr 17, 2024
f14550c
killing the cat
Apr 17, 2024
a0e1cef
Merge pull request #1 from mymunaalom/iria
iriaPM Apr 17, 2024
2cc5537
first commit wissy
Apr 17, 2024
9dda3e3
trying to merge
Apr 17, 2024
af546f2
Merge pull request #2 from mymunaalom/wissy
wissamhadjarab Apr 17, 2024
9017e2d
tikiface1
iriaPM Apr 17, 2024
d1cd54f
images change
iriaPM Apr 21, 2024
513623e
case1 update
iriaPM Apr 21, 2024
f5b4896
deleteimages
iriaPM Apr 21, 2024
b502b2e
palm tree start
iriaPM Apr 21, 2024
7691108
circle
iriaPM Apr 23, 2024
8b19d69
new circle
iriaPM Apr 23, 2024
19952fb
added comments and changed coconuts to move with mouse
iriaPM Apr 23, 2024
251a1f0
fix the coconuts
iriaPM Apr 23, 2024
5f3303b
trying tikiface again
iriaPM Apr 24, 2024
6f92151
first tiki face that works:)
iriaPM Apr 24, 2024
1029b77
coconut fix
iriaPM Apr 24, 2024
4a1a44a
multiple tikis
iriaPM Apr 24, 2024
f6f54d2
update coconuts
iriaPM Apr 24, 2024
275b62c
coconut fix again
iriaPM Apr 24, 2024
c511ef5
outlining the visual
Apr 24, 2024
acde442
fire
iriaPM Apr 24, 2024
1ae33ba
trying to do squidward
Apr 24, 2024
5efa780
circle
iriaPM Apr 24, 2024
574893b
beackground
iriaPM Apr 24, 2024
c31403c
trying to do background
Apr 24, 2024
3bdaaf6
iriasvisual
iriaPM Apr 24, 2024
06b28b2
Merge pull request #3 from mymunaalom/iria
iriaPM Apr 24, 2024
ecb6db0
fix
iriaPM Apr 24, 2024
c3c2edd
adding interactions
Apr 24, 2024
249e807
Merge pull request #4 from mymunaalom/wissy
wissamhadjarab Apr 24, 2024
2f0c030
render
iriaPM Apr 24, 2024
fd33856
render
iriaPM Apr 24, 2024
76c8328
fix
iriaPM Apr 24, 2024
501fa8b
palm tree
C22400154 Apr 25, 2024
ac66759
2 palm trees
C22400154 Apr 25, 2024
c770615
more fixing
iriaPM Apr 25, 2024
3860421
last errors
iriaPM Apr 25, 2024
00fb666
Merge pull request #5 from mymunaalom/iria
iriaPM Apr 25, 2024
2649d66
palm trees moving
C22400154 Apr 25, 2024
9e15907
waveform file works
iriaPM Apr 25, 2024
16ee200
moon
stellarmoon Apr 25, 2024
f74fac7
Merge branch 'master' of https://github.com/mymunaalom/MusicVisuals
stellarmoon Apr 25, 2024
7fce828
clouds
C22400154 Apr 25, 2024
6052d07
flowers 1
C22400154 Apr 25, 2024
e898666
flowers to beat
C22400154 Apr 25, 2024
a60806c
adding waves
Apr 25, 2024
0356956
skirt
iriaPM Apr 25, 2024
08a6ed3
skirts
iriaPM Apr 25, 2024
30d1726
final
iriaPM Apr 25, 2024
7690e67
final?
iriaPM Apr 25, 2024
c4206b7
adding falling bananas
Apr 25, 2024
169dac3
skirts final touch
iriaPM Apr 25, 2024
9a65451
Merge pull request #6 from mymunaalom/iria
iriaPM Apr 25, 2024
d27b059
switch works finally
iriaPM Apr 26, 2024
dc695cb
Merge branch 'master' into iria
iriaPM Apr 26, 2024
274dde7
Merge pull request #7 from mymunaalom/iria
iriaPM Apr 26, 2024
3bee4cd
working on screen sizing
Apr 26, 2024
4394772
Merge branch 'master' of https://github.com/mymunaalom/MusicVisuals
Apr 26, 2024
968a301
moonie
stellarmoon Apr 26, 2024
460f5d3
moon commit
stellarmoon Apr 26, 2024
eb63daa
main works
iriaPM Apr 26, 2024
bec0ba4
Merge branch 'master' of https://github.com/mymunaalom/MusicVisuals
iriaPM Apr 26, 2024
c7bfb35
main
iriaPM Apr 26, 2024
3169af7
adding background
Apr 26, 2024
14a257a
background
Apr 26, 2024
d600a85
skirts
iriaPM Apr 26, 2024
0e22a13
Merge branch 'master' of https://github.com/mymunaalom/MusicVisuals
iriaPM Apr 26, 2024
9f90943
skirts
iriaPM Apr 26, 2024
8e6d374
main
stellarmoon Apr 26, 2024
96a57b7
Merge branch 'master' of https://github.com/mymunaalom/MusicVisuals
stellarmoon Apr 26, 2024
431e8cc
trying to get main
Apr 26, 2024
3bccc6f
Merge branch 'master' of https://github.com/mymunaalom/MusicVisuals
Apr 26, 2024
b054c42
zoom fix
stellarmoon Apr 26, 2024
fd7efa8
Merge branch 'master' of https://github.com/mymunaalom/MusicVisuals
stellarmoon Apr 26, 2024
f9f1304
finalyyyy
iriaPM Apr 26, 2024
78644f8
ambercommit
C22400154 Apr 26, 2024
8b3be4f
final
stellarmoon Apr 26, 2024
ff43155
amber commit 2
stellarmoon Apr 26, 2024
efd97ee
Merge pull request #8 from mymunaalom/amber
iriaPM Apr 26, 2024
89eebc9
final touch
stellarmoon Apr 26, 2024
2e21250
Update README.md
wissamhadjarab Apr 26, 2024
a7d429d
Update README.md
iriaPM Apr 27, 2024
ebc3e05
Update README.md
iriaPM Apr 27, 2024
aa0c0a2
Update README.md
iriaPM Apr 27, 2024
41d5903
Update README.md
iriaPM Apr 27, 2024
e49e0c8
Update README.md
iriaPM Apr 27, 2024
0359b4d
Update README.md
C22400154 Apr 27, 2024
d610d0c
Update README.md
C22400154 Apr 27, 2024
a515d43
Update README.md
C22400154 Apr 27, 2024
741ddad
Update README.md
wissamhadjarab Apr 27, 2024
a01a085
Update README.md
C22400154 Apr 27, 2024
53d8020
Update README.md
C22400154 Apr 27, 2024
869a8ed
Update README.md
C22400154 Apr 27, 2024
b20c993
Update README.md
C22400154 Apr 27, 2024
6e3e4d0
Update README.md
C22400154 Apr 27, 2024
8855b38
wissyREADME.md
wissamhadjarab Apr 27, 2024
7a27edd
wissyREADME.md
wissamhadjarab Apr 27, 2024
4f92d03
wissyREADME.md
wissamhadjarab Apr 27, 2024
65c1835
Update README.md
C22400154 Apr 27, 2024
90751f1
Update README.md
C22400154 Apr 27, 2024
89ecf7e
Update README.md
mymunaalom Apr 28, 2024
d09f8fb
Add files via upload
mymunaalom Apr 28, 2024
b3710b6
Add files via upload
mymunaalom Apr 28, 2024
3b3a8bb
Rename Screenshot 2024-04-28 172939.png to amberSS
mymunaalom Apr 28, 2024
6b716ee
Rename Screenshot 2024-04-28 173110.png to WissamImage
mymunaalom Apr 28, 2024
cfc1a2d
Rename Screenshot 2024-04-28 173000.png to mymunaImage
mymunaalom Apr 28, 2024
8d1e7e4
Rename Screenshot 2024-04-28 174357.png to IriaImage
mymunaalom Apr 28, 2024
9afc536
Delete images/Screenshot 2024-04-28 173018.png
mymunaalom Apr 28, 2024
9f890eb
Update README.md
mymunaalom Apr 28, 2024
7a2ba4e
Update README.md
mymunaalom Apr 28, 2024
f85fd00
Update and rename IriaImage to IriaImage.png
mymunaalom Apr 28, 2024
bb31050
Update and rename WissamImage to WissamImage.png
mymunaalom Apr 28, 2024
27fbfdc
Update and rename amberSS to amberSS.png
mymunaalom Apr 28, 2024
bcea201
Update and rename mymunaImage to mymunaImage.png
mymunaalom Apr 28, 2024
7289cc3
Update README.md
iriaPM Apr 28, 2024
a908048
Delete images/IriaImage.png
mymunaalom Apr 28, 2024
bd67f34
Delete images/WissamImage.png
mymunaalom Apr 28, 2024
4bda931
Delete images/amberSS.png
mymunaalom Apr 28, 2024
23536a2
Delete images/mymunaImage.png
mymunaalom Apr 28, 2024
c7c8cee
Add files via upload
mymunaalom Apr 28, 2024
b278325
Update README.md
mymunaalom Apr 28, 2024
96f07e9
Update README.md
iriaPM Apr 28, 2024
c5c7af2
Update README.md
iriaPM Apr 28, 2024
488175d
Update README.md
iriaPM Apr 28, 2024
08d5dce
Update README.md
iriaPM Apr 28, 2024
a534274
Update README.md
iriaPM Apr 28, 2024
fe9ca6e
Update README.md
iriaPM Apr 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
"configurations": [
{
"type": "java",
<<<<<<< HEAD
"name": "ambersVisual",
"request": "launch",
"mainClass": "C22400154.ambersVisual",
=======
"name": "MusicVisualizer",
"request": "launch",
"mainClass": "c22368271.MusicVisualizer",
>>>>>>> 8b3be4fbce12a731e0d2402b35d1105a3f8b5226
"projectName": "java"
},
{
"type": "java",
"name": "IriaVisual2",
"request": "launch",
"mainClass": "c22305863.IriaVisual2",
"projectName": "java"
},
{
"type": "java",
"name": "CodeLens (Launch) - Main",
"request": "launch",
"mainClass": "ie.tudublin.Main",
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.debug.settings.onBuildFailureProceed": true
}
446 changes: 399 additions & 47 deletions README.md

Large diffs are not rendered by default.

Binary file added images/AmberSS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/IriaSS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/MymunaSS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/WissamSS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions java/.project
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
</natures>
<filteredResources>
<filter>
<id>1616413840733</id>
<id>1710347678049</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
Expand Down
Binary file not shown.
Binary file added java/data/banana_pic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added java/data/skirt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added java/data/song.mp3
Binary file not shown.
Binary file added java/data/spongeBG.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added java/data/spongeFlower.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added java/data/tiki_face3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
290 changes: 290 additions & 0 deletions java/src/C22400154/ambersVisual.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,290 @@
package C22400154;

import ddf.minim.AudioBuffer;
import ddf.minim.AudioInput;
import ddf.minim.AudioPlayer;
import ddf.minim.Minim;
import processing.core.PApplet;
import java.util.ArrayList;




public class ambersVisual extends PApplet
{
Minim minim;
AudioPlayer ap;
AudioInput ai;
AudioBuffer ab;

int mode = 0;// default mode for switch statement

float[] lerpedBuffer;
float y = 0; // vertical position
float ySpeed = 2;
float smoothedY = 0;
float smoothedAmplitude = 0;
float outsideRadius = 150;
float insideRadius = 100;

ArrayList<Cloud> clouds;
ArrayList<Flower> flowers;
boolean flowersStarted = false;

public void keyPressed() {
if (key >= '0' && key <= '9') {
mode = key - '0';
}
if (keyCode == ' ') {
if (ap.isPlaying()) {
ap.pause();
} else {
ap.rewind();
ap.play();
}
}

switch (mode) {
case 0:
draw();
break;

default:
break;
}

}

public void settings() {
size(1024, 600, P3D);
// fullScreen(P3D, SPAN);
// size(1024,700);
}

public void setup() {
minim = new Minim(this);
// Uncomment this to use the microphone
// ai = minim.getLineIn(Minim.MONO, width, 44100, 16);
// am = ai.mix;
ap = minim.loadFile("Squidward's Tiki Land Psy-Trance Remix.mp3", 1024);

ap.play();
ab = ap.mix;
colorMode(RGB, 255);

y = height / 2;
smoothedY = y;

lerpedBuffer = new float[width];

clouds = new ArrayList<Cloud>();

for (int i = 0; i < 5; i++) {
clouds.add(new Cloud(random(width), random(height * 0.2f), random(50, 100), random(1, 3)));

}

flowers = new ArrayList<Flower>();

}

float off = 0;

public void draw()
{
float average = 0;
float sum = 0;
off += 1;

for (int i = 0; i < ab.size(); i++)
{
sum += abs(ab.get(i));
lerpedBuffer[i] = lerp(lerpedBuffer[i], ab.get(i), 0.05f);
}
average = sum / (float) ab.size();
smoothedAmplitude = lerp(smoothedAmplitude, average, 0.1f);

background(152, 193, 217);

float averageAmplitude = getAverageAmplitude(ab);

float treeX1 = width / 4;
float treeX2 = width * 3 / 4;

float treeY1 = map(averageAmplitude, 0, 1, height * 0.7f, height * 0.9f);
float treeY2 = map(averageAmplitude, 0, 1, height * 0.7f, height * 0.9f);

for (Cloud c : clouds)
{
c.move();
c.display();
}

drawTree(treeX1, treeY1, 1.5f);
drawTree(treeX2, treeY2, 1.5f);

if (ap.isPlaying())
{
int currentPosition = ap.position();
if (currentPosition >= 19000 && currentPosition < 45000)
{
int timeInterval = currentPosition - 19000;
if (timeInterval % 7000 <= 40)
{
startFlowers();
}
}

}

for (Flower flower : flowers)
{
flower.update();
flower.display(this);
}



}

float getAverageAmplitude(AudioBuffer buffer) {
float sum = 0;
for (int i = 0; i < buffer.size(); i++) {
sum += abs(buffer.get(i));
}
return sum / buffer.size();
}

void drawTree(float x, float y, float scale)
{
//trunk
fill(55, 40, 28);
rect(x - 10 * scale, y, 20 * scale, 150 * scale);

//leaves
fill(19, 128, 99);

//topleft
beginShape();
vertex(x + 10 * scale, y);
bezierVertex(x - 50 * scale, y - 60 * scale, x - 70 * scale, y + 20 * scale, x - 50 * scale, y + 60 * scale);
bezierVertex(x - 20 * scale, y + 20 * scale, x - 40 * scale, y - 10 * scale, x, y);
endShape(CLOSE);

//left
beginShape();
vertex(x - 10 * scale, y);
bezierVertex(x - 80 * scale, y - 30 * scale, x - 90 * scale, y + 10 * scale, x - 70 * scale, y + 50 * scale);
bezierVertex(x - 30 * scale, y + 20 * scale, x - 40 * scale, y - 10 * scale, x - 10 * scale, y);
endShape(CLOSE);

//right
beginShape();
vertex(x + 10 * scale, y);
bezierVertex(x + 80 * scale, y - 30 * scale, x + 90 * scale, y + 10 * scale, x + 70 * scale, y + 50 * scale);
bezierVertex(x + 30 * scale, y + 20 * scale, x + 40 * scale, y - 10 * scale, x + 10 * scale, y);
endShape(CLOSE);

//topright
beginShape();
vertex(x + 10 * scale, y);
bezierVertex(x + 50 * scale, y - 60 * scale, x + 80 * scale, y - 20 * scale, x + 50 * scale, y + 20 * scale);
bezierVertex(x + 20 * scale, y - 20 * scale, x + 30 * scale, y - 40 * scale, x + 10 * scale, y);
endShape(CLOSE);
}

class Cloud
{
float x, y, size, speed;

Cloud(float x, float y, float size, float speed)
{
this.x = x;
this.y = y;
this.size = size;
this.speed = speed;
}

void display()
{
noStroke();
fill(255);
float angleStep = TWO_PI / 10;
ellipse(x, y, size * 2, size * 0.8f);
for (float angle = 0; angle < TWO_PI; angle += angleStep)
{
float vx = x + cos(angle) * size;
float vy = y + sin(angle) * size * 0.5f;
ellipse(vx, vy, (float)(size * 0.8), (float)(size * 0.8));
}
}

void move()
{
x += speed;
if (x > width + size / 2)
{
x = -size / 2;
}
}
}

public class Flower
{
float x, y;
float vx, vy;
float size;
int color;

public Flower(float x, float y, float vx, float vy, float size, int color)
{
this.x = x;
this.y = y;
this.vx = vx * 2;
this.vy = vy * 2;
this.size = size;
this.color = color;
}

public void update()
{
x += vx;
y += vy;
}

public void display(PApplet p)
{
p.noStroke();
p.fill(color);
float petalAngleIncrement = TWO_PI / 5;
for (int i = 0; i < 5; i++) {
float angle = i * petalAngleIncrement;
float petalX = x + cos(angle) * size * 0.8f;
float petalY = y + sin(angle) * size * 0.8f;
p.ellipse(petalX, petalY, size * 1.1f, size * 1.1f);
}
}
}

void startFlowers()
{
for (int i = 0; i < 75; i++)
{
float x = random(width);
float y = random(height);
float vx = random(-2, 2);
float vy = random(-2, 2);
float size = random(20, 40);
int color = color(random(255), random(255), random(255));
flowers.add(new Flower(x, y, vx, vy, size, color));
}
}



public static void main(String[] args)
{
PApplet.main("C22400154.ambersVisual");
}

}
Loading