Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
2a2c0d4
Update README.md
AlexDergach Mar 23, 2022
2e485cf
First Test Commit
AlexDergach Mar 23, 2022
9f06496
Alexs second commit
AlexDergach Mar 23, 2022
6187765
Jay First Commit
jaycelmarie Mar 23, 2022
854abf9
Deleted Jays commit
AlexDergach Mar 23, 2022
373c92d
Added all packages for teammates
AlexDergach Mar 23, 2022
222b3bd
Added Visual Subclasses
AlexDergach Mar 23, 2022
94773dc
Imported Packages into packages
AlexDergach Mar 23, 2022
0583f56
Mende's first commit
mendebto Mar 23, 2022
3f6588b
Deleted Mendes Commit
AlexDergach Mar 23, 2022
3800ee1
Changed Folders
AlexDergach Apr 18, 2022
7b5ed92
Set Up
AlexDergach Apr 18, 2022
6b5536a
test commit
AlexDergach Apr 18, 2022
848265b
Branch test
AlexDergach Apr 18, 2022
24567db
Bug fixing
AlexDergach Apr 18, 2022
932e8d7
Alexs commit
AlexDergach Apr 19, 2022
1b954b8
Started on Alex's Visuals, completed most, need to figure out beat de…
AlexDergach Apr 29, 2022
252c69c
Modified Alex Visuauls, Added Working Menu
AlexDergach Apr 30, 2022
b0d2b4e
mende first commit
mendebto Apr 30, 2022
d7d6de8
Jay First Render
jaycelmarie Apr 30, 2022
bc375ea
Merged Master Branch with alex
AlexDergach Apr 30, 2022
519ac19
Merge branch 'mende'
AlexDergach Apr 30, 2022
ae6f8b3
Merge mende
AlexDergach Apr 30, 2022
0258897
mendes first commit again
mendebto Apr 30, 2022
3c32311
Merge branch 'master' of https://github.com/AlexDergach/MusicVisuals …
mendebto Apr 30, 2022
b2009de
Fixed Menu Button
jaycelmarie Apr 30, 2022
9e9a675
Fixed bugs
AlexDergach Apr 30, 2022
1250578
mende stressed out pt1
mendebto Apr 30, 2022
6929abc
Merge branch 'master' of https://github.com/AlexDergach/MusicVisuals …
mendebto Apr 30, 2022
9d69f52
Finished Menu
AlexDergach Apr 30, 2022
1a5c540
Final
jaycelmarie Apr 30, 2022
11c2b4b
mende stressed out pt2
mendebto Apr 30, 2022
d3da4b9
Merged branches
AlexDergach Apr 30, 2022
ad99ed3
Bug fixes
AlexDergach Apr 30, 2022
3cd7812
Merged Mendes Branch
AlexDergach Apr 30, 2022
edf6ebc
Changes made
jaycelmarie May 2, 2022
d314f3c
Finished Alexs Visuals, Fixed Bugs on Menu, Commented all Code
AlexDergach May 2, 2022
7313512
Render two start
jaycelmarie May 2, 2022
7b8a0e7
Test Merge
AlexDergach May 2, 2022
533d572
Empty Commit
AlexDergach May 2, 2022
5b72e72
Bugs
AlexDergach May 2, 2022
410e557
Added More options for menu to seconds renders
AlexDergach May 3, 2022
f5bd4d3
Merge branch 'alex'
AlexDergach May 3, 2022
5be3f8d
Merged Menus
AlexDergach May 3, 2022
9feb6a6
Particals
AlexDergach May 3, 2022
3a478d2
Finished Jays 2d Render
May 5, 2022
f928107
Added Jay 2 and Alex 2
AlexDergach May 5, 2022
d626a28
Added Comments
AlexDergach May 5, 2022
6faacba
Bug fixes
AlexDergach May 5, 2022
48a9696
Added background to menu, started on report
AlexDergach May 5, 2022
5c07a31
Bugs
AlexDergach May 5, 2022
95d3700
Worked on report, and commented particals.java
AlexDergach May 5, 2022
ff583bb
More report work
AlexDergach May 5, 2022
13302d6
Report
AlexDergach May 5, 2022
0da870b
Report
AlexDergach May 5, 2022
9d483a2
Report
AlexDergach May 5, 2022
4918d23
Update README.md
jaycelmarie May 5, 2022
16ebff4
Update README.md
jaycelmarie May 5, 2022
b4b96a3
mendes stressed pt3
mendebto May 5, 2022
c3d5461
mende final commit
mendebto May 6, 2022
951db83
mende final commit pt2
mendebto May 6, 2022
4e04953
mende report written
mendebto May 6, 2022
cc32b18
mendes final final commit
mendebto May 6, 2022
e5cf9d6
merged
AlexDergach May 6, 2022
99d6634
clean up
mendebto May 6, 2022
c931408
final changes
AlexDergach May 6, 2022
ba1ed34
Commit
AlexDergach May 6, 2022
9d9e7cf
Merge branch 'mende' of https://github.com/AlexDergach/MusicVisuals i…
AlexDergach May 6, 2022
aab468f
Merge branch 'mende'
AlexDergach May 6, 2022
fb3ed53
Yt
AlexDergach May 6, 2022
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
266 changes: 212 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,89 +1,247 @@
# Music Visualiser Project

Name:
Name: Alexander Dergach, Jaycel Estrellado, Mendbayar Bat-Orshikh

Student Number:
Student Number: C20401562, C20372876, C20458384

## Instructions
- Fork this repository and use it a starter project for your assignment
- Create a new package named your student number and put all your code in this package.
- You should start by creating a subclass of ie.tudublin.Visual
- There is an example visualiser called MyVisual in the example package
- Check out the WaveForm and AudioBandsVisual for examples of how to call the Processing functions from other classes that are not subclasses of PApplet
Song: Love Is A Miracle, *Jinco*

# Description of the assignment
Welcome to our Music Visualizer Project. This assignment will consist of 5 distinct visual effects. An interactive menu will be displayed and as the user, you are able to switch through different renders using button clicks.

### First Visual

The first Visual is comprised of 3 components, center, side and top/bottom.
In the center there is two distorted semi circles, made of thin lines each respective line being sound responsive with both size and colour, they are separated giving room for a row of ellipses in the middle, which are also synchronizing with the music. From the very center steams a flower pattern made of dots along with a beam of colour going off to the corner of the screen, the flower petal design vibrating as the music plays intensifies with the amplitude, the lazer beam also being sound responsive and only visible when the actual song is playing.
At the sides you will find two identically placed illustrations, made of ellipses with no fill creating a scribble effect and the width and height of the ellipses changing with the song.
Random generated lines are placed at the top and bottom of the screen and it is also synchronizing with the music- adding a more visualizing effect to the program.
Adding this randomly generated beams, creates a more chaotic approach to the visual contrasting with the other effects.

![An image](java/data/FirstVis.png)

### Second Visual

The second Visual has a more symmetrical element, using 3 cubes on the center line, with a sphere in the very center, and sin waves covering the border of the screen.
The very center Cube is actually comprised of multiple smaller cubes creating one large cuboid, this cube is a plain grey colour at first but it changes colour values only when the beat is detected. In the center of the cuboid is a white sphere with a fixed position giving the user a fixed point on the visual. This is needed as each cube is rotating and it gives a sense of order to the elements. This rotation is depended on the amplitude of the song playing, when paused the cubes remain in there fixed position only rotating by the default amount.
The two side cubes are music responsive and will rotate as well as change colour with the music as the cuboid, since they are not filled in, with the rotation and colour change they give a slight pop out visual - adding to the already 3D effect.
The Sin waves on the borders are sound responsive and move according to the calculated frequency, there colours being of the full rainbow spectrum giving the visual a nice colour. This vibrant colour scheme will be seen through the rest of the visuals.

![An image](java/data/secondvis.png)

### Third Visual

Our Third Visual contains the most aspects. In the center we have a custom made *Devil* emoji, lines radiating from the center in a black circle that has a smooth sin wave curving in and our of the circles borders. On the sides we have two almost 3D looking rotating triangles creating an X graphic, a beat responsive practical background. All the colours being of the rainbow spectrum responsive to the amplitude of the song to keep this visual uniform.
The devil emoji creates a center piece for the visual, with the strokes being colour responsive to the music, around it are vertical and horizontal lines that are also colour responsive along with moving with the sound, as it intensifies the lines start creating different shapes around the devil emoji creating a very interesting effect, from donuts to squares. The circle that holds both those elements has a sin wave as its border, smoothened to create a wave effect that is amplified with the song.
The two side graphics are made to look 3D a lot they are just triangles rotating from the center, once fully rotated creating an X and its scale, once fully rotated, is depended on the amplitude of the song.
The background is made of a natural flowing partials that speed up the flow as the songs frequency increases along with partials that only appear upon beat detection.

![An image](java/data/thirdvis.png)

### Fourth Visual

The fourth visual, is the more geometrical of the visuals, giving a new sense to the project, comprised of a 3D center piece along with multiple evenly placed sin waves.
In the center are four nested triangles made up of vectors, each triangle being colour responsive to the sound and getting bigger as the layers go. The center triangle is a fixed white colour to match the 4 spheres that are around the triangle, giving the visual a fixed look. The spheres along with the triangles are being rotated by a fixed rate, amplified by the songs amplitude, similar to the cuboid logic. The spheres along with being rotated also scale in size with the sound. The colours for this visuals are a little darker to change the up the feel of the very vibrant visuals, with the sin waves being black rather then rainbow, being evenly places horizontally and vertically.

![An image](java/data/fourthvis.png)

### Fifth Visual

The fifth visual makes a pulsating "eye" effect.

It features a big red outermost layer of the eye that is made up of an array of ellipses giving it the further detail that an eye has while also changing size depending on the amplitude of the song. The outermost layer also changes to random colours when a beat is detected giving it a creepy vibe. The middle layer is there to fill in the space between the iris and outer layer so the composition of the graphic doesn't look empty. The iris is made to bump up and down like the outer layer but instead of soreading to the inside and outside, this layer just spreads outside. This effect also lets us have an after image when the song is finished where the irish slowly transitions and fades away.

![An image](java/data/fifthvis.png)


# Instructions

### Starting Visuals

- First you clone this repository
- Open it in an IDE, press *F5* to run the visual
- Opening the Main Menu

### Main Menu

- You may select a render and press on the middle play button to play that persons render

![An image](java/data/MainMenu.png)

- Menu will collapse into a lower menu, you are able to *loop*, *pause/play*, or *change* to another persons render

![An image](java/data/Lowermenu.png)

# How it works

# What I am most proud of in the assignment
Being the assignment we created a Main class to operate our renders, extending the visuals class from ie/tudublin and inheriting from the Mimim library.
- 3D = True
- Size of window = 1400 x 800
- Colour Mode = HSB

Also to give a big thank you to past years creative inspirations!

From here we were able to call all the other classes within a switch statement starting with the menu class by default.
```java
if(allowToPlay){
switch (mode)
{

case 0:
break;
case 1:
jay.render();
startm.lowerMenu();
break;
case 2:
jay2.render();
startm.lowerMenu();
break;
case 3:
for(int i = 0; i < particals; i++)
{
partical[i].render();
}
alex.render();
startm.lowerMenu();
break;
case 4:
alex2.render();
startm.lowerMenu();
break;
case 5:
mende.render();
startm.lowerMenu();
break;

}
}else{
startm.render();
}
```

The menu works off the *public void mouseClicked()* method, creating statements to allow the program to verify which render the user selected on the menu, and if it was selected then the user is allowed to play, the mode for the switch statement set for which render the user picked.
Once the user selects a render the menu is collapsed down, with an array of renders showing at the button along with a responsive play/pause button which changes depending on the songs state.

The sub classes, inherit from *Start.java* along with *Visuals.java*. With the use of processing we were able to create sound responsive designs by mapping the values from index's of a for loop and the audio buffers of the song as such:

# Markdown Tutorial
```java
float index = PApplet.map(i, 0 , 180 , 0, ab.size() - 1);
s.stroke(PApplet.map(index, 0, ab.size(), 0, 255), 255,255);
```

This is *emphasis*
The same logic being used to make it rotate to sound and grow in scale.
For a lot of the geometrical aspects of the visuals we needed to use mathematical formals such as sin, cos and radius' and example being the third graphics center circles smoothened border waves.

This is a bulleted list
```java
for(float i = 0f; i < 360; i += space){

- Item
- Item
float xoff = PApplet.map(cos(i), -1, 1, 0 ,3);
float yoff = PApplet.map(sin(i), -1, 1, 0 ,3);

This is a numbered list
float n = noise(xoff + start, yoff + start);

1. Item
1. Item
float h = PApplet.map(n, 0, 1, (amp*250) * -1 ,amp*500);

This is a [hyperlink](http://bryanduggan.org)
s.fill(map(amp, 0, 1, 0, 255), 255, 255);

# Headings
## Headings
#### Headings
##### Headings
s.rotate(space);

This is code:
s.rect(250,0,h,3);

```Java
public void render()
{
ui.noFill();
ui.stroke(255);
ui.rect(x, y, width, height);
ui.textAlign(PApplet.CENTER, PApplet.CENTER);
ui.text(text, x + width * 0.5f, y + height * 0.5f);
}
}
```
Using the processing library along with mapping of the sin position of the *i* index that's to 360, allowing us to create circles. Every visual being easer to map onto the screen using *push/pop Matrix's* along with *translate*, the idea of these processes is to change the coordinates of the starting x and y positions from 0,0 to the desired location and still keep it as 0,0 for indexing as such:

```java
//______________Center Matrix
s.pushMatrix();

So is this without specifying the language:
//Translating to middle of the screen
s.translate(s.width/2, s.height/2);

//_________________Center Circle
s.fill(15);
s.circle(0, 0, 500);

s.popMatrix();
```
public void render()
{
ui.noFill();
ui.stroke(255);
ui.rect(x, y, width, height);
ui.textAlign(PApplet.CENTER, PApplet.CENTER);
ui.text(text, x + width * 0.5f, y + height * 0.5f);
}

Moving from 2D shapes we were able to use 3D graphics as outlined in our setup method in the *Start.java*. Creating items such as spheres and cubes that responsive to sound, with scale and rotation.

```java
s.sphere(30 * s.getSmoothedAmplitude() * 7);

s.rotateY(s.angle);
s.rotateX(s.angle);
s.box(f);
```

This is an image using a relative URL:
# Project Managment

For effective team work we seperated our roles.

![An image](images/p8.png)
| Team Member | Roles |
|-----------|-----------|
|Jay | Two Renders, Designer |
|Alex | Two Renders, Merge Handler, Menu Creation|
|Mende | Render|

This is an image using an absolute URL:
# What I am most proud of in the assignment

![A different image](https://bryanduggandotorg.files.wordpress.com/2019/02/infinite-forms-00045.png?w=595&h=&zoom=2)
As a group we were proud of the whole project but to identifiy each renders outstanding values would be :

This is a youtube video:
1. Menu -
When it came to the menu, the complex use of the mouse methods from proccessing, allowing to create an almost high end menu. Helping me understand how menus such as Spotify or Youtube are created. With the ability to select specific renders within the respective ranges. I have further gained knowledge while coding the menu part in processing - loading in png and jpg images onto the screen. I really love the aesthetic that we have gone with our menu with the background contrasting with the buttons and when a render is chosen, it highlights the opposite colour around it.

[![YouTube](http://img.youtube.com/vi/J2kHSSFA4NU/0.jpg)](https://www.youtube.com/watch?v=J2kHSSFA4NU)
2. Visual 3 -
The third visual is one of my favourite in this assignment. Whether idea and implementation, both made me really excited after achieving the final result. Especially the custom devil emoji that was created, which was very fun and interesting to make. The use of mathematical concepts in processing to create a sine wave that curves around a circle creating a smoothened wave thats sound and colour responsive.

This is a table:
3. Default Rotation -
Another aspect of our project that I am most proud of is the default rotation of shapes when the music stops. The rotation depends on the amplitude of the song playing. In regards to the rotation and turning - I am also very proud of the rubix cube from the Second Visual. It was an idea I did not think I would be able to visualise on the project. As I was doing research on what to do for the project, I came across a forum on rubix cubes and thought how I would be able to implement small cubes that make up a bigger cube that rotates and turns. I thought that it would consist of some heavy coding but to my surprise it was very short to implement.

```java
float size = 100;

s.pushMatrix();

s.translate(s.width/2, s.height/2);

//Rotation Of Cubiod

s.rotateX(s.angle);
s.rotateY(s.angle);
s.rotateZ(s.angle);

for (int xo = (int)-size; xo <= size; xo += 30) { //Spacing between each box
for (int yo = (int)-size; yo <= size; yo += 30) {
for (int zo = (int)-size; zo <= size; zo += 30) {
s.pushMatrix();
s.translate(xo, yo, zo); //Positions of each cube

//Rotates boxes
s.rotateX(s.angle);
s.rotateY(s.angle);
s.rotateZ(s.angle);
s.noStroke();

s.strokeWeight(4);
s.fill(c); //Filling the inside of the boxes white

//Changing cubiod colour on beat detection
if(s.beat.isOnset()){
s.fill(c, 255, 255);
}

s.box((float) (15 + (Math.sin(s.angle1)) * 10));
s.popMatrix();
}
s.angle += 0.00005f; //Speed of rotation
s.angle1 += 0.00005f;
```


Our YouTube Video:

[![YouTube]](https://www.youtube.com/watch?v=RUKFmpijMn4)

| Heading 1 | Heading 2 |
|-----------|-----------|
|Some stuff | Some more stuff in this column |
|Some stuff | Some more stuff in this column |
|Some stuff | Some more stuff in this column |
|Some stuff | Some more stuff in this column |

16 changes: 16 additions & 0 deletions bash.exe.stackdump
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Stack trace:
Frame Function Args
000FFFFCD30 0018006293E (001802847A0, 0018026FE51, 00000000059, 000FFFFB710)
000FFFFCD30 0018004846A (000FFFFCD30, 00100000000, 00000000000, 00000000001)
000FFFFCD30 001800484A2 (00000000000, 00000000000, 00000000059, 9069A7B88A6C96FF)
000FFFFCD30 0018006E2A6 (00180045323, 001803529C8, 00000000000, 0000000000D)
000FFFFCD30 0018006E2B9 (00180045170, 001802377E0, 001800448F2, 000FFFFC910)
000FFFFCD30 00180070CE4 (00000000013, 00000000001, 000FFFFC910, 00180272640)
000FFFFCD30 0018005AB45 (000FFFFCA60, 00000000000, 00000000000, 008FFFFFFFF)
000FFFFCD30 0018005B315 (00800000010, 00000000000, 000FFFFCD30, 000000303E9)
000FFFFCD30 0018005B827 (001800D995E, 00000000000, 00000000000, 00000000000)
000FFFFCD30 0018005BB36 (00000000000, 000FFFFCD30, FFFFFFFFFFFFFFC9, 00000000000)
000FFFFCD30 00180048C0C (00000000000, 00000000000, 00000000000, 00000000000)
000FFFFFFF0 00180047716 (00000000000, 00000000000, 00000000000, 00000000000)
000FFFFFFF0 001800477C4 (00000000000, 00000000000, 00000000000, 00000000000)
End of stack trace
Binary file added java/data/BG.jpg
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/FirstVis.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/Lowermenu.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/MainMenu.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.wav
Binary file not shown.
Binary file added java/data/fifthvis.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/fourthvis.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 removed java/data/heroplanet.mp3
Binary file not shown.
Binary file added java/data/secondvis.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/thirdvis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading