Qbasicnews.com
July 05, 2020, 07:13:58 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: 1 ... 3 4 [5]
  Print  
Author Topic: Sound Wave Bar.....  (Read 22815 times)
Mitth'raw'nuruodo
Ancient Guru
****
Posts: 515



WWW
« Reply #60 on: April 10, 2005, 07:38:20 PM »

no that was a question, I really don't. :-?
Logged

i]"But...it was so beautifully done"[/i]
Rattrapmax6
__/--\__
*****
Posts: 2577



WWW
« Reply #61 on: April 11, 2005, 09:11:36 PM »

You serious? I broke apart the code, it looks more like ya ment it, or saw what it was doing and centered it... but its right here thats doing it...

PSET (((i% + amp) * SIN(r% * 3.141593 / 180)) + 160, ((r% + amp) * SIN(i% * 3.141593 / 180)) + 100), (i% MOD 255)

And this seems to be the code you might have been shooting for.. :wink:

Code:
SCREEN 13
amp = 10
DO
 r% = (r% + 1)
 IF r% = 200 THEN r% = -120
 FOR i% = 1 TO 360
    PSET (i%, ((r% + amp) * SIN(i% * 3.141593 / 180)) + 100), (i% MOD 255)
 NEXT i%
 WAIT &H3DA, 8
 CLS
LOOP


Your orrig still counts, except its under both you and Shift's, since he modified it to 8 lines 4 ya... :wink:
Logged

Kevin (x.t.r.GRAPHICS)

Mitth'raw'nuruodo
Ancient Guru
****
Posts: 515



WWW
« Reply #62 on: April 12, 2005, 05:27:15 PM »

No your wrong.
That was intentional what I did (it was a ripple effect)
But then I decided to switch the radii and make both sin instead of x cos and y sin.
Then I saw it looked like your thing in here so I posted it.
But I was asking why it was looking 3D. :wink:
Logged

i]"But...it was so beautifully done"[/i]
Kylemc
Guru
**
Posts: 291



WWW
« Reply #63 on: April 15, 2005, 05:06:26 PM »

Thought you might find this interesting  Cheesy  
Found it in the old ABC packets:

[syntax="qbasic"]
DEFINT D, G
DEFLNG H
SCREEN 12
CLS
OPEN "c:\windows\media\ding.wav" FOR BINARY AS #1
s = 45
g = 0
d = 0
px = 0
py = 240
np = 0
ns = 5
WHILE NOT (EOF(1)) AND s < 300000
c = 0
h = 0
WHILE c < ns
GET 1, s, g
g = ABS(g MOD 256)
h = h + g
s = s + 1
c = c + 1
IF EOF(1) THEN END
WEND
h = h / ns
LINE (np, h + 112)-(px, py)
PSET (np, 240), 2
py = h + 112
px = np
np = np + 1
IF np > 640 THEN np = 0: SLEEP: CLS : px = 0
WEND
[/syntax]

Needless to say Windows 2k/XP users might need to change the path to winnt\media\ .

[/code]
Logged
Rattrapmax6
__/--\__
*****
Posts: 2577



WWW
« Reply #64 on: April 15, 2005, 07:17:07 PM »

Sad To others, but I have no sound support,.......
Logged

Kevin (x.t.r.GRAPHICS)

Kylemc
Guru
**
Posts: 291



WWW
« Reply #65 on: April 16, 2005, 06:06:28 AM »

Have you actually run it? It doesn't play sound. It displays WAV files in a graphical form.
Logged
TheDarkJay
I hold this place together
*****
Posts: 913



WWW
« Reply #66 on: April 16, 2005, 06:47:21 AM »

Quote from: "Mitth'raw'nuruodo"
Mabey in FB but the default in QB is SCREEN 0, which is text mode.

The graphics statements like PSET don't work in text mode.

thnx lynax. Cheesy


I was using qb 4.5
Logged

url=http://www.sloganizer.net/en/][/url]
Kylemc
Guru
**
Posts: 291



WWW
« Reply #67 on: April 16, 2005, 07:55:06 AM »

You must have hit F5 after you deleted the SCREEN 13, instead of shift+F5 to restart it.
Logged
TheDarkJay
I hold this place together
*****
Posts: 913



WWW
« Reply #68 on: April 16, 2005, 08:03:50 AM »

No, i didn't. Hmm, maybe qb bugged a little or something and didn't restaert even though i told it to.

Well, i don't have qb to worry about anymore. i now am a part of the FB community. Porting the forest demo is going to be a HELL load of work.
Logged

url=http://www.sloganizer.net/en/][/url]
Mitth'raw'nuruodo
Ancient Guru
****
Posts: 515



WWW
« Reply #69 on: April 16, 2005, 09:33:13 AM »

:barf:
Logged

i]"But...it was so beautifully done"[/i]
Rattrapmax6
__/--\__
*****
Posts: 2577



WWW
« Reply #70 on: April 16, 2005, 11:29:53 AM »

Quote from: "Kylemc"
Have you actually run it? It doesn't play sound. It displays WAV files in a graphical form.


 :lol: No, Now I see,.. cool!! Cool
Logged

Kevin (x.t.r.GRAPHICS)

Pages: 1 ... 3 4 [5]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!