{"id":2015,"date":"2021-06-16T16:02:27","date_gmt":"2021-06-16T15:02:27","guid":{"rendered":"https:\/\/blog.univ-angers.fr\/istiaprojetsei2\/?p=2015"},"modified":"2021-06-17T13:48:39","modified_gmt":"2021-06-17T12:48:39","slug":"chorduino","status":"publish","type":"post","link":"https:\/\/blog.univ-angers.fr\/polytech_2A\/2021\/06\/16\/chorduino\/","title":{"rendered":"Projet Chorduino"},"content":{"rendered":"<p>Introduction :<\/p>\n<p>Bonjour, nous sommes Pierre PORTRON et Yohann CONANEC, tous les deux \u00e9tudiants en PEIP2-A \u00e0 Polytech Angers.<\/p>\n<p>Le but de ce projet \u00e9tait de cr\u00e9er un syst\u00e8me permettant d\u2019accompagner un musicien en jouant une s\u00e9rie d&#8217;accords sur un synth\u00e9tiseur. Pour cela nous avions \u00e0 notre disposition une carte Arduino UNO, muni de boutons poussoirs et d\u2019un \u00e9cran LCD, une p\u00e9dale, un c\u00e2ble MIDI-USB et un c\u00e2ble Arduino-USB<\/p>\n<p>Travail r\u00e9alis\u00e9 :<\/p>\n<p>1-Le codage des accords :<\/p>\n<p>Un accord est un ensemble de notes jou\u00e9 simultan\u00e9ment, ils sont d\u00e9finis par le type d\u2019accords ainsi que la note fondamentale, qui est la premi\u00e8re note jou\u00e9e.<\/p>\n<p>Pour coder les types d\u2019accords nous cr\u00e9ons un tableau pour chaque type, contenant dans l\u2019ordre, le nombre de notes, l&#8217;\u00e9cart entre les prochaines notes et la note fondamentale.<\/p>\n<p><a href=\"https:\/\/blog.univ-angers.fr\/istiaprojetsei2\/files\/2021\/06\/tab-acc.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.univ-angers.fr\/istiaprojetsei2\/files\/2021\/06\/tab-acc-275x300.png\" alt=\"tab acc\" width=\"275\" height=\"300\" class=\"alignnone size-medium wp-image-2021\" srcset=\"https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/tab-acc-275x300.png 275w, https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/tab-acc.png 313w\" sizes=\"auto, (max-width: 275px) 100vw, 275px\" \/><\/a><\/p>\n<p>Afin de coder l\u2019accord en lui-m\u00eame nous avons num\u00e9rot\u00e9 chaque notes de 0 \u00e0 11 et chaque types d\u2019accords de 0 \u00e0 19 que l\u2019on multipliait par 12.<br \/>\npour chaque accords on additionne la valeure de la note fondamentale et du type d\u2019accord<\/p>\n<p>exemple : type accord n7 : 2 * 12 = 24<br \/>\n             note fondamentale D : 5<br \/>\n\t    accords = 24 + 5 = 29<\/p>\n<p><a href=\"https:\/\/blog.univ-angers.fr\/istiaprojetsei2\/files\/2021\/06\/image_2021-06-16_165859.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.univ-angers.fr\/istiaprojetsei2\/files\/2021\/06\/image_2021-06-16_165859-300x11.png\" alt=\"image_2021-06-16_165859\" width=\"300\" height=\"11\" class=\"alignnone size-medium wp-image-2022\" srcset=\"https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/image_2021-06-16_165859-300x11.png 300w, https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/image_2021-06-16_165859-500x19.png 500w, https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/image_2021-06-16_165859.png 505w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Afin de d\u00e9coder l\u2019accord lorsque l\u2019on souhaite le jouer on trouve la note fondamentale en appliquant un modulo 12 \u00e0 la valeur de l\u2019accord et ont la divise par 12 pour trouver le type d\u2019accord<\/p>\n<p>Exemple :<br \/>\n\t    Accords = 29<br \/>\n\t    Note fondamentale= 29 % 12 = 5 = D<br \/>\n\t    Type d\u2019accord = 29 \/ 12 = 2 = n7<\/p>\n<p><a href=\"https:\/\/blog.univ-angers.fr\/istiaprojetsei2\/files\/2021\/06\/image_2021-06-16_170010.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.univ-angers.fr\/istiaprojetsei2\/files\/2021\/06\/image_2021-06-16_170010-300x49.png\" alt=\"image_2021-06-16_170010\" width=\"300\" height=\"49\" class=\"alignnone size-medium wp-image-2023\" srcset=\"https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/image_2021-06-16_170010-300x49.png 300w, https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/image_2021-06-16_170010.png 435w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>2-Jouer l\u2019accord :<\/p>\n<p>Pour jouer l\u2019accord on le d\u00e9code comme vu pr\u00e9c\u00e9demment pour obtenir le type d\u2019accord et la note fondamentale. Puis on utilise la fonction MIDI.sendNoteOn(note, volume) en additionnant \u00e0 chaque fois la note fondamentale de la valeur not\u00e9 dans le tableau du type d\u2019accord.<\/p>\n<p><a href=\"https:\/\/blog.univ-angers.fr\/istiaprojetsei2\/files\/2021\/06\/image_2021-06-16_171125.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.univ-angers.fr\/istiaprojetsei2\/files\/2021\/06\/image_2021-06-16_171125-205x300.png\" alt=\"image_2021-06-16_171125\" width=\"205\" height=\"300\" class=\"alignnone size-medium wp-image-2026\" srcset=\"https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/image_2021-06-16_171125-205x300.png 205w, https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/image_2021-06-16_171125.png 467w\" sizes=\"auto, (max-width: 205px) 100vw, 205px\" \/><\/a><\/p>\n<p>3-Les grilles d\u2019accords<\/p>\n<p>Les grilles d\u2019accords sont des tableaux d\u2019accords ce qui nous permet de jouer plusieurs accords \u00e0 la suite.<\/p>\n<p><a href=\"https:\/\/blog.univ-angers.fr\/istiaprojetsei2\/files\/2021\/06\/grille.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.univ-angers.fr\/istiaprojetsei2\/files\/2021\/06\/grille.png\" alt=\"grille\" width=\"1082\" height=\"19\" class=\"alignnone size-full wp-image-2038\" srcset=\"https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/grille.png 1082w, https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/grille-300x5.png 300w, https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/grille-1024x17.png 1024w, https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/grille-1000x19.png 1000w, https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/grille-500x8.png 500w\" sizes=\"auto, (max-width: 1082px) 100vw, 1082px\" \/><\/a><\/p>\n<p>Pour cela on regarde la valeur envoy\u00e9e par la p\u00e9dale (plus on appuie plus la valeur augmente)<br \/>\nLorsque cette valeur d\u00e9passe 400 on joue le premier accord puis quand on la rel\u00e2che on passe \u00e0 l\u2019accord suivant.<\/p>\n<p><a href=\"https:\/\/blog.univ-angers.fr\/istiaprojetsei2\/files\/2021\/06\/jouergrille.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.univ-angers.fr\/istiaprojetsei2\/files\/2021\/06\/jouergrille.png\" alt=\"jouergrille\" width=\"390\" height=\"419\" class=\"alignnone size-full wp-image-2037\" srcset=\"https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/jouergrille.png 390w, https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/jouergrille-279x300.png 279w\" sizes=\"auto, (max-width: 390px) 100vw, 390px\" \/><\/a><\/p>\n<p>4-La liaison s\u00e9rie<\/p>\n<p>Pour entrer une grille manuellement, on utilise la liaison s\u00e9rie Arduino pr\u00e9sent sur l\u2019IDE Arduino. On re\u00e7oit la nouvelle grille sous forme d\u2019une cha\u00eene de caract\u00e8res que l\u2019on transforme en un tableau d\u2019entiers repr\u00e9sentant les accords.<\/p>\n<p><a href=\"https:\/\/blog.univ-angers.fr\/istiaprojetsei2\/files\/2021\/06\/image_2021-06-16_173809.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.univ-angers.fr\/istiaprojetsei2\/files\/2021\/06\/image_2021-06-16_173809.png\" alt=\"image_2021-06-16_173809\" width=\"360\" height=\"496\" class=\"alignnone size-full wp-image-2033\" srcset=\"https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/image_2021-06-16_173809.png 360w, https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/image_2021-06-16_173809-217x300.png 217w\" sizes=\"auto, (max-width: 360px) 100vw, 360px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/blog.univ-angers.fr\/istiaprojetsei2\/files\/2021\/06\/moniteur.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.univ-angers.fr\/istiaprojetsei2\/files\/2021\/06\/moniteur.png\" alt=\"moniteur\" width=\"683\" height=\"340\" class=\"alignnone size-full wp-image-2034\" srcset=\"https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/moniteur.png 683w, https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/moniteur-300x149.png 300w, https:\/\/blog.univ-angers.fr\/polytech_2A\/files\/2021\/06\/moniteur-500x248.png 500w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><\/a><\/p>\n<p>Vid\u00e9os montrant le projet en fonctionnement : <\/p>\n<p><a href=\"http:\/\/drive.google.com\/file\/d\/1ohHWEjFQPqnQ6lgYgXIuU3x8RuiLttEy\/view?usp=sharing\">drive.google.com\/file\/d\/1ohHWEjFQPqnQ6lgYgXIuU3x8RuiLttEy\/view?usp=sharing<\/a><br \/>\n<a href=\"http:\/\/drive.google.com\/file\/d\/1pDgMJ5z21NYXAhiWjoK8Dx4-1u30MCZR\/view?usp=sharing\">https:\/\/drive.google.com\/file\/d\/1pDgMJ5z21NYXAhiWjoK8Dx4-1u30MCZR\/view?usp=sharing<\/a><br \/>\n<a href=\"http:\/\/drive.google.com\/file\/d\/1osvTKHlHw0p1z_huiWoCOzXzyjFL0QGX\/view?usp=sharing\">https:\/\/drive.google.com\/file\/d\/1osvTKHlHw0p1z_huiWoCOzXzyjFL0QGX\/view?usp=sharing<\/a><\/p>\n<p>Conclusion :<\/p>\n<p>Ce projet nous aura finalement beaucoup apport\u00e9, notamment au niveau du travail de groupe sur un projet de cette dur\u00e9e. <\/p>\n<p>Nous sommes tr\u00e8s fiers du r\u00e9sultat m\u00eame si plusieurs points pourraient \u00eatre am\u00e9lior\u00e9s.<\/p>\n<p>Merci beaucoup \u00e0 M COTTENCEAU pour son aide.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction : Bonjour, nous sommes Pierre PORTRON et Yohann CONANEC, tous les deux \u00e9tudiants en PEIP2-A \u00e0 Polytech Angers. Le but de ce projet \u00e9tait de cr\u00e9er un syst\u00e8me permettant d\u2019accompagner un musicien en jouant une s\u00e9rie d&#8217;accords sur un &hellip; <a href=\"https:\/\/blog.univ-angers.fr\/polytech_2A\/2021\/06\/16\/chorduino\/\">Continuer la lecture <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":74858,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[344],"tags":[127,437,220,215,129,27],"class_list":["post-2015","post","type-post","status-publish","format-standard","hentry","category-344","tag-carte-arduino","tag-ecran-lcd","tag-musique","tag-programmation","tag-programmation-c","tag-projet"],"_links":{"self":[{"href":"https:\/\/blog.univ-angers.fr\/polytech_2A\/wp-json\/wp\/v2\/posts\/2015","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.univ-angers.fr\/polytech_2A\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.univ-angers.fr\/polytech_2A\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.univ-angers.fr\/polytech_2A\/wp-json\/wp\/v2\/users\/74858"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.univ-angers.fr\/polytech_2A\/wp-json\/wp\/v2\/comments?post=2015"}],"version-history":[{"count":1,"href":"https:\/\/blog.univ-angers.fr\/polytech_2A\/wp-json\/wp\/v2\/posts\/2015\/revisions"}],"predecessor-version":[{"id":2025,"href":"https:\/\/blog.univ-angers.fr\/polytech_2A\/wp-json\/wp\/v2\/posts\/2015\/revisions\/2025"}],"wp:attachment":[{"href":"https:\/\/blog.univ-angers.fr\/polytech_2A\/wp-json\/wp\/v2\/media?parent=2015"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.univ-angers.fr\/polytech_2A\/wp-json\/wp\/v2\/categories?post=2015"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.univ-angers.fr\/polytech_2A\/wp-json\/wp\/v2\/tags?post=2015"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}