Jump to content

Final year project question. Music visualiser


ellipsoid

Recommended Posts

Hi there. I start my final year of my computer science degree this September and, alongside other modules, will do an independent final year project. I have not had very much CS experience outside my degree so I am a bit unsure what would be feasible for me while not being too trivial such that I receive a poor grade.

I was looking to do something related to my interests and one of my initial ideas that my tutor seemed to like was generating an image from a given piece of music. I am not yet fully sure about what metrics I would use to do this, but I was thinking a combination of rhythm, lyrics, velocity and harmonics.

For a general example, an aggressive sounding piece of music would result in an aggressive feeling image, a calming song, a calm feeling image and so on. The project must have some success criteria that can be evaluated and I was thinking I could survey participants and ask whether the generated image fits with the song.

In the past two years in my degree, I have programmed a fair bit in Java, Haskell and a tiny bit in C. Would you say that this idea for a project would be two difficult to do in the roughly 6 months of time given considering my perhaps more limited experience? Also could you tell what language(s) you would recommend something like this be done in as well as existing packages and/or software that could be useful for this?

I was thinking that with a given audio file, I could do some web retrieval of existing images and combine it with some abstract procedurally generated images however if you think doing both would be too much or if one of these would be too difficult then I can simplify?

Also, my initial plan was for this to be done in real time with visual elements coming in as a piece is playing but once again, if this would be too difficult to achieve good results with, I can rethink that? I guess I have a few questions here but I would appreciate any thoughts on any of this and am happy to provide more info where I can. Thank you very much.

Link to comment
Share on other sites

If you like music, how about starting from visualization of staff.. ?

Make generic C++/Java class Note with attribute taking enum { C, D, .... , H } as parameter, and second one integer with octave, and third one with length.

e.g. new Note( Note.C, 5, Note.Half ) will be C-5 half-note..

methods:

set/get C,D... H (from enum)

set/get octave integer..

set/get length (whole note, half note, etc.) (from enum)

set/get frequency (convert human readable e.g. C-5 to corresponding the real frequency https://www.google.com/search?q=notes+frequencies )

helper public static function Parse( std::string &string ); generating Note object from given string.

 

Then make class which has dynamic list of such notes (Staff class). (template class? List<Note> / ArrayList<Note> in Java?)

 

Then make class which is taking Staff object as argument and outputs PNG image. Draw 5 horizontal lines with user defined space between them, and then iterate through the all elements in the staff object, and for each note object, draw it, with appropriate shape and horizontal position (index in staff) and vertical position (octave and note), with appropriate design (load PNG with predefined templates or generate them by yourself using drawing functions?). Make parameters fully controllable by the user. Sizes, spaces, distances, thicknesses etc.

 

Then you can take staff as argument in command-line like in Linux pipe:

echo "C-5, D-5, E-5" | genstaff image.png

 

Then you can make website, on your dedicated server, where from e.g. PHP/CGI code you can execute bash script/command-line, taking HTML form input with notes, which will generate PNG and show staff to the website client..

 

It should not take you more than a just a few hours for all this project. Teacher (or other students) will be able to visit your website, enter notes in text input field in HTML form and instantly see generated staff (use AJAX/jQuery to parse HTML form and call genstaff command, and send to web-browser client to see result), so user has not have to click any button, but see result instantly..

 

Fun project.

A joint-venture of several technologies C/C++/Java/HTML/CSS/AJAX/jQuery/PHP..

 

1 hour ago, ellipsoid said:

For a general example, an aggressive sounding piece of music would result in an aggressive feeling image, a calming song, a calm feeling image and so on.

Sounds it would require FT/FFT

https://en.wikipedia.org/wiki/Fourier_transform

Boring.. (IMHO)

...unless you make a website (Android/iOS app?) that uses a microphone to capture sound from the user's room and then analyzes it in real time visualizing something..

 

If you do the first (on the top) project with FT/FFT, you can generate staff with notes automatically from the given music (recorded by microphone?) example.... and show it to the user..

 

a multi-million dollar website if you achieve this.. Can be done this week..

 

Edited by Sensei
Link to comment
Share on other sites

1 hour ago, ellipsoid said:

Hi there. I start my final year of my computer science degree this September and, alongside other modules, will do an independent final year project. I have not had very much CS experience outside my degree so I am a bit unsure what would be feasible for me while not being too trivial such that I receive a poor grade.

I was looking to do something related to my interests and one of my initial ideas that my tutor seemed to like was generating an image from a given piece of music. I am not yet fully sure about what metrics I would use to do this, but I was thinking a combination of rhythm, lyrics, velocity and harmonics.

For a general example, an aggressive sounding piece of music would result in an aggressive feeling image, a calming song, a calm feeling image and so on. The project must have some success criteria that can be evaluated and I was thinking I could survey participants and ask whether the generated image fits with the song.

In the past two years in my degree, I have programmed a fair bit in Java, Haskell and a tiny bit in C. Would you say that this idea for a project would be two difficult to do in the roughly 6 months of time given considering my perhaps more limited experience? Also could you tell what language(s) you would recommend something like this be done in as well as existing packages and/or software that could be useful for this?

I was thinking that with a given audio file, I could do some web retrieval of existing images and combine it with some abstract procedurally generated images however if you think doing both would be too much or if one of these would be too difficult then I can simplify?

Also, my initial plan was for this to be done in real time with visual elements coming in as a piece is playing but once again, if this would be too difficult to achieve good results with, I can rethink that? I guess I have a few questions here but I would appreciate any thoughts on any of this and am happy to provide more info where I can. Thank you very much.

Here is an example to get you started. It's one of my favourite pieces of a cappella polyphony, one I very much enjoyed singing over ten years ago now, when I was with an early music chamber choir in The Hague. The video accompanying it represents the 4 vocal lines. I think the way they have done it is beautiful. It also actually helps the listener disentangle the intertwined lines of the music: 

 

Edited by exchemist
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.