###### Tags: `makers lab` `bootcamp` `EM Lyon` `IA` # Bootcamp IA Ecully ## About this document During a four days AI bootcamp, at the makers' lab of emlyon business school's, we made a musical chair, creating songs based on research papers of emlyon searcher. Thank to an IA, we transformed academic researches stand out by music. This tutorial will help you create your own! ++Description:++ The music is generated by Artificial Intelligence. First, a research article written by an emlyon professor is randomly selected from the school's online library. Then, according to the tone of the article, its length and its semantics, an Artificial Intelligence using NLP -Natural Language Processing- determined (Watson Natural Language Understanding by IBM, link [here](https://www.ibm.com/watson/services/natural-language-understanding/)), a second Artificial Intelligence (Performance RNN derived from Magenta, link [here](https://magenta.tensorflow.org/performance-rnn)) creates a unique music. Thus, a negative article produces sad music and a positive one, a joyful piece. Furthermore, the richer an article is semantically, the more notes are used in the piece of music. Finally, the length of the musical piece depends on the length of the article. ## Contribution Authors listing * [Samuel Javelle](https://www.linkedin.com/in/samuel-javelle-188a377b/) * [Hugo Sainte-Marie](https://www.linkedin.com/in/hugosaintemarie/) * [Romain Chaffal](https://www.linkedin.com/in/romain-chaffal/) * [Margaux Viel](https://www.linkedin.com/in/margauxviel/) * [Lionel Radisson](https://makerslab.em-lyon.com) * [Hugo Guillart](https://www.linkedin.com/in/hugo-guillart/) * [Elena Patin](https://www.linkedin.com/in/elena-patin-81a2aab2/) * [Ilann Adjedj](https://www.linkedin.com/in/iadjedj/) * [Guillaume Thoviste](https://www.linkedin.com/in/guillaume-thoviste/) * [Théophile Thomas](https://www.linkedin.com/in/theophile-thomas-97413047/) * [Antoine Bertho](https://www.linkedin.com/in/antoinebertho/) * [Tom Antonietti](https://www.linkedin.com/in/tom-antonietti-05431791/) * [Camille Huret ](https://www.linkedin.com/in/camille-huret-02b914170/) * [Mathieu Geiler](https://www.linkedin.com/in/mathieugeiler/) * [Guy Didia](https://www.linkedin.com/in/guy-abel-didia-62a21126/) * [Héloïse Caillaux](https://www.linkedin.com/in/héloïse-caillaux/) * [Paul Gardette](https://www.linkedin.com/in/paul-gardette/) * [Mathis Dominjon ](https://www.linkedin.com/in/mathis-dominjon-9786aa173/) * [Jérôme Lin](https://www.linkedin.com/in/jérôme-lin-59b6a4170/) * [Thomas Imbert](https://www.linkedin.com/in/thomas-imbert-a1661868/) * [Tanguy Pledel ](https://www.linkedin.com/in/tanguy-pledel-088a45144/) * [Vincent Joseph-Noël](https://www.linkedin.com/in/vincent-joseph-noël/) * [Yoline Badet](https://www.linkedin.com/in/yoline-badet-63500b156/) * [Isolde Roumy](https://www.linkedin.com/in/roumyisolde/) * [Elise Madariaga ](https://www.linkedin.com/in/elise-madariaga-316807171/) * [Clarisse Lam ](https://www.linkedin.com/in/clarisse-lam/) * [Valentine Greff](https://www.linkedin.com/in/valentine-greff-630923107/) * [Perrine Debasseux ](https://www.linkedin.com/in/perrine-debasseux-23b27a14b/) --- ## Tools and materials ### Materials ![](https://i.imgur.com/nO9T1mz.png) ![](https://i.imgur.com/LMFJoUP.png) ![](https://i.imgur.com/IX0LPmT.png) ![](https://i.imgur.com/YZIUGzF.png) ![](https://i.imgur.com/hD9K0pE.png) ### Tools - Pliers - Screwriver - Scissors #### Classical tools #### Consumables - Scotch tape #### Electronics - Raspberry Pi card - 2X75W Caliber Amplifier Amplifier - Screen/user interface - Cables - Power strip - Dominos #### Machinery - Numerical control milling machine ### Software - Fusion 360 ### Coding languages - Javascript --- ## Photos sharing - Do things, step by step ### Step 1 - Link the loudspeakers together **Step 1.1** Take a couple of black and red cables. <center><img src="https://i.imgur.com/fY1W82r.jpg" style="width: 300px;"/></center> **Step 1.2** Strip the wires so that they can fit into the domino plug. <center><img src="https://i.imgur.com/Ho5bvXB.jpg" style="width: 300px;"/></center> <br> <center><img src="https://i.imgur.com/GrWhyqG.jpg" style="width: 300px;"/></center> Twist the wires: it'll make easier the next step. <center><img src="https://i.imgur.com/VJuej2I.jpg style="width: 300px;"/></center> Plug the wires into the domino. Negative wires with negative wires in on domino. And positive ones with positive ones in another. <center><img src="https://i.imgur.com/fWyghEX.jpg" style="width: 300px;"/></center> **Step 1.3** Once it's done plug them into the loudspeakers. One red and one black in each one. <center><img src="https://i.imgur.com/CYfrP6q.jpg" style="width: 300px;"/></center> Repeat the operation for the other side. ### Step 2 - Link the two buttons **Step 2.1** Cut one meter of wire cable for each button. Strip the two ends of each cable. <center><img src="https://i.imgur.com/UtrOr89.jpg" style="width: 300px;"/></center> **Step 2.2** Weld one end to the button connecter. Take the other cable and weld it to the other button connecter. <center><img src="https://i.imgur.com/99GTfYR.jpg" style="width: 300px;"/></center> <br> <center><img src="https://i.imgur.com/wDh2Yg2.jpg" style="width: 300px;"/></center> **Step 2.3** Sand the inside of the hole if the button doesn't fit. <center><img src="https://i.imgur.com/MbO2exO.jpg" style="width: 300px;"/></center> **Step 2.4** Settle the buttons on the wood and make the cables go under it. <center><img src="https://i.imgur.com/MWMktfb.jpg" style="width: 300px;"/></center> It should eventually look like that. <center><img src="https://i.imgur.com/PiFPqGZ.jpg" style="width: 300px;"/></center> ### Step 3 - Assemble the screen **Step 3.1** Link the raspberry with the right armrest : make the cables pass through the little hole made in the armrest. Link all the cables with the raspberry pi as on the following sketch: <center><img src="https://i.imgur.com/HqqiWJy.png" style="width: 300px;"/></center> :exclamation: Careful :exclamation: Nail the screen to the armrest and pass the cables through the hole first. Otherwise, you won't be able to nail it afterwards. <center><img src="https://i.imgur.com/ZgaUok5.jpg" style="width: 300px;"/></center> **Step 3.2** Nail the armrest with the raspberry. Be careful, the raspberry has to be on the top of the armrest otherwise you cannot nail everything all together as said earlier. It should look like that: <center><img src="https://i.imgur.com/qqLtnYc.jpg" style="width: 300px;"/></center> ### Step 4 - Connecting the speakers to the amplifier **Step 4.1** Connect the amplifier with two objects: -on the one hand, connect the amplifier to the Rasperry Pi Card with the Stereo Jack. -on the other hand, connect the yellow and black wires with the power supply female connector. <center><img src="https://scontent-frx5-1.xx.fbcdn.net/v/t1.15752-0/p280x280/53343497_365167977419039_2579384889270861824_n.jpg?_nc_cat=100&_nc_ht=scontent-frx5-1.xx&oh=6f87a4f175d0d10a3d770e79fcc98acd&oe=5CE8209C" style="width: 300px;"/></center> **Step 4.2** Then, connect the + and - cables to a sector adaptator <center><img src="https://i.imgur.com/Zln0frb.jpg" style="width: 300px;"/></center> **Step 4.3** Fix the raspberry on the armrest with nails. Bind the speakers with the battery. The right speaker goes with the right head of the battery and the left speaker go with the left head. The red cable has to be connected to the + side (right side) The tranparent cable is connected to the - side (right side) Do the same for the left speaker. Then, connect the + and - cables to a sector adaptator <center><img src="" style="width: 300px;"/></center> <center><img src="https://i.imgur.com/d9orD1e.jpg" style="width: 300px;"/></center> Finally, connect the amplifier to the power supply. - The yellow plus to the power socket - The black minus to the power socket <center><img src="https://i.imgur.com/iX8wWGs.jpg" style="width: 300px;"/></center> ### Step 5 - Assemble the chair Gather all the required pieces for one chair : * Pillow A and Pillow B * Main Body * Panel A x2 * Panel B x2 * Panel C x2 * 6 little wood connectors (Connector A) * 4 big wood connectors (Connector B) * A bunch of screws and ring washers (always use a ring washer with the screw) **Step 5.1** First, screw two Connectors A to the top sides of the Main body. Then the Connectors B to the bottom sides of the Main body. <center><img src="https://i.imgur.com/f6YvB6c.jpg" style="width: 300px;"/></center> <br> <center><img src="https://i.imgur.com/DqG9gl4.jpg" style="width: 300px;"/></center> **Step 5.2** Finally screw two Panel A to the connectors <center><img src="https://i.imgur.com/gJyOS7h.jpg" style="width: 300px;"/></center> <br> <center><img src="https://i.imgur.com/3DkqSS9.jpg" style="width: 300px;"/></center> **Step 5.3** First screw Connectors A to the top sides of each Panel A. Screw Connectors C to the bottom sides of each Panel A. Finally screw two Panels B to the connectors. <center><img src="https://i.imgur.com/3wIK27G.jpg" style="width: 300px;"/></center> **Step 5.4** First screw Connectors A to the top sides of each Panel B. Screw Connectors B to the bottom sides of each Panel B. Finally screw two Panels C to the connectors. ### Step 6 - Finish * Screw the amplifier to the inside of the armrest. * Screw the armrests inside the chair. * Screw the two boards on the chair. <center><img src="https://i.imgur.com/6EL8OrN.jpg" style="width: 300px;"/></center> * Put the pillows. <center><img src="https://i.imgur.com/cy5KBTB.jpg" style="width: 300px;"/></center> ## Links ### Link to the chair 3D file https://github.com/emlyon/makers-furniture/tree/master/AIpod ### Link to the Fritzing scheme (Electronic) https://github.com/emlyon/aipod ### Code to generate music from a text #### Explaination of the technologies used Music is generated by a subproject of Google [Magenta](https://magenta.tensorflow.org), the Performance RNN model (click [here](https://magenta.tensorflow.org/demos/performance_rnn) for a demo running in browser). Magenta is a subdivision of Google focusing on using AI in art and music projects. We used the [IBM Watson Natural Langage Understanding](https://www.ibm.com/watson/services/natural-language-understanding/) (NLU) API to analyse emlyon scientific papers database ([Scripta](https://learninghub.em-lyon.com/exploitation/default/scripta.aspx?_lg=fr-FR)) and extracted the main characteristics of the articles (length, subject, sentiment, number of keywords) and mapped these characteristics to compositional parameters of the Performance RNN model (root note, harmonic scales, "note density", etc..) #### Link to the code "making music from a text" https://github.com/emlyon/aipod/blob/master/generator_code/ The code in documented in-line, enjoy! You must know that this code is adapted to emlyon data base and will surely need to be adapted depending of what you're working on. Furthermore, you'll need to install dependencies using : ``` pip install -r requirements.txt ``` Finally, mp3 conversion is done using freesynth, so you'll need a .sf2 file (soundfont), we used FreePats2 soundfonts. You can find one you like on http://freepats.zenvoid.org/index.html (but keep in mind that Magenta generate only piano scores) ### Code integration --- Ce document est placé sous la licence [CC-BY-NC-SA 4.0](http://creativecommons.org/licenses/by-nc-sa/4.0/) - Auteurs : Makers Lab EM Lyon & al. <img style="display: block; margin: 0 auto;" src="https://mirrors.creativecommons.org/presskit/buttons/88x31/png/by-nc-sa.png" width="40%">