Code Monkey home page Code Monkey logo

sonification-pi's Introduction

sonification-pi

A sonification code that converts sensors data into MIDI files.

About us

This project was developed during the 2016 CubeSat Bootcamp Summer Program at Capitol Technology University (Laurel, MD). This specific project was oriented by Professor Antunes. The team is:

  • Rebeca Nunes Rodrigues
  • Rodrigo J. de Bem
  • Marcelo Moreira Nicoletti
  • Felipe Alexandre L. de Abreu

About the project

Data sonification is a useful technique that enable multitasking while "reading" data. It consists on converting numbers into sound. This project intends to apply sonification to PiSat data. In specific, get sensors data from a Raspberry Pi and convert into midi files. The MIDI files are then sent to a PC Linux (the "ground station") via FTP. It is a nearly Real Tie Process.

The MIDI files

It is a way to store sound in a small space. It is a command based file and the commands are called Events. Events can be described by:

  • Velocity: the amplitude or how "strong" a piano key is pressed.
  • Pitch: the frequency, i.e., which key of a piano, a Do (C) or a Mi (E)?
  • Tick: the start time or the relative time when the event ocurred. The actual event is equal to the tick + sum of all previous events ticks.

python-midi library

The library we used to the MIDI part is the python-midi. You can find it at https://github.com/vishnubob/python-midi .

Repository description

  • Journal.odt: day by day advances on the project
  • Pi_Sonification-Rebeca_Felipe_Rodrigo_Marcelo (2).pptx: PowerPoint file presented during the summer program.
  • Time:07:11:03.mid: a MIDI file generated by the code.
  • example.mid: a nice sample of sonification. The repetive and low sound is the temperature sensor, the more variable one is the light data.
  • sonification_final.py: the code itself.

Running the code

The code must be run in a Raspberry Pi with light and temperature sensors and a push button. In a few lines what the code does is:
In a loop:

  • Pi get data from the sensors
  • Write the data as Events in a Pattern
  • Get the Pattern into a MIDI file
    Everytime a interrupt (caused by a push button) happens:
  • Send the MIDI file via FTP to a PC
  • Erase the MIDI file from the Pi

It is important to have your computer set as a server:

sonification-pi's People

Contributors

rebeca53 avatar

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.