<?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 Aleksandra Ma on Medium]]></title>
        <description><![CDATA[Stories by Aleksandra Ma on Medium]]></description>
        <link>https://medium.com/@leksa_86?source=rss-effc1ebd4aac------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*v_gl1l-SqXYATKpPWIPdbQ.jpeg</url>
            <title>Stories by Aleksandra Ma on Medium</title>
            <link>https://medium.com/@leksa_86?source=rss-effc1ebd4aac------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 09:59:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@leksa_86/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[Work Hard Only If You Are Working Smart]]></title>
            <link>https://medium.com/@leksa_86/work-hard-only-if-you-are-working-smart-d11c0294942a?source=rss-effc1ebd4aac------2</link>
            <guid isPermaLink="false">https://medium.com/p/d11c0294942a</guid>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[professional-development]]></category>
            <category><![CDATA[career-advice]]></category>
            <category><![CDATA[advice]]></category>
            <category><![CDATA[consulting]]></category>
            <dc:creator><![CDATA[Aleksandra Ma]]></dc:creator>
            <pubDate>Mon, 29 May 2023 04:04:22 GMT</pubDate>
            <atom:updated>2023-05-29T04:35:18.770Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Tz-MKagaBXlQdlXY" /><figcaption>Photo by <a href="https://unsplash.com/it/@mattwridley?utm_source=medium&amp;utm_medium=referral">Matt Ridley</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Last Friday marked my last day working as a strategic risk consultant at Deloitte.</p><p>When I first started my career, I didn’t know what my place was in the real world. So I chose a path that gave me the most opportunities to dip my toes into different industry waters and work with different kinds of people. Looking back at this rewarding yet challenging journey, I want to share some lessons that have transformed me from a fresh college graduate into a professional who has clear goals, vision, and most importantly, dedication to achieving them.</p><h4>Lesson 1. Do Your Homework, But Do It Strategically.</h4><p>Of course, by homework, I mean all the good stuff like call preparation, meeting notes, due diligence, research… you get the idea. While these tasks significantly bolster your confidence and competence, it is also important to ensure you’re investing your efforts wisely. What is the end goal of your task? What do you need to know or do in order to accomplish it? Are you researching with the right tool? Are you researching the right topics? If you are not sure, ask someone and check if you are going in the right direction. That naturally leads to my next lesson…</p><h4>Lesson 2. Find Your Support Network at Work.</h4><p>Trust me, a strong support network can be a lifeline, especially during challenging times. You should have at least one overall career mentor that does not directly oversee you, a senior member in your group who can provide guidance, and a peer that you can trust.</p><p>It’s easy to see why you would want to build a good relationship with someone in your group that you can seek help from and trust on a daily basis, but make sure to find that balance so that you are not bugging them every day. After all, their time is precious, and we should leave any Googleable questions to Google.</p><p>As for the overall career mentor, they should have a career trajectory you admire and a willingness to mentor young professionals. When you need some advice about the direction to take your career within the firm or if your current role does not fit your goals, they should be able to share their insights without conflict of interest. Of course, if you are thinking about taking your career outside the firm, it’s worth it to find a mentor outside of your company. Usually there are a lot of area-specific programs/initiatives/conferences that provide mentorship opportunities.</p><h4>Lesson 3. Have More Confidence — You Know More Than You Think.</h4><p>And if after thorough research, you still find yourself at a dead-end, ASK. It is more likely that you don’t have the resource or background than competence. With that being said, imposter syndrome happens to everyone. It is normal to feel overwhelmed, but remember, you are here for a reason.</p><p>On a slightly different note, if English is not your native language and you are working in an English-speaking country, don’t let the language barrier stand in your way. First of all, you should celebrate yourself for taking on the challenge and putting yourself out of your comfort zone. Second of all, forget about the perfect pronunciation and focus on expressing yourself clearly and to the point with structure. If someone else gives you trouble for not being a native speaker, it’s their problem (that you can take to HR of course ;)).</p><h4>Lesson 4. Expectations and Boundaries: Manage Up, Down, and All Around.</h4><p>This is one of the lessons that is easier said than done. Let’s be real, we all have performance reviews. Setting clear expectations ahead of time between you and your manager is a great way to promote transparency for those performance reviews. Otherwise, how would we hit a target that is moving all the time? It is also important to check those expectations regularly to make sure they stay current.</p><p>Managers are not saints, and they are learning in their role too. That’s why we should always communicate with them and understand what their goals and pressures are, so that we could help them achieve the project’s goal more effectively. When the project timeline is not realistic or when you have a concern about the approach, you should always try to push back. If the concern is serious enough but the communication with the manager is tough, it is also a good idea to express your concerns to other members of the team, or involve someone outside the team.</p><p>Your career is a marathon, not a sprint. Something that I didn’t realize at the beginning of my career until a mentor pointed out is, we as young professionals are in a position where we should feel empowered to make decisions, speak up, and set boundaries. These things might not come naturally right when we begin, but with enough practice, it should feel like second nature.</p><h4>Lesson 5. Protect Your Focus Time, Or Just Time in General.</h4><p>I first came across the concept of deep work when I read Cal Newport’s book, <em>Deep Work</em><strong>.</strong> I’m sure we all got those times when we recognize the value of a task but couldn’t find the time to actually do them. This is your sign to block your calendar for 2 hours in the morning and just work through them. Quit your email app, quit your Teams, Slack, or what have you, and just focus. They will still be there when you are done with your 2 hours. Do this every day for 2 hours, and you will be surprised just how much time you can save yourself. It is also beneficial for the whole team, since your productivity is directly linked to theirs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dYg6OLPmkub2dmTV" /><figcaption>Photo by <a href="https://unsplash.com/@sworupimages?utm_source=medium&amp;utm_medium=referral">Saurav Thapa Shrestha</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Lesson 6. Innovate If the Result Justifies the Cost, and Don’t Complicate Things.</h4><p>Of course, it would make your project sound cool if it involves the latest technology. Generative AI, anyone? However, one should also strive to find the balance between innovation and practicality. Is the technology a true fit for the problem at hand? Can we solve the problem as effectively with a simpler and cheaper solution? If not, does the return on investment for this innovation effort justify the cost? If the answers to these questions are all yes, then we could consider spending the effort on finding a more innovative solution.</p><h4>Lesson 7. A Personal Favorite: Manage Your Life How You Would a Consulting Project.</h4><p>At one point during my career, I had the revelation that my life is exactly like a consulting project. I am constantly facing the questions of goals, priorities, stakeholders, time constraints, budget, etc. So why can’t I leverage the tools and mindsets that I use for consulting on my own life and career? Here are some thoughts to kick off your own life management journey:</p><ul><li>Ask yourself these questions and be honest: What is the short term and long term goal? What does the timeline look like? Should I do this in a couple of sprint phases or is this more of a steady state project? Then revisit them every once in a while. When I first asked myself this question, I had the first pivotal moment in my career. My long-term goal is to work in a music-related industry, and when I confronted myself with what the timeline should look like in order for it to come true in 5 years, I realized it’s now time to move on from professional services.</li><li>In order for you to get there, who are the stakeholders? Who do you need on your advisory board? Who do you need to know your name? Reach out and get that cup of coffee. Now of course, it is likely that they might not respond, but learn to be okay with that and find the next person.</li><li>Use a project management or productivity tool to keep you on track of personal goals. Start weekly goals and to-dos, then distribute them to daily goals and to-dos. At the beginning, it’s hard to keep consistent, but that’s where the power of habit and rituals come in. Make them part of your morning ritual and reward yourself with a cup of coffee at the end of it. I will not go into the power of habits here and instead direct you to Jame Clear’s <em>Atomic Habits</em><strong>.</strong></li><li>Write down all the things that you have done in the past so that you don’t forget about them.</li><li>If you are anything like me, you won’t remember all the details of your current accomplishments two years down the road. Have a long running documentation of what you have accomplished and stay organized, it will pay dividends.</li></ul><p>It is quite scary to leave what I grew comfortable with and pursue something completely different. But it is a strategic risk that I decided to take after my two years as a … strategic risk consultant. I hope these lessons will help someone who is just starting their career somewhere. As for me, I’m thrilled to pursue a future career in the music technology field and can’t wait to see what the future holds!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d11c0294942a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Built a Lo-fi Music Web Player with AI-Generated Tracks]]></title>
            <link>https://medium.com/data-science/how-i-built-a-lo-fi-music-web-player-with-ai-generated-tracks-36f3915e39f8?source=rss-effc1ebd4aac------2</link>
            <guid isPermaLink="false">https://medium.com/p/36f3915e39f8</guid>
            <category><![CDATA[editors-pick]]></category>
            <category><![CDATA[lstm]]></category>
            <category><![CDATA[generative-model]]></category>
            <category><![CDATA[music-generation]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Aleksandra Ma]]></dc:creator>
            <pubDate>Thu, 12 Jan 2023 05:01:29 GMT</pubDate>
            <atom:updated>2023-01-12T05:01:29.574Z</atom:updated>
            <content:encoded><![CDATA[<h4>Made with Tone.js and LSTM Model</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*F7Ln3dhjETAIb7Y_" /><figcaption>Photo by <a href="https://unsplash.com/@rupixen?utm_source=medium&amp;utm_medium=referral">rupixen.com</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Introduction</h3><p>Lo-fi hip hop music has been my go-to study buddy ever since college. It creates a cozy and calming vibe with a relatively simple musical structure. Some jazzy chord progressions, groovy drum patterns, ambience sounds, and nostalgic movie quotes can give us a pretty decent sounding lo-fi hip hop track. On top of the musical side, animated visuals are also a crucial part of the lo-fi aesthetics, setting the ambience along with the nature sounds of water, wind, and fire.</p><p>The idea to create my own lo-fi web player occurred to me one Sunday afternoon when I was learning about deep generative models. I did some research and finished the project during the holiday times. The web player provides two options: users can either choose a lo-fi track based on a real song encoded with Tone.js, or they could choose an AI-generated solo track. Both options will be layered on top of the drum loop, ambience sounds, and quotes that users selected in the previous step. This post will mainly talk about how to use LSTM models to generate a midi track, and I will briefly discuss how to make a song with Tone.js at the end.</p><p>You can try the web player <a href="https://mtsandra.github.io/lofi-station">here</a>, and I recommend using the desktop Chrome browser for the best experience.</p><h3>LSTM Model Architecture &amp; Midi Generation</h3><p>In a previous <a href="https://mtsandra.github.io/blog/2022/dl4mir-4">post</a>, I explained what an LSTM network is. For a quick refresher, it is a special type of RNN that handles long-term dependencies better. It also has a recurrent structure that takes the output from the previous time step at the current time step. To better understand it, we can unroll the network and think of an LSTM cell as multiple copies of the same network, each passing a message to the next time step, as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J57OHEsHuI8WzmTmCeUEig.jpeg" /><figcaption>Unrolled LSTM; Created by Author</figcaption></figure><p>Each cell contains four main components that allow them to handle long term dependencies better:</p><ul><li>forget gate: determines what information to forget</li><li>input gate: determines what information to update and store in our cell state</li><li>cell state update: make element-wise operations to update the cell state</li><li>output gate: determines what information to output</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AM2WVHRFbCPqRiPIX3o_1g.jpeg" /><figcaption>Inside an LSTM cell; created by Author</figcaption></figure><h4>Training Data Preparation</h4><p>We have a couple of options when it comes to the music data format we are training the model on: raw audio, audio features (e.g. time frequency representations like Mel spectrogram), or symbolic music representation (e.g. midi files). Our goal is to generate a solo track (i.e. a sequence of notes, chords, and rests) to layer on other components like drum loops, so midi files are the easiest and most effective format to achieve our goal. Raw audio is very computationally expensive to train on. To put it in perspective, music clips sampled at 48000kHz mean there are 48000 data points in one second of audio. Even if we downsample it to 8kHz, that is still 8000 data points for every second. In addition, clean audio of only the melody or chord progression is extremely rare. However, we could still find some midi files containing only the chord progression / melody if we try hard enough.</p><p>For this project, I used some lo-fi midi samples from YouTube creator <a href="https://www.youtube.com/watch?v=9gAgtc5A5UU&amp;ab_channel=MichaelKim-Sheng">Michael Kim-Sheng</a>, who have generously given me permission to use his files. I also leveraged some midi files in this <a href="https://cymatics.fm/products/lofi-toolkit">Cymatics lo-fi toolkit</a> licensed for commercial use. In order to make sure that I am training my model on quality data (plausible chord progression and meter for lo-fi hip hop), I listened to a subset of tracks from each source and filtered out my training dataset. The model architecture is inspired by the classical piano composer repository <a href="https://github.com/Skuldur/Classical-Piano-Composer">here</a>.</p><h4>Load and encode the midi files</h4><p>A Python package <a href="http://web.mit.edu/music21/doc/index.html">music21</a> can be used to load the midi files. Music21 parses a midi file and stores each musical component into a specific Python object. In other words, a note will be saved as a Note object, a chord will be saved as a Chord object, and a rest will be saved as a Rest object. Their name, duration, pitch class and other attributes can be accessed through the dot notation. Music21 stores the music clip in a hierarchy shown as below, and we can extract the necessary information accordingly. If you are interested in how to use the package, the package website has a beginner-friendly user guide and Valerio Velardo from The Sound of AI has a <a href="https://www.youtube.com/watch?v=coEgwnMBuo0&amp;ab_channel=ValerioVelardo-TheSoundofAI">tutorial</a> on how to use music21 as well.</p><p>As mentioned previously, music21 stores each note, rest, and chord as a Python object, so the next step is to encode them and map them to integers that the model can train on. The model output should contain not just notes, but also chords and rests, so we will encode each type separately and map the encoded value to an integer. We do this for all the midi files and concatenate them into one sequence to train the model on.</p><ul><li>Chords: get the pitch names of the notes in a chord, convert them to their normal order, and connect them with a dot in the string format, “#.#.#”</li><li>Notes: use the pitch name as the encoding</li><li>Rests: encoded as the string “r”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/0*ElUd3DxfVZQ0cODq.PNG" /><figcaption><em>Midi Encoding and Mapping</em></figcaption></figure><h4>Create the Input and Target Pairs</h4><p>Now we have a model-friendly encoding of our midi data. The next step would be to prepare the input and target pairs to feed into the model. In a simple supervised classification machine learning problem, there are input and target pairs. For example, a model that classifies a dog breed will have the fur color, height, weight, and eye color of the dog as input and the label / target will be the specific dog breed the dog belongs to. In our case, the input will be a sequence of length k starting from time step i, and the corresponding target will be the data point at time step i+k. So we will loop through our encoded note sequence and create the input and target pairs for the model. As a last step, we change the dimension of the input to the keras-friendly format and one-hot encode the output.</p><h4>Model Structure</h4><p>As previously mentioned, we will use LSTM layers as our core structure. In addition, this network also uses the below components:</p><ul><li>Dropout layers: to regularize the network and prevent overfitting by randomly setting input units to 0 with a frequency of rate at each step during training time (in our case, the rate is 0.3)</li><li>Dense layers: fully connects the preceding layer and performs matrix-vector multiplication in each node. The last dense layer needs to have the same amount of nodes as the total number of unique notes/chords/rest in our network.</li><li>Activation layers: adds non-linearity to our network if used in a hidden layer and helps the network classify to a class if used in an output layer.</li></ul><pre>model = Sequential()<br>model.add(LSTM(<br>    256,<br>    input_shape=(network_input.shape[1], network_input.shape[2]),<br>    return_sequences=True<br>))<br>model.add(Dropout(0.3))<br>model.add(LSTM(512, return_sequences=True))<br>model.add(Dropout(0.3))<br>model.add(LSTM(256))<br>model.add(Dense(256))<br>model.add(Dropout(0.3))<br>model.add(Dense(n_vocab))<br>model.add(Activation(&#39;softmax&#39;))<br>model.compile(loss=&#39;categorical_crossentropy&#39;, optimizer=&#39;rmsprop&#39;)<br>model.fit(network_input, network_output, epochs=200, batch_size=128)</pre><p>For this example network, 3 LSTM layers are used with 2 dropout layers each following the first two LSTM layers. Then there are 2 fully connected dense layers, followed by one softmax activation function. Since the outputs are categorical, we will use categorical cross entropy as the loss function. The RMSprop optimizer is used, which is pretty common for RNNs. Checkpoints are also added so that weights are regularly saved at different epochs and could be used before the model finishes training. Please feel free to tweak the model structure, and try with different optimizers, epochs, and batch sizes.</p><h4>Output Generation &amp; Decoding Back to Midi Notes</h4><p>The output generation process is similar to the training process — we give the model a sequence of length m (we’ll also call it sequence m for notation simplification) and ask it to predict the next data point. This sequence m has a start index randomly selected from the input sequence, but we can also specify a specific start index if we wish. The model output is a list of probabilities from softmax that tell us how much each class is suited as the next data point. We will pick the class with the highest probability. In order to generate a sequence of length j, we will repeat this process by removing the first element of the sequence m and adding the recently generated data point to this sequence m, until the model generates j new data points.</p><p>The data generated from the last paragraph is still an integer, so we decode it back to a note/chord/rest using the same mappings during encoding. If it is a chord string format, we will read the integer notation from the string “#.#.#.#” and create a music21.chord object. If it is a note or rest, we will create a corresponding note and rest object accordingly. At the same time, we append the new data point generated to the prediction output sequence at each time step. For an illustration of this process, please see the example flow below where we are generating a sequence of 4 data points with an input sequence of 3 data points.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Z2_h0hkx0ogk-kZB.PNG" /><figcaption><em>Output Generation and Midi Decoding</em></figcaption></figure><p>Now we have a sequence of notes, chords, and rests. We could put them in a music21 stream and write out the midi file, in which case all the notes will be quarter notes. To keep the output a little bit more interesting, I added a code snippet that randomly samples a duration to specify for each note or chord (The default probability distribution is 0.65 for eighth notes, 0.25 for 16th notes, 0.05 for both quarter and half notes). Rests are defaulted to 16th rests so that we don’t have too long of a silence between notes.</p><pre>NOTE_TYPE = {<br>            &quot;eighth&quot;: 0.5,<br>            &quot;quarter&quot;: 1,<br>            &quot;half&quot;: 2,<br>            &quot;16th&quot;: 0.25<br>        }<br>offset = 0<br>output_notes = []<br>for pattern in prediction_output:<br>    curr_type = numpy.random.choice(list(NOTE_TYPE.keys()), p=[0.65,0.05,0.05, 0.25])<br>    <br>    # pattern is a chord<br>    if (&#39;.&#39; in pattern) or pattern.isdigit():<br>        notes_in_chord = pattern.split(&#39;.&#39;)<br>        notes = []<br>        for current_note in notes_in_chord:<br>            new_note = note.Note(int(current_note))<br>            new_note.storedInstrument = instrument.Piano()<br>            notes.append(new_note)<br>        new_chord = chord.Chord(notes, type=curr_type)<br>        new_chord.offset = offset<br>        output_notes.append(new_chord)<br>    elif str(pattern).upper() == &quot;R&quot;:<br>        curr_type = &#39;16th&#39;<br>        new_rest = note.Rest(type=curr_type)<br>        new_rest.offset = offset<br>        output_notes.append(new_rest)<br>    # pattern is a note<br>    else:<br>        new_note = note.Note(pattern, type=curr_type)<br>        new_note.offset = offset<br>        new_note.storedInstrument = instrument.Piano()<br>        output_notes.append(new_note)<br># increase offset each iteration so that notes do not stack<br>    offset += NOTE_TYPE[curr_type]<br>midi_stream = stream.Stream(output_notes)<br>midi_stream.write(&#39;midi&#39;, fp=&#39;test_output.mid&#39;)</pre><p>Once we run the model for a few times with different parameters and pick out the tracks that we like, we will choose a lofi-esque instrument effect in any DAW so that our generated tracks sound more like real music. Then we head over to JavaScript to build our web player.</p><h3>Building the Web Player with <a href="https://tonejs.github.io/">Tone.js</a></h3><p>Tone.js is a web audio framework for creating interactive music in the browser. You can use it to build a lot of fun interactive websites (see <a href="https://tonejs.github.io/demos">demos</a> here). But in our case, it provides a global transport to make sure our drum patterns, ambience sounds, quotes, and melody play at the same time. It also allows us to write in music score, sample an instrument, add sound effects (reverberation, gain, etc.), and create loops right in JavaScript. Credit goes to <a href="https://github.com/lawreka/loaf-ai">Kathryn</a> for the code skeleton. If you want a quick and effective crash course on Tone.js, I highly recommend the use case examples on their <a href="https://tonejs.github.io/">website</a>. The most important takeaway is that for each sound event we create, we need to connect them to the AudioDestinationNode (aka our speakers) through toDestination() or through samplePlayer.chain(effect1, Tone.Destination) if we want to add sound effects to it. Then through Tone.Transport, we will be able to start, pause, and schedule events on the master output.</p><h4>Looping the Audio Clips</h4><p>Drum patterns, ambience sounds, quotes, and the pre-generated AI tracks are all audio files (.mp3 or .wav) loaded into our web player through a Player class. After loading the user input events from the website, they are then fed into a Tone.js Part class to create loops.</p><p>Drum patterns are looped every 8 measures, ambience sounds every 12 measures, and AI solo tracks every 30 measures. Quotes are not looped and start at the beginning of the 5th measure.</p><h4>Creating Melody and Chord Progression with Instrument Samples</h4><p>Tone.js does not provide software instrument options that we see in DAW, only samplers that allow us to sample our own instruments by loading in a couple of notes. The sampler will then repitch the samples automatically to create the pitches which were not explicitly included.</p><p>Then we can write in the melody and chord progression by specifying the notes and the time that the note should take place. I recommend using TransportTime to encode the beat exactly as we want. TransportTime is in the form of &quot;BARS:QUARTERS:SIXTEENTHS&quot; and uses zero-based numbering. For example, &quot;0:0:2&quot; means the note will take place after two sixteenth notes passed in the first bar. &quot;2:1:0&quot; means the note will take place in the third bar, after one quarter note passed. I wrote in the melody and chord progressions for 3 existing songs: Ylang Ylang by FKJ, La Festin by Camille, and See You Again by Tyler, the Creator this way.</p><h4>Web Player Design</h4><p>I added functions to change the web player background with different inputs for ambience sounds so that a more context-appropriate gif will be displayed for each context. There is also a visualizer connected with the song notes to add visual appeal, made with p5.js.</p><h3>Future Work</h3><p>The LSTM Model</p><ul><li>Add start of sequence and end of sequence tokens so that the model can learn the music pattern as the song comes to an end.</li><li>Incorporate encoding for note duration so that beat tracking can be enabled.</li></ul><p>The Web Player</p><ul><li>It would be cool to connect the backend AI model to the web player so that the output can be generated live. Currently the roadblock is that the model takes a few minutes to generate the output, but likely we could leverage a pre-trained model API.</li><li>User interactivity could be greatly improved if the web player allows the users to 1) put in chord progression of their own choice 2) write down some text that the web player will do sentiment analysis on and output a chord progression matching the sentiment.</li></ul><h3>Conclusion</h3><p>For code and training datasets, please see the GitHub repo <a href="https://github.com/mtsandra/lofi-station">here</a>. While this is just a simple lo-fi web player, I have had a lot of fun with both the LSTM model and Tone.js. It amazes me every time to see how we can incorporate technology into our experience with music.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36f3915e39f8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/how-i-built-a-lo-fi-music-web-player-with-ai-generated-tracks-36f3915e39f8">How I Built a Lo-fi Music Web Player with AI-Generated Tracks</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Surveillance Capitalism Means to Democracy in Today’s Digital Age]]></title>
            <link>https://medium.com/swlh/what-surveillance-capitalism-means-to-democracy-in-todays-digital-age-498e659a1d4?source=rss-effc1ebd4aac------2</link>
            <guid isPermaLink="false">https://medium.com/p/498e659a1d4</guid>
            <category><![CDATA[surveillance-capitalism]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[data-ethics]]></category>
            <category><![CDATA[shoshana-zuboff]]></category>
            <category><![CDATA[privacy]]></category>
            <dc:creator><![CDATA[Aleksandra Ma]]></dc:creator>
            <pubDate>Mon, 16 Mar 2020 02:10:38 GMT</pubDate>
            <atom:updated>2020-04-12T23:48:43.336Z</atom:updated>
            <content:encoded><![CDATA[<p>“Absolute power corrupts absolutely.” — Lord Acton</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4qgFp9qNEdFQFPGW6ATJXw.jpeg" /><figcaption>Photo: The Harvard Gazette</figcaption></figure><p>Ever since the dot com boom in the early 2000s, our lives have been saturated by technology in every aspect and have been made much more convenient by the services tech corporations provide. After two decades flew by, the Internet has become the extension of the real world and one of the most significant infrastructures of today’s society. We engage in daily activities, make important life decisions, and expose sensitive information on this platform, which allows the tech corporations to collect this user information and use it to train their algorithms. We as users, on the other hand, are unaware of which part of the traces we leave online is collected as data, and most importantly, how these tech corporations handle our data. This huge asymmetry of knowledge and transparency has exposed us to surveillance capitalism and puts democracy at stake.</p><p><em>Introduction to Surveillance Capitalism</em></p><p>Shoshana Zuboff, a Harvard Business School professor emerita with decades of experience studying issues of labor and power in the digital economy, defines surveillance capitalism as a “radically disembedded and extractive variant of information capitalism” based on the commodification of “reality” and its transformation into behavioral data for analysis and sales. One important characteristic of traditional capitalists is that they claim things outside the market such as rivers and mountains and take them into the market dynamics as commodities. Similarly, surveillance capitalists like Google were also looking for their free target outside the conventional market in the early 2000s, and they saw the vast potential in commodifying people’s private experience. The surveillance capitalists build platforms such as social media to collect data, they use the data to train predictive models, and their final products are the predictions of what their users will do. In this case, it is not their users that are the business customers, but the companies that need these prediction results to make decisions like when to send the targeted ads, how much to charge for insurance for different people, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TTruAf-DgZvb6db3TboYzg.jpeg" /><figcaption>Shoshana Zuboff’s Book about Surveillance Capitalism</figcaption></figure><p><em>Indications of Surveillance Capitalism</em></p><p>In Zuboff’s article <em>“Big Other: Surveillance Capitalism and the Prospects of an Information Civilization”,</em> she argues that surveillance capitalism “ aims to predict and modify human behavior as a means to produce revenue and market control.” Surveillance capitalists know that the monetization potentials linked to accurate data capture and analysis are enormous. In order to get the most accurate models, tech corporations need to get not only a massive amount of data but also a variety of data. Because technology is still a largely unrestricted and lawless land, tech firms have developed lots of ways to convert the real world into data points as well. Virtual assistants such as Amazon Alexa are brought into people’s homes and said to be listening to people’s conversations; insurance tracking devices are promoted by auto insurance companies to decide on how much an individual should pay for insurance; CCTV surveillance cameras are installed in different neighborhoods, which leaves people’s facial expressions that are highly indicative of their future behaviors free for the companies to grab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*iyR3I_eckO6ubZIxlbAgGg.jpeg" /><figcaption>Photo: Covert Law Enforcement</figcaption></figure><p>Unfortunately, these new opportunities and incentives to capture data can sometimes challenge people’s privacy and even violate rights and laws. This prompts the big tech corporations such as Google and Facebook to obscure their operations and algorithms in order to take advantage of the uninformed data subjects. They expect to get opposition along the way but as previously mentioned, they will already have accumulated a substantial amount of resources to defend themselves at low cost.</p><p>The technology that backs up this surveillance capitalism develops at an unprecedented speed, which puts people in a brand new position where very few people understand the logic and consequences of the work of these corporations. As a result, there is a law gap between technological development and defensive barriers. The opacity that the tech corporations choose to hide behind did not help with connecting the gap, especially knowing that their ultimate goal is to modify and swing behavior. Zuboff argues that under the framework of surveillance capitalism, the global architecture of computer mediation turns the electronic text of the bounded organization into an intelligent world-spanning organism that she defines as the Big Other. Those with the material, knowledge, and financial resources participate in the Big Other economics, and the markets in behavioral control get to decide who can gain access to the Big Other. Markets and democracies are no longer reciprocal to each other; rather, populations depend on the markets so much that the data they are supposed to own is just free data capture targets. As Zuboff said, “Under surveillance capitalism, democracy no longer functions as a means to prosperity; democracy threatens surveillance revenues.”</p><p>The opacity that big tech corporations choose to take on catalyzes the formation of a black box society where we know only the output, but not the process leading to the output. As James Arvanitakis states, “In a democracy, we assume that we understand where the information comes from, but this is no longer the case.” The asymmetry of knowledge crashes democracy from both above and below. From above, it increases the social inequality in this digital era. Internet was built to spread and democratize knowledge, but surveillance capitalists see their users’ rights of knowing as an obstacle on their way to higher efficiency. From below, it is nearly impossible for users to combat surveillance capitalism. Since the product is the certainty of behavior predictions, the surveillance capitalists aim to interfere with our own decision making without the users knowing through subliminal cues and micro-targeting.</p><p>As we entered the digital era, the Internet has become the basic infrastructure of today’s economy. However, if our infrastructure is full of cameras and strings that can be pulled to manipulate the majority, the power will naturally fall into the hands of the minority who has all the information. As Lord Acton once said, “Absolute power corrupts absolutely.” Democracy will be threatened, and there will be bigger social inequality issues. The good news is, surveillance capitalism is still a relatively new phenomenon that has lasted for about 20 years, and legislative institutions have started to take measures to regulate the operation and ownership of the Internet. European Union has recently come up with General Data Protection Regulation, which aims to protect the users’ privacy; every state in the United States has its own breach disclosure law; pioneer tech companies such as Facebook have also shown interest in cooperating with the legislative institutions after Mark Zuckerberg was called in front of Congress. This is still a long fight, but I do have hope in everyone in the ecosystem figuring out a solution, not at the sacrifice of users’ privacy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=498e659a1d4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/what-surveillance-capitalism-means-to-democracy-in-todays-digital-age-498e659a1d4">What Surveillance Capitalism Means to Democracy in Today’s Digital Age</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>