This is my blog from my first semester at ITP. I have since switched to a Notion blog which you can view here.
Intro to Physical Comp:
Intro to Comp Media:
P003 → Week 3 - Tone & Servo Labs
This week I was able to complete the labs without major difficulties.
float
frequency
=
map
(sensorReading,
200
,
900
,
100
,
1000
);
However, when Noah and I tried to run it with the sensor reading mapped to 200 - 900, we found that the tone would not play. This made some sense, as the sensor readings we were seeing did range from 0-900. But we still weren’t sure why nothing would play at all with a tighter range like 200-900.
We did some troubleshooting with Nikolai and think that the map function might be breaking the code when it is mapped from too tight of a range, because it could output a negative value. Is this true?