scieee Open visual document viewer

KTRL midi controller

Pastor Bermúdez, Vicente

Abstract

[EN] We come to an era, where technology is more than important in music industry. First, music was written by humans. Then performed by humans, performed by musicians. Music spreads. It spreads via physicals, via vinyles, via CDs. Technologies were meant for recording studios : the compressors, the mixing desks, the microphones, the amplifiers, etc... Then, they spread on stage. Lights, visuals, performances. We come to a step, now, where electronic music shows are as important as music concerts. Music concerts have musicians playing their instruments and electronic music shows have DJs/Live performer mixing, playing their tunes with technology. These technologies can either be mixing console, turntables, controllers. But where is the performance in the way that the music is played by technology ? People go to a concert to see the musician performance. But when can we categorize an electronic music show as a performance ? With KTRL, midi controller for Digital Audio Workstation, our goal is to provide entertainment to an electronic music show, to give to the audience some visuals, to give them stuff to watch, to show them what the performer is actually doing, also in an original way, a different way than normal. The research we made, comes from different statement, different point of view we, the team, had concerning electronic music shows. 3/4 of the team are into electronic music, and after going to severals concerts during our lifetime, we came to a point where it is necessary to the audience to know what the performer is doing. What is more boring than watching someone with his face down on his setup without even looking to the audience ? Another point for KTRL, as electronic music shows are very common, more and more people are into producing their own music and performing it. Also they are trying to reach a step where they can be more original than the others. One of our goal is to give access to the people, tutorials that we are putting in shape on our website so they can build, craft the controller. Our open vision, shares interest in the DIY (aka Do It Yourself) community. Making the controller yourself, gives you the impression of building an instrument that you care about, also the pride of owning something you did.

Full text

