diff --git a/README.md b/README.md index 024bb765b..e765d0c40 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Music Visualiser Project -Name: +Name: aleena Student Number: @@ -18,7 +18,7 @@ Student Number: # How it works # What I am most proud of in the assignment -- I chose the song for this and im half proud of myself and half hate myself for choosing such an upbeat, classic and fun yet such an annoying, +- I chose the song for this and im half proud of myself and half hate myself for choosing such an upbeat, classic and fun yet such an annoying song - Time stamps : 0-27s Amy, 28-42s Aleena, 43-1.10s Roxana, 1.11-1.24s Aleena, 1.24-1.50s Ciara # Rough draft - Time stamps : 0-27s Amy, 28-42s Aleena, 43-1.10s Roxana, 1.11-1.24s Aleena, 1.24-1.50s Ciara diff --git a/git b/git new file mode 100644 index 000000000..e69de29bb diff --git a/h -f origin master b/h -f origin master new file mode 100644 index 000000000..388e52d04 --- /dev/null +++ b/h -f origin master @@ -0,0 +1,440 @@ +commit 86702c6444a830614cdb1e616e6562818d3d8ba9 (HEAD -> rr.1, upstream/master, origin/master, origin/HEAD) +Merge: b6f3fcf e9ecda6 +Author: aleenamatt1 <129902591+aleenamatt1@users.noreply.github.com> +Date: Tue Mar 26 14:54:34 2024 +0000 + + Merge pull request #5 from aibourk/am.1 + + Am.1 + +commit e9ecda63ce6936f9f9022974c10ee2008db8064f (origin/am.1) +Merge: c9b5545 26dfab9 +Author: Aleena +Date: Tue Mar 26 14:51:21 2024 +0000 + + erge branch 'am.1' of https://github.com/aibourk/MusicVisuals into am.1 + +commit c9b5545e6db78931e7022affebb858b6abac00f0 +Author: Aleena +Date: Tue Mar 26 14:49:46 2024 +0000 + + test + +commit b6f3fcf40e495e69256622ed5a05906fb38c7717 (origin/rr.1) +Merge: 26dfab9 eb58204 +Author: c21374751 <158525844+c21374751@users.noreply.github.com> +Date: Tue Mar 26 14:46:24 2024 +0000 + + Merge pull request #4 from aibourk/rr.1 + + Rr.1 + +commit eb58204de32a5d061a07dc8404316e9be46c7922 +Merge: 5dc3c1d 26dfab9 +Author: Roxana +Date: Tue Mar 26 14:38:52 2024 +0000 + + Merge branch 'master' of https://github.com/aibourk/MusicVisuals into rr.1 + +commit 26dfab9d8b83a65e6cc5c4ed155440d3f1a7816c (upstream/am.1) +Merge: 1f71ba6 1e9f30c +Author: aleenamatt1 <129902591+aleenamatt1@users.noreply.github.com> +Date: Tue Mar 26 14:37:56 2024 +0000 + + Merge pull request #3 from aibourk/am.1 + + Am.1 + +commit 5dc3c1d0eb2265a2461d91d6c4a8eb1eae5f48ef (upstream/rr.1) +Merge: 41849ab 1f71ba6 +Author: Roxana +Date: Tue Mar 26 14:35:32 2024 +0000 + + Merge branch 'master' of https://github.com/aibourk/MusicVisuals into rr.1 + +commit 41849ab0ad6a47ef74bc1d9d9893c981b04f78a2 +Author: Roxana +Date: Tue Mar 26 14:31:38 2024 +0000 + + test + +commit 1f71ba652793dd94fc501b53dabba27cf72f4310 (upstream/ai.2, origin/ai.2) +Merge: a10ff6e 6be34dc +Author: Amy <124152568+aibourk@users.noreply.github.com> +Date: Tue Mar 26 14:31:09 2024 +0000 + + Merge pull request #2 from aibourk/ai.1 + + made OurVisuals file in tudublin folder + +commit 1e9f30cba61a284e48d6d5cb625aa2df06fe1659 +Author: Aleena +Date: Tue Mar 26 14:27:58 2024 +0000 + + test + +commit 6be34dcdf211aa543645211e445651536a01e6fb (origin/ai.1) +Author: Amy +Date: Tue Mar 26 14:25:07 2024 +0000 + + made OurVisuals file in tudublin folder + +commit 9620ac0d87ee017ad425923f353d887d9c39d339 +Merge: 0ddacf0 a10ff6e +Author: Aleena +Date: Tue Mar 26 13:42:03 2024 +0000 + + Merge branch 'am.1' of https://github.com/aibourk/MusicVisuals into am.1 + +commit a10ff6e36bb4a542cbf55742c5e23a60ee4153b6 (upstream/ct.1, origin/ct.1) +Author: Amy +Date: Tue Mar 26 13:35:40 2024 +0000 + + .DS_Store banished! + +commit 0ddacf05716712ca412b9d472e4e4173adbf7c98 +Author: Aleena +Date: Tue Mar 26 13:18:04 2024 +0000 + + deleted branch + +commit f99c622729d007e8d4fd29007c978eab63ac6e7c (master) +Author: Roxana +Date: Tue Mar 26 12:59:58 2024 +0000 + + r + +commit c0738588778a315bd97b01b1ec14f3ebfda86afc +Merge: df0f1f7 aaa79d7 +Author: Roxana +Date: Tue Mar 26 12:48:59 2024 +0000 + + Merge branch 'master' of https://github.com/aibourk/MusicVisuals + +commit df0f1f7d366c224c40d42b2a2e66c35a2746d071 +Author: Roxana +Date: Tue Mar 26 12:48:24 2024 +0000 + + roxana + +commit aaa79d758280b363c3b43c223709599ec89119ce +Author: Aleena +Date: Tue Mar 26 12:47:25 2024 +0000 + + test + +commit c0bd21496aeffe969ad03eb854d9f6a7695bad03 +Author: Aleena +Date: Tue Mar 26 12:44:52 2024 +0000 + + test + +commit 41ceea80b2c553c5c9817ef843e9eda6074f7524 +Merge: 450af97 beb8ac7 +Author: Aleena +Date: Tue Mar 26 12:38:56 2024 +0000 + + Merge branch 'master' of https://github.com/aibourk/MusicVisuals + +commit beb8ac73b176706d7fed5e88a818ad516633551c +Author: Roxana +Date: Tue Mar 26 12:28:19 2024 +0000 + + time stamps + +commit 450af97619cee764c049e6429acc4655a03755cc +Merge: 64457e7 59ccf83 +Author: Aleena +Date: Tue Mar 26 12:26:23 2024 +0000 + + aleena + +commit 64457e72acb031ff05a9ec1dbbcaeeedb8f89e80 +Author: Aleena +Date: Tue Mar 26 11:45:25 2024 +0000 + + aleena + +commit 59ccf83ebaabe1fb42513b4688c545183ff6b01e +Author: Amy +Date: Mon Mar 25 18:24:10 2024 +0000 + + fixing .gitignore .DS_Store + +commit bdafc82ecc9aeb623e8406a4492a2b49fc60f124 +Author: Amy +Date: Mon Mar 25 18:22:04 2024 +0000 + + removing .DS_Store + +commit a082365638d9fd25b011d9345bf7f46bc1d30746 +Author: Amy +Date: Mon Mar 25 18:19:34 2024 +0000 + + committing + +commit e13114ba79c36a7c85151424de0646f884972bc5 +Author: Amy +Date: Mon Mar 25 18:14:49 2024 +0000 + + committing + +commit 222b0cee6faa7f9b42171c284b1c4563b8229653 +Author: Amy +Date: Mon Mar 25 18:14:22 2024 +0000 + + committing + +commit feb72838d317b1fabfb7a2c124035c20c31e9587 +Author: Amy +Date: Mon Mar 25 18:13:36 2024 +0000 + + committing + +commit d2b71a764f1a21c78f7211df5a4997f679055e72 +Author: Amy +Date: Mon Mar 25 17:59:23 2024 +0000 + + Added basis code to visual files + +commit f05081358ebbfe461396bb9a6cadf71b17070239 +Author: Amy +Date: Mon Mar 25 15:49:32 2024 +0000 + + Added student number packages and created visual files + +commit 5f84d80a1da8ae6be1aeb67c35cc0223400e3803 +Author: Amy +Date: Tue Mar 19 16:08:40 2024 +0000 + + add song to code + +commit 17c3f6cfc2c49f5e442c7c1084a99dad5700ef2f +Author: Amy +Date: Tue Mar 19 16:01:31 2024 +0000 + + add song to code + +commit be1a7c426f35446d06c6ea4f4524ef61dbf02fbe +Author: Amy +Date: Tue Mar 19 15:50:12 2024 +0000 + + removed space in song name + +commit b3e42de810dfc2e0a6f9e7985d617e827dea48f2 +Author: Amy +Date: Tue Mar 19 15:48:02 2024 +0000 + + changed song type (.mp3) + +commit f3962791c5d7cf531bf1e5a37638d6e299a598ce +Merge: 3dc85a3 7e2d0eb +Author: Amy +Date: Tue Mar 19 15:44:40 2024 +0000 + + Merge branch 'master' of https://github.com/aibourk/MusicVisuals + merge conflict solve + +commit 3dc85a3c4dda8955e1c37da79bc998f08a776f3c +Author: Amy +Date: Tue Mar 19 15:40:30 2024 +0000 + + added song + +commit 7e2d0eb0d847d0a470d7491a912c226439e7a420 +Author: Amy +Date: Tue Mar 19 15:40:30 2024 +0000 + + created araVisual.java + +commit 8b43fe18921602a83bf65079f8f810ffb2e9d21c +Merge: 15e176e e2fde35 +Author: Aleena +Date: Tue Mar 19 15:09:34 2024 +0000 + + aleena + +commit e2fde3568fba298cb96bb58d69effbbe0f48bd4b +Merge: 5cf1d2c 9e24cfb +Author: Roxana +Date: Tue Mar 19 15:04:18 2024 +0000 + + Resolved merge conflict in java/.project + +commit 5cf1d2cbb2c1a17688c8360bf10f730a810b447d +Author: Roxana +Date: Tue Mar 19 14:53:40 2024 +0000 + + Hi + +commit 9e24cfbc891f537e45c500a17cfbf1167bdde6a5 +Author: Amy +Date: Tue Mar 19 14:51:44 2024 +0000 + + created araVisual.java + +commit 15e176e1f18b506b394b17abb805bb37e64e17f1 +Author: Aleena +Date: Tue Mar 19 14:49:59 2024 +0000 + + hi + +commit 2eb77c6597c6f58ceaa879b799374ef7cff2975d +Merge: 994cc69 17d8cb0 +Author: Amy +Date: Tue Mar 19 14:45:33 2024 +0000 + + new package + +commit 994cc69cc05b93085333144999262bc2a2dde7a1 +Author: Amy +Date: Tue Mar 19 14:44:43 2024 +0000 + + new package + +commit 6b9e4b5f10903ed3690794c235ff8f8c39f34f17 +Author: Amy +Date: Tue Mar 19 14:43:48 2024 +0000 + + new package + +commit 17d8cb0b520eee31ae714207791ba07f87d245a0 +Author: Aleena +Date: Wed Mar 13 17:19:15 2024 +0000 + + aleena + +commit 4c7cb2161524d10ead00990d2b160f7e4f217cc8 +Author: Amy +Date: Wed Mar 13 16:40:54 2024 +0000 + + test-amy + +commit f90967a2832a737d92eabc76cc421b082c44cfe2 +Author: Amy +Date: Wed Mar 13 16:32:54 2024 +0000 + + test + +commit 5644fe9181c2bd3623d1cfc5238e8941ec0a78ae +Merge: e046dab 162948c +Author: Bryan Duggan +Date: Wed Feb 7 10:17:35 2024 +0000 + + Merge pull request #26 from D22124651/master + + macs on apple silicon support added + +commit 162948cba7cdc0010a93bcf771dbf51f617cdf4a +Author: Artem Mikheev +Date: Thu Jan 25 15:58:20 2024 +0000 + + macs on apple silicon support added + +commit e046dab1e2b251637c1ad34172fa1ad88182298f +Author: Bryan Duggan +Date: Mon Apr 12 22:53:18 2021 +0100 + + several fixes + +commit 992ecfa22c6a6d5fd410f43a5223718fe62e93ae +Author: Bryan Duggan +Date: Mon Apr 12 15:40:32 2021 +0100 + + latest processing libraries + +commit 95c87ea607180366adffa1019a39dc3fece0a3c1 +Author: Bryan Duggan +Date: Mon Apr 12 14:40:26 2021 +0100 + + Added getFFT method + +commit c750dfc61c2df7f10f02ae441fdd6b5fd0dde632 +Author: Bryan Duggan +Date: Mon Mar 22 11:54:02 2021 +0000 + + bla + +commit cc0250fe11bfd31233735e224c9253c06ad1e5b1 +Author: Bryan Duggan +Date: Mon Apr 27 12:05:52 2020 +0100 + + rotating bands + +commit 4544869fc088cc2d72d157835b14734e61ace876 +Author: Bryan Duggan +Date: Tue Mar 24 21:23:07 2020 +0000 + + bla + +commit 85950761a79769a29c0478318c253c2a70a11a02 +Author: skooter500 +Date: Tue Mar 24 21:21:25 2020 +0000 + + moved the data folder + +commit fbabb794e44518a2adaf6d11c54fb2b423118027 +Author: skooter500 +Date: Tue Mar 24 20:48:27 2020 +0000 + + bla + +commit f8cddc3321f0c7042be7cb9e021dd337052a3698 +Author: skooter500 +Date: Tue Mar 24 20:17:38 2020 +0000 + + fixes for mac + +commit f3e5b6f7fdfcf021729d8267c35773eccbb92fba +Author: Bryan Duggan +Date: Fri Mar 20 16:38:09 2020 +0000 + + fixed run.sh + +commit 8fdad31eb6d846eae750d67fa68fdb1715bc59aa +Author: Bryan Duggan +Date: Sun Mar 15 14:37:20 2020 +0000 + + Added the two cubes example + +commit 6598473b8043a4fcec423b3cb529161ab617dc6c +Author: Bryan Duggan +Date: Thu Mar 12 10:27:39 2020 +0000 + + bla + +commit 0da691edba22dac90fa9f6589da289f29b9e060a +Author: Bryan Duggan +Date: Mon Mar 9 11:19:20 2020 +0000 + + fixed compile.sh + +commit 66f50357b6512d275ac1c52bed28e9e01c8c5465 +Author: Bryan Duggan +Date: Tue Mar 3 15:04:11 2020 +0000 + + bla + +commit 958c4f3622030447f1091921e0264eb4552bcdd4 +Author: Bryan Duggan +Date: Tue Mar 3 14:35:01 2020 +0000 + + changed package name + +commit a789b49a1a984e3e15fcf4203acb58bc8f256cff +Author: Bryan Duggan +Date: Tue Mar 3 13:40:57 2020 +0000 + + bla + +commit 90a87f17e29449046aa9b63982b156d51e39b975 +Author: Bryan Duggan +Date: Tue Mar 3 13:33:27 2020 +0000 + + bla + +commit fa745bb297d1334fbd666a548802767e40e6c83d +Author: Bryan Duggan +Date: Tue Mar 3 13:28:13 2020 +0000 + + starter code diff --git a/images/frog.png b/images/frog.png new file mode 100644 index 000000000..f6234fd8f Binary files /dev/null and b/images/frog.png differ diff --git a/java/src/C21374751/RoxanaVisual1.java b/java/src/C21374751/RoxanaVisual1.java index 50b3e815f..3505be01a 100644 --- a/java/src/C21374751/RoxanaVisual1.java +++ b/java/src/C21374751/RoxanaVisual1.java @@ -3,33 +3,77 @@ import ie.tudublin.OurVisual; import processing.core.*; -// This is an example of a visual that renders the waveform public class RoxanaVisual1 { OurVisual ov; + PImage frogImage; + float xPos; // Horizontal position of the frog image + float yPos; // Vertical position of the frog image + float hopSpeed; // Horizontal speed of the frog + float angle; // Angle for rainbow colors + int numGrassLines; // Number of grass lines + float grassSpacing; // Spacing between grass lines - // public WaveForm(MyVisual mv) public RoxanaVisual1(OurVisual ov) { this.ov = ov; + frogImage = ov.loadImage("images/frog.png"); // Load the frog image from the "images" folder + frogImage.resize(120, 0); // Resize the image width to 120 pixels, keep aspect ratio (slightly bigger) + xPos = frogImage.width / 2; // Start the frog at the left edge of the screen + yPos = ov.height - frogImage.height / 2; // Start the frog at the bottom of the screen + hopSpeed = 5; // Horizontal speed of the frog + angle = 0; // Initialize angle for rainbow colors + numGrassLines = 30; // Number of grass lines + grassSpacing = ov.width / numGrassLines; // Calculate spacing between grass lines } public void render() { - // float hue = map(getAmplitude(), 0, 1, 0, 255); - // fill(hue, 255, 255); - // rectMode(CENTER); - // float size = map(getSmoothedAmplitude(), 0, 1, 0, 400); - // rect(width / 2, height / 2, size, size); + // Calculate background color based on time + float bgBrightness = PApplet.abs(PApplet.sin((float)(ov.frameCount * 0.02))) * 255; + ov.background(0, 0, bgBrightness); // Set background to fade from black to blue and back to black + + // Update frog position + xPos += hopSpeed; + + // Check if frog reaches edges of the screen + if (xPos > ov.width - frogImage.width / 2 || xPos < frogImage.width / 2) { + // Reverse direction when frog reaches the right or left wall + hopSpeed = -hopSpeed; + } + + // Draw rainbow aura around the frog + ov.noFill(); + for (int i = 0; i < 6; i++) { + ov.stroke((i * 60) % 255, 255, 255); // Rainbow colors + float auraSize = 50 + 20 * PApplet.sin(angle + i * PApplet.TWO_PI / 6); + ov.ellipse(xPos, yPos, frogImage.width + auraSize, frogImage.height + auraSize); + } + + // Calculate squish factor based on frog's vertical position relative to the bottom of the screen + float squishFactor = 1.0f - (yPos / (ov.height - frogImage.height / 2)); + float squishedHeight = frogImage.height * squishFactor; + + // Draw frog image + ov.imageMode(PApplet.CENTER); // Set image mode to center + ov.image(frogImage, xPos, yPos, frogImage.width, squishedHeight); // Display frog image with squish effect - // ^ original code and then below is slightly edited to work with the OurVisual class - - ov.colorMode(PApplet.HSB); - float hue = PApplet.map(ov.getAmplitude(), 0, 1, 0, 255); - ov.fill(hue, 255, 255); - ov.rectMode(PApplet.CENTER); - float size = PApplet.map(ov.getSmoothedAmplitude(), 0, 1, 0, 400); - ov.rect(ov.width / 2, ov.height / 2, size, size); + // Make the frog jump higher + float hopAmount = 20 * PApplet.sin((float)(ov.frameCount * 0.1)); // Adjust the hop amount as needed + yPos = ov.constrain(yPos + hopAmount, 0, ov.height - frogImage.height / 2); // Ensure the frog stays within the screen + + angle += 0.05; // Increment angle for rainbow colors + + + + // Draw grass lines at the bottom of the screen + for (int i = 0; i < numGrassLines; i++) { + float grassX = i * grassSpacing; // Calculate x position for each grass line + float grassHeight = ov.random(40, 100); // Randomize grass height + ov.strokeWeight(10); // Set grass line thickness + ov.stroke((i * 60) % 225, 255, 225); // Rainbow colors // Set grass color to green + ov.line(grassX, ov.height, grassX, ov.height - grassHeight); // Draw a vertical grass line + } } -} \ No newline at end of file +} diff --git a/java/src/ie/tudublin/Main.java b/java/src/ie/tudublin/Main.java index 80b8d2717..d4c8d3fc5 100644 --- a/java/src/ie/tudublin/Main.java +++ b/java/src/ie/tudublin/Main.java @@ -1,9 +1,8 @@ package ie.tudublin; -import example.CubeVisual; + import example.MyVisual; -// import ie.tudublin.OurVisual; import example.RotatingAudioBands; import C21374751.RoxanaVisual1; import C22308773.AmyVisual1;