Cov txheej txheem:

Arduino Jazz Improviser: 4 Kauj Ruam (nrog Duab)
Arduino Jazz Improviser: 4 Kauj Ruam (nrog Duab)

Video: Arduino Jazz Improviser: 4 Kauj Ruam (nrog Duab)

Video: Arduino Jazz Improviser: 4 Kauj Ruam (nrog Duab)
Video: Performance of my bespoke Arduino synthesizer, with live coding & clarinet processing in Ableton ❤️ 2024, Hlis ntuj nqeg
Anonim
Arduino Jazz Improviser
Arduino Jazz Improviser

Qhov kev tsim no tsis ua "nkauj". Hloov chaw, nws siv qhov kev nplij siab los tsim nws cov nkauj thaum nws ua si - zoo ib yam li tus kws ntaus suab paj nruag jazz tiag. Txhua zaus koj qhib nws nws yuav ua qee yam txawv; tab sis koj tseem tuaj yeem tswj lub sijhawm, suab nrov, thiab ntim nrog cov xov tooj. Hnov ib qho piv txwv ntawm nws ua si hauv qab no:

Kauj ruam 1: Dab tsi yog Jazz?

Image
Image

Yog tias koj xav tau lub ntsiab lus raug cai, koj tuaj yeem saib cov kab ntawv txuas no, tab sis kuv xav tias txoj hauv kev zoo tshaj plaws los piav nws tsuas yog qhia koj tias nws zoo li cas.

  • https://en.wikipedia.org/wiki/Jazz
  • https://en.wikipedia.org/wiki/Jazz_improvisation

Kauj ruam 2: Tsim Circuit Court

Tsim Circuit Court
Tsim Circuit Court
Tsim Circuit Court
Tsim Circuit Court

Kuv tau ua sawv ntawm kuv tus neeg hais lus tawm ntawm cov quav quav thiab kab xev, tab sis qhov ntawd yog nyob ntawm yeem. Ua raws daim duab txhawm rau tsim qhov tsim ntawm qhov tsim no.

Kauj ruam 3: Upload Code

Txoj cai no ua raws li pseudo-random algorithm los ua qhov kawg sau cov ntawv ntawm Bb blues nplai hauv qhov kev sib dhos jazzy syncopated.

Siv tus lej no hauv Arduino IDE:

int nco = 1;

int nco2 = 1; teeb tsa tsis muaj dab tsi () {pinMode (3, OUTPUT); } void loop () {int tonecontrol = daim ntawv qhia (analogRead (A0), 0, 1023, 1, 4); int speedcontrol = daim ntawv qhia (analogRead (A1), 0, 1023, 1, 20); int tonecontrol2 = daim ntawv qhia (analogRead (A2), 0, 1023, 1, 4); koj playnote; int switchval = random (1, 5); hloov (hloov pauv) {rooj plaub 1: ceeb toom = ceeb toom; tawg; rooj plaub 2: ceeb toom = ceeb toom + 1; tawg; rooj plaub 3: ceeb toom = ceeb toom - 1; tawg; rooj plaub 4: ceeb toom = ceeb toom + 2; tawg; rooj plaub 5: ceeb toom = ceeb toom - 2; tawg; } hloov (ceeb toom) {rooj plaub 1: playnote = 262; tawg; rooj plaub 2: playnote = 294; tawg; rooj plaub 3: playnote = 311; tawg; rooj plaub 4: playnote = 349; tawg; rooj plaub 5: playnote = 392; tawg; rooj plaub 6: playnote = 440; tawg; rooj plaub 7: playnote = 466; tawg; rooj plaub 8: playnote = 523; tawg; default: nco = 1; tawg; } playnote = playnote * lub suab tswj; koj playnote2; int switchval2 = random (1, 5); hloov (switchval2) {rooj plaub 1: note2 = note2; tawg; rooj plaub 2: note2 = note2 + 1; tawg; rooj plaub 3: note2 = note2 - 1; tawg; rooj plaub 4: note2 = note2 + 2; tawg; rooj plaub 5: note2 = note2 - 2; tawg; } hloov (note2) {rooj plaub 1: playnote2 = 262; tawg; rooj plaub 2: playnote2 = 294; tawg; rooj plaub 3: playnote2 = 311; tawg; rooj plaub 4: playnote2 = 349; tawg; rooj plaub 5: playnote2 = 392; tawg; rooj plaub 6: playnote2 = 440; tawg; rooj plaub 7: playnote2 = 466; tawg; rooj plaub 8: playnote2 = 523; tawg; default: nco2 = 1; tawg; } playnote2 = playnote2 * tonecontrol2; suab nrov (3, playnote, 30 * kev tswj nrawm); ncua (31 * kev tswj nrawm); yog (random (1, 4) == 3) {ncua (21 * kev tswj nrawm); } lwm {suab (3, playnote2, 20 * speedcontrol); ncua (21 * kev tswj nrawm); }}

Kauj Ruam 4: Yuav Tswj Li Cas

Yuav Tswj Li Cas
Yuav Tswj Li Cas

Los ntawm sab laug mus rau sab xis, txhua lub xov tooj ua raws li hauv qab no:

  • Ntim
  • 1st tone lub suab
  • Sijhawm
  • Lub suab thib 2

Tham nrog lawv kom txog thaum koj tau txais lub suab uas koj nyiam.

Pom zoo: