Jump to content





A8 Wind Chimes - Gentle Breeze in C minor

Posted by k-Pack, 30 September 2016 · 562 views

MIDI chimes Arduino

There is a sound recording of the first attempt to simulate wind chimes within the following .ZIP file.  It was recorded using Window 10's Voice Recorder.  The A8 used Atari BASIC's RND(0) function to pick note, volume, and delay values for the chime strikes.  Then sent the MIDI data to the Yamaha TG33 Tone Generator, Preset 2 #87 PC*Bells.  You don't need the A8 setup to hear the recording. Its in .m4a format.
 
Attached File  A8 Wind Chimes - Gentle Breeze in C minor.zip (4.97MB)
downloads: 39
 
If you are interested in the A8 side of this, read on.
 
The idea was/is  to simulate wind chimes by programming an A8 to output MIDI data to the tone generator.  The 850-Arduino-Midi connection has been described in previous blog entries. 
 
The first thing that needed to be accomplished was to decide which Midi notes to assign to the six chimes.  Information on how to build your own chimes was found on Michigan Technological University's site.  It had suggestions on how to choose the notes.  One was to pick the notes and then play them as randomly as possible on the keyboard.
 
http://www.phy.mtu.e.../windchime.html
 
The other was to setup a pentatonic scale used to make most of the tuned chimes.  The major and minor keys are explained at:  http://www.phy.mtu.e...pentatonic.html
 
These links provided enough information to start programing the chimes.  Once the MIDI Note values have been chosen, the program chooses a random note, and random volume and some random delay between notes.  It took some experimenting to get the program to start to sound like wind chimes.  BASIC made this really easy.  Change the parameters, enter RUN, then press reset to stop the program.  I could have done this all day; and perhaps I did.
 
1 REM WIND CHIMES USING ARDUINO MIDI OUTPUT.
2 REM PACK007 - 9/29/2016
3 REM First experiment to determine MIDI Note vales, random timing values, and volume values for chime simulation
10 GOSUB 30000:REM SET UP RS232 PORT
20 DIM TONE(6):CMD=144
30 TONE(1)=60:REM NOTE C4
40 TONE(2)=TONE(1)+3
50 TONE(3)=TONE(2)+2
60 TONE(4)=TONE(3)+2
70 TONE(5)=TONE(4)+3
80 TONE(6)=TONE(5)+2
100 MIDINOTE=TONE(INT(RND(0)*6)+1)
110 VOL=INT(RND(0)*60)+20
120 DELAY=INT(RND(0)*500)
200 PUT #1,CMD:PUT #1,MIDINOTE:PUT #1,VOL
210 ? MIDINOTE,VOL,DELAY
220 FOR X=1 TO DELAY:NEXT X
230 GOTO 100
29999 REM SETUP RS232 PORT FOR CONCURRENT OUTPUT TO ARDUINO-MIDI
30000 CLOSE #1:OPEN #1,9,0,"R2:":XIO 36,#1,14,0,"R2:":XIO 38,#1,32,0,"R2:":XIO 40,#1,0,0,"R2:":RETURN
 
 
Making changes to the program can be fun but now a program needs to be developed to adjust the variables to simulate any atmospheric condition, during program execution.






Recent Comments

Latest Visitors