Cov txheej txheem:

Arduino Uno Midi Fighter: 5 Kauj Ruam
Arduino Uno Midi Fighter: 5 Kauj Ruam

Video: Arduino Uno Midi Fighter: 5 Kauj Ruam

Video: Arduino Uno Midi Fighter: 5 Kauj Ruam
Video: Can the ARDUINO NANO handle 64 potentiometers? 2024, Hlis ntuj nqeg
Anonim
Arduino Uno Midi Fighter
Arduino Uno Midi Fighter

Cov lus qhia no tau tsim los ua kom tiav ntawm txoj haujlwm xav tau ntawm Makecourse ntawm University of South Florida (www.makecourse.com)

Raws li MidiFighter nrov los ntawm DJ Techtools, lub tsev Arduino uas siv lub suab paj nruas ntsuas Digital Interface (MIDI) tus tswj tuaj yeem siv ua MIDI cov cuab yeej hla txhua Digital Digital Workstation (DAW) software. MIDI maub los tuaj yeem xa thiab tau txais MIDI cov lus los ntawm lub khoos phis tawj thiab tuaj yeem siv ncaj qha los tswj qhov software twg los xij. Ib qho ntxiv, kev tswj hwm ntawm MIDI maub los tau hloov kho tau tag nrho - lub ntsiab lus tias txhua tus khawm, tus swb thiab pob qhov rooj tuaj yeem teeb tsa rau ib qho haujlwm hauv DAW. Piv txwv li, nias lub pob tuaj yeem ua cov ntawv tshwj xeeb lossis raug programmed toggle lub suab ntawm koj qhov project.

github.com/jdtar/Arduino-Midi-Controller

Kauj ruam 1: Cov ntaub ntawv

Hauv qab no yog cov npe khoom siv thiab cov cuab yeej siv hauv txoj haujlwm no.

Arduino Ib

Cov qhob cij

4051/4067 Multiplexer

Jumper xov hlau

Hlau Ntxiv

2x 10k ohm linear slide potentiometers

16x Sanwa 24mm nyees khawm

Thaum tshav kub kub ntsws

Soldering Hlau

Rab chais hniav

4.7 kΩ resistor

Acrylic Sheet (rau hau)

Vaj tse rau cov nyees khawm thiab Arduino

3-D Tshuab Luam Ntawv

Laser Txiav

Kauj Ruam 2: Tsim

Tsim
Tsim
Tsim
Tsim

Kuv twb tau muab lub tsev nyob rau kuv tus MIDI maub los ua ntej pib qhov haujlwm, yog li kuv tau thuam ib daim duab rau lub hau kom pom qhov twg txhua yam yuav tsum tau muab tso rau. Kuv paub tias kuv xav tau yam tsawg 16 lub nyees khawm thiab ob peb lub zog muaj zog raws li qhov muaj txiaj ntsig yog li kuv tau sim ua qhov chaw tawm ntawm cov khoom kom zoo ib yam li ua tau.

Tom qab teeb tsa cov txheej txheem rau lub hau, kuv tau xa cov ntaub ntawv ua 1: 1 PDF thiab xa nws mus rau lub tshuab txiav laser txiav ib daim ntawv ntawm acrylic. Rau cov ntsia hlau qhov, Kuv tau cim qhov twg kuv xav kom lub qhov nyob nrog tus cim thiab yaj cov acrylic nrog cov ntsiab lus kub.

Txuas nrog yog 1: 1 PDF uas tuaj yeem luam tawm ua 1: 1 thiab txiav nrog cov cuab yeej siv zog yog tias tsis muaj lub tshuab txiav laser.

Kauj Ruam 3: Kev tsim kho thiab thaiv

Kev tsim kho thiab thaiv
Kev tsim kho thiab thaiv
Kev tsim kho thiab thaiv
Kev tsim kho thiab thaiv
Kev tsim kho thiab thaiv
Kev tsim kho thiab thaiv

Tom qab txiav txiav cov acrylic, Kuv pom tias cov acrylic nyias nyias dhau los txhawm rau txhawb nqa tag nrho cov khoom. Tom qab ntawd kuv txiav tawm lwm daim ntawv thiab lo rau lawv ua ke uas tshwm sim los ua haujlwm zoo kawg nkaus.

Kev thaiv cov khoom siv coj los sim thiab ua yuam kev tab sis ua rau Fritzing kos duab txuas nrog. Thawj zaug kuv tau xaim xov hlau hauv av thiab 4.7kΩ resistor, soldered thiab cua sov ua rau sib txuas ntawm cov nyees khawm. Mounting ob qhov swb potentiometers yuav tsum tau yaj qhov rau cov ntsia hlau hauv acrylic. Tom qab ob lub potentiometers raug ntsia, lawv tau txuas mus rau A0 thiab A1 analog pins. Tom qab cov xov txuas tiav, Kuv nco qab tias tsis muaj lub pob qhov rooj rau kuv tus faders ntau dua li yuav lawv, Kuv tau luam tawm qee lub pob qhov rooj siv lub tshuab luam ntawv 3-D los ntawm kos nws tawm hauv Autodesk Fusion 360 thiab xa mus rau STL cov ntaub ntawv. De

Arduino Uno tsuas yog muaj 12 qhov muaj digital input pins tab sis 16 cov nyees khawm yuav tsum tau txuas. Txhawm rau them nyiaj rau qhov no, Kuv tau xaim 74HC4051 Multiplexer ntawm lub khob cij uas siv 4 tus lej nkag nkag thiab ua rau ntau lub cim qhia siv kab sib koom uas ua rau muaj 8 qhov digital input pins rau tag nrho 16 digital pins muaj rau siv.

Kev xaim cov nyees khawm rau tus pin raug yog yooj yim ntawm teeb meem ntawm kev tsim 4x4 matrix thiab siv qhov ntawd hauv cov cai. Qhov tsis yooj yim txawm li cas los xij yog qhov tshwj xeeb multiplexer yuav tau muaj tus lej tshwj xeeb teeb tsa uas cov ntaub ntawv tau pab nrog thiab kuv tseem muaj cov ntawv tshwj xeeb teeb tsa hauv siab thaum xaim cov nyees khawm li uas tau xaus zoo li qhov no:

NCO TSEG MATRIX

[C2] [C#2] [D2] [D#2]

[G#2] [A1] [A#2] [B1]

[E1] [F1] [F#1] [G1]

[C2] [C#2] [D2] [D#2]

PIN MATRIX (M = MUX INPUT)

[6] [7] [8] [9]

[10] [11] [12] [13]

[M0] [M1] [M2] [M3]

[M4] [M5] [M6] [M7]

Kauj ruam 4: Programming

Programming
Programming

Thaum lub rooj sib txoos tiav, kev teeb tsa Arduino yog txhua yam uas seem. Cov ntawv txuas nrog tau sau nyob rau hauv ib txoj kev xws li nws yooj yim customizable.

Qhov pib ntawm tsab ntawv suav nrog MIDI.h lub tsev qiv ntawv thiab lub tsev qiv ntawv tswj tau qiv los ntawm Cov Lus Cim thiab Volts blog uas yog ob qho tib si suav nrog hauv cov ntawv zip rau tus lej. Kev siv lub tsev qiv ntawv tswj hwm, khoom siv rau cov nyees khawm, lub zog loj thiab cov nyees khawm sib txawv tuaj yeem tsim muaj cov ntaub ntawv tseem ceeb uas suav nrog tus lej cim, tswj tus nqi, ceeb toom nrawm, MIDI channel naj npawb, thiab lwm yam. Arduino cov chaw nres nkoj uas tau tig los siv cov ntaub ntawv los ntawm cov khoom siv tswj hwm, hloov pauv lawv mus rau MIDI cov lus thiab xa cov lus mus rau qhov twg los xij midi interface txuas nrog.

Qhov tsis muaj qhov teeb tsa ntu ntawm tsab ntawv pib ua txhua txoj hauv kev raws li tawm thiab tseem pib ua qhov txuas txuas ntawm 115200 baud, tus nqi nrawm dua li MIDI cov cim qhia tau hloov pauv.

Lub voj tseem ceeb tseem ceeb yuav siv cov kab ntawm cov nyees khawm thiab cov nyees khawm sib txawv thiab ua haujlwm rau lub voj uas txheeb xyuas yog tias lub pob tau raug nias lossis tso tawm thiab xa tawm cov ntaub ntawv sib thooj bytes mus rau midi interface. Lub voj potentiometer txheeb xyuas qhov chaw ntawm lub zog thiab xa qhov hloov pauv qhov sib txawv rov qab mus rau qhov nruab nrab nruab nrab.

Kauj ruam 5: Teeb

Image
Image
Teeb
Teeb
Teeb
Teeb
Teeb
Teeb

Thaum cov ntawv raug thauj mus rau Arduino, cov kauj ruam tom ntej yog ntsaws thiab ua si. Muaj ob peb kauj ruam, txawm li cas los xij, ua ntej nws tuaj yeem siv tau.

Ntawm OSX, Apple suav nrog qhov tshwj xeeb los tsim cov cuab yeej siv midi uas tuaj yeem nkag mus tau los ntawm Audio Midi teeb tsa daim ntawv thov ntawm macs. Thaum cov cuab yeej tshiab tau tsim, Hairless MIDI tuaj yeem siv los tsim kev sib txuas txuas ntawm Arduino thiab cov cuab yeej tshiab midi tshiab. Qhov txuas txuas los ntawm Arduino los ntawm Hairless MIDI ua haujlwm ntawm baud tus nqi tau teev tseg hauv qhov tsis muaj teeb tsa teeb tsa ntawm tsab ntawv thiab yuav tsum tau teeb tsa sib npaug hauv Hairless MIDI qhov kev nyiam.

Txog kev ntsuas lub hom phiaj Kuv siv Midi Monitor txhawm rau txheeb xyuas yog tias cov ntaub ntawv raug raug xa mus xav tias qhov txuas-MIDI txuas. Thaum kuv txiav txim siab tias txhua lub pob tau xa cov ntaub ntawv raug los ntawm qhov raug, kuv teeb tsa MIDI teeb liab mus rau Ableton Live 9 raws li MIDI Kev Nkag Mus. Hauv Ableton Kuv muaj peev xwm ua daim ntawv qhia tawm txiav cov qauv ua piv txwv rau txhua lub khawm thiab ua si txhua tus qauv.

Pom zoo: