diff --git a/Blue Dot Sessions - Winter Theme.mp3 b/Blue Dot Sessions - Winter Theme.mp3 new file mode 100644 index 00000000..03ae8546 Binary files /dev/null and b/Blue Dot Sessions - Winter Theme.mp3 differ diff --git a/Dave Nelson - Whale Lines.mp3 b/Dave Nelson - Whale Lines.mp3 new file mode 100644 index 00000000..d2776dd2 Binary files /dev/null and b/Dave Nelson - Whale Lines.mp3 differ diff --git a/Doctor Turtle - Two Hat Rag.mp3 b/Doctor Turtle - Two Hat Rag.mp3 new file mode 100644 index 00000000..88b8b753 Binary files /dev/null and b/Doctor Turtle - Two Hat Rag.mp3 differ diff --git a/Il Sogno Del Marinaio - Skinny Cat.mp3 b/Il Sogno Del Marinaio - Skinny Cat.mp3 new file mode 100644 index 00000000..eda745e5 Binary files /dev/null and b/Il Sogno Del Marinaio - Skinny Cat.mp3 differ diff --git a/Portron Portron Lopez - De Tout Le Corps Je Ris.mp3 b/Portron Portron Lopez - De Tout Le Corps Je Ris.mp3 new file mode 100644 index 00000000..9d99cfeb Binary files /dev/null and b/Portron Portron Lopez - De Tout Le Corps Je Ris.mp3 differ diff --git a/README.md b/README.md index 4ac8bbff..d16b3ccd 100644 --- a/README.md +++ b/README.md @@ -1,61 +1,9 @@ -Assignment 4 - Creative Coding: Interactive Multimedia Experiences -=== +## Song Visualizer -Due: October 4th, by 11:59 AM. +https://a4-yasmine-aoua.glitch.me -For this assignment we will focus on client-side development using popular audio/graphics/visualization technologies. The goal of this assignment is to refine our JavaScript knowledge while exploring the multimedia capabilities of the browser. +The goal of this application was to make a music visualizer that a user could change the color of the visualization, the song, and be able to stop and start the application. -[WebAudio + Canvas Tutorial](https://github.com/cs4241-22a/cs4241-22a.github.io/blob/main/using_webaudio_canvas.md) -[SVG + D3 tutorial](https://github.com/cs4241-21a/cs4241-21a.github.io/blob/main/using_svg_and_d3.md) +![Menu](https://user-images.githubusercontent.com/74080772/193856071-f786b887-6395-483e-9544-933a3f3103e5.png) -Baseline Requirements ---- - -Your application is required to implement the following functionalities: - -- A server created using Express. This server can be as simple as needed. -- A client-side interactive experience using at least one of the following web technologies frameworks. - - [Three.js](https://threejs.org/): A library for 3D graphics / VR experiences - - [D3.js](https://d3js.org): A library that is primarily used for interactive data visualizations - - [Canvas](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API): A 2D raster drawing API included in all modern browsers - - [SVG](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API): A 2D vector drawing framework that enables shapes to be defined via XML. - - [Web Audio API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API): An API for audio synthesis, analysis, processing, and file playback. -- A user interface for interaction with your project, which must expose at least four parameters for user control. [tweakpane](https://cocopon.github.io/tweakpane/) is highly recommended for this, but you can also use regular HTML `` tags (the `range` type is useful to create sliders). You might also explore interaction by tracking mouse movement via the `window.onmousemove` event handler in tandem with the `event.clientX` and `event.clientY` properties. Consider using the [Pointer Events API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events) to ensure that that both mouse and touch events will both be supported in your app. -- Your application should display basic documentation for the user interface when the application first loads. - -The interactive experience should possess a reasonable level of complexity. Some examples: -### Three.js -- A generative algorithm creates simple agents that move through a virtual world. Your interface controls the behavior / appearance of these agents. -- A simple 3D game... you really want this to be a simple as possible or it will be outside the scope of this assignment. -- An 3D audio visualization of a song of your choosing. User interaction should control aspects of the visualization. -### Canvas -- Implement a generative algorithm such as [Conway's Game of Life](https://bitstorm.org/gameoflife/) (or 1D cellular automata) and provide interactive controls. Note that the Game of Life has been created by 100s of people using ; we'll be checking to ensure that your implementation is not a copy of these. -- Design a 2D audio visualizer of a song of your choosing. User interaction should control visual aspects of the experience. -### Web Audio API -- Create a screen-based musical instrument using the Web Audio API. You can use projects such as [Interface.js](http://charlie-roberts.com/interface/) or [Nexus UI](https://nexus-js.github.io/ui/api/#Piano) to provide common musical interface elements, or use dat.GUI in combination with mouse/touch events (use the Pointer Events API). Your GUI should enable users to control aspects of sound synthesis. If you want to use higher-level instruments instead of the raw WebAudio API sounds, consider trying the instruments provided by [Tone.js]() or [Gibber](https://github.com/charlieroberts/gibber.audio.lib). -### D3.js -- Create visualizations using the datasets found at [Awesome JSON Datasets](https://github.com/jdorfman/Awesome-JSON-Datasets). Experiment with providing different visualizations of the same data set, and providing users interactive control over visualization parameters and/or data filtering. Alternatively, create a single visualization with using one of the more complicated techniques shown at [d3js.org](d3js.org) and provide meaningful points of interaction for users. - -Deliverables ---- - -Do the following to complete this assignment: - -1. Implement your project with the above requirements. -3. Test your project to make sure that when someone goes to your main page on Glitch/Heroku/etc., it displays correctly. -4. Ensure that your project has the proper naming scheme `a4-firstname-lastname` so we can find it. -5. Fork this repository and modify the README to the specifications below. *NOTE: If you don't use Glitch for hosting (where we can see the files) then you must include all project files that you author in your repo for this assignment*. -6. Create and submit a Pull Request to the original repo. Name the pull request using the following template: `a4-firstname-lastname`. - -Sample Readme (delete the above when you're ready to submit, and modify the below so with your links and descriptions) ---- - -## Your Web Application Title - -your hosting link e.g. http://a4-charlieroberts.glitch.me - -Include a very brief summary of your project here. Images are encouraged when needed, along with concise, high-level text. Be sure to include: - -- the goal of the application -- challenges you faced in realizing the application -- the instructions you present in the website should be clear enough to use the application, but if you feel any need to provide additional instructions please do so here. +I faced a couple challenges when creating this project. The first challenge I faced was creating the song picker using tweakpane. I had an error that broke the song picker and buttons after it that took a while to find. A bigger challenge I faced was changing the shape of the visualization. I wanted to try something different then just rectangles so I replaced them with circles but drawing non-rectangle shapes is a lot more complicated because there isn't just one method you can call like fillRect(). I was not able to fill the inside of the circles I drew for some reason that I still haven't figured out but I actually like the way it looks better with just the outline of the circle so I decided to keep it that way. diff --git a/SalmonLikeTheFish - Glacier.mp3 b/SalmonLikeTheFish - Glacier.mp3 new file mode 100644 index 00000000..e3ec8da9 Binary files /dev/null and b/SalmonLikeTheFish - Glacier.mp3 differ diff --git a/package.json b/package.json new file mode 100644 index 00000000..e20a9d7e --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "name": "a4-creative-coding", + "version": "1.0.0", + "description": "Assignment 4 - Creative Coding: Interactive Multimedia Experiences ===", + "main": "server.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "start": "node server.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/YasmineFA/a4-creative-coding.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/YasmineFA/a4-creative-coding/issues" + }, + "homepage": "https://github.com/YasmineFA/a4-creative-coding#readme", + "devDependencies": { + "@tweakpane/core": "^1.1.0" + } +} diff --git a/public/script.js b/public/script.js new file mode 100644 index 00000000..e69de29b diff --git a/public/style.css b/public/style.css new file mode 100644 index 00000000..e69de29b diff --git a/server.js b/server.js new file mode 100644 index 00000000..93c8f314 --- /dev/null +++ b/server.js @@ -0,0 +1,41 @@ +// server.js +// where your node app starts + +// we've started you off with Express (https://expressjs.com/) +// but feel free to use whatever libraries or frameworks you'd like through `package.json`. +const express = require('express'), + app = express(), + cors = require('cors') + +app.use( cors() ) +app.use( express.static('./') ) + +// our default array of dreams +const dreams = [ + "Find and count some sheep", + "Climb a really tall mountain", + "Wash the dishes" +]; + +// make all the files in 'public' available +// https://expressjs.com/en/starter/static-files.html +app.use(express.static("public")); + +// https://expressjs.com/en/starter/basic-routing.html +app.get("/", (request, response) => { + response.sendFile(__dirname + "/views/index.html"); +}); + + +// send the default array of dreams to the webpage +app.get("/dreams", (request, response) => { + // express helps us take JS objects and send them as JSON + response.json(dreams); +}); + +// listen for requests :) +// const listener = app.listen(process.env.PORT, () => { +// console.log("Your app is listening on port " + listener.address().port); +// }); + +app.listen(3000); \ No newline at end of file diff --git a/views/index.html b/views/index.html new file mode 100644 index 00000000..0e6622ba --- /dev/null +++ b/views/index.html @@ -0,0 +1,150 @@ + + + + +
+ +
+
+

+ Song Visualizer! +

+

+ Select a song from the dropdown and hit play to
+ start. Click the color picker to change the color
+ of the visualization of the song at any time.
+ Click stop to end the visualization and song. +

+
+ + + + \ No newline at end of file