Sonic and Sega Retro Message Board: In which I am apparently retarded at Atari BASIC. - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Page 1 of 1
    Locked
    Locked Forum

In which I am apparently retarded at Atari BASIC. or this thing is broken like wtf even

#1 User is offline Lobotomy 

Posted 29 March 2014 - 06:08 PM

  • 35% Cognac
  • Posts: 4397
  • Joined: 22-March 06
  • Gender:Male
  • Location:Traverse City
  • Project:Project: Matter/Energy
  • Wiki edits:94
I'm playing with the Atari 8-bit family of computers so I can get back into the realm of programming.

What I have below is a series of PRINT loops associated with 3 SOUND tones. Basically I have two descending tones, and one that I'm just fucking with (50). One of the PRINT commands counts the number of tones being played, whilst the second counts how many times the program has looped. Line 100 is unused.

10 FOR A=0 TO 255
20 FOR B=0 TO 64
30 PRINT B
40 PRINT A
50 SOUND 1,A/2^4,10,10
60 SOUND 3,B,14,15
70 SOUND 0,B,12,10
80 NEXT B
90 NEXT A
100 SOUND 0,0,0,0



The SOUND parameters are in order by tone, pitch, distortion, volume.

Can someone explain to me how to get a rising pitch in this bullshit? Any expression so far that I put in the second parameter in SOUND lowers in pitch iteratively. I've tried different variables in an additional STEP command for lines 10 and 20, but to no avail.
This post has been edited by Lobotomy: 29 March 2014 - 09:19 PM

#2 User is offline Aerosol 

Posted 29 March 2014 - 06:42 PM

  • FML and FU2
  • Posts: 10148
  • Joined: 27-April 08
  • Gender:Male
  • Location:Not where I want to be.
  • Project:Sonic (?): Coming summer of 2055...?
Maybe 0 is...the maximum? I dunno what I'm talking about.

#3 User is offline Cooljerk 

Posted 31 March 2014 - 11:32 AM

  • NotEqual Tech, Inc - VR & Game Dev
  • Posts: 4198
  • Joined: 06-April 06
  • Gender:Male
  • Wiki edits:9
I haven't worked with atari basic in yeeeeeears. Try this:

10 FOR B=0 TO 64 STEP +0.2:SOUND 3,B,14,15:NEXT B

see if that single line works, then try expanding from there.

EDIT: Wrote that from memory but looking around online it looks correct. I have a huge reference manual for atari basic at home, if the above doesn't work I'll try looking up their SOUND examples and posting some code later, just drop a line to remind me.
This post has been edited by Cooljerk: 31 March 2014 - 11:59 AM

#4 User is offline Lobotomy 

Posted 31 March 2014 - 07:32 PM

  • 35% Cognac
  • Posts: 4397
  • Joined: 22-March 06
  • Gender:Male
  • Location:Traverse City
  • Project:Project: Matter/Energy
  • Wiki edits:94
Nope, the pitch descends.

EDIT: Whoop, all I had to do was reverse the equation. Wouldn't work on the original code though. Weird.

10 FOR B=64 TO 0 STEP -0.2:SOUND 3,B,14,15:NEXT B

Thanks for the help, I'll keep this thread open because I'm going to invariably fuck up again.
This post has been edited by Lobotomy: 31 March 2014 - 07:43 PM

Page 1 of 1
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users