Jump to content

MIDI Wind Chimes - Using M: and Atari BASIC

k-Pack

116 views

The last time I tried to simulate wind chimes was by outputting MIDI data through an RS-232 port on the 850 Interface(Rn:).

 

A8 Wind Chimes - Gentle Breeze in C minor - Out of the Pack - AtariAge Forums

 

Now that I have the Wizztronics MIDIMAX,  I can hook up a MIDI synthisizer to it and output MIDI data using Atari BASIC and the MIDI device handler(M:).

 

There were only a couple of lines in the original code that needed to be changed to open a channel to the M: device.  But, I wanted the option to change the maximum random value for the velocity and delay loop times during program execution.  The use of Atari paddles will hopefully help to make those adjustments for wind gusts and intensity.  You decide after listening to this recording of the PC*Bells from the Yahama  TG33. 

 

MidiWindChimes.mp3

 

The program MIDIWIND is a simple BASIC program.

 

1885641018_screenshot.thumb.JPG.3c4b24961a7a062b688d7342a25a5b3b.JPG

 

To use the MIDI Windchimes program:

1 Make the connections between the Atari8, MIDI interface, and synthisizer. Paddles in port 1.

2 Boot up computer with a disk with your choice of DOS and M: device handler(AUTORUN.SYS)

3 RUN "Dn:MIDIWIND.BAS"

   (The program will start sending MIDI data on Channel 1(change line 30010 for different channels)

4 Adjust the Paddles to change the maximum values for velocity and delay time.

   (the paddles are checked every cycle of the delay loop.  To compensate for the jitter of the joystick reading, the joysticks values have to change by 3 before new max values are set.)

 

 This program is not optimized for your MIDI synth, its not for mine. Noteoff commands are not used so it will work best for percussion type instruments.

 

In line 3200 the root note for the pentatonic scale is defined. Sequential notes are calculate by adding the semitones to produce a minor scale.  60 = C4, 72 = C5.

 

 

1 REM MIDI WIND CHIMES v2.0 4/7/2021

2 REM by Kevin Packard

3 REM

4 REM simulates windchimes in Cmin.

5 REM Randomly selects tone, velocity

6 REM and duration. Max VEL and DELAY

7 REM are set using PADDLE(0)&(1).

8 REM

9 REM Requires MIDIMAX type interface

10 REM paddles, MIDI Sound device,

11 REM and loaded M: device handler.

12 REM

13 REM

100 GOSUB 30000:REM set up variables

200 REM start of main loop

210 MIDINOTE=TONE(INT(RND(0)*6)+1)

220 POSITION 3,9:? #6;"MIDI NOTE = ";MIDINOTE;"  "

230 VEL=INT(RND(0)*(P0*0.5))+10

240 POSITION 4,11:? #6;"VELOCITY = ";VEL;"  "

250 DELAY=INT(RND(0)*P1)

260 PUT #1,CMD:PUT #1,MIDINOTE:PUT #1,VEL:REM output midi data

300 REM delay loop / read paddles

310 FOR X=0 TO DELAY

320 POSITION 1,13:? #6;"DELAY COUNT = ";DELAY-X;"  "

330 IF ABS(228-PADDLE(0)-LASTP0)<3 AND ABS(228-PADDLE(1)-LASTP1)<3 THEN 390

340 P0=228-PADDLE(0):P1=228-PADDLE(1)

350 LASTP0=P0:LASTP1=P1

360 POSITION 2,17:? #6;"P0-MAX VEL   =";P0;"  "

370 POSITION 2,19:? #6;"P1-MAX DELAY =";P1;"  "

380 POKE 77,0:REM reset atract mode

390 NEXT X

400 GOTO 200

29999 REM set up parameters

30000 GRAPHICS 17:POSITION 2,4:? #6;"MIDI WIND CHIMES"

30010 CMD=144:REM noteon command+channel-1

30020 DIM TONE(6):TONE(1)=60+12

30030 TONE(2)=TONE(1)+3

30040 TONE(3)=TONE(2)+2

30050 TONE(4)=TONE(3)+2

30060 TONE(5)=TONE(4)+3

30070 TONE(6)=TONE(5)+2

30080 P0=50:P1=P0:LASTP0=P0:LASTP1=P0

32010 CLOSE #1

32020 OPEN #1,13,0,"M:"

32030 XIO 40,#1,0,0,"M:"

32040 RETURN

 

 

Program and M: device (AUTORUN.SYS)

MIDIWIND.atr



3 Comments


Recommended Comments

16 minutes ago, Allan said:

Cool. Do you think this would work with MidiMate as well?

I'm 99% sure it would. If your interface works with MIDI Music System or MIDI Track III then it should work. 

Share this comment


Link to comment

I will give it a try but it will take a while since I am still working on archiving DarkLord's Current Notes magazines. I have a midimate plus a Casio CZ-1000. Hybrid Arts made both programs plus the Midimate, your are probably write.

  • Like 1

Share this comment


Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...