Escola Tècnica Supe io d’Enginye ia In o mà ica Uni e si a Poli ècnica de València KTRL midi con olle T abajo Fin de G ado G ado en Ingenie ía In o má ica Au o : Pas o Be múdez, Vicen e Tu o : Galiano Ronda, Isabel Remedios 2015-2016 KTRL midi con olle 2 Resumen Es amos en una época en la que la ecnología es más que impo an e pa a la indus ia de la música. An es dicha ecnología se u ilizaba exclusi amen e en los es udios de g abación, pe o hoy en día podemos e espec áculos en di ec o donde se p oduce música u ilizando es a ecnología. ¿Realmen e se puede e cómo el músico mode no in e ac úa con la ecnología pa a p oduci su música? ¿Se puede conside a es o un e dade o espec áculo? Median e es e p oyec o se p e ende cambia la o ma en la que se in e ac úa con la ecnología pa a p oduci música. El obje i o es que el público pueda ap ecia de una o ma más isual lo que el músico mode no ealiza en un escena io median e la ecnología. Pa a ello hemos c eado una con olado a MIDI con senso es de p oximidad manejados po una placa A duino. Palab as cla e: MIDI, A duino, senso es de p oximidad, con olado a. Abs ac We come o an e a, whe e echnology is mo e han impo an in music indus y. Fi s , music was w i en by humans. Then pe o med by humans, pe o med by musicians. Music sp eads. I sp eads ia physicals, ia inyles, ia CDs. Technologies we e mean o eco ding s udios : he comp esso s, he mixing desks, he mic ophones, he ampli ie s, e c... Then, hey sp ead on s age. Ligh s, isuals, pe o mances. We come o a s ep, now, whe e elec onic music shows a e as impo an as music conce s. Music conce s ha e musicians playing hei ins umen s and elec onic music shows ha e DJs/Li e pe o me mixing, playing hei unes wi h echnology. These echnologies can ei he be mixing console, u n ables, con olle s. Bu whe e is he pe o mance in he way ha he music is played by echnology ? People go o a conce o see he musician pe o mance. Bu when can we ca ego ize an elec onic music show as a pe o mance ? Wi h KTRL, midi con olle o Digi al Audio Wo ks a ion, ou goal is o p o ide en e ainmen o an elec onic music show, o gi e o he audience some isuals, o gi e hem s u o wa ch, o show hem wha he pe o me is ac ually doing, also in an o iginal way, a di e en way han no mal. The esea ch we made, comes om di e en s a emen , di e en poin o iew we, he eam, had conce ning elec onic music shows. 3/4 o he eam a e in o elec onic music, and a e going o se e als conce s du ing ou li e ime, we came o a poin whe e i is necessa y o he audience o know wha he pe o me is doing. Wha is mo e bo ing han wa ching someone wi h his ace down on his se up wi hou e en looking o he audience ? Ano he poin o KTRL, as elec onic music shows a e e y common, mo e and mo e people a e in o p oducing hei own music and pe o ming i . Also hey a e ying o each a s ep whe e hey can be mo e o iginal han he o he s. One o ou goal is o gi e access o he people, u o ials ha we a e pu ing in shape on ou websi e so hey can build, c a he con olle . Ou open ision, sha es in e es in he DIY (aka Do I You sel ) communi y. Making he con olle you sel , gi es you he imp ession o building an ins umen ha you ca e abou , also he p ide o owning some hing you did. Keywo ds : midi, A duino, p oximi y senso s, con olle . 3 KTRL midi con olle 4 Table o Con en s The con en is based on he documen s equi ed by ECE Pa is o he ealiza ion o his p ojec . 1. In oduc o y ideo.................................................................................................7 2. Websi es................................................................................................................9 3. P ojec Roadmap..................................................................................................11 4. Speci ica ions documen ......................................................................................17 5. Technical Requi emen s Speci ica ion................................................................43 6. P o o ype Accep ance Plan..................................................................................59 7. Sys em A chi ec u e Documen ...........................................................................71 8. Valua ion Repo ...............................................................................................106 5 KTRL midi con olle 6 1. In oduc o y ideo h ps://www.you ube.com/embed/D4qPhk1M0xs 7 KTRL midi con olle 8 2. Websi es o he p ojec 1.Wo dp ess: h p://k lmidi.wo dp ess.com 2.Facebook: h ps://www. acebook.com/KTRLmidi 3.GoogleCode (Sou ce code): h p://k l.googlecode.com 9 KTRL midi con olle 16 4. Speci ica ions documen Documen “Speci ica ions documen ” 17 KTRL midi con olle 18 Vic e n e B e m u d e z - P i e e - E m i l e B o i o n - J o h n n y L o - V i n c e n L e b o e u - S é p h a n e R u h l m a n n Speci ica ions documen Vicen e Be mudez Pie e-Emile Boi on Johnny Lo Vincen Leboeu Alexis Ma in S éphane Ruhlmann 2013/2014 PPE : KTRL 08 Fall PPE KTRL – Speci ica ions Be mudez – Boi on - Leboeu – Lo – Ma in - Ruhlmann 2 Table o Con en s 1. In oduc ion ..................................................................................................................................... 3 2. S a e o he a and exis ing solu ions ..................................................................................... 4 4. Func ional equi emen s ............................................................................................................. 9 1. Requi emen s de ini ions (wha is Li e, Max o Li e) ................................................................ 9 2. Sys em con ex ......................................................................................................................................... 10 3. Func ions .................................................................................................................................................... 11 4. Accep ance C i e ia ................................................................................................................................ 13 5. Recommended implemen a ion a chi ec u e ................................................................... 14 1. Al e na i es ............................................................................................................................................... 14 1. De elopmen Ca d............................................................................................................................................... 14 2. Senso s ..................................................................................................................................................................... 15 2. Recommenda ion .................................................................................................................................... 16 6. Cons ain s ..................................................................................................................................... 19 1. Design cons ain s : ................................................................................................................................ 19 2. Technology : .............................................................................................................................................. 20 7. Glossa y ........................................................................................................................................... 21 PPE KTRL – Speci ica ions Be mudez – Boi on - Leboeu – Lo – Ma in - Ruhlmann 3 1. In oduc ion Nowadays, i is e y easy o make elec onic music, jus using a compu e and some elec onic de ices. Bu , pe o ming i du ing a show can be pain ul as he possibili ies a e endless. You can o ins ance, pe o m wi h a band, o pe o m as a solois using DJ se up o li e se up. DJ se up o Li e se up ? DJ se ups a e he mos common as i equi es less space. DJs jus come wi h CDs, o a USB key, a compu e wi h he so wa e and hey jus ha e o plug e e y hing and play as he enue is mo e likely o ha e u n ables. Li e pe o mances a e di e en . The pe o me has o b ing his whole se up a e e y enue he a ends. These wo se ups a e di e en ways o pe o m PPE KTRL – Speci ica ions Be mudez – Boi on - Leboeu – Lo – Ma in - Ruhlmann 4 2. S a e o he a and exis ing solu ions Nowadays he e a e plen y o MIDI con olle s o mul iple pu poses, hey can be ca ego ized ha way :  DJ con olle s : When DJs began o make mixes and play songs, he pla o m hey used inyl discs. They used wo o mo e inyl playe s o make hei mixes and ouched di ec ly he inyl discs o synch onize he songs and make he sound e ec s. Nowadays DJs con olle s ha e one o mo e shu le jogs, his is a ci cle ha ies o emula e he inyl playe s so he DJ can ouch his like i his was a inyl disc. These con olle s a e ocused on mix and synch oniza ion be ween songs and also ha e some e ec s and equaliza ions.  Li e PA con olle s: These con olle s a e used o li e pe o mances, i 's basically a g id o bu ons and e e y bu on has a sample eco ded on i . When he use p esses a bu on, a sample s a s o play, his sample can be played con inuously o only once e e y ime ha he bu on is p essed. These con olle s suppo mul i- ouch and some o hem play he sample wi h di e en olumes acco ding o he p essu e he bu on is p essed. Also you can eco d a sequence o p essed bu ons and play i e e y ime you wan . A he same ime, you can p ess o he bu ons. Wi h hese ea u es he a is s can make complex songs du ing li e pe o mances using simple samples. O he in e es ing ea u e is ha hese con olle s can synch onize he samples, ha means ha hey di ide he ime in icks and i he use p esses he bu on be ween one ick and he ollowing he sample will be played on he mos p oximal co ec ick. Con olle s o li e pe o mance a e ocused on playing samples and i 's no usual ha hey ha e o he kind o unc ionali ies. PPE KTRL – Speci ica ions Be mudez – Boi on - Leboeu – Lo – Ma in - Ruhlmann 5  Ins umen con olle s: The ins umen s con olle s ha e he same o m as usual ins umen and can be played like eal ones, di ec ly sending MIDI signals. The mos common ins umen con olle used is keyboa d bu he e a e a lo o exis ing ins umen con olle s ha can be used. This kind o con olle s is ocused on e y accu a ely emula e he ins umen ha hey ep esen . So hey need o be e y p ecise and ha e a cus om MIDI de ec o like ai low.  DAW con olle s: These con olle s a e used o music c ea ion in digi al audio wo ks a ions (DAW). They need a lo o unc ionali ies and a lo o eplica e modules because on he DAWs he use needs o be able o manage a lo o di e en audio acks and hei e ec s so e e y ack o g oup o acks a e mapped o one o his modules whe e you can con ol he olume and equaliza ion sepa a ely. These con olle s also ha e o he kind o modules o c ea e o manage he e ec s. I mus be e y comple e and i is usual ha hey ha e a big size. I can be said ha hese con olle s a e he mos comple e ones because hey can use he o he s con olle s explained be o e. PPE KTRL – Speci ica ions Be mudez – Boi on - Leboeu – Lo – Ma in - Ruhlmann 6 C i ical analysis (s eng hs and weaknesses) DJ con olle s: S eng hs:  Compac size compa ed o old inyl playe s  Emula e inyl disks  Don' need a physical de ice o s o e one o ew songs like disks o simila Weaknesses:  Don' ha e a lo o unc ionali ies and some imes Djs need o he con olle s.  The la ency be ween he con olle and he music can be signi ican . Li e PA con olle s: S eng hs:  Appea ance is impo an on li e pe o mance and his kind o con olle s usually has a lo o ligh s and a ac s a en ion.  Easy o unde s and how hey wo k. Weaknesses:  To make complex songs, he use needs a lo o expe ience.  The quali y o he li e pe o mance depends e y much on he samples quali y. PPE KTRL – Speci ica ions Be mudez – Boi on - Leboeu – Lo – Ma in - Ruhlmann 7 Ins umen con olle s: S eng hs:  The musician al eady knows how o play i .  The con olle sends a midi signal di ec ly o he so wa e and don' need a mic ophone. Weaknesses:  This con olle s needs o emula e e y well he ins umen and he way ha i is played o he musician won' be com o able playing i .  Need some special de ices o con e he inpu s on he midi signals. DAWS con olle s: S eng hs:  This kind o con olle s is e y comple e.  Can be used o many pu poses. Weaknesses:  The size o he con olle s is e y big.  Need a powe ul compu e whi high quali y sound de ices PPE KTRL – Speci ica ions Be mudez – Boi on - Leboeu – Lo – Ma in - Ruhlmann 14 5. Recommended implemen a ion a chi ec u e In o de o send a MIDI alue o he compu e s a ing om he senso s, we will design an a chi ec u e using a boa d wi h a mic ocon olle . The ma ke is eno mous and we ha e o ocus on one sys em, which will espond o ou equi emen s wi hou useless in e aces. The boa d will con ol e e y hing and i will jus send he da a o he compu e . Tha is why he choice is e y impo an . As one o he main unc ions is o de ec a hand mo ion, he selec ion o he senso s is c ucial. We wan an analog ol age in ou pu o he senso in o de o do an A/D con e sion. Mo eo e he measu ing dis ance has o be app op ia e o he p ojec (~ 10–200 mm). 1. Al e na i es 1. De elopmen ca d A i s glance, he e a e se e al possible al e na i es o he design o ou p ojec . The ex e nal a chi ec u e (inpu s/ou pu s) is qui e simila bu he pla o m is di e en . He e a e a couple o manu ac u e s ha sell de elopmen ca ds (some o hem a e a ailable a ECE): A duino Cheap, open sou ce, he la ges communi y o de elope s, A mel chips, a lo o p oduc s Raspbe y Powe ul embedded sys em, “Li le compu e ” designed o un GNU/Linux pla o m, c ea e some games BeagleBoa d Powe ul embedded sys em, open, “Li le compu e ” o un Linux/And oid sys ems myAVR Qui e cheap, good de elopmen ki , ew modules, almos no communi y mik oelec onika Ve y good documen a ion, s a e -ki EasyPIC 7, se e al PPE KTRL – Speci ica ions Be mudez – Boi on - Leboeu – Lo – Ma in - Ruhlmann 15 in e aces, big de elopmen ca ds chipKIT Compa ible wi h many A duino codes, PIC32 bi s chips, b and- new communi y (no so big), cheap, se e al ca ds Mos o hose solu ions a e no sui able o he p ojec . Indeed, we don’ need he mo e powe ul mic op ocesso , o a ca d like Raspbe y Pi, which can un GNU/Linux o small sys ems. A duino p oposes he la ges solu ion o de elopmen ca ds. He e a e a couple o in e es ing ca ds sui able o ou p ojec : 2. Senso s The inpu in o ma ion o he MIDI signal will come om senso s. The ol age alue sen o he mic ocon olle will be con e ed in o a MIDI signal, which will be ans e o he compu e wi h a UBS link. Se e al kinds o dis ance measu ing senso s a e a ailable: in a ed, ul asonic, lase . The ul asonic senso s ha e gene ally a esponse ime e y high. The lase senso s a e mo e used in indus y and do no mee he equi ed ea u es. Bo h o hose ypes o senso s would no be accep able o he p ojec . PPE KTRL – Speci ica ions Be mudez – Boi on - Leboeu – Lo – Ma in - Ruhlmann 16 Senso s wi h he ollowing ea u es a e equi ed: - 5V inpu ol age - Ideal dis ance measu ing be ween 10mm and 200mm - Analog ol age ou pu - G ea ime esponse Sha p p o ides a lo o dis ance measu ing senso s using in a ed ligh . Maxsona makes also senso s bu hey ha e undesi able ea u es and he da ashee s a e no e y speci ic. 2. Recommenda ion A duino “A duino is an open-sou ce elec onics p o o yping pla o m based on lexible, easy- o-use ha dwa e and so wa e. I ’s inden ed o a is s, designe s, hobbyis s and anyone in e es ed in c ea ing in e ac i e objec s o en i onmen s.“ (sou ce a duino.cc) A duino is a good de elopmen pla o m. A lo o A duino ca ds a e a ailable and you can (almos ) p og am e e y hing you wan . The e is an eno mous communi y o people who de elop p ojec s using he A duino pla o m. We accessed o o ums and blogs, which was help ul when we we e looking o in o ma ion. Fu he mo e, we can add ex ensions ca ds o he mas e ca d i we wan new I/O pins. PPE KTRL – Speci ica ions Be mudez – Boi on - Leboeu – Lo – Ma in - Ruhlmann 17 We can analyze om he p e ious able ha : - The Due has a CPU Speed much highe han he wo o he s (84 MHz) bu con ains less Analog In/Ou (only 12 inpu s and 2 ou pu s). Bu we need only 8 analog inpu s o he senso s. This ca d uns a 3.3V; ha could be a p oblem. Indeed, p o iding highe ol ages, like 5V o an I/O pin could damage he boa d. Mo eo e mos o he pe iphe al wo ks a 5V. - The Mega2560 and he Mega ADK a e closely he same. The Mega ADK has a USB hos in e ace o connec an And oid de ice, which we will no use. To conclude, we hink ha he Mega2560 seems o be he bes solu ion o ou p ojec . Senso s An in e es ing senso is he GP2Y0A41SK0F. I mee s app oxima ely he ea u es equi ed and will p obably be used in ou p ojec o de ec hand mo ion. O he ea u es Mo eo e , o he in o ma ion on he mic ocon olle has o be seen by he use . Fo example, he s a es o all bu ons will be displayed by u ning on a simple LED inside hem. A 7-segmen display will show he numbe o he ack he use is playing. Design and e gonomics The con olle will be a box (dimensions a ound 1x0.3x0.3m) made o wood. The ma e ial is in e es ing because i is easy o wo k on i . The wood is also cheap and lexible. Because o i s huge size, all he con ol bu ons and all he ou pu s o he a is (LEDs, 7-segmen display) will be concen a ed on one side o he con olle . As a consequence he e will be an ex a place on he op o he con olle . This will allow he use o pu his compu e on i and maybe an addi ional con olle , which will be pa o his whole se up. PPE KTRL – Speci ica ions Be mudez – Boi on - Leboeu – Lo – Ma in - Ruhlmann 18 Fo he audience, powe LEDs on he back o he con olle will display he le els o he acks in o de o c ea e a g ea isual aspec . Usually, he audience can ba ely see he a is and wha he is doing. Thanks o he powe LEDs, he c owd could see mo e p ecisely how he a is manages e ec s. Sou ces: a duino.cc www.con ad. /ce mic ochip.com www.lex onic. PPE KTRL – Speci ica ions Be mudez – Boi on - Leboeu – Lo – Ma in - Ruhlmann 19 6. Cons ain s 1. Design cons ain s Secu i y: As we a e using lase o poin he posi ion o he senso , hese lase s don' ha e o poin somewhe e whe e hey can be in di ec con ac o he use s and he audience’s eyes. E gonomic : This is he expec ed aspec o ou con olle : The senso s' posi ions ha e o be s udied o a simple access o each o hem. They also ha e o be well spaced o be accessible one by one. We also need o be able o loca e he senso s e en in he da k because a lo o li e pe o mances a e done in he da k. Tha 's why, we a e hinking abou lase s poin ing down o see he posi ion o each senso . We need a way o see he midi alue con ol o each senso . We' e going o pu a column o LEDs co esponding o each senso on he op o he con olle . We ha e o con ol di e en alues in he same way a he same ime. We'll de elop a g oup unc ion o g oup some senso s o make hei MIDI alue mo ing in he same way. This unc ion will be implemen ed wi h eigh bu ons, one o each senso . Fo example, i you g oup senso one, wo and ou , you will jus ha e o mo e one o hem and he MIDI alue o each o hem will mo e in he same way. A is s may wan a unc ion o swi ch be ween di e en p ese on ou con olle . We wan o implemen a sys em o p ese o swi ch be ween he au o- PPE KTRL – Speci ica ions Be mudez – Boi on - Leboeu – Lo – Ma in - Ruhlmann 20 mapping mode and a ew o he modes, c ea ed by he use . We' e going o use some bu ons o swi ch be ween hose modes. Finally, we'll need wo bu ons o swi ch be ween acks and mo e pa icula ly o swi ch be ween he e ec - ack o each ack. We wan o build he con olle in wood. I also has o be ligh o be anspo able by a is s. Pla o m: Ou con olle has o be well ecognized by all DAW. I also has o be au oma ically mapped on he Able on e ec - ack o he selec ed ack. I also has o wo k on Windows and Mac OS. 2. Technology We ha e o communica e wi h he compu e by MIDI signal so we'll ha e o modula e he signal om he senso s in MIDI signal. Ou con olle also has o be connec ed by USB po o he compu e because i 's he easies way o ans e MIDI signal in i . The bigges cons ain o ou p oduc is o be enough sensible and as o allow a good con ol du ing li e pe o mance. A is s who play li e music a e used o ha e a physical con ol on hei e ec s wi h knobs o bu ons. The con ol is e y esponsi e and communica es immedia ely wi h he so wa e. We ha e o b ing he same quali y o con ol wi h ou con olle . We will ha e o es di e en senso s o ge he bes concession be ween quali y and p ice. The senso s ha e o be eally sensi i e o de ec sho a ia ions on a sho - ange dis ance. The p ocess o he elec ical signal has also o be eally as o ha e he lowes possible la ency. This la ency shouldn' exis o he human pe cep ion. O ganiza ional cons ain s : We need a USB po on he con olle o connec i o a compu e . PPE KTRL – Speci ica ions Be mudez – Boi on - Leboeu – Lo – Ma in - Ruhlmann 21 7. Glossa y Te m De ini ion Analog signal Is a signal ha has a con inuous a ia ion in a ange o alues. A is An a is is a pe son who c ea es, p ac ices o demons a es an a . Bea A bea is he sound/loop made by s okes. Bu on A bu on is a physical de ice ha swi ch on/o a signal. Chip Is a se o elec onic ci cui s encapsula ed on a small case. Also called in eg a ed ci cui . Con olle A con olle is a de ice ha gene a es, ansmi s and p oduces MIDI signals as inpu and/o ou pu . C oss ade A c oss ade is a physical de ice ha inc eases / dec eases he alue o one signal, a he same ime i dec ease / inc ease he alue o ano he one. Digi al signal Is a signal ha ep esen s disc e e alues Fade A ade is a physical de ice ha inc eases / dec eases he alue o one signal. Ha dwa e The ha dwa e is a g oup o physical componen s needed o un so wa e ins uc ions. In eg a ed ci cui Is a se o elec onic ci cui s encapsula ed on a small case. Also called chip. Knob A knob is a physical de ice ha con ols he in ensi y o a signal. This de ice is mo ed ci cula ly. Li e pe o mance A li e pe o mance is a conce whe e an a is c ea es music "on he ly". Mac o A mac o is a ins uc ion ha s a a se o ins uc ions o do au oma ic asks o change be ween p ese con igu a ions. Mas e ing Mas e ing is he ac o adjus ing a song o his inal o m. Mic ocon olle A mic ocon olle is a small “compu e ” in eg a ed in only one single chip. Mix Mix is when wo o mo e sounds a e combined in a new one. Plug-and-play Said o de ices ha don’ need con igu a ions o speci ic so wa e o wo k. Plugin A plugin is a complemen o an applica ion ha ex ends he applica ion unc ionali y. Rack A ack is a me allic suppo o elec onic equipmen . Also PPE KTRL – Speci ica ions Be mudez – Boi on - Leboeu – Lo – Ma in - Ruhlmann 22 i can e e a se o de ices connec ed oge he , hei can be i ual o physical de ices. Sequence I is a de ice used o gene a ed MIDI signals in a p og ammed pa e n. Se up A se up is he se o di e en con olle s ha one a is needs o a li e pe o mance. So wa e The so wa e is a se o ins uc ions unning on ha dwa e. T ack A ack can e e o an en i e song o a subpa . Ac onym Meaning Explana ion BPM Bea s pe Minu e I is a speed measu e uni used in music. CPU Cen al P ocessing Uni I is he main componen o a compu e whe e he so wa e ins uc ions a e execu ed. DAW Digi al Audio Wo ks a ion This is a se o so wa e solu ion ocused on music gene a ion, mixing and mas e ing. DJ Disc Jokey Is a pe son who mixes songs. LED Ligh Emi ing Diode An elec onic componen ha p oduces ligh . MHz Mega-He z I is a measu e o equency. MIDI Musical Ins umen Digi al In e ace This is a p o ocol o se ial communica ion used o send in o ma ion ela ed wi h he sound. This p o ocol can also be used o o he pu poses using he in o ma ion ha i send in a di e en way. SPI Se ial Pe iphe al In e ace SPI is a s anda d o communica ions ha is e y common o ans e da a be ween in eg a ed ci cui s. USB Uni e sal Se ial Bus USB is a s anda d bus o connec de ices. VST Vi ual S udio Technology So wa e used o emula e ins umen s and physical de ices used in adi ional sound s udios. 41 I4-TRS-PPE13-33-20131211 4 1 Pu pose This documen is he echnical equi emen s speci ica ion. I p o ides he eade wi h all he speci ica ions conce ning he KTRL midi con olle . The eade will ha e an inside look plus an ou side look o he u u e inal p oduc . 2 Documen a ion and e minology 2.1 Re e ence documen s Documen Numbe A ached Applica ion Sha p GP2Y0A41SK0F OP13008EN No In o ma ions abou senso s such as p ecision, ange alue, ime esponse ATmega2560/V 2549P–AVR– 10/2012 No Mic o con olle 2.2 Glossa y 2.2.1 Te ms Te m De ini ion Analog Signal Is a signal ha has a con inuous a ia ion in a ange o alues. Able on Li e Is a digi al audio wo ks a ion. Used o p oduce and manage audio. Con olle A con olle is a de ice ha gene a es, ansmi s and p oduces MIDI signals as inpu and/o ou pu . Digi al signal Is a signal ha ep esen s disc e e alues. Midi channel Whi one Midi wi e can be con olled di e en uni s o pa ame e s. To di e en ia e his uni s is used an iden i ica ion. These iden i ica ions a e he channels. So wa e The so wa e is a se o ins uc ions unning on ha dwa e. MAC An ope a ing sys em de eloped by Apple. Windows An ope a ing sys em de eloped by Mic oso . Max o Li e Is a plugin o Able on wi h p ese ins umen s and he capaci y o gene a es new ones. Li e pe o mance A li e pe o mance is a conce whe e an a is c ea es music "on he ly". Bugs I is an e o on he so wa e. Ha dwa e The ha dwa e is a g oup o physical componen s needed o un so wa e ins uc ions. A duino Is a single-boa d mic ocon olle . Pin Is whe e he physical connec ions a e done on he chips o elec onic de ices. P o ocol I is a se o ules and egula ions ha de e mine how da a is ansmi ed. Plug-and-play Said o de ices ha don’ need con igu a ions o speci ic so wa e o wo k. Digi al inpu Is a signal ha ep esen s disc e e alues. Se up A se up is he se o di e en con olle s ha one a is needs o a li e pe o mance. Ha dwa e The ha dwa e is a g oup o physical componen s needed o un so wa e ins uc ions. A is An a is is a pe son who c ea es, p ac ices o demons a es an a . T ack A ack can e e o an en i e song o a subpa . Rack A ack is a me allic suppo o elec onic equipmen . Also i can e e a se o de ices connec ed oge he , hey can be i ual o physical de ices. Mac o A mac o is an ins uc ion ha s a a se o ins uc ions o do au oma ic asks o change be ween p ese con igu a ions. I4-TRS-PPE13-33-20131211 5 2.2.2 Ac onyms Ac onym Meaning Explana ion OS Ope a ing Sys em A collec ion o so wa e ha manages compu e ha dwa e and p o ides se ices o compu e p og ams. MIDI Musical Ins umen Digi al In e ace This is a p o ocol o se ial communica ion used o send in o ma ion ela ed wi h he sound. This p o ocol can also be used o o he pu poses using he in o ma ion ha i sends in a di e en way. USB Uni e sal Se ial Bus USB is a s anda d bus o connec de ices. TTL T ansis o Logic I is a class o digi al ci cui s. 3 P oduc p esen a ion Ou p oduc is a midi con olle wi h senso s. I deli e s midi alue and is he in e ace be ween he use and he so wa e. We will i s in oduce he unc ional equi emen s such as he bu on used, hen we will deal wi h he in e ace speci ica ion (able on li e 8 and Max). We wan o ha e a li e app oach, so he con olle has o be nice isually. 4 Func ional Requi emen s 4.1 On/O bu on (powe ) This bu on ep esen s a digi al inpu o he sys em. I e u ns 1 when he bu on is u ned on and 0 when i is u ned o . I is ci cled in ed on he ollowing scheme: This mus be a “la ching” bu on, because he sys em mus be u ned on as soon as he use pushes he bu on. The e a e no speci ic physical equi emen s, because when an a is will use i , he will push i a he beginning o he show and won’ ouch i du ing he pe o mance. I should be e be a ligh bu on because li e pe o mances a e made in he da k. Jus unde he on/o bu on, he e is he usb hub. I4-TRS-PPE13-33-20131211 6 4.2 The “modes” bu ons These bu ons a e ep esen ed on he ollowing scheme: The ci cled bu ons selec s he modes. When one bu on is pushed on, he mode is selec ed and he o he modes a e se o 0. So when we push a bu on, he o he bu ons a e pushed o au oma ically. We mus ha e “la ching” bu ons oo because he a is won’ keep his inge on he bu on o le he mode on. We ha e digi al alues ha e u n 0 when he bu on is pushed o and 1 when i is pushed on, like a powe bu on. 4.3 The “ acks” bu on The bu ons a e ci cled in ed in he ollowing scheme: I4-TRS-PPE13-33-20131211 7 The 2 “ acks” bu ons a e used o swi ch be ween he acks in he so wa e. I could be done di ec ly on he so wa e bu i ’s easie o make i on he con olle . Unlike he o he bu ons, hese ones mus be “momen a y bu ons”, he alue mus s ay a 1 only when he bu on is pushed on, and wi h a li le delay. I e u ns he alue 1 when i is pushed on and 0 when i is pushed o . 5 In e ace equi emen s 5.1 Use in e aces He e is Able on Li e, he so wa e we will use o es ou p ojec . I ’s a loop-based digi al audio wo ks a ion ha allows managing e ec s in a ack wi h mac os con olling use -de ined pa ame e s. He e is an example o an audio e ec ack. Each pa ame e will be con olled by one o ou senso s (in basic mode). I4-TRS-PPE13-33-20131211 8 We will link ou mic ocon olle inpu s o he ack h ough a sc ip in Max : 5.2 Ha dwa e in e ace The ha dwa e in e ace will look like ha : I4-TRS-PPE13-33-20131211 9 The use will in e ac wi h he con olle ia eigh bu ons ha will allow him o g oup he senso s o con ol one pa ame e . The senso s will be unde he op o he con olle , ge ing he dis ance be ween he use ’s hand and hei posi ion. The e will be some LED ows o display he pa ame e s alues o he use and o he audience. 6 Pe o mance Requi emen s 6.1 Accu acy We need a p e y high accu acy. The senso has a measu ing dis ance ange om 4 cm o 30 cm. We need o manage a midi ale om 0 o 127. So he maximum accu acy p o ided by ou sys em is: Amax = (30 – 4) / 127 = 26 / 127 = 0,205 cm = 2,05 mm. I4-TRS-PPE13-33-20131211 10 The A duino ca d should manage he alues o he analog ol age ou pu by s ep o con e hem in MIDI. The accu acy will be inc ease a ound he ac ual alue o a be e con ol in he ela i e mode. 6.2 Response ime The esponse ime o he senso s should be lowe as possible o ha e he imp ession ha e e y hing is immedia e when playing wi h he con olle in li e. Some hing a ound 20 – 30 ms will be g ea . We' e going o use he Sha p GP2Y0A41SK0F. Tmax = 16,5 + 3,7 + 5,0 = 25,2 ms 6.3 S abili y As ou con olle is o ien ed o li e pe o mance, we need i o be eally s able and don' s op wo king in use. The A duino ca d ha e o be able o manage se e al midi alues o he senso s, blinking o no leds, ge he ac ion om he bu ons wi hou e o . I4-TRS-PPE13-33-20131211 11 The new e sion o Able on Li e allows connec ing and disconnec ing he con olle when you wan wi hou he need o elaunch he so wa e. 7 Ex e nal equi emen s and cons ain s 7.1 S anda ds and compa ibili y equi emen s Ou p oduc has o be compa ible wi h Mac OS and Windows. We will de elop ou solu ion using hose e sions, which a e he las a ailable:  Able on li e 9: one ad an age compa ed o Able on Li e 8 is ha we can connec and disconnec a pe iphe al wi hou closing he so wa e. The 9.1 e sion p o ides a dual-sc een mode in o de o ha e a be e expe ience.  Max Fo Li e: now he Max ool can be di ec ly included in o Able on Li e 9, which makes o ins ance he ins umen s con igu a ion easie . People ha c ea e elec onic music o pe o m li e ha e upda ed hei so wa e e sion. Indeed, he las e sion p o ides so wa e imp o emen and always ixes bugs. 7.2 Ha dwa e and so wa e limi a ions The A duino Mega 2560 ca d will send a MIDI alue o he compu e h oughou USB. The MIDI Da a will be ans e ed using he ATmega16U2 USB- o-TTL Se ial chip. Pin 0/19/17/15 (RX) and pin 1/18/16/14 (TX) o he ca d a e used o ecei e and ansmi TTL se ial da a. Pin 0 and 1 a e also connec ed o he co esponding pins o he ATmega16U2. Conce ning he baud a e o he se ial ansmission, we ha e plen y o possibili ies: 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, o 115200 bps. The con igu a ion o he baud a e is made in he code. The con olle will be huge in o de o allow he use o pu his compu e on i . Indeed du ing li e pe o mance he a is , which could be a p o essional o no , does no ha e plen y o space a ound him. The space is e y o en limi ed. Tha is why he ha dwa e pa could i easily in he con olle ’s body. 7.3 Technology/Scien i ic Cons ain s KTRL con olle is based on he MIDI P o ocol, using Max en i onmen . 7.4 Physical equi emen s The con olle is made o wood, pa allelepipedic. Conce ning he size : 80x30x30cms. The weigh will depend on he wood o he con olle . The e will be a me al pla e on he on so he componen s can be ixed on. I4-TRS-PPE13-33-20131211 12 7.5 En i onmen al equi emen s The con olle is li e-o ien ed. Bu i can also be used o p oduc ion pu poses. I has o p o ide esis ance agains humidi y as he li e can be indoo o ou doo . Elec onic de ices a e e y sensi i e owa ds humidi y, so he elec onic chip mus be e y isola ed. Fo shocks, he con olle has o be e y solid as i can also be used as a desk o o he midi con olle s o si on. Also, he con olle will be e y mobile, i has o be p o ec ed on he edges and he ci cui s mus be ixed inside he box. 7.6 Documen a ion equi emen s  Lis o he package con en : o Secu i y no ices o Use manual  In o  Ins alla ion  S anda d con igu a ion  Able on Li e con igu a ion  Basic usage  Ad ance usage  Fas suppo (FAQ echnical) 7.7 Ope a ions equi emen s This con olle is speci ically designed o Able on Li e. So o ull unc ionali y he ope a o need o con igu e Able on Li e p ope ly o wo k whi his con olle . Also he ope a o mus assign he midi channels om he con olle o he midi channels whe e he con olle is plugged. 7.8 Si e adap a ion equi emen s The con olle equi es a la bed o be placed. To wo k p ope ly he con olle needs o be plugged in o some de ice ha accep s midi signals o o ge ull unc ionali y need o be plugged in o a sys em whi he Able on Li e so wa e. I4-TRS-PPE13-33-20131211 13 Appendix A. Table des ma iè es Ve sions ................................................................................................................................................................... 2 Table des ma iè es .................................................................................................................................................. 3 1 Bu .................................................................................................................................................................... 4 2 Documen a ion ................................................................................................................................................ 4 2.1 Documen de é é ence ............................................................................................................................ 4 2.2 Glossai e .................................................................................................................................................... 4 2.2.1 Te mes ................................................................................................................................................................. 4 2.2.2 Ac onymes ........................................................................................................................................................... 5 3 P ésen a ion du p odui ................................................................................................................................... 5 4 Exigences onc ionnel ....................................................................................................................................... 5 4.1 Bou on de mise en ma che ....................................................................................................................... 5 4.2 Le bou on mode ........................................................................................................................................ 6 4.3 Le bou on pis e .......................................................................................................................................... 6 5 Exigences de l'in e ace .................................................................................................................................... 7 5.1 In e ace u ilisa eu ................................................................................................................................... 7 5.2 In e ace ma é iel ...................................................................................................................................... 8 6 Exigences conce nan la pe o mance ............................................................................................................. 9 6.1 P écision .................................................................................................................................................... 9 6.2 Temps de éponse ................................................................................................................................... 10 6.3 S abili é.................................................................................................................................................... 10 7 Exigences e con ain es ex é ieu s ............................................................................................................... 11 7.1 Exigences de compa ibili é ...................................................................................................................... 11 7.2 Limi a ions ma é iels e logiciels ............................................................................................................. 11 7.3 Con ain es echnologiques .................................................................................................................... 11 7.4 Exigences physique.................................................................................................................................. 12 7.5 Exigences de l'en i onnemen ................................................................................................................ 12 7.6 Exigences des documen a ions ............................................................................................................... 12 7.7 Exigences des opé a ions ........................................................................................................................ 12 7.8 Exigences du milieu ex é ieu ................................................................................................................. 12 I45PAP5PPE13533520140408! ! ! ! 4! 1 In oduc ion! Nowadays,!a!lo !o !elec onic!music!a is s!a e!playing!wi h!knobs,! ade s!and!bu ons.!The!audience!can' ! eally! see!wha ! he!a is !is!doing.! KTRL!is!a!MIDI!con olle !using!eigh !dis ance5measu ing!senso s! o!con ol! unc ionali y!o !DAW!(Digi al!Audio! Wo ks a ion).!I !was!designed! o!be!used!wi h!Able on!Li e,!especially! o!con ol!e ec s.!! The!audience!can!see! he!a is s'!hands!mo emen !and!ca ch! he!e ec s!in ensi y!wi h! he!powe !LEDs!a ! he! back!o ! he!con olle .! I 's!also!an!in ui i e!and!c ea i e!way! o!play!music.! ! This!documen !p esen s!all! he! es s! ealized!on!ou ! inal!p o o ype.! 2 Tes !en i onmen ! 2.1 Physical!en i onmen ! To!play!wi h!KTRL,!you!need! o!connec !i ! o!a!compu e ! ia!USB!cable! o!gi e! he!powe !supply! o! he!A duino! ca d.!! You!also!need! o!connec ! he!MIDI!cable!o ! he!p o o ype! o!an!ex e nal!soundca d!and! hen!connec ! he! soundca d! o!you !compu e !and!download! he!app op ia e!d i e .!This!is! o! ans e !MIDI!da a.! The!p o o ype!also!has! o!be!connec ed! o!an!ex e nal!powe !supply.! 2.2 Ha dwa e!en i onmen ! KTRL!can!wo k!on!MAC!OS!and!Windows.!The e!is!no!minimal!con igu a ion! equi ed! o!play!wi h!KTRL.! 2.3 So wa e!en i onmen ! You!need!a! e sion!o !Able on!Li e!so wa e!ins alled!on!you !compu e .! ! You!also!need! o!add! he!KTRL!midi!sc ip !in! he!app op ia e! olde .!! ! ! ! ! ! ! ! ! ! ! I45PAP5PPE13533520140408! ! ! ! 5! You!can!download!i !he e:!h p://k l.googlecode.com/s n/ unk/au omapping/! This!sc ip !will!make! he!p o o ype!au oma ically!map! o!pa ame e s!on!Able on.! ! The!eigh !senso s!will!con ol! he!eigh !mac os!o ! he!Audio!E ec !Rack!o ! he!selec ed!audio! ack! ! 2.4 Ac o ! oles! This!pa !is! he!goal!o !ou !p ojec .! Any!a is !can!come!wi h!is!own!con igu a ion!and!is!own!con olle s.! As!i !said!be o e,! he!e ec s!ha e! o!be!added!in!an!Audio!E ec !Rack!and! he!pa ame e s!ha e! o!be!assigned! o! he!mac os.! Then,!you!ha e! o!selec ! he!KTRL!sc ip !in! he!Able on!p e e ences:! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! You!ha e! o!allow!Pis e!and!Télec! o ! he!inpu .! The!p o o ype!is!now! eady! o!play,!jus !launch!an!audio!clip!and!play!! I45PAP5PPE13533520140408! ! ! ! 6! 2.5 Da a! The!only!ex e nal!da a! ile!needed!is! he!KTRL!MIDI! emo e!sc ip .! You!can!download!i !a ! his!link:!h p://k l.googlecode.com/s n/ unk/au omapping/! ! Then!see!2.3!sec ion! o ! he!ins alla ion.! 3 Tes !sui e! 3.1 Senso s! The!senso s!a e!used! o!con ol!e ec s!in!Able on!Li e.!They!ha e! o! e u n!a! alue!be ween!0!and!127,!which! co esponds! o! he!posi ion!o ! he!hand.! ! ! No.! Desc ip ion! Execu ion!scena io! Expec ed! esul s! OK/NOK! 1! Use!a!senso ! o! con ol!an!e ec ! The!use !ha e! o!mo e!his!hand! unde ! he!senso ! I !should!mo e! he!MIDI! alue! o !co esponding!pa ame e !in! he!Audio!E ec !Rack!o ! he! selec ed! ack.! ! ! 3.2 Led!ba s! The!led!ba s!a e!showing! he! alue!o ! he!e ec !o ! he!co esponding!senso s.! No.! Desc ip ion! Execu ion!scena io! Expec ed! esul s! OK/NOK! 2! Display! he!e ec s! alue! The!use !has! o!mo e!his!hand! unde ! he!senso .! The!leds!should!be!blink!in! he! same!way!as! he!e ec !is! e ol ing.! ! ! 3.3 Powe !leds! The!powe !leds!a e!blinked!when!a!senso !is!in!use.! No.! Desc ip ion! Execu ion!scena io! Expec ed! esul s! OK/NOK! 3! Display! he!ac i e! senso s! The!use !has! o!mo e!his!hand! unde ! he!senso .! The!powe !led!co esponding! should!be!blink! ! ! ! ! I45PAP5PPE13533520140408! ! ! ! 7! 3.4 Mode!bu ons! ! No.! Desc ip ion! Execu ion!scena io! Expec ed! esul s! OK/NOK! 4! Ac i a e!memo y! mode! The!use !has! o!p ess! he!memo y! mode!bu on! The!senso s!a e!now!wo king!in! memo y!mode! ! 5! Ac i a e! ee!mode! The!use !has! o!p ess! he! ee! mode!bu on! The!senso s!a e!now!wo king!in! ee!mode! ! 6! Ac i a e!g oup!mode! The!use !has! o!p ess! he!memo y! mode!bu on,! hen!se e al!g oup! bu ons! The!senso s!a e!now!wo king!in! g oup!mode,!which!means! ha ! con olling!one!senso !could! change!se e al! alues! ! 7! Ac i a e!kill!mode! The!use !has! o!p ess! he!kill!mode! bu on! The!senso s!who!a e!no !in! g oup!ha e! o!be! ese ! ! ! 4 Tes &en i onmen &se up& ! To!make!i !wo k,!you!jus !ha e! o!do! he! ollowing! asks:! • The!con olle !needs! o!be!powe ed!by!plugging! he!elec ic!supply!cable! o!220V.!! • Then! he!MIDI!cable!mus !be!connec ed! o!a!sound!ca d!(o !a!MIDI! o!USB).!! • Finally,! he!o he !USB!cable!should!be!plugged! o!a!USB5220V!adap o !o !a!compu e .! ! ! ! ! ! ! ! ! ! ! ! ! I45PAP5PPE13533520140408! ! ! ! 8! ! ! Appendix!A. Bibliog aphy! h p://a duino.cc/! h p://lea n.ada ui .com/! h ps://www.spa k un.com/! h p://www.seeeds udio.com/! h ps:// o um.able on.com! h p://www.syn h opia.com/! h p://en.wikipedia.o g/! Appendix!B. Glossa y! See! he! ollowing!documen s:! • CDC! • TRS! • SAD! ! 69 KTRL midi con olle 70 7. Sys em A chi ec u e Documen Documen “Sys em A chi ec u e Documen ” 71 KTRL midi con olle 72 I4#SAD#PPE13#33#20140408. . . . . . . . . . . . . . . . . . . . Sys em.A chi ec u e.Documen . o . KTRL. I4#SAD#.PPE13#33#20140408. 04.08.2014. . ! ! ! ! I4#SAD#PPE13#33#20140408. . A e .discussing.wi h.p o essionals,.we. ealize. ha .a is s.ha e.al eady. hei .whole.se .o .con olle s,. and. hey.would.no .change.all.o . hem. o .one..A is s.a e.o en.cu ious,.and.like. ying.new.s u .. This.is.why.ou .con olle 's.pu pose.is. o.be.a.complemen a y. o. he.o he s,.no . o.be. he.main.one.. Ou .con olle .has.a. e y.p ecise.use.. The.use .will.in e ac .wi h. he.con olle .by.mo ing.his.hands.and.p essing.bu ons..All. hose.ac ions. will.ha e.an.impac .on. he.Able on.Li e.so wa e.on.his.compu e ,. which.gene a e. he. elec onic. music.. . 2.2.2 Compu e ((Max(and(Able on(Li e)( . Able on.Li e.is. he.mos .used.so wa e. o .elec onic.music.li e.pe o mances.. I .allows.connec ing.se e al.MIDI.con olle s. o.con ol.pa ame e s.. Ou .con olle .is. hough . o.wo k.wi h. he.Able on.Audio.E ec .Rack.bu .i .can.be.used. o.con ol.any. o he . unc ions.o .any.o he .so wa e.. . . I4#SAD#PPE13#33#20140408. . . 2.2.3 O he (con olle s( . Nowadays,.a.lo .o .a is s.use.se e al.con olle s.in. he.same.li e.session..They.usually.co espond. o. di e en .pa .o . he.so wa e..Fo .example,.one.con olle .is.going. o.launch.audio.clips,.ano he .one. will. con ol. he. mixe . ( olume,. pan,. …).. Ou . con olle . is. hough . o. con ol. only. one. pa . o . he. Able on.li e.so wa e:. he.Audio.E ec .Rack..I .means. ha .a is s.can.s ill.be.playing.wi h. hei .ac ual. se up.and.add.ou .con olle .. . 2.2.4 Sound(Sys em,(audience( . Usually. in. elec onic. music. show,. he. audience. can' . eally. see. and. unde s and. wha . he. a is . is. doing.. The.KTRL.add.a. isual.aspec . o . he.audience.du ing.a.li e.pe o mance.. Fi s . he. public. can. see. he. hands. o . he. a is . mo ing. in. he. same. way. as. he. audio. e ec . a e. playing.. Then,.we.also.ha e.powe .leds.a . he.back.o . he.con olle ,.so.in. on .o . he.audience,. o.show. he. e olu ion.o . he.senso s. alue. o. he.public.. 3 Subsys em(1:(A duino(se ( 3.1 Ha dwa e(elemen s( 3.1.1 A duino(Mega(2560( ( ! ! ! ! ! ! ! ! I4#SAD#PPE13#33#20140408. . The.A duino.Mega.2560.is. he.mas e .o . he.p ojec ..All.ou .componen s.a e.connec ed. o.i ,.and. he. ca d.communica es.wi h. he.compu e ..I s.main. ole.is. o.manage. he.in e ac ion.be ween. he.use . and. he. con olle . by. ecei ing. inpu s. alue. om. senso s. and. bu ons,. and. also. by. displaying. he. le el.o .each. ack. o . he.use .and. he. isual.e ec . o . he.audience... . 3.1.2 G o e(Mega(Shield( . Thanks. o. he. G o e. Mega. shield,. we. can. connec . mo e. easily. he. LEDs. Ba g aph. and. he. senso s.. The e.a e.connec o s,.which.enable.us. o.link.di ec ly. he. componen s. o. he. ca d.. O he wise,. we. would. ha e.issues.wi h. he.good.connec ion.o .elemen s. o. he.Mega.2560.because.we.use.almos .all. he.pins.. Indeed,. he. A duino. ca d. doesn’ . p o ide. ixed. and. s able. pins,. and. some. o . hem. will. p obably. be. in. con ac .wi h.each.o he .. . . 3.2 So wa e(elemen s( 3.2.1 A duino(IDE( . «!The!open2sou ce!A duino!en i onmen !makes!i !easy! o!w i e!code!and!upload!i ! o! he!i/o!boa d.!I ! uns!on!Windows,!Mac!OS!X,!and!Linux.!The!en i onmen !is!w i en!in!Ja a!and!based!on!P ocessing,! a 2gcc,!and!o he !open!sou ce!so wa e.!»! ! We.de elop. he.p ojec .using.A duino.IDE.1.0.5.on.Mac.and.Windows..This.so wa e.is.hos ed.wi h. Gi hub,.and.lib ai ies.a e.w i en.in.C.o .C++... . On.one.hand,.i .is. eally. as . o. es . he.code.on. he.A duino.and.make.changes. hanks. o. his.IDE.. Bu .on. he.o he .hand,.i .doesn’ .p o ide.a.g ea .compile .and. he.implemen a ion/ eadabili y.o . he. code.is.no .op imal..Tha .is.why.we.use.ano he .so wa e.. . 3.2.2 Ne beans(wi h(Sub e sion(and(Google(Code( . The.de elopmen .o .so wa e. o . he.a duino.boa d.has.been.done.using. he.Sub e sion. e sion. con ol..Google.code.google.com.p o ide. his.se ice.by. ee. o . he.open.sou ce.p ojec s.. I4#SAD#PPE13#33#20140408. . Using.Sub e sion.can.be.seen. he.g ow h.o . he.p ojec .on. he.di e en . e sions..Also.is.a.way. o. sha e. he.sou ce.code.easily.in.a.p o essional.manne .and.o .cou se.all.bene i s.p o ided.by.a. e sion. con ol.a e.ob ained.. The.IDE.(In eg a ed.de elopmen .en i onmen ). ha .has.been.used.was. he.A duino.SDK.(So wa e. de elopmen .ki ).and.also.Ne Beans.wi h. he.A duino.plugin..Ne Beans.p o ide.be e .de elope . ools.and.in eg a ion.wi h. he.sub e sion.se e .. 3.2.3 Lib a y( . We.use.one.ex e nal.lib a y.in.o de . o.implemen . he.MIDI.sending:. # The.MIDI.sending:.<Midi.h>lib a y. This.lib a y.is.o .cou se.open.sou ce,.and.a ailable.on. he.A duino.websi e.. 3.3 Sha ed(da a(de ini ions( 3.3.1 Senso s(and(bu ons( alues( . The. A duino. ca d. ge s. back. senso s. RAW. alues. and. he. s a e. o . he. bu ons.To. ha e. he. exac . dis ance.be ween. he.use ’s.hand,.we.implemen ed.an.app oxima ion.o . he.ou pu . unc ion.o . he. senso ..O he wise,.we.would.no .ha e. he.“middle. alue”.when. he.hand.would.be.a .hal .dis ance. o . he.senso .. Then,. i . compu es. he. igh . algo i hm. wi h. he. combined. unc ions. (memo y,. ee,. elease. non. g ouped,.g oup.mode),.in.o de . o.ge . he. alue. ha .will.be.sen . o. he.compu e .and. o. he.LEDs.. All. his.da a.is.s o ed.in.se e al.a ays.o .NSENSORS.(8.in.ou .case).. 3.3.2 MIDI(signal( . This.is. he.mos .impo an .pa .o . he.p ojec ..Indeed,. he.con olle .has. o.send.a.MIDI. alue. o. he. compu e .and.Able on.Li e..To.do. ha ,.we.use. he.<Midi.h>p o o ypes,.and. he.signal.is.sen . h ough.a.MIDI.cable,. hen.a.MIDI# o#USB.in e ace..Mo e.de ails.a e.in. he.MIDI.pa .. . The.communica ion.be ween. he.ha dwa e.and.so wa e.elemen s.is.a.key.poin .o .ou .p ojec ..The. A duino.will.send. he. alue.we’ e.in e es ed.in.and.i .will.be. ansla ed.in.MIDI. o.be. he e o e.used. by. he.use ’s.digi al.audio.wo ks a ion.. A . i s .we.conside ed. wo.main.solu ions:. Fi s ,.we.planned. o.ha e. he.pa ame e s. alues.sen .o e . he.se ial.connec ion. om.A duino. o. he. compu e .and. hen.be. ecei ed.by.a.Max.pa ch.. I4#SAD#PPE13#33#20140408. . This.pa ch.would.pa se. he.da a.and.build.a.MIDI.Con ol.Change.signal. hen.send.i .. The.use .would. hen.con igu e. he.DAW.o .his.choice. o.use. hese.MIDI.CCs.. . We.decided. o.send.MIDI.di ec ly. ia.a.MIDI.connec o /cable. o. he.compu e .and. ecei e.i .wi h. wha e e .DAW.use .could.use.. . Plan.B.was. o.send.MIDI.in o ma ion.o e . he.USB.se ial.connec ion. o.be. hen.di ec ly. ecei ed.by. he.DAW..The.MIDI.o e .USB.p oceeding.would.be.p o ided.by.a. i mwa e.ins alled.on. he.A duino.. .The.second.solu ion.is. o.send.di ec ly.a.MIDI.signal. h ough.a.MIDI.cable,.connec ed. o.ou . A duino.ca d. ia. he. ollowing.sys em:. ! .We.ha e. o.plug.wi es.on. he.GND,. he.TX.pin.and. he.5V.pin,.wi h.a.220.ohm. esis o .. .MIDI.(Musical.Ins umen .Digi al.In e ace).is.a.p o ocol. o .con olling.musical.de ices.like. ou .con olle ..This.p o ocol.ope a es.a .a.31250.baud. a e.(31250.bi s.pe .second)..In.ou .case,.we. I4#SAD#PPE13#33#20140408. . jus . ecei e.da a. om. he.con olle ,.bu .we.send.no hing.in. he.MIDI.cable,. ha ’s.why.we.jus .plug. he.MIDI.IN.cable.. .The.da a.by es.a e.less. han.127,. ha ’s.we. ans o m. he.senso s. alues.in o.MIDI. alues..In. he.da a,.we.ha e.elemen s.like. he.no e. o.play.and. he. eloci y..In.ou .case,.we.will.jus .use. he. command.Con olChange. ha .will.jus .change. he. alue. o.send.in o. he.MIDI.p o ocol.. . 3.4 Subsys em(beha io ( . The. ollowing. schema. explains. he. in e ac ion. be ween. he. subsys em. ( he. A duino. ca d),. and. he.o he .elemen s..We.made.a.“black.box”,.because.in. his.pa .we.don’ .need. o.know.wha . happens.in o. he.ca d,.bu .how.i .in e ac s.. . . . . . . The.ca d.can. ecei e.di e en .bu ons. alues:. V F om. he.mode. V F om. he.senso s.used. o . he.g oup.mode. I . ecei es. he. alues.in. he.same. ime.( om. he.senso .and. om. he.bu ons)..Fo .example,. i . he.g oup.is.ac i a ed.and. he.senso s.2,3.and.7.selec ed,. he.subsys em.will. ecei e. he. alues. om. he. bu ons. and. om. he. senso s. selec ed,. and. will. send. i . o. he. di e en . elemen s. (ba g aphs,.powe .LEDs.and. he.so wa e. ia.MIDI. alues).. . I4#SAD#PPE13#33#20140408. . 4 Subsys em(2:(Con ol((senso s(and(bu ons)( 4.1 Ha dwa e(elemen s( 4.1.1 Senso s( . . The. eigh . Sha p. gp2y0a41sk0 . senso s. a e. he. mos . impo an . componen s. o . ou . p ojec .. They. ha e.a.good. ange. alue.and.a.co ec . esponse. ime..This.is. he.bes .we. ound. o .a. easonable. p ice... . . . . . . They.send.back. o. he.A duino.an.analog. ol age,.which.co esponds. o. he.dis ance.be ween. he. hand.o . he.use .and. he.senso ..This. alue.will.be.handled.by. he.ca d,.and.sen . o. he.con olle . LEDs.and. he.compu e .. . . 4.1.2 Bu ons( . . . . . . To.choose.which.senso . he.use .wan s. o.use,.and. o.con igu e. he.con olle ,. he.use .could.use. ON/OFF.bu ons.(Figu e.1).and.pushbu ons.(Figu e.2)..The.ON/OFF.bu ons.a e.essen ially. o . he. g oup.mode,.which.enable. he.a is . o.ga he . oge he .senso s..The.pushbu ons.a e. o . he.o he . unc ions.o . he.con olle ,. o .example. he.mode.selec ion.. Figu e.1. Figu e.2. I4#SAD#PPE13#33#20140408. . . . 4.2 Subsys em(beha io ( ! The. ollowing.subsys ems.a e.con olled.by.human.beha io s..They.ha e.a.di ec .in e ac ion.wi h. he. use .( he.a is )..They.ha e.a. o al.con ol.o . he.objec .. ! The. senso . subsys em. ecei es. a. mo e. made. by. he. a is . (an. up#and#down. mo e. o. modi y. he. alue.o . he.senso ).and.will.send. he. alues.de ined.by. he.senso .( om.0. o.a ound.500)... The.bu on.sys em.is. e y.simple..I .wai s.a.p essu e. om. he.use ,.and. hen.sends.a.digi al. alue.(0. o .1). o. he.A duino.ca d.. 5 Subsys em(3:(Display( 5.1 Ha dwa e(elemen s( . 5.1.1 LEDs(ba g aph( . . G o e.LEDs.ba .a e.componen s.made. o.wo k.wi h. he.G o e.shield.. We.use.eigh .o . hem..Thei .goal.is. o.display. o . he.use . he.le el.o . he.ac ual. ack.o .e ec ... . . I4#SAD#PPE13#33#20140408. . 5.1.2 Powe (LEDs( . The.eigh .powe .LEDs’.pu pose.is. o.c ea e.a. isual.e ec . o . he.audience.. They. enhance. he. in e ac ion. be ween. he. a is . and. he. c owd,. which. is. one.o . he.main.goals.o .ou .p ojec ..The.b igh ness.o . he.eigh .powe .LEDs. co esponds. o. he.senso . alue.. . . . . . 5.1.3 Shi (Regis e (74HC595( . This.de ice.is.used. o.con ol. he.powe .LEDs.desc ibed. be o e..I .can.con ol.se e al.LEDs.wi h. ewe .wi es. han. he.numbe . o .LEDs..The.ad an age.is. ha .we.don’ .need.8.wi es. o.con ol. he.8. powe .LEDs..I .has.high#noise.immuni y.and.con ains.an.eigh #bi . se ial.–in,.pa allel#ou ,.shi . egis e . ha . eeds.an.eigh #bi .D# ype. s o age. egis e .. . . 5.2 So wa e(elemen s( Able on. Li e. is. a. digi al. audio. wo ks a ion,. allowing. he. pe o me . o. play,. a ange,. emix,. mix. sounds..I .gi es.access. o.in ini e.e ec s. o .audio,.such.as. e e b,.dis o sion,.delay,.gli ch... The.so wa e.can.be.con olled.wi h.ex e nal.ha dwa es,.using.midi.communica ion..E e y.pa ame e . can.be.assigned. o.a.de ice..Fo .example,. he.play.bu on.can.be.assigned. o.a.bu on,.same. o . he. eco d.bu on,. he. olume.slide .can.be.assigned. o.a. ade .. I4#SAD#PPE13#33#20140408. . . E e y.pa ame e . ha .is.in.blue.is.assignable.. The. op.le .a ea.shows. he.link. om. he.ha dwa e. o. he.so wa e..(in. his.example,.no hing.has. been.assigned).. KTRL.midi.con olle .p o ides.8.senso s,.sending.midi.messages.(we.call. ha ."CC.message")... . . . Mac o.pa ame e s:. . Mac os.a e.inside. he.Audio.E ec .Rack..I .gi es.8.pa ame e s. o.be.assigned. o.a.speci ic.pa ame e . inside. he.speci ic.e ec ..He e. o .example.we.ha e.:. Mac o.1.:.In e al. om. he.Bea .Repea .E ec . Mac o.2.:.Repea .On/O . om. he.Bea .Repea .E ec . Mac o.3.:.Volume. om. he.Bea .Repea .E ec . Mac o.4.:.D y/We . om. he.Flange .E ec . Mac o.5.:.High.pass.Fil e . om. he.Cho us.E ec . I4#SAD#PPE13#33#20140408. . 6.1.3 Senso s( . .The. senso s. a e. one. o . he. mos . impo an . ha dwa e. elemen s. because. i . does. he. pa icula i y.o .ou .con olle .. We.use. he.sha p.GP2YOA41SKOF.. We. choose. o. pu . eigh . senso s. on. i . because. an. audio. e ec . ack. in. able on. allows. he. use . o. con ol.eigh .pa ame e s.. Ou .senso s.a e.dis ance.measu emen .senso s..They.ha e.a.measu ing.dis ance. ange. om.4.cm. o. 30.cm..We.need. o.manage.a.midi. alue. om.0. o.127.. So. he.accu acy.p o ided.by.ou .sys em.is.:. A.=.(30#4)./.127.=.2,05.mm. The.senso s.analog. ol age.ou pu .will.be.con e .in.MIDI.by. he.A duino.ca d.. I4#SAD#PPE13#33#20140408. . To.ha e. o.exac .dis ance.be ween. he.hand.and. he.senso ,.we.implemen .an.app oxima ion.o . his. unc ion. in. he.con e sion.algo i hm.(in. ed he.ou pu . cu e,.in.blue. he. app oxima ed. unc ion. used.in. he.code).. . Each. senso . is. o ien ed. om. he. op. o. he. bo om;. he. highes . alue. will. be. a . he. op. so. he. nea es . om. he.senso s.. . I 's.also.essen ial. o.ha e. he.lowe . esponse. ime.as.possible.. Tmax.=.16,5.+.3,7.+.5,0.=25,2.ms. . I4#SAD#PPE13#33#20140408. . . 6.1.4 G o e(W(LED(Ba ( . Seeeds udio.p o ides. his.LED.Ba ..This.LEDs.ba s. will.display. he. alue. o .his.co esponden .senso .. This.componen .comeswi h.a.MY9221.LED.(by.My# Semi).con olling.chip..G o e.connec o s.a e.used. o.connec . his.ba g aphs.. When.all. he.LEDs.a e.on.(8.ba s.on. his.p ojec .=.80. LEDs).2A.a e.needed..To.suppo . his.an.ex e nal. powe .supply.will.be.used.. . The.main.di e ence.be ween. he.MY9221and. he. amous.74HC595.is. ha . he. i s .one.can.con ol.up. o.12.LEDs,.and. he.command.da a.is.on.16.bi s..To. choose.which.LED.we.wan . o.ligh .on,.a.command. on.10.bi s.is.sen .(because.we.a e.using.10.LEDs)... Fo .example,.i .we.wan . o.ligh .up. he.las .3.LEDs,.we.ha e. o.send:.1110000000=.896.. . 6.1.5 Me al(Pushbu on( . We.use.s ainless.S eel.Body.bu on.wi h.la ch.swi ch.mode..Also. hey.a e. equipped.wi h.a.LED. ha .con ollable.by.sepa a ed.. This.bu ons.will.con ol. he.g oups. o . he.senso s..And.also.can.be.assigned. o.do.mo e.jobs.i . he.so wa e.is.con igu ed. o.do.i ..The.A duino.boa d.can. ead. he.s a e.and.make.changes.acco ding. o.i .. . I4#SAD#PPE13#33#20140408. . 6.1.6 Luxeon(Rebel(High(Powe (LED( . This.high.powe .LED.can.a o d.a.max. o wa d.cu en .o .1A.in.a. 2.55V. o.3.99V. ange..Philips.p o ides.i .. Fo . he.p ojec .will.be.used.8.high.powe .LEDs.and. he.powe .will. be.supplied.by. he.same.sou ce.o . he.LEDs.ba s..This.LED.will. ha e.a. esis ance. o.a oid. he.use.o .so.much.cu en .bu .s ill.will. be.b igh e . han. he.usual.LEDs. . .The. elec ical. cha ac e is ics. a . 350. mA. and. a . a. 25°C. he mal.pad. empe a u e.a e:. . . . . . .The.cu en .cha ac e is ics.a e:. . I4#SAD#PPE13#33#20140408. . .Fu he mo e,. he.luminous. lux.is. ep esen ed.by. he. ollowing.cu e:. . . The.74HC595.d i e .will.con ol. hese.LEDs.. 6.1.7 74HC595(Shi (Regis e ( . The.supply. ol age.mus .be.be ween.2.and.6V..The.inpu .and. he.ou pu . ol age.mus .be.mo e. han. 0.and.less. han. he.supply. ol age.. . He e.is. he.pinning.o . he.shi . egis e :. V Ou pu Enable:.connec ed. o. he.g ound. o.ac i e.all. he.ou pu ... V Mas e .Rese :.connec ed. o.+5V. o.a oid.a. ese .o . he.chip.. V Q0. o.Q7:.connec ed. o. he.8.LEDs. V Ds:.se ial.da a.inpu ,.i .will.command. he.ou pu s.o . he.chip.. V Two.clocks,.connec ed. o.digi al.pins.o . he.A duino.ca d.. . . I4#SAD#PPE13#33#20140408. . . . An.o de . o. he.74HC595.is.composed.o .8.bi s...Fo .example. he.o de .00110111.will.ligh .up.5.LEDs.. In. his.case,.se e al.logical.‘1’.and.‘0’.a e. ollowing.each.o he ..The.shi . egis e .can’ .know.i . his.is.a. single.‘1’,.o .se e al..Tha .is.why. he e.is.a.clock.signal..I .has. he.same. equency.as. he.o he .clock. inpu ..Bo h.o . hem.send.squa e.signal..A .e e y. ising.edge.o . he.SHcp.inpu ,. he.74HC595.knows. ha . he e.is.a.new.bi . o.check.on. he.STcp.inpu ,.which.is. he.one.who. ecei es. he.o de .. . . . . . . . . . . . . When. he.clockPin.goes. om.low. o.high,. he.shi . egis e . eads. he.s a e.o . he.da a.pin..As. he. da a.ge s.shi ed.in.i .is.sa ed.in.an.in e nal.memo y. egis e ..When. he.la chPin.goes. om.low. o. high. he.sen .da a.ge s.mo ed. om. he.shi . egis e s.(memo y. egis e ).in o. he.ou pu .pins,.which. ligh .up. he.LEDs.. . I4#SAD#PPE13#33#20140408. . He e.is.a.simula ion.o . he.A mega.2560,.wi h. he.74HC595.shi . egis e .connec ed. o.8.LEDs:. . 6.1.8 Mode(bu ons( . Gene ic.bu ons.wi hou .la ch.. . 7 So wa e(elemen :(Max(Pa ch( . The.communica ion.be ween. he.ha dwa e.and.so wa e.elemen s.is.a.key.poin .o .ou .p ojec ..The. A duino.will.send. he. alue.we’ e.in e es ed.in.and.i .will.be. ansla ed.in.MIDI. o.be. he e o e.used. by. he.use ’s.digi al.audio.wo ks a ion.. A . i s .we.conside ed. h ee.a chi ec u es:. Fi s ,.we.planned. o.ha e. he.pa ame e s. alues.sen .o e . he.se ial.connec ion. om.A duino. o. he. compu e .and. hen.be. ecei ed.by.a.Max.pa ch.. This.pa ch.would.pa se. he.da a.and.build.a.MIDI.Con ol.Change.signal. hen.send.i .. The.use .would. hen.con igu e. he.DAW.o .his.choice. o.use. hese.MIDI.CCs.. . . . I4#SAD#PPE13#33#20140408. . 7.1 A chi ec u e( . . . . . . . V We.decided. o.send.MIDI.di ec ly. ia.a.MIDI.connec o /cable. o. he.compu e .and. ecei e.i . wi h.wha e e .DAW.use .could.use.. . . V Plan. C. was. o. send. MIDI. in o ma ion. o e . he. USB. se ial. connec ion. o. be. hen. di ec ly. ecei ed. by. he. DAW.. The. MIDI. o e . USB. p oceeding. would. be. p o ided. by. a. i mwa e. ins alled.on. he.A duino.. I4#SAD#PPE13#33#20140408. . 7.2 Max(Pa ch( Max.is.a. isual.p og amming.language. o .music.and.mul imedia.de eloped.by.Cycling’74..Du ing.i s. 20#yea s.his o y,.i .has.been.used.by.compose s,.pe o me s,.so wa e.designe s,. esea che s,.and. a is s. o .c ea ing. eco dings,.pe o mances,.and.ins alla ions.. The.Max.p og am. i sel . is. modula . and. has. a. la ge. use . base. o . p og amme s. no . a ilia ed. wi h. Cycling.'74.who.enhance. he.so wa e.wi h.comme cial.and.non#comme cial.ex ensions..Because.o . i s. ex ensible. design. and. GUI,. Max. is. now. known. as. a. s anda d. o . de eloping. in e ac i e. music. pe o mance.so wa e.. I .can.send.se e al. ype.o .in o ma ion. o.and. h ough. he.compu e .and.so.we.conside ed.i . o.be.a. good.candida e. o.con e .ou .da a.in o.MIDI.. The. idea. was. o. send. in o ma ion. o. he. compu e . h ough. he. USB. se ial. po ,Maxwould. hen. p ocess.i .and.con e .i .in o.a.MIDI.signal. o.be.used.by.any.DAW.. . He e.is. he.pa ch.we.made. o.pa se. he.se ial.in o ma ion,. hen.con e .i .in o.MIDI:. . . . . . . . . . . . . . . . . . . . This.solu ion.wo ked.well.bu .i .needed. he.use . o.download. he.pa ch.and. un.Max. o.ha e. he. con olle .wo king..I .would.ha e.added.one.mo e.link.in. he.p ocess.chain.. . We. inally.decided. o.gi e.up. his.idea.because.we.wan ed. he.con olle . o.be. he.mo e.plug#and# play.we.could.make.i .so. he.use .would.simply.ha e. o.plug.i .and….play.. . I4#SAD#PPE13#33#20140408. . Appendix(A. Bibliog aphy( . h p://a duino.cc/. h p://lea n.ada ui .com/. h ps://www.spa k un.com/. h p://www.seeeds udio.com/. h ps:// o um.able on.com. h p://www.syn h opia.com/. h p://en.wikipedia.o g/. . . . Appendix(B. Glossa y( . See. he. ollowing.documen s. o .a.comple e.unde s anding.o .all. e ms:. • CDC. • TRS. ( 113 KTRL midi con olle 114