MSc in Computer Engineering University of...

25
A WEARABLE MUSICAL INTERFACE USING A WIRELESS SENSOR NETWORK Francesco Corucci – – 2012 Mobile and pervasive systems class – MSc in Computer Engineering MSc in Computer Engineering University of Pisa

Transcript of MSc in Computer Engineering University of...

Page 1: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

A WEARABLE MUSICAL

INTERFACE USING A WIRELESS

SENSOR NETWORK

Francesco Corucci – – 2012

Mobile and pervasive systems class – MSc in Computer Engineering

MSc in Computer Engineering – University of Pisa

Page 2: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

Introduction

Goal: implement a platform that allows the use of a

wireless sensor network as a wearable interface

that can be used for producing music

Requirements:

Modular

Flexible

MIDI-compliant

Mobile and pervasive systems class

2

Page 3: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

What is MIDI

MIDI (Musical Instrument Digital Interface) is a

standard technology for the interaction between

musical devices

It standardizes:

A communication protocol

An hardware interface

Versatile technology, widely used since the 80’s and still

reliable after more than 30 years

Mobile and pervasive systems class

3

Page 4: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

Shimmer sensor nodes

For setting up the WSN we choose Shimmer sensor

nodes :

Mobile and pervasive systems class

Suitable for wearable applications

Integrate a 3-axis accelerometer

Optional gyroscope shield

(not used in this project)

Bluetooth or 802.15.4

communication

Support TinyOS

4

Page 5: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

Shimmer sensor nodes

Mobile and pervasive systems class

5

Page 6: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

Overview of the system

Mobile and pervasive systems class

USB

802.15.4

• Two or more wireless sensors on the body

• The sensors sample accelerometric data

associated with movements

• Data are then collected from the sink and

forwarded to the computer

Sink

6

Page 7: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

Overview of the system (cont’d)

Mobile and pervasive systems class

Oscilloscope application

(extended with MIDI map module)

Virtual MIDI

device Musical software

Data from sink

• Filtering

• Displaying

• Mapping in MIDI commands

7

Page 8: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

Detailed architecture

Mobile and pervasive systems class

Serial forwarder

Computer

USB

TCP/IP

Oscilloscope

Radio

MIDI map

MIDI forwarder

Virtual MIDI port

TCP/IP

Musical sw

(VST-host)

VST

Plugin

VST

Plugin

MIDI

MIDI

8

Page 9: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

MIDI controller

This way the WSN become a standard MIDI controller,

that can interoperate with every musical software

Mobile and pervasive systems class

9

Page 10: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

How to choose the mapping

The way to map sensed data into MIDI messages is

absolutely arbitrary, and can lead to a multitude of

expressive results

Every data channel can be mapped in a different

instrument

effect

note/chord

etc…

…and this can be done in a variety of ways!

Mobile and pervasive systems class

10

Page 12: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

Features

Modular, extensible:

Is it possible to use an arbitrary number of sensor nodes, and

choose which on-board sensors must be used as data sources

Flexible:

Many degrees of freedom in the mapping

Many expressive possibilities

Sound generation is left to specialized and mature softwares

Standard:

Since the WSN becomes a MIDI controller, it is able to

interoperate with a moltitude of software platforms

12

Mobile and pervasive systems class

Page 13: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

Possible applications

The platform can be used for several purposes:

New expressive forms based on gestuality

In combination with traditional instruments

(e.g. influence of on-stage movements on played music)

Any application that asks for sonification of human movements:

Sport training

Rehabilitation

Mobile and pervasive systems class

13

Page 14: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

References

Shimmer sensor nodes

http://www.shimmer-research.com/

General information about MIDI

http://en.wikipedia.org/wiki/MIDI

VST

http://en.wikipedia.org/wiki/Virtual_Studio_Technology

rtMidi, a cross-platform C++ library for MIDI

http://www.music.mcgill.ca/~gary/rtmidi/

Sonification

http://en.wikipedia.org/wiki/Sonification

Mobile and pervasive systems class

14

Page 15: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

Thank you for your attention :-)

Mobile and pervasive systems class

15

Page 16: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

Implementation details

Mobile and pervasive systems class

16

Page 17: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

OscilloscopeAppC - overview

OscilloscopeAppC is the TinyOS application running

on sensor nodes

Receives commands from the sink:

start/stop/change_freq

Samples the on-board tri-axis accelerometer using

three ADC channels in DMA mode

When a block of samples has been collected, the

sensor node sends it to the sink via radio

Mobile and pervasive systems class

17

Page 18: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

OscilloscopeAppC - architecture

Mobile and pervasive systems class

18

Page 19: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

OscilloscopeAppC - interactions 19

Page 20: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

BasestationC - overview

BasestationC is the TinyOS application running on

the sink node

Acts as a bridge between the serial and the radio

link

Implements queues in both direction to handle

traffic spikes

Mobile and pervasive systems class

20

Page 21: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

BasestationC - architecture

Mobile and pervasive systems class

21

Page 22: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

MIDI map module

Offers a simple GUI: the user can choose how to map

the active data channels into MIDI messages from a

predefined set of mappings

Mobile and pervasive systems class

22

The module then catches

incoming data, maps it into

MIDI command according

to user-defined

preferences, and forwards

them via TCP/IP socket

toward the MIDI forwarder

Page 23: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

MIDI forwarder

Implements a virtual

MIDI device: the WSN is

seen as an input MIDI

peripheral plugged into

the computer

It then acts as a bridge:

Waits for incoming MIDI

messages from a TCP/IP

socket

Forwards MIDI messages

to the virtual MIDI port

Mobile and pervasive systems class

23

Page 24: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

Screenshots: Oscilloscope + MidiMap

Mobile and pervasive systems class

24

Page 25: MSc in Computer Engineering University of Pisavecchio.iet.unipi.it/vecchio/files/2010/07/presentazione.pdf · Introduction Goal: implement a platform that allows the use of a wireless

Screenshots

Mobile and pervasive systems class

25