<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dana Lee on Medium]]></title>
        <description><![CDATA[Stories by Dana Lee on Medium]]></description>
        <link>https://medium.com/@danagilliann?source=rss-9edd5bd87a55------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4-0y668aQNc04e1_1XCzSA.jpeg</url>
            <title>Stories by Dana Lee on Medium</title>
            <link>https://medium.com/@danagilliann?source=rss-9edd5bd87a55------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 08:05:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@danagilliann/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[An Introduction to Creating Music in the Browser with Web Audio API]]></title>
            <link>https://medium.com/@danagilliann/an-introduction-to-creating-music-in-the-browser-with-web-audio-api-1a8d65cc2375?source=rss-9edd5bd87a55------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a8d65cc2375</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[webaudio]]></category>
            <category><![CDATA[web-audio-api]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Dana Lee]]></dc:creator>
            <pubDate>Wed, 27 Dec 2017 23:59:55 GMT</pubDate>
            <atom:updated>2017-12-27T23:59:55.537Z</atom:updated>
            <content:encoded><![CDATA[<p>The Web Audio API is a way to create music with code. To do this, you can use Javascript to write and to talk to Web Audio, and you can easily run it in the browser.</p><p>The nice part about Web Audio is it abstracts the process of coding music. However, it is still gives you the option to configure things like sampling rates or precise wavelengths. It’s a great interface for beginners and advanced engineers. I recommend this tutorial for people who have a little familiarity with Javascript.</p><h4>Let’s get started:</h4><p>First thing we need do is to create an instance of the AudioContext:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f86b648c5d46d7c074d46d3387245a0e/href">https://medium.com/media/f86b648c5d46d7c074d46d3387245a0e/href</a></iframe><p>This is our entry point to the methods of Web Audio API. Think of it as the building blocks of our sound machine.</p><p>You only need one audioContext instance per project. If you try to have more than one per project, your browser will either throw an error or output an unexpected sound.</p><p>Next, we will need to create and start an oscillator from your audioContext variable:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/73fc1165b7052512f61d1443bb36c9aa/href">https://medium.com/media/73fc1165b7052512f61d1443bb36c9aa/href</a></iframe><p>An oscillator is a sound generator. It creates sound by being given a frequency and a wave form. Sound is created through waves in the air. The frequency dictates how tight or loose the sound wave will be, which means the frequency determines what the sound <em>sounds</em> like.</p><p>At this point, I would like to point out that we will need to view sound and volume as something separate. For the sake of this article, I will define sound as what our ears will listen to. I will define volume as how loud the sound is. This definition will help you in the following paragraphs.</p><p>The oscillator needs to be connected to a volume generator. For this to happen, we need to create a gain node from the audioContext variable and connect it to our oscillator:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c1e890e99237885e29783103ead3ac07/href">https://medium.com/media/c1e890e99237885e29783103ead3ac07/href</a></iframe><p>Gain is a node which controls the oscillator’s volume. We use it to program how loud the sound will be.</p><p>Next, we will want to hear the sound. We set up the sound and volume, but this actually does not allow us to hear what we have coded. To do this, we will need to connect the gain to the destination of the audioContext, aka our speaker, and give the gain some volume:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a319722ac45b086ffecc2e6f620669f0/href">https://medium.com/media/a319722ac45b086ffecc2e6f620669f0/href</a></iframe><p>Understanding how oscillator, gain, and audioContext work together may be a bit confusing. The way I like to think about it is we configure the sound with oscillator. Then we pass that sound to the gain node to give it volume. Then we pay that sound with the volume to give it to our audioContext. Then, audioContext sends it to our speakers for our ears to hear.</p><p>A word of caution: Avoid setting your volume above 1. If your volume is too high then you could blow out your speakers. If you’re building your project with headphones on and connected to your computer, well you could become deaf. I like setting my volume to maximum 0.5.</p><p>The resulting code should look something like <a href="https://github.com/danagilliann/webAudioTutorial/blob/master/basic.js">this</a>.</p><h4>Customization:</h4><p>Now here’s the fun part. We can customize the tune of our sound through the frequency:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/29110ed12f16b53cb089cc384862d9e6/href">https://medium.com/media/29110ed12f16b53cb089cc384862d9e6/href</a></iframe><p>The default frequency is 528. If you program the frequency to be higher then your tune will start sound pitchier. If you program the frequency to be lower then it will sound deeper and heavy.</p><p>We can also change the wave of the oscillator:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0bcc4fc5354b42896679d4ecd108a1eb/href">https://medium.com/media/0bcc4fc5354b42896679d4ecd108a1eb/href</a></iframe><p>The default wave type is a sine wave. If you would like to hear how these wave types sound, check out the following videos: <a href="https://www.youtube.com/watch?v=eXQnsYXbqqs">sine</a>, <a href="https://www.youtube.com/watch?v=NaoHFZXDN5g">triangle</a>, <a href="https://www.youtube.com/watch?v=IctmUIHdb00">sawtooth</a>, and <a href="https://www.youtube.com/watch?v=1W_uV-p-7_k">square</a>.</p><p>You can also control the volume at certain levels of time. AudioContext has its own “timekeeper” which I highly recommend using. There’s close to no setup and it’s far more accurate than the way Javascript keeps track of time.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/24b2ec99123ca7bddd29d87765f4d0f2/href">https://medium.com/media/24b2ec99123ca7bddd29d87765f4d0f2/href</a></iframe><p>The variable now is officially your timekeeper, and you can easily pass it through functions and class.</p><p>Now suppose you wanted to tune to fade out after 20 seconds, you can easily do that by making use of your timekeeper by writing:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/151755e125bbae2d6f6e3eb2521f2c8d/href">https://medium.com/media/151755e125bbae2d6f6e3eb2521f2c8d/href</a></iframe><p>exponentialRampToValueAtTime smoothly changes the volume. In the code we just wrote, we’re slowly decreasing the volume so it does not feel like we’re suddenly stopping the sound when we call stop on oscillator. Technically, you do not need to call stop on oscillator since our ears cannot hear the tune at volume 0.001. However, it is for cleanup purposes, and, in my opinion, good practice.</p><p>You can also have two or more sounds played at once. It’s one of the times when Javascript’s asynchronous feature comes in handy. Let’s try combining one low frequency sawtooth, one high frequency square, and have both fade out after 20 seconds:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/466b448f3e4d9d05422a4e328147ad93/href">https://medium.com/media/466b448f3e4d9d05422a4e328147ad93/href</a></iframe><h4>Abstracting everything:</h4><p>From the playing two sounds example, you may notice that we’re repeating some logic. Namely, creating our oscillators and playing them. To solve this, we can port everything to a class:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/835dde3a876d7b98153df18b33807cb6/href">https://medium.com/media/835dde3a876d7b98153df18b33807cb6/href</a></iframe><p>Then, we can instantiate the class and use it to play tunes.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5d195ac9be61f9df573e534af3358611/href">https://medium.com/media/5d195ac9be61f9df573e534af3358611/href</a></iframe><p>Now, we have our basic “sound machine.” You can port your Sound class to any of your projects. You can also add more customizations to it by looking at the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">documentation</a>.</p><h4>More with Web Audio:</h4><p>These were just the basics with Web Audio, and there is a lot more you can do with it. Here are some ideas:</p><ul><li><a href="https://www.html5rocks.com/en/tutorials/webaudio/intro/#toc-play">Playing song files with Web Audio and buffers</a></li><li><a href="https://www.npmjs.com/package/dilla">Metronome built with Web Audio</a> *</li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode">Adding a filter to a tune</a></li><li><a href="https://github.com/notthetup/awesome-webaudio">List of libraries which use Web Audio</a></li><li><a href="http://webaudio.github.io/demo-list/">List of apps which use Web Audio</a></li></ul><p>*If you plan to incorporate a metronome or a metronome-like project, I highly recommend using a pre-built one. Javascript is really terrible at handling infinite background jobs, which makes it quite difficult to code it out.</p><h4>Conclusion:</h4><p>I hope you were able to find Web Audio interesting or even entertaining. It’s fairly easy to find StackOverflow questions, and the documentation is quite thorough so it’s not too painful to debug. There are also a handful of music-related libraries on npm which use Web Audio, and you can also do some complex audio engineering with some of the methods. If you want to start a music-related project and already have already have Javascript knowledge, I highly recommend using Web Audio API.</p><p>If you have any questions or comments on this article, feel free to comment below, mention or message me on Twitter (<a href="https://twitter.com/danagilliann">@danagilliann</a>), or email me at <a href="/service/mailto:hello@danagilliann.me">hello@danagilliann.me</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a8d65cc2375" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Things People Have Said to Me]]></title>
            <link>https://medium.com/@danagilliann/things-white-people-have-said-to-me-9b0b8b0c6bc6?source=rss-9edd5bd87a55------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b0b8b0c6bc6</guid>
            <category><![CDATA[asian]]></category>
            <category><![CDATA[microaggressions]]></category>
            <category><![CDATA[racism]]></category>
            <dc:creator><![CDATA[Dana Lee]]></dc:creator>
            <pubDate>Tue, 21 Jun 2016 01:05:22 GMT</pubDate>
            <atom:updated>2016-10-15T16:04:35.627Z</atom:updated>
            <content:encoded><![CDATA[<h4>A collection of racist encounters</h4><ol><li>“Omg, you’re so Asian!”</li><li>“Oh, right, you are Asian.”</li><li>“I hate Chinatown…that place is disgusting. The only thing I like are the pumpkin buns.”</li><li>“Black lives matter so much!” (Well this is ironic…)</li><li>“America was a nice colonizer.”</li><li>“Wow! Your English is so good!”</li><li>“Does the Philippines even have an airport?”</li><li>“Is everyone in the Philippines like a maid?”</li><li>“Filipino food is, like, spicy, right?”</li><li>“The Philippines doesn’t have four seasons?! That’s abnormal.”</li><li>“Why would you put raw beef in soup? That’s gross!”</li><li>“Are you doing Computer Science because your parents said so?”</li><li>“You don’t eat dogs, do you?”</li><li>“Chili with kale looks so disgusting.”</li><li>“You’re from the Philippines? Aren’t you supposed to be darker?”</li><li>“The owner is Asian so it’s super minimalist.”</li><li>“The Philippines is in Guam, right?”</li><li>“Do you know [insert name here]? She’s from the Philippines too.”</li><li>“Where is the Philippines? Is it near Hawaii?”</li><li>“Your food smells really bad.”</li><li>“I have yellow fever.”</li><li>“It’s ‘eh-muhnds,’ not ‘aL-monds.’”</li><li>“It’s ‘sah-muhn,’ not ‘saL-mon.’”</li><li>“Kow-nee-chee-wah”</li><li>“Nee-ha-ow”</li><li>“Look at all those Asians”</li><li>“Those goddamn Chinese”</li><li>“Fucking Chinks”</li><li>“Hey! Are you mixed? Cause you look exotic!”</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b0b8b0c6bc6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Have a Question…]]></title>
            <link>https://code.likeagirl.io/i-have-a-question-aeaec597115a?source=rss-9edd5bd87a55------2</link>
            <guid isPermaLink="false">https://medium.com/p/aeaec597115a</guid>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[life-lessons]]></category>
            <dc:creator><![CDATA[Dana Lee]]></dc:creator>
            <pubDate>Tue, 15 Mar 2016 03:04:00 GMT</pubDate>
            <atom:updated>2016-03-16T21:21:05.449Z</atom:updated>
            <content:encoded><![CDATA[<h4>But I’m too scared to ask</h4><p>Sounds familiar? Yep, same.</p><p>I became interested in Computer Science the summer before my freshman year in college. I was interested in the tech industry, but I was also very scared. Everyone seemed to have been coding since they were fetuses, and everyone seemed to know everything. How could I possibly keep up?? I was just starting out!</p><p>Like any rational human being, I pretended to understand what other engineers and Computer Science majors were talking about. Of course I knew what an API was! Front-end and back-end? Psh, definitely heard of that! Databases are super super cool. I <em>loooooove</em> MVC frameworks. To be honest, I had no idea what anyone was talking about. After every conversation with a developer, I would quickly open my laptop and spend hours Googling everything we talked about. This was quite ridiculous, but I was too afraid and too intimidated to ask questions. I did not want to be the n00b in the room who everyone mocked.</p><p>One day, I was at a Javascript workshop, and I asked a question to the speaker. He started using some web development jargon, and I nodded my head and pretended to understand him. I’m sure he started getting a bit suspicious since he was using big developer words, and I seemed to know everything. He then asked me, “Wait, do you know what an [insert web dev concept here]?” Oh shoot. I’m caught. Play cool, play cool. “Umm…yeah!” I said. “Okay, then what is it?” he said. Fuck. This is it, he’s going to think that I’m a n00b and make fun of me. “Umm…actually, I don’t,” I said. He shook his head, “If you don’t know something, then ask!”, and he preceded to talk about the concept.</p><blockquote><strong>“If you don’t know something, then ask!”</strong></blockquote><p>That moment struck me because it was the first time someone told me it was okay to ask questions. The dude was experienced and extremely knowledgeable, but he did not judge me for not knowing. It shifted my perspective and made a feel a bit better about asking questions. I would like to note that I did not change overnight and suddenly become this person who fearlessly asked questions. It was a process.</p><p>I confided to one of my friends that I hesitated to ask question because I was scared of being the “dumb one.” “I mean, all these amazing and intelligent developers started out like us, right?” she said. For some strange reason, we forget that talented people do not come into the world being naturally talented. Everyone has to start somewhere and experienced developers are not exempt from this.</p><p>Asking questions is still something I struggle with, but there are a few things I tell myself so I don’t back out. 1) I don’t know what this concept is so it makes sense for me to ask. 2) I could either waste an hour of my time Googling the answer to my question and potentially get nowhere or ask right now and get a clear answer within five minutes. 3) If someone judges me for not knowing the answer to my question, then they’re the dumb one.</p><blockquote><strong>If someone judges me for not knowing the answer to my question, then they’re the dumb one.</strong></blockquote><p>We can’t expect ourselves to know everything because no one is a walking search engine. I believe that asking questions makes us better developers. Having a question answered produces a domino effect. Once one is answered, you will probably have more questions. This way you become more knowledgeable about the field. It also shows to the other person that we are genuinely curious and passionate about Computer Science. Asking questions does not mean you’re “dumb” person; it means you’re curious.</p><blockquote>If you like this post, don’t forget to recommend and share it. Check out more great articles at <a href="https://medium.com/code-like-a-girl/">Code Like A Girl</a>.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aeaec597115a" width="1" height="1" alt=""><hr><p><a href="https://code.likeagirl.io/i-have-a-question-aeaec597115a">I Have a Question…</a> was originally published in <a href="https://code.likeagirl.io/">Code Like A Girl</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reflecting on Grief and Loss]]></title>
            <link>https://medium.com/@danagilliann/reflecting-on-grief-and-loss-c4f5028a79ce?source=rss-9edd5bd87a55------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4f5028a79ce</guid>
            <category><![CDATA[loss]]></category>
            <category><![CDATA[death]]></category>
            <category><![CDATA[grief]]></category>
            <dc:creator><![CDATA[Dana Lee]]></dc:creator>
            <pubDate>Sun, 31 Jan 2016 06:39:36 GMT</pubDate>
            <atom:updated>2016-02-01T03:57:19.052Z</atom:updated>
            <content:encoded><![CDATA[<p>The first time I experienced grief was when I was maybe ten or eleven years old when my <em>akong</em> (grandfather on my dad’s side) passed away. Fast-forward to the present when I just attended my friend, <a href="http://grungerabbit.com/">Cheryl Wu</a>’s, funeral. Now, I am experiencing grief in a different way.</p><p>I vaguely remember my grandfather’s funeral. I remember there were people, and the atmosphere was extremely somber. I spoke a few words on the podium, but not nearly as heartfelt as I did at Cheryl’s funeral. Perhaps it is because I now understand what it means to lose someone.</p><p>It is the realization that the people I surround myself with continuously make an impact on me. I am never going to meet the same person twice. The memories I share with one person will never be identical to the memories I share with another. If a person I met passes away, the identity and personality of that person will go away too. I will never meet another Cheryl because she was unique — we all are.</p><p>The idea that we are all different is not new. However, I think it’s important to add that we should value those differences before we can’t anymore. I did not come to this realization when my grandfather died. I was sad because he left, but I did not think about the possibility of someone else in my life following the same route.</p><p>Now that I am older, I can see the lessons grief and loss teach me. I want to appreciate my friends and my family because one day they might not be here. I want to be able to show my gratitude to the people who show love and kindness to me because I don’t want to regret not returning the love that I am given. Death is a struggle for the living, but I want to believe that it helps me value the people who are still present in my life.</p><p><em>Kindly consider visiting Cheryl’s page to </em><a href="http://afsp.donordrive.com/index.cfm?fuseaction=donorDrive.personalCampaign&amp;participantID=959717"><em>donate to the American Foundation for Suicide Prevention</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4f5028a79ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>