Path: news.uiowa.edu!hobbes.physics.uiowa.edu!math.ohio-state.edu!magnus.acs.ohio-state.edu!freenet.columbus.oh.us!not-for-mail From: dalloff@freenet.columbus.oh.us (Dave Althoff) Newsgroups: comp.sys.apple2 Subject: Re: Can GS be used as a metronome? Date: 1 Jun 1995 01:57:08 -0400 Organization: The Greater Columbus Freenet Lines: 28 Message-ID: <3qjkrk$j0d@acme.freenet.columbus.oh.us> References: <3qim7u$ts@cello.gina.calstate.edu> NNTP-Posting-Host: acme.freenet.columbus.oh.us X-Newsreader: TIN [version 1.2 PL2] Of course it can! The easiest way is to just write a BASIC routine with a timing loop to provide a click at intervals. Something like... REM works on ANY Apple ][! 60000 S=PEEK(-16336)+PEEK(-16336):TM=DL 60001 K%=PEEK(016384):ON K%>128 GOTO 60002:TM=TM-1:ON TM=0 GOTO 60000:GOTO 60001 60002 POKE -16368,0:RETURN Where DL is the time delay between clicks. The delay will generally be consistent, but you'll have to experiment with values. In English, the routine looks more like this... 60000 CLICK SPEAKER:LET COUNTER=CONSTANT 60001 READ KEYBOARD:IF KEY PRESSED GOTO 60002:DECREMENT COUNTER:IF COUNTER HAS RUN OUT, GOTO 60000. OTHERWISE, GOTO 60001 60002 SINCE KEY WAS PRESSED, CLEAR KEYBOARD AND RETURN. There's your start. Now have at it! --Dave Althoff, Jr. -- /-\ _ _ __ *** .SIG NOW OPEN!!!! *** /XXX\ /X\ /X\_ _ /XX\_ _ _ _____ /XXXXX\ /XXX\ _/XXXX\_ /X\ /XXXXX\ /X\ /X\ /XXXXX _/XXXXXXX\__/XXXXX\/XXXXXXXX\_/XXX\_/XXXXXXX\__/XXX\_/XXX\_/\_/XXXXXX