One sound that would be really helpful for our house is a certain song playing as a notification if all our garbage/recycling cans aren’t in their spots on our driveway at 5:30 PM on Wednesdays. This would be a great reminder to take them off the curb so we don’t get in trouble with Pittsburgh.
Another helpful sound inspired by Jet’s weather example is a tone that would be played as we are leaving the house if it’s late afternoon/ early evening and the temperature is supposed to drop by 10 or more degrees. This could be a useful reminder to get a(nother) jacket if you aren’t already prepared for the temperature change. This is more important with everyone spending so much time inside.
Finally, a last helpful sound I thought of is if a package is delivered to have the doorbell ring if the delivery person had not done so. It seems that this year it is up in the air whether there is a notification that a package has arrived.
This is a counter to sampling and using electronics to invent new music. Instruments from one style of music are used to perform a style of music from a completely unrelated genre. My favorite examples are “piratemetal” or the band Orkestra Obsolete playing famous pop music.
We’re skipping a lot of contemporary genres — things like EDM, IDM, dub, liquid trap, and future soul. There’s an entire class in this topic, but if you want to go on a genre-binge-fest then Ishkur’s Guide is one place to start: http://music.ishkur.com/
Physical interaction options
How to hide things in plain sight: https://www.youtube.com/watch?v=T61-twuvJA4
Bill Shannon, PGH native, who defies disability with dance performance:
and his tutorial on a dance form he developed:
Ways of making sound
Some examples of different ways people create sound
how to debounce a switch: https://www.arduino.cc/en/Tutorial/Debounce
standard deviations, arrays, and monitoring a variable source. flattening data with mean / median.
// -*-c++-*-
/*
The MIT License (MIT)
Copyright (c) 2019 Jet Townsend
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* basic stats with analogRead()
intputs
A0 pot
output
D2 Speaker
D13 LED
40 NEOPIXEL
*/
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 44
#define NUMPIXELS 1
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRBW + NEO_KHZ800);
static int plotter = 1;
static int console = !plotter;
static const int inPot = A0;
unsigned int potValue;
static const int sampleSize = 16;
int readings[sampleSize];
unsigned int sampleIndex = 0;
unsigned long lastSampleTime = 0;
unsigned long sampleInterval = 100; // in ms
// we need to move these out of the loop() as well
unsigned int median = 0;
unsigned int low = 1024;
unsigned int high = 0;
unsigned int mean = 0;
static const int statusLed = 13;
unsigned int lastRedVal = 0;
unsigned int analogMax = 1023;
void setup() {
//analogWriteResolution(10); // Set analog out resolution to max, 10-bits
analogReadResolution(12); // and read at 12 bits
analogMax = 1023 * 4;
Serial.begin(115200);
pinMode(inPot, INPUT);
pinMode(statusLed, OUTPUT);
pixels.begin(); // This initializes the NeoPixel library.
}
void loop() {
// TODO what happens if you try to set a negative color?
unsigned int redVal = 0;
// TODO
// don't read the input on every loop to help stabilize the data
// sampling over time is also a UI change, you have to actively
// block light for
// sampleSize * sampleInterval milliseconds to create a change
unsigned long now = millis();
if (lastSampleTime + sampleInterval < now) {
lastSampleTime = now;
potValue = analogRead(inPot);
// good for debugging:
// Serial.print(now);
// Serial.print(" ");
// Serial.println(potValue);
readings[sampleIndex] = potValue;
sampleIndex < (sampleSize - 1) ? sampleIndex++ : sampleIndex = 0;
digitalWrite(inPot, HIGH);
for (int i = 0; i < sampleSize; i++) {
mean += readings[i];
if (readings[i] < low) {
low = readings[i];
}
if (readings[i] > high) {
high = readings[i];
}
}
mean = mean / sampleSize;
bubbleSort();
median = readings[sampleSize / 2];
}
// set the pixels with different values, mean, median, current read
// long map(long x, long in_min, long in_max, long out_min, long out_max)
// in A10, the value of 600 was the bottom end
// TODO use a flashlight to break this, more light == lower number
// than 600
redVal = map(median, 5, analogMax, 0, 255);
// at home, 950 was the bottom end. Remember that higher value == less light
// how do we dynamically set the bottom end of the map?
// redVal = map(median, 950, analogMax, 0, 255);
// what about changing the max value of redVal so we have a dimmer range?
// redVal = map(median, 600, analogMax, 0, 128);
// TODO keep the pixel from blinking
/*
// simple, but allows for some blinking
if (redVal != lastRedVal) {
pixels.setPixelColor(0, pixels.Color(redVal,0,0));
pixels.show(); // This sends the updated pixel color to the hardware.
lastRedVal = redVal;
}
*/
// use a tolerance to limit to a range
// by making this not a const we can change it in the code
// as needed
int tolerance = 5;
// This looks like it should work, right?
// what happens if lastRedVal is 0?
if (
(redVal > (lastRedVal + tolerance))
|| (redVal < (lastRedVal - tolerance))
) {
pixels.setPixelColor(0, pixels.Color(redVal, 0, 0));
pixels.show(); // This sends the updated pixel color to the hardware.
lastRedVal = redVal;
}
// console
if (console) {
Serial.print("reading ");
Serial.print(potValue);
Serial.print(" low ");
Serial.print(low);
Serial.print(" high ");
Serial.print(high);
Serial.print(" mean ");
Serial.println(mean);
Serial.print(" median ");
Serial.print(median);
Serial.print(",");
Serial.print(" redVal ");
Serial.println(redVal);
delay(100);
digitalWrite(inPot, LOW);
delay(100);
}
else if (plotter) {
// plotter
Serial.print(low);
Serial.print(",");
Serial.print(high);
Serial.print(",");
Serial.print(mean);
Serial.print(",");
Serial.print(median);
Serial.print(",");
Serial.println(redVal);
}
}
// tigoe's sort for an array
void bubbleSort() {
int out, in, swapper;
for (out = 0 ; out < sampleSize; out++) { // outer loop
for (in = out; in < (sampleSize - 1); in++) { // inner loop
if ( readings[in] > readings[in + 1] ) { // out of order?
// swap them:
swapper = readings[in];
readings [in] = readings[in + 1];
readings[in + 1] = swapper;
}
}
}
}
Problem:
I go to a circuit training gym, and since it reopened after covid, we’ve had to stand in line to take our temperature before we’re allowed to be admitted into class. This designated spot is obfuscated by a bunch of equipment, and it’s not always easy for the trainer on duty to be alerted whenever someone arrives. They are also likely to be re-setting the equipment for the next class, and unable to rely on visual cues.
Solution:
Whenever someone arrives at the door, the ultrasonic sensor initiates the speaker to start playing a tune to alert the trainer that someone is here. Once they take their temperature is taken and they leave that spot, the tune automatically stops because the distance sensed in the ultrasonic sensor returns back to baseline. This is less frustrating and annoying than a doorbell or buzzer, which can startle other people in the room and disrupt their pre-workout stretch.
Sometimes, the trainer uses a vacuum cleaner to clean the gym between classes, and can’t hear soft ambient noises. In this case, the person waiting can use a button to sound a buzzer and stop the tune playing to attract the attention of the trainer more effectively.
//Setting up ultrasonic speaker pins
const int trigPin = 12;
const int echoPin = 13;
//Defines variables
long duration;
int distance;
//Setting up speaker
#include "pitches.h"
//Setting up melody:
int melody[] = {
NOTE_C4, NOTE_G3, NOTE_G3, NOTE_A3, NOTE_G3, 0, NOTE_B3, NOTE_C4
};
// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = {
4, 8, 8, 4, 4, 4, 4, 4, 4
};
//buzzer interrupt
static const int togglePin = 2;
bool buzzerState = false;
const bool isInterrupt = true;
void SwitchPressed()
{
//play buzzer
}
void setup() {
//To read ultrasonic speaker
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
Serial.begin(9600); // Starts the serial communication
pinMode(togglePin, INPUT); // Button for buzzer
}
void loop() {
//Reading from ultrasonic speaker
// Clears the trigPin
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Sets the trigPin on HIGH state for 10 micro seconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);
// calculate distance
distance= duration*0.034/2;
// print distance
Serial.print("Distance: ");
Serial.println(distance);
if(distance<100){
// digitalWrite(11,HIGH);
// iterate over the notes of the melody:
for (int thisNote = 0; thisNote < 8; thisNote++) {
// to calculate the note duration, take one second divided by the note type.
//e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
int noteDuration = 1000 / noteDurations[thisNote];
tone(8, melody[thisNote], noteDuration);
// to distinguish the notes, set a minimum time between them.
// the note's duration + 30% seems to work well:
int pauseBetweenNotes = noteDuration * 1.30;
delay(pauseBetweenNotes);}
}
else{
// digitalWrite(11,LOW);
// stop the tone playing:
noTone(8);
}
}
Problem: Today, many children are taking music lessons. They learn to read notes and play them on different instruments. But is it enough to learn notes and scores by heart in order to cultivate an ear for music? Or to recognise notes both auditory and visually to compose them into pleasant melodies that make sense?
Solution: Capacitive μPiano helps beginners to do exactly that. You can repeat your favourite melody as many times you want, until you finally perceive how to reproduce it. Each capacitive sensor represents a different note. The melody’s reading becomes an auditory experience for the user, who previously used visual scores. This process helps new practitioners to train an ear for music from the early beginning.
After watching the videos on changes and developments in music in class, I got to thinking about what would be a cool, funky way to make music with electronics. I decided that a fun experimental music making idea would combine the ability to change the type of sound quickly on a speaker (frequency) as well as add in the taps that could go with a beat based on your leg moving up and down. This being triggered by your leg would leave a hand open to change out what is being tapped by the solenoid and thus change the sound heard from it. As someone who knows nothing about music and notes, I chose for someone to just change the frequency so that there would be no barriers from someone trying it out. For this proof of concept, I chose to have the speaker turn off when the IR beam is broken and the solenoid moves as it overpowers the sound otherwise.
int solenoidPin = 9;
const int IRpin = 3;
int IRstate;
int potPin = A0;
int potVal;
int speakerPin = 13;
int frequency;
void setup()
{
pinMode(solenoidPin, OUTPUT);
pinMode(IRpin, INPUT);
digitalWrite(IRpin, HIGH);
pinMode(potPin, INPUT);
pinMode(speakerPin, OUTPUT);
Serial.begin(9600);
}
void loop()
{
potVal = analogRead(potPin);
frequency = map(potVal, 0, 1023, 1, 1000);
IRstate = digitalRead(IRpin);
Serial.println(IRstate);
static int start = millis();
digitalWrite(solenoidPin, !IRstate);
if (IRstate == 1) {
tone(speakerPin, frequency);
}
else { //broken
noTone(speakerPin);
}
}
I have just started practicing boxing a few weeks ago and every week we work on a new drill. During class I can work with a partner and get familiar with the hits and rhythm of the drill. After I am familiar with drill, I will have to react to the movement made by my partner and execute the drill accordingly. When I shadow-box in home and without a partner, however, there is no hint or reminder on the next hit as I try to get familiar with the drill again. In addition, shadow-boxing also lacks the reacting aspect of s?m.parring. Therefore, a device that acts as the shadow boxing partner is designed.
Solution
The device is made up by six speakers that sticks to the wall. Each square in the diagram above represents a speaker. The diagram shows the default arrangement of the speakers. The number written near the speakers represents the number for the hit the speakers are responsible for. For example, when a jab needs to be thrown, the speaker on the top left-corner will play the sound effect because the number of jab is 1. The middle speakers are responsible to upper cut to chin and body shots to the middle. The device will connect to phone, and the sound effect player by the speakers depending on what drill is being practiced. The one of the navy drills, for example, includes a left hook (3), a straight punch (2), and then a left hook (3). The speaker that is responsible for left hook will play the sound effect for left hook, and the speaker responsible for straight punch will play the sound effect for straight punch. The sound effects of each type of punches are recorded from actual punches. They might not be that distinct comparing to each other but the position of the speaker already gives a big hint on the next hit and the user should at least know what hits are included in the drill. When the user gets comfortable with the drill, the device can be switched to difficult mode. Only the first punch or the “hit” from the partner is given and the user has to react to it. The user can also change the drill through the smart phone.
Proof of Logic
Because of the lack of materials, I cannot make the full device with 6 speakers. Instead, I will use speaker, solenoid, and vibration motor to stimulate the sound effects for hook, straight punch/ jab, and body shoots. The first button on the right hand side is to switch between drills and the second button is to switch between normal mode and difficult mode.
Code:
//libary
#include "pitches.h"
//Defining the pins
#define solenoide 12
#define motor 13
#define speaker 7
#define drill_pin 3
#define hint_pin 2
//Global varibales
//For interrupt
const bool isInterrupt = true;
int drill;
int drill_number = 1;
bool hint_status = true;
bool solenoid = true;
int delay_in_between = 350;
//Functions
void move_solenoid() {
if (solenoid == true) {
digitalWrite(solenoide, HIGH);
solenoid = false;
}
else {
digitalWrite(solenoide, LOW);
solenoid = true;
}
}
void vibrate_motor() {
digitalWrite(motor, HIGH);
delay(300);
digitalWrite(motor, LOW);
}
void DrillSwitchPressed() {
if (digitalRead(drill_pin) == LOW) {
drill == drill_number ? drill = 0 : drill ++;
}
}
void HintSwitchPressed() {
if (digitalRead(hint_pin) == LOW) {
hint_status = !hint_status;
}
}
//Functions for the drill
void Navy_drill(int random_numb) {
if (hint_status == true) {
if (random_numb == 1) {
//NOTE_A4 is the note for hook
tone(speaker, NOTE_A4,200);
delay(delay_in_between);
move_solenoid();
delay(delay_in_between);
tone(speaker, NOTE_A4,200);
}
if (random_numb == 2) {
move_solenoid();
delay(delay_in_between);
tone(speaker, NOTE_A4,200);
delay(delay_in_between);
move_solenoid();
}
if (random_numb == 3) {
//Upper cut
vibrate_motor();
delay(delay_in_between);
move_solenoid();
delay(delay_in_between);
//NOTE_A4 is the note for hook
tone(speaker, NOTE_A4,200);
}
if (random_numb == 4) {
//Upper cut
//tone(speaker, NOTE_C4);
//delay(200);
//tone(speaker, NOTE_D4);
//delay(100);
//tone(speaker, NOTE_E4, 100);
vibrate_motor();
delay(delay_in_between);
//hook
tone(speaker, NOTE_A4, 200);
delay(delay_in_between);
move_solenoid();
}
}
else {
if (random_numb == 1) {
//NOTE_A4 is the note for hook
tone(speaker, NOTE_A4, 200);
}
if (random_numb == 2) {
//NOTE_A4 is the note for hook
tone(speaker, NOTE_A4, 200);
}
if (random_numb == 3) {
//Body shot coming in
vibrate_motor();
}
if (random_numb == 4) {
//Body shot coming in
vibrate_motor();
}
}
}
void Dodge_drill(int random_numb) {
if (hint_status == true) {
if (random_numb == 1) {
//NOTE_A4 is the note for hook
tone(speaker, NOTE_A4,200);
delay(delay_in_between);
move_solenoid();
}
if (random_numb == 2) {
tone(speaker, NOTE_A4,200);
delay(delay_in_between);
move_solenoid();
}
}
else {
delay(random(0,2000));
if (random_numb == 1) {
//NOTE_A4 is the note for hook
tone(speaker, NOTE_A4, 200);
}
if (random_numb == 2) {
//NOTE_A4 is the note for hook
tone(speaker, NOTE_A4, 200);
}
}
}
void setup() {
// Setup the pin modes
pinMode(solenoide, OUTPUT);
pinMode(motor, OUTPUT);
//When the buttons are pushed, digitalRead shows 0
pinMode(drill_pin, INPUT_PULLUP);
pinMode(hint_pin, INPUT_PULLUP);
//Initiate the serial monitor
Serial.begin(9600);
// attach the interrupt pin to a method
if (isInterrupt) {
attachInterrupt (digitalPinToInterrupt(drill_pin), DrillSwitchPressed, FALLING);
attachInterrupt (digitalPinToInterrupt(hint_pin), HintSwitchPressed, FALLING);
}
//vibrate_motor();
//tone(speaker, NOTE_C4);
//delay(200);
//tone(speaker, NOTE_D4);
//delay(100);
//tone(speaker, NOTE_E4, 100);
}
void loop() {
if (drill == 0) {
//randomSeed(analogRead(A0));
int random_numb = random(1,4);
Navy_drill(random_numb);
delay(3000);
}
if (drill == 1) {
//randomSeed(analogRead(A0));
int random_numb = random(1,2);
Dodge_drill(random_numb);
delay(4000);
}
}
I learned surfing for the first time this past weekend and paddling was one of the hardest part of it. Here are some of the common mistakes/mistakes that I made:
Starts increasing paddling “faster”(in quotations because by faster, it does not mean moving your arms faster but paddle the water stronger with the same tempo so that the surfboard moves faster) too late
Not paddling “fast” enough
Arms are moved too fast and lost the tempo
Stop paddling too early
So I thought what kind of device can offer some cues to beginners like me? Auditory cue is a great idea here because there is already a lot to look at and strength requirement does not really allow haptic cues.
Here is the device that uses an acceleration sensor as input, and a speaker as output. The device always make sounds with the same tempo like a metronome, but depending on how close the wave is(acceleration), the pitch of the sound it makes is different.
Users can listen to the sounds to decide when to paddle faster, how fast, and when to stop while maintaining the rhythm.
I couldn’t accurately simulate the change acceleration change, so for demoing purpose, I’m swinging the acceleration sensor back and forth, but you can still hear the different pitches when swinging at different speeds.
As Jet briefly mentioned in class, in some countries including Korea/Japan, the “singing toilets” can be commonly found. Even the toilet at my house not only plays music but also it has a speaker and a microphone that connects to the doorbell, so you can answer someone outside the door while you are using the toilet.
I wondered, why does it play music? why not just a sound? Is it also a way to show the luxury of listening to classical music even while you do your business? I asked around many people, but I couldn’t really get an answer. Therefore, I called the interior consultant who installed this at my home.
He says it is more of a cultural thing. Not only the calm music lets you concentrate better on your business, but basically, for the toilets that are located in a shared area such as a public bathroom/my parent’s room, it is considered “rude” to let others hear the sound that your stuff makes. Therefore, there’s music to stealth the sound so that you don’t feel embarrassed. It is not always music, too; for example, the Incheon airport toilets have buttons next to them that you press when you use the toilet, and it makes a flush sound — no, it doesn’t flush the toilet, it only makes a flushing sound (you flush your toilet after pressing the flush sound button.
Therefore, I wondered again. While I use the microphone in the bathroom, classical music doesn’t stop. However, everyone in this building has the same toilet installed, so I was always afraid that the delivery guys can hear the music while I talk. The fact that the music doesn’t stop while talking on the microphone is defeating the whole purpose of that music.
So I designed a singing toilet module that fulfills all of the purposes.
Sound to me is spatial and that because it triggers my spatial modalities of perception such as vision, touch and proprioception. Through the latter ones, a person perceives space and its properties such as shapes, relations, textures, materiality, as well as his/her body’s relation to space and particular objects. Therefore, when I hear a sound, I have the tendency to visualise, spatialise and make kinaesthetic projections onto my body.
For example, when hearing the workers building on the construction site, I particularly focus on the sounds being produced using their tools. Those make me visualise materials being transformed; I try to understand the nature of the material itself, how rigid that is, what kind of texture it may have and the kinds of visual transformations that take place when it collides with different tools.
Or when hearing the echo of a person walking or talking in a space, I close my eyes and visualise how spacious and tall this room is. Or when raining, I render spatial the rain’s strength or the environment’s humidity degree. Finally, because of my dancing experience and the effect of neural mirroring on me, when hearing to music such as the sleeping beauty, I visualise famous dancing patterns and sometimes I perceive the difficulty to execute them.