Cov txheej txheem:
- Khoom siv
- Kauj Ruam 1: Txhim Kho Lub Breadboard
- Kauj Ruam 2: Upload Sketch
- Kauj Ruam 3: Nkag Siab Hairless MIDI thiab Internal MIDI Loops
- Kauj Ruam 4: Txuas nrog Koj DAW
- Kauj ruam 5: Ua si
Video: Basic Arduino MIDI Controller: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Qhia:
Kuv yog tus tshiab los ua haujlwm nrog Arduino tab sis kuv vam tias yuav nthuav kuv qhov kev paub los ntawm kev qhia lwm tus thiab tau txais kev tawm tswv yim. Nov yog qhov yooj yim heev MIDI maub los nrog 4 khawm thiab lub zog ntsuas. Tus txheej txheem rau txoj haujlwm no zoo li qhov no:
1. Tsim tawm lub khob cij
2. Upload Daim Duab Sketch mus rau Arduino
3. To taub Hairless MIDI thiab sab hauv MIDI loop (loopbe1)
4. qhia koj qhov MIDI mus rau DAW (Ableton)
Khoom siv
1 x Arduino Mega 2560
1 x Mov Board
1 x USB Cable
1 x Potentiometer
4 x Tact Nyem khawm
4 x 120Ohm resistors
14 x jumper cables rau lub thawv ntawv
Kauj Ruam 1: Txhim Kho Lub Breadboard
Txuas koj lub khob cij kom tag nrho cov khoom sib dhos ua duab 1 saum toj no. Txhua lub pob yuav tsum zoo ib yam li daim duab 2. Khawm nkag tau yog 2, 3, 4 thiab 5 ntawm Arduino thiab tus pin nruab nrab ntawm lub hwj chim tau txuas nrog ANALOG input A0.
Kauj Ruam 2: Upload Sketch
Luam thiab paste cov cai hauv qab no rau hauv Arduino IDE. Xaiv lub rooj tsav xwm raug hauv qab "cov cuab yeej" thiab xa cov duab kos mus rau Arduino.
byte noteON = 144; // nco rau ntawm commandbyte nco; // cia rau tam sim no ua si nco int khawmPin1 = 2; int buttonPin2 = 3; int buttonPin3 = 4; int buttonPin4 = 5; int potPin = A0; boolean currentState = LOW; // stroage rau lub xeev khawm tam sim no boolean lastState = LOW; // cia rau khawm kawg lub xeev tsis muaj teeb tsa teeb tsa () {pinMode (buttonPin1, INPUT); pinMode (buttonPin2, INPUT); pinMode (buttonPin3, INPUT); pinMode (buttonPin4, INPUT); // lub sijhawm no peb yuav teeb tus pin li INPUT Serial.begin (9600); // initialize Serial connection} void loop () {int PotVal = analogRead (potPin); byte nrawm = daim ntawv qhia (PotVal, 0, 1023, 0, 127); currentState = digitalRead (buttonPin1); if (currentState == HIGH && lastState == LOW) {MIDImessage (noteON, 60, velocity); // tig ceeb toom 60 rau nrog 127 nrawm nrawm (200); // daim ntawv nyoos ntawm khawm debouncing} lwm tus yog (currentState == LOW && lastState == HIGH) {MIDImessage (noteON, 60, 0); // tig ceeb toom 60 tawm qeeb (2); // daim ntawv nyoos ntawm khawm debouncing} lastState = currentState; currentState = digitalRead (buttonPin2); yog (currentState == HIGH && lastState == LOW) {// yog tias khawm tau nyuam qhuav nias MIDImessage (noteON, 61, tshaj tawm); // tig ceeb toom 60 rau nrog 127 nrawm nrawm (200); // daim ntawv nyoos ntawm lub pob debouncing} lwm tus yog (currentState == LOW && lastState == HIGH) {MIDImessage (noteON, 60, 0); // tig ceeb toom 60 tawm qeeb (2); // daim ntawv nyoos ntawm khawm debouncing} lastState = currentState; currentState = digitalRead (buttonPin3); yog (currentState == HIGH && lastState == LOW) {// yog tias khawm tau nyuam qhuav nias MIDImessage (noteON, 62, tshaj tawm); // tig ceeb toom 60 rau nrog 127 nrawm nrawm (200); // daim ntawv nyoos ntawm lub pob debouncing} lwm tus yog (currentState == LOW && lastState == HIGH) {MIDImessage (noteON, 60, 0); // tig ceeb toom 60 tawm qeeb (2); // daim ntawv nyoos ntawm khawm debouncing} lastState = currentState; currentState = digitalRead (buttonPin4); yog (currentState == HIGH && lastState == LOW) {// yog tias khawm tau nyuam qhuav nias MIDImessage (noteON, 63, tshaj tawm); // tig ceeb toom 60 rau nrog 127 nrawm nrawm (200); // daim ntawv nyoos ntawm lub pob debouncing} lwm tus yog (currentState == LOW && lastState == HIGH) {MIDImessage (noteON, 60, 0); // tig ceeb toom 60 tawm qeeb (2); // daim ntawv nyoos ntawm khawm debouncing} lastState = currentState; } // xa MIDI lus tsis muaj dab tsi MIDImessage (byte hais kom ua, byte data1, byte data2) {Serial.write (hais kom ua); Serial.write (data1); Serial.write (data2); }
Kuv tseem tshiab heev los sau cov cai feem ntau….. cov uas muaj kev paub me ntsis ntxiv tuaj yeem tuaj yeem ntxuav qhov no…
Kauj Ruam 3: Nkag Siab Hairless MIDI thiab Internal MIDI Loops
Arduino xav tau los ntawm tus choj txuas ib yam li Hairless MIDI tom qab ntawd dhau los ntawm lub voj MIDI sab hauv xws li loopbe1 (lossis IAC npav rau Mac).
Nco tseg: koj tsis tuaj yeem xa cov duab kos mus rau Arduino thaum nws txuas nrog lub plua plav MIDI txuas txuas.
Xaiv koj Arduino hauv Hairless MIDI qhov chaw nres nkoj txuas thiab loopbe1 lossis IAC Bus hauv MIDI tawm.
Nco tseg: nco ntsoov tias hais tsis tau lus thaum siv loopbe1.
Kauj Ruam 4: Txuas nrog Koj DAW
Yog tias koj tau txais lub teeb liab rau Hairless MIDI app thaum koj nias lub pob ntawm lub khob cij (lub teeb yuav ci) koj yuav tsum tuaj yeem xa cov ntaub ntawv MIDI mus rau DAW. Kuv siv Ableton tab sis ib qho DAW yuav tsum ua haujlwm. Nco ntsoov tias koj sab hauv MIDI lub voj (loopbe1) tau qhib rau hauv koj li kev nyiam DAW (hauv Ableton koj xav kom "taug qab" kom qhib tau). Tom ntej no, xaiv ib qho ntawm koj li MIDI taug qab nkag mus rau MIDI lub voj (loopbe1) raws li qhia hauv daim duab saum toj no.
Kauj ruam 5: Ua si
Cov nyees khawm yuav tam sim no ua haujlwm zoo li lwm yam MIDI maub los! Lub hwj chim yuav hloov qhov nrawm ntawm cov ntawv xa mus rau DAW. Daim vis dis aus (tsaus ntuj heev…) qhia pom lub suab piano zoo heev hauv kev ua!
Pom zoo:
Arduino Tsheb Rov Qab Chaw Nres Tsheb Ceeb Toom - Cov Kauj Ruam ntawm Kauj Ruam: 4 Kauj Ruam
Arduino Tsheb Rov Qab Chaw Nres Tsheb Ceeb Toom | Cov kauj ruam ib kauj ruam: Hauv txoj haujlwm no, kuv yuav tsim qhov yooj yim Arduino Tsheb Rov Qab Tsheb Nres Tsheb Nres Sensor Siv Arduino UNO thiab HC-SR04 Ultrasonic Sensor. Qhov no Arduino raws Lub Tsheb Rov Qab ceeb toom tuaj yeem siv rau Kev Tshawb Fawb Txog Tus Kheej, Robot Ranging thiab lwm yam
Arduino Attiny85 Smart Controller Controller: 3 Kauj Ruam
Arduino Attiny85 Ntse Tus Kheej Tswj:
RC Taug Qab Neeg Hlau Siv Arduino - Kauj Ruam Ib kauj ruam: 3 Kauj Ruam
RC Tracked Robot Siv Arduino - Kauj Ruam Ib Nrab: Hav guys, Kuv rov qab los nrog lwm tus neeg hlau txias chassis los ntawm BangGood. Vam tias koj tau dhau los ntawm peb cov phiaj xwm yav dhau los - Spinel Crux V1 - Tus Cwj Pwm Tswj Tus Neeg Hlau, Spinel Crux L2 - Arduino Xaiv thiab Muab Neeg Hlau nrog Robotic caj npab thiab Badland Braw
Arduino Raws DIY Game Controller - Arduino PS2 Game Controller - Ua Si Tekken Nrog DIY Arduino Gamepad: 7 Kauj Ruam
Arduino Raws DIY Game Controller | Arduino PS2 Game Controller | Ua Si Tekken Nrog DIY Arduino Gamepad: Nyob zoo cov neeg, ua si game yog ib txwm lom zem tab sis ua si nrog koj tus kheej DIY kev cai game Controller yog kev lom zem dua.Yog li peb yuav ua tus tswj kev ua si siv arduino pro micro hauv cov lus qhia no
DIY Arduino Robotic Arm, Kauj Ruam ntawm Kauj Ruam: 9 Kauj Ruam
DIY Arduino Robotic Arm, Kauj Ruam ntawm Kauj Ruam: Cov ntawv qhia no yog qhia koj yuav tsim lub Caj Npab Caj Npab ntawm koj tus kheej li cas