Presentation is loading. Please wait.

Presentation is loading. Please wait.

Human Sensing Beam 2014. Low resolution image and Sound Image 8 x 8 pixels Sound: 8 notes in an octave (13) GFU&feature=relmfu.

Similar presentations


Presentation on theme: "Human Sensing Beam 2014. Low resolution image and Sound Image 8 x 8 pixels Sound: 8 notes in an octave (13) GFU&feature=relmfu."— Presentation transcript:

1 Human Sensing Beam 2014

2 Low resolution image and Sound Image 8 x 8 pixels Sound: 8 notes in an octave (13) http://www.youtube.com/watch?v=ljGMhDSS GFU&feature=relmfu http://www.youtube.com/watch?v=ljGMhDSS GFU&feature=relmfu

3 Musical Scale Notes are specific sounds A melody is a sequence of these sounds Melody has “meaning” Note sequence Rythm Brain does a good job “remembering” sequences specific sounds

4 Sound Scapes “unspecific sounds” and iconic sounds – Noise – Background “canvas” of life – Uncontrolled sound – No coding sound – But also “meaning”: bird sound, water sound, wind, applause: “iconic” sounds

5 Difference melody - iconic Melody is coded: can be low res – MIDI, very low filesize Iconic is uncoded: high res – HD, lots of memory Arduino can do – melody, – a bit of clicking, – but no really bird sounds, no MP3

6 Arduino Sound Quality: 8 bits (Arcade game sound) If coded (melody): length no problem If random clicks:no problem If MP3: not possible (few seconds bad quality) – That is without extra electronics

7 Reinforced Arduino Sound Shields 1 – Attach amplifier – Improve Volume – No improvement in Quality (still 8 bits) Sound Shields 2 – Attach external memory – Improve volume, storage capacity – Improve quality

8 This Workshop Arduino Just attach an 8 Ohm speaker – With a capacitor to avoid short cutting a PIN Sound library, sound scale: melody Sound click: some random sounds Tone Sirene

9 Melody Script Arduino script environment Examples, Melody

10 Script Melody NOTE sequence NOT duration PIN 8 for speaker But speaker has 2 PINS: Add: Pinmode(9, OUTPUT); digitalWrite(9, LOW); In setup(){ }

11 Hardware Speaker Capacitor To digital PIN 8 + To digital PIN 9 GND (coded GND PIN)

12 Experiment with Melody script Add Notes Change note duration Change speed Make different melodies (search internet) – Short – Significant, eg Beethoven 5th theme Experiment with fast “texture”, upbeat style

13 Sound 2 Use Click: digitalWrite(8, HIGH) and LOW In between delay(milliseconds) command See script in next slide:

14 Sound scape Code for (int i= 0; i< 1000; i++) { clickSound(); } clickSound(){ digitalWrite(8, HIGH); delay(1); digitalWrite(8, LOW); delay(1); }

15 Problem: delay(1) = 1 millisecond, not fast enough Special fastest command: __asm__("nop\n\t"); But this is too fast! Toooooo high notes. Make this command slower with another for loop: for(int i2 = 0 ; i2<beats ;i2++) __asm__("nop\n\t");

16 No you can go high pitch: for(int i2 = 0 ; i2<beats ;i2++) __asm__("nop\n\t"); Instead of “delay(.. )” (double for loops) Change “beats” inside the loop for obtaining sirenes

17 Experiments Alternate melody with sirenes Sequential programming Block 1: melody1 Block 2: sirene1, say “up” Block 3: melody2 Block 4: sirene2, say “down” Try to make “sense” sound

18 If statement Forking possibilities Instead of 4 blocks repeating: choice Choice can be: – human input, push button, paper button – Sensor input, digital or analog Needed for us: analog input

19 Analog PINS, 6 of them Input range 0-1023 Normally used for sensors – light (LDR) – Temperature – Pollution Capacitive sensor: electrostatic charge

20 Breadboard

21 Smart Connections Standardized!


Download ppt "Human Sensing Beam 2014. Low resolution image and Sound Image 8 x 8 pixels Sound: 8 notes in an octave (13) GFU&feature=relmfu."

Similar presentations


Ads by Google