GithubHelp home page GithubHelp logo

imclab / the_weather_sound Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jasperboyd/the_weather_sound

0.0 2.0 0.0 518 KB

Max/MSP/Jitter Project that converts real time weather data into ambient music.

the_weather_sound's Introduction

the_weather_sound

#####Jasper Boyd

Summary: A computer music project that transforms real time weather data into an evolving soundscape.

Techonologies: Max/MSP/Jitter, Java, JSON

Version: 0.0


##Quick idea

Do the effects first and then maybe use a basic synth controled by a piano and turn it into an instrument (definitely more engaging)โ€ฆ

##todo - Harmonizer
- Finish Implementation - Add effects to the synth - Parameter control - Create the synth sound

##Features for Later Versions - Jitter Implementation - Zip Code feature - Urban/Suburban/Rural/Wilderness Settings


##Outline

The following patchers make up the weather sound engine:

###GetWeather - Input: - Bang: - Output: - Lots of things (Fill this in!)

###WeatherDataInterpreter - Input: - temp_f - wind_gust_mph - precip_today_in - Output: - Float representing the ratio: Upset/Content

###ChangeDetect - Input: - Fill this in!!! - Output: - Bang if true

###Melody Generator - Input: - Mood - Set Key - Bang - From ChangeDetect - Output: - Midi Values - Velocity

###BaseSynth - Input: - temp_f - feelslike_f - visibility_mi - UV - pressure_in - pressure_trend - dewpoint_f - relative_humidity

###WindSynth - Input: - wind_degrees - wind_mph - wind_gust_mph

###PrecipSynth - Input: - temp_f - precip_1hr_in - precip_today_in


###Legend

bold means that it is a definition of my own.

italic means it is a technical term.


##Goal

The major goal behind this project was finding a new way to distribute commonly consumed data. So many people everyday log onto sites like Wunderground and look at the strings that will explain to them what it's like outside weather-wise. This certainly effectively communicates the data, but what if the process was simpler? What if that data could be communicated by the speaker built into an alarm clock?

##Programming Approach

For the most part my goal is to show the extremes in weather conditions. By taking the data downloaded from Wunderground, and build algorithms that takes there respective peice of the data and use that number to generate the music.

The best option for answering the problem of accurately articulating extremes in the weather was to use the variables available from the Wunderground API. This lead to the creation of three subsynths Base, Wind, and Precipitation.

###Base

Base is the predominant sound that the listener is hearing. It contains the main pitch of the current note. It will normally cover the most registers. This sound is going to be composed of the following variables:

- temp_f
- feelslike_f
- visibility_mi
- UV
- pressure_in
- pressure_trend
- dewpoint_f
- relative_humidity

The majority of these variables control the paremeters of the synth, more details will follow.

###Wind

I like to think of Wind as a kind of auxiliary synth in the program some sort of equivalent to the "noise" feature on more vintage affairs. This auxiliary module runs on the following JSON variables:

- wind_degrees
- wind_mph
- wind_gust_mph 

The Wind synth would normally not take up as much space on the sound spectrum as Base, except for during a major storm or a particularly windy day.

###Precipitation

The Precipitation synth will only turn on if it's raining or snowing. My main goal with its implementation is to create a clear distinction between weather it is snowing or raining. The variables in use are the following:

- temp_f
- precip_1hr_in
- precip_today_in

Because Precipitation is a major concern with the weather when Precipitation is engaged it causes the entire sound spectrum to be altered.

###Java External:

The first challenge for this project was getting the data into Max/MSP/Jitter.

####JSON

JSON really made this whole project possible. It was the only real way that I could retrieve that data using Java (The only extension language Cycling74 readily provides).

###Temperature:

Temperature is a measure of the local thermal energy of matter or radiation. Colder temperatures means that the energy is lower whereas hotter temperatures indicate more energy (1). When I was trying to define the way the temperature would affect the music I wanted to take into consideration the scientific definition in addition to our human perception. To this end I wanted the temperature input to control the warmth and the energy of the music. The warmth parameter would make the sound thin when it is cold, and thick when it is hot.

###Wind:

When looking at the values I was going to be able to pull from Wunderground's servers I was excited when I saw the "wind_degrees" variable. That value was sure to control the stereo imaging of the synthesizer.

##Compositional Approach

On the musical end I wanted the music to be generated to be minimalistic. The way that I like to think about it is that the weather is the musician and I am building a custom instrument. To make this instrument I first considered what sort of aspects of the weather that we can hear already.

I wanted to avoid building something that merely mimics the natural sound of the weather, mainly because I knew it would be too easy to build a program that merely played samples to match the input data.

I knew that the music would be much more expressive if I created synth engines that were tailored perfectly to the data available.

###Choosing The Notes

My first choice was to decide what notes we're going to be chosen based on the data. Because of the restrictions on data I didn't want to tie up variables in deciding what key and notes to use for the current weather. This created a problem because I also didn't what to take the easy way out and make everything in a basic key like C Major. To solve this problem I came up with the concept of the weather having a mood which would be able to select a key.

####Mood:

For Version 1 is only going to have two moods Upset and Content. Upset will be chosen for weather data that is categorized as Extreme, otherwise the modd will be set to Content. For the keys that these moods will represent I decided to decide based on the keys I like to use in my own compositions. I chose C# Minor as the key to represent Upset weather and D major as the key to represent Content weather.

###Defining the Melody:

I decided the best way to determine when notes should change is to look at the variables and everytime something changes after retrieving the data from the server the note will change. I designed a custom algorithm to choose which notes will be triggered.

##Resources

  1. Temperature (Wikipedia)

the_weather_sound's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.