Cov txheej txheem:

Synesthesia Player Piano: 4 Kauj Ruam
Synesthesia Player Piano: 4 Kauj Ruam

Video: Synesthesia Player Piano: 4 Kauj Ruam

Video: Synesthesia Player Piano: 4 Kauj Ruam
Video: You & Me: Relaxing Piano Music & Soft Rain Sounds For Sleep & Relaxation 2024, Kaum ib hlis
Anonim
Image
Image
Synesthesia Player Piano
Synesthesia Player Piano
Synesthesia Player Piano
Synesthesia Player Piano

Tus neeg ntaus piano no ntaus nkauj siv lub log xim thiab lub koob yees duab! Cov duab tau ntes los ntawm lub koob yees duab, ua tiav, thiab txhais ua suab paj nruag sau tseg. Tam sim no nws tau npaj los ua si cov lus sib dhos hauv tsev zov me nyuam uas tuaj yeem hloov pauv los ntawm kev rub tawm daim duab tshiab arduino uas qhia meej tias yuav tsum sau dab tsi (Cov xim twg yuav tsum pom rau lub koob yees duab).

Lub onboard Linux PC pib qhov kev pabcuam ntawm bootup uas thaij duab nrog lub koob yees duab, suav ua haujlwm ntawm RGB qhov tseem ceeb hauv daim duab, thiab tso tawm suab raws li qhov rov qab los ntawm kev ua haujlwm. Ua ntej ua lub suab nws xa lub teeb liab qhia rau Arduino kom tig lub servo, nthuav tawm cov xim sib xws rau daim ntawv tom ntej uas yuav tsum tau ua. Tom qab ntawd lub voj pib dua, daim duab raug coj mus, lub log xim tau tig, thiab lub suab tau ua si ad infinitum.

Txoj haujlwm no yog txoj hauv kev lom zem los koom ua ke cov nkauj, Linux cov txheej txheem niaj hnub no, kev tswj hwm lub tshuab micro, inkscape doodling, txiav laser, thiab rov ua dua qee lub thawv ntawv thawv tsis zoo.

Txhua tus lej thiab inkscape SVGs muaj nyob ntawm github ntawm:

github.com/melvyniandrag/pyMusic

Cov Khoom Siv:

  1. Cov ntawv dawb paug dawb
  2. Lub thawv ntawv
  3. Webcam
  4. Crayons
  5. Arduino
  6. Beagleboard-xwm
  7. Hlau
  8. Serial Cable
  9. Kev paub pib ntawm kev ua duab thiab suab paj nruag

Kauj ruam 1: Khoos phis tawj Computer

Cov khoom siv Computer
Cov khoom siv Computer
Cov khoom siv Computer
Cov khoom siv Computer
Cov khoom siv Computer
Cov khoom siv Computer

Nyob ntawm lub nkoj koj yuav xav tau lub khoos phis tawj Linux muaj peev xwm xws li Raspberry Pi. Kuv siv BeagleBoard-xM qub vim kuv tau tshwm sim kom nws tso ib puag ncig thiab kuv twb muaj lub kaw lus ua haujlwm ntawm SD daim npav. Koj tuaj yeem siv qhov twg los xij, tsuav nws tuaj yeem siv lub vev xaib, tuaj yeem ua haujlwm OpenCV (lub khoos phis tawj pom kev siv los coj thiab ua cov duab ntawm lub log xim), thiab muaj lub suab tawm.

Kuv teeb tsa lub operating system los khiav cov nab npawb nab npawb uas ntes cov duab ntawm bootup tom qab kev qhia systemd. Txhawm rau sau tsab ntawv koj yuav tsum tau sudo apt-tau nruab python-pyaudio python-opencv kom tau txais cov tsev qiv ntawv qhia. Koj kuj tseem yuav tsum tau pip nruab numpy pyserial kom tau txais cov tsev qiv ntawv ntawd. pyaudio yog siv los ua suab nrov, opencv yog siv rau kev thaij duab thiab ua, numpy kuj tseem siv rau kev ua duab, thiab pyserial xav tau kev sib txuas lus nrog Arduino.

Arduino yog siv rau kev tig lub cav servo uas lub log xim tau teeb tsa. Yog tias koj muaj Raspberry Pi koj tuaj yeem siv GPIO pins nyob ntawd thiab tawm Arduino, tab sis koj yuav tsum tau hloov kho Python code.

Hauv cov duab koj tuaj yeem pom cov cuab yeej thev naus laus zis ntawm kev ua haujlwm thiab ob peb ntawm cov lej code.

Kauj ruam 2: Piano

Tus Piano
Tus Piano
Tus Piano
Tus Piano
Tus Piano
Tus Piano

Kuv ua lub piano tawm ntawm cov duab los ntawm qee lub thawv qub uas kuv muaj. Kuv muaj qhov hmoov zoo ntawm kev nyob ze ntawm lub chaw tsim khoom uas muaj lub tshuab txiav laser. Rau ib xyoos tag nrho kuv tau xav tsis thoob dab tsi heck ib tus xav tau lub tshuab txiav laser rau, thiab nws hloov tawm thaum kawg kuv pom siv rau nws.

Kuv ntsuas lub khoos phis tawj, arduino, thiab servo yog li kuv paub ntau npaum li cas qhov chaw kuv xav tau, kos qhov ntawm piano hauv inkscape, thiab txiav tawm ntawm lub tshuab txiav laser. (Kho kom raug: Kuv tau khiav tawm ntawm cov duab los ua kom lub thawv ntawv tuav lub khoos phis tawj thiab arduino thiab yog li kuv tsis tso lawv rau hauv. Lawv nyob sab nraum ntawm rooj plaub. Tsis muaj teeb meem, tuaj yeem tau txais lwm lub thawv los ntawm lwm qhov, tab sis nws tsis tau tsis muaj teeb meem thaum kawg.)

Cov ntawv tau muab tso ua ke nrog epoxy.

Kauj ruam 3: Sib dhos

Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke

Nov yog qee cov duab ntawm lub piano tau sib sau ua ke thiab xim. Lub tshuab luam ntawv tsis muaj number li kuv tsis tuaj yeem luam cov xim mus rau cov ntawv dawb raws li kuv tau npaj tseg. Yog li kuv siv kuv tus ntxhais cov xim av. Thiab kuv nrhiav tsis tau ib rab riam xacto los txiav daim ntawv lo rau ntawm daim duab duab, yog li kuv tsuas yog siv rab riam ci thiab muab qee yam tiv thaiv ntawm lub txee rau chav ua noj. Siv qhov koj tau txais!

Kauj Ruam 4: Cov Kev Nyuaj Siab thiab Kev Xav Yav Tom Ntej

Kev Nyuaj Siab thiab Kev Xav Yav Tom Ntej
Kev Nyuaj Siab thiab Kev Xav Yav Tom Ntej
Kev Nyuaj Siab thiab Kev Xav Yav Tom Ntej
Kev Nyuaj Siab thiab Kev Xav Yav Tom Ntej

Ib feem nyuaj ntawm txoj haujlwm no tau txais qhov tsim nyog RGB qhov tseem ceeb los nyeem los ntawm lub koob yees duab. Lub webcam Kuv muaj qee qhov zoo nkauj ci ntsa iab LEDs rau nws uas kuv tsis paub yuav ua li cas tua hauv Linux. Kuv xav tias muaj lub Windows tsav tsheb uas tso cai rau koj toggle lawv rau thiab tawm. Kuv sim ua cov kab xev LED nrog kab xev hluav taws xob thiab tso lawv tawm. Kuv kuj tau sim cov software kom ruaj khov los ntawm tsis yog qhia nws cov ntawv dawb xwb, tab sis tseem sau me ntsis lub vev xaib uas qhia xim.

Lub suab tsim los ntawm lub khoos phis tawj qee zaum muaj suab nrov thiab tawg hauv lawv, thiab qhov no los ntawm qhov tseeb tias kuv muaj kev paub me ntsis hauv Linux lub suab programming. Lub tsev qiv ntawv pyaudio spits tawm tag nrho pawg ntawm kev tsis txaus siab txog JACK tsis tau teeb tsa hauv PC, tab sis los ntawm lub neej ntawd JACK tsis xav khiav lub taub hau (tsis muaj lub desktop gui thiab tus saib). Nov yog txoj haujlwm ua haujlwm uas kuv xav tias yog kev kho dua tshiab, tab sis tsis tsim nyog los qhia qhov tseem ceeb ntawm tus ntaus piano uas kuv tau xav.

Kuv tau txiav txim siab siv tus tes crank los hloov cov xim, thiab tej zaum kom muaj lawv ntawm tus pin tus pin yam yam, tab sis qhov uas qhia nws tus kheej cov teeb meem. Lub servo muaj suab nrov me ntsis, tab sis ua haujlwm zoo rau tam sim no.

Tam sim no tus neeg ntaus nkauj piano tam sim no tsuas yog tsim los ua 4 cov ntawv. Qhov no yog vim tias qhov kev pabcuam tsuas yog txav mus rau 180 degrees, feem ntau cov lus sib dhos hauv tsev menyuam tuaj yeem ua si nrog tsuas yog 3-4 cov ntawv, thiab kuv tsis xav kom lub log xim kom nruj nrog cov cheeb tsam xim, tej zaum yuav ua rau lub koob yees duab tsis meej pem. Yog li dhau los ntawm kev sib koom ua ke ntawm cov suab paj nruag hmoov zoo thiab cov kev txwv, 4 sau ntawv zoo.

Pom zoo: