Frequency (super simple fun!)

Post Reply
DrChip
Posts: 167
Joined: Wed Oct 22, 2014 3:26 pm
My devices: iPhone 4 to 6+,iPad mini to iPad air 2

Frequency (super simple fun!)

Post by DrChip »

Code: Select all

REM frequency



'g'
init:
GRAPHICS
sw=SCREEN_WIDTH()
sh=SCREEN_HEIGHT()
noise=100
sections = 100
''
'b'
LOOP:
GRAPHICS CLEAR 0,0,0
REFRESH OFF
GOSUB hud 
   x=sw/2!y=0
   DRAW LINE x,0 TO x,0
   FOR y = 0 TO sh STEP sh/sections
      DRAW LINE TO x+RND(noise),y
   NEXT y
REFRESH ON
GOTO LOOP
END
''
'r'
hud:
DRAW TEXT "X: "&x AT 0,0
DRAW TEXT "Y: "&y AT 0,20
DRAW TEXT "NOISE: "&noise AT 0,40
DRAW TEXT "SECTIONS: "&sections AT 0,60
RETURN
''
Attachments
IMG_0482.PNG
IMG_0482.PNG (385.66 KiB) Viewed 1836 times
IMG_0481.PNG
IMG_0481.PNG (570.72 KiB) Viewed 1836 times
IMG_0480.PNG
IMG_0480.PNG (400.89 KiB) Viewed 1836 times
IMG_0478.PNG
IMG_0478.PNG (346.1 KiB) Viewed 1836 times
IMG_0477.PNG
IMG_0477.PNG (361.73 KiB) Viewed 1836 times

Henko
Posts: 816
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

Re: Frequency (super simple fun!)

Post by Henko »

I don't HEAR the noise ? ;)

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Frequency (super simple fun!)

Post by rbytes »

I agree. I think a great cmbination could be made of the code in this post and another recent post called Frequency that has an adjustable oscillator.

What the heck, not much to do this Labor Day weekend. I will post it today.
The only thing that gets me down is gravity...

Post Reply