# Program that generates an image based of music / frequencies

**URL:** https://discourse.processing.org/t/program-that-generates-an-image-based-of-music-frequencies/13063
**Category:** Project Guidance
**Created:** [July 30, 2019, 2:20pm UTC](https://discourse.processing.org/t/program-that-generates-an-image-based-of-music-frequencies/13063 "2019-07-30T14:20:38Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Ephixi4](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ephixi4/32/5947_2.png) [@Ephixi4](https://discourse.processing.org/u/Ephixi4)
#### Post date: [July 30, 2019, 2:20pm UTC](https://discourse.processing.org/t/program-that-generates-an-image-based-of-music-frequencies/13063/1 "2019-07-30T14:20:38Z")

</div>

Hey all,

First of all I’m a real beginner in Processing and coding. I’ve had some basics at uni (New Arts Media faculty). Graphic design and so on.

During the short time I had with processing I really fell in love since it is kinda the coding language for people that don’t really know how to code. Especially graphic designers and so on. (More or less ofc)

So straight to the project.

I want to write a program that would allow me to import a song and create an image based on certain variables I’ve set earlier. I want to assign frequencies to colours and let the program create an image, kinda like a printer. Going from left to right, then a row higher till the song stops.

Is it code-able? If so are there any limitations? Or would it be possible to pick the slightest frequency differences? Not just once a second or so? So that a default unit would be a single pixel to create high-res images?

How hard would it be to assign the colours to the frequencies?

Sorry if the thoughts are all over the place, I’m just trying to find out if it’s doable before I do any serious planning.

Thank you in advance for answers and if you could link to examples or some knowledge bases that could help me during this project I’d be grateful.

-Jay

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [July 30, 2019, 8:00pm UTC](https://discourse.processing.org/t/program-that-generates-an-image-based-of-music-frequencies/13063/2 "2019-07-30T20:00:51Z")

</div>

To get you started:

[https://processing.org/tutorials/](https://processing.org/tutorials/)  
[https://processing.org/reference/libraries/sound/](https://processing.org/reference/libraries/sound/)

> **[processing/processing-sound](https://github.com/processing/processing-sound/tree/master/examples)**
>
> Audio library for Processing built with JSyn. Contribute to processing/processing-sound development by creating an account on GitHub.

🙂

---

<div class="post-metadata">

### Author: ![Ephixi4](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ephixi4/32/5947_2.png) [@Ephixi4](https://discourse.processing.org/u/Ephixi4)
#### Post date: [July 30, 2019, 8:19pm UTC](https://discourse.processing.org/t/program-that-generates-an-image-based-of-music-frequencies/13063/3 "2019-07-30T20:19:35Z")

</div>

Cheers! So just to make it straight, this is doable, right? 😛

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [July 30, 2019, 8:22pm UTC](https://discourse.processing.org/t/program-that-generates-an-image-based-of-music-frequencies/13063/4 "2019-07-30T20:22:35Z")

</div>

You are only limited by your imagination. 🙂

Try this but with your own sound file:

> <https://github.com/processing/processing-sound/blob/master/examples/Analysis/FFTSpectrum/FFTSpectrum.pde>

🙂

---

<div class="post-metadata">

### Author: ![Ephixi4](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/ephixi4/32/5947_2.png) [@Ephixi4](https://discourse.processing.org/u/Ephixi4)
#### Post date: [July 30, 2019, 9:04pm UTC](https://discourse.processing.org/t/program-that-generates-an-image-based-of-music-frequencies/13063/5 "2019-07-30T21:04:40Z")

</div>

Awesome, thank you, will dive into it!
