Page 1 of 1
Color Circle screen saver thing (iPad/iPhone)
Posted: Wed Feb 18, 2015 3:26 am
by Dav
Had a few moments today to make a small screen saver thing. Not very advanced, but looks colorful and plays random background music. Touching screen will clear screen.
- Dav
Code: Select all
'Circle screen saver thing.
'Touch screen to clear and reset.
'Works in portrait or lanscape mode.
'For iphone or ipad
'Coded by Dav
graphics
shadow on
main:
x=screen_width()/2
y=screen_height()/2
graphics clear 0,0,0
s$="" 'generate random notes
for o = 1 to 800
s$=s$&chr$(63+rnd(7))&str$(5+rnd(2))&"r"
s$=s$&str$(12+rnd(2))&":"
next o
notes set "13:q"&s$
notes play
do
v = rnd(100)+5
for t = 1 to x
x1 = (cos(t)*z) + x
y1 = (sin(t)*z) + y
fill color r/255,g/255,b/255
fill circle x1,y1 size z/v
z=z+1 ! if z > x*2.1 then z = 1
r=r+1 ! if r> 255 then r=rnd(255)
g=g+1 ! if g> 255 then g=rnd(255)
b=b+1 ! if b> 255 then b=rnd(255)
if screen_width()<>x*2 then main
if touch_x(0) <>-1 then main
next t
until 0
Re: Color Circle screen saver thing (iPad/iPhone)
Posted: Wed Feb 18, 2015 10:45 am
by Dutchman
Beautifull display
Music needs some extra design
Re: Color Circle screen saver thing (iPad/iPhone)
Posted: Wed Feb 18, 2015 11:11 am
by Mr. Kibernetik
Let's add this program to sB program samples!
It has all features of a good sample program:
- it supports both iPad and iPhone
- it is short and light
- it is nicely coded
- it is beautiful
Re: Color Circle screen saver thing (iPad/iPhone)
Posted: Wed Feb 18, 2015 9:06 pm
by Dav
Glad you like it! Yes the music needs work.
It was a last minute addition. I wrote this music today to make up for it. Is there a way to play two instruments at once?
- Dav
Code: Select all
'background music by Dav
i$="46:" 'instrument number...
'A section
a$="i(a3e5ca4)d5e(fdb3)e5d(ca4ec4)bc5(db4e#)c5b4"
a$=a$&"(aec4)e5a(e4a3)(e5c#)gq(fa4d)(d5a4f)(a4fd)"
a$=a$&"i(daf5)ed(da4f5)e5dq(ea4c)e(aec5)"
a$=a$&"i(b4g#e)c5d(b4g#)d5fq(eb4g#e)ief#(eg#)b"
a$=a$&"i(e5ca4)d5e(fdb4)e5d(ca4e)bc5(db4e#)c5b4"
a$=a$&"(aec4)e5a(e4a3)(e5c#)gq(fa4d)(d5a4f)(a4fd)"
a$=a$&"i(afd5)e(fda4)g5q(afd)i(ca4e)d5(eca4)f5(eca4)"
a$=a$&"r(bg#d5)e4(eg#be5)e4(g#5edb4e)e4q(a5eca4)ea3"
'B section
b$="i(g5ec4)g(f5dc4)g(e5cc4)g(gbd5g3)(e5c)q(df)sg3aba"
b$=b$&"i(g3f5d)g4(g3e5c)g4(bd5g3)g4(ce5c)(df)q(ceg)"
b$=b$&"sg4fed"
b$=b$&"i(g5ec4)g(f5dc4)g(e5cc4)g(gbd5g3)(e5c)q(df)sg3aba"
b$=b$&"i(g3b4gd5)(e5c)q(fdb3)(g3f4gb)(cegc5)g3i(a#4gecc3)e"
'C section
c$="i(c4aff3c5)(ff4a)(ca5ff4)(c7a6)(a6f)(c5c4af)"
c$=c$&"i(c4aff3c5)(ff4a)(ca5ff4)(c7a6)(a6f)(c5c4af)"
c$=c$&"i(a#gecc5)(ege4)q(a#5gc5e4)(a#5d6g4e)"
c$=c$&"i(ega#5d6)(c6a6f5)q(caf)s(c6a5)(a#g)(af)(ge)"
c$=c$&"i(c4aff3c5)(ff4a)(ca5ff4)(c7a6)(a6f)(c5c4af)"
c$=c$&"i(c4aff3c5)(ff4a)(ca5ff4)(c7a6)(a6f)(c5c4af)"
c$=c$&"(bfdb4)a(bfdb4)c5(df4ac)d#5q(eb4g#ee3)"
c$=c$&"i(e5e4e3)(d5d4d3)(c5c4c3)(b4b3b2)"
'build song, ABCA format...
m$=a$&b$&c$&a$
'play song
notes set i$&m$
notes play
'loop until music stops playing
do
until notes_time() => notes_length()
Re: Color Circle screen saver thing (iPad/iPhone)
Posted: Thu Feb 19, 2015 4:01 am
by Mr. Kibernetik
Dav wrote:Is there a way to play two instruments at once?
Yes, each track can play its own instruments.
Please look at "notes.txt" sample program in Music & Sound section - it plays two tracks.
Re: Color Circle screen saver thing (iPad/iPhone)
Posted: Thu Feb 19, 2015 7:05 am
by Mr. Kibernetik
This plays this wonderful music with all instruments. Very long play...
Code: Select all
'background music by Dav
inst=0
loop:
text clear
print "Instrument:";inst
i$=inst&":" 'instrument number...
'A section
a$="i(a3e5ca4)d5e(fdb3)e5d(ca4ec4)bc5(db4e#)c5b4"
a$=a$&"(aec4)e5a(e4a3)(e5c#)gq(fa4d)(d5a4f)(a4fd)"
a$=a$&"i(daf5)ed(da4f5)e5dq(ea4c)e(aec5)"
a$=a$&"i(b4g#e)c5d(b4g#)d5fq(eb4g#e)ief#(eg#)b"
a$=a$&"i(e5ca4)d5e(fdb4)e5d(ca4e)bc5(db4e#)c5b4"
a$=a$&"(aec4)e5a(e4a3)(e5c#)gq(fa4d)(d5a4f)(a4fd)"
a$=a$&"i(afd5)e(fda4)g5q(afd)i(ca4e)d5(eca4)f5(eca4)"
a$=a$&"r(bg#d5)e4(eg#be5)e4(g#5edb4e)e4q(a5eca4)ea3"
'B section
b$="i(g5ec4)g(f5dc4)g(e5cc4)g(gbd5g3)(e5c)q(df)sg3aba"
b$=b$&"i(g3f5d)g4(g3e5c)g4(bd5g3)g4(ce5c)(df)q(ceg)"
b$=b$&"sg4fed"
b$=b$&"i(g5ec4)g(f5dc4)g(e5cc4)g(gbd5g3)(e5c)q(df)sg3aba"
b$=b$&"i(g3b4gd5)(e5c)q(fdb3)(g3f4gb)(cegc5)g3i(a#4gecc3)e"
'C section
c$="i(c4aff3c5)(ff4a)(ca5ff4)(c7a6)(a6f)(c5c4af)"
c$=c$&"i(c4aff3c5)(ff4a)(ca5ff4)(c7a6)(a6f)(c5c4af)"
c$=c$&"i(a#gecc5)(ege4)q(a#5gc5e4)(a#5d6g4e)"
c$=c$&"i(ega#5d6)(c6a6f5)q(caf)s(c6a5)(a#g)(af)(ge)"
c$=c$&"i(c4aff3c5)(ff4a)(ca5ff4)(c7a6)(a6f)(c5c4af)"
c$=c$&"i(c4aff3c5)(ff4a)(ca5ff4)(c7a6)(a6f)(c5c4af)"
c$=c$&"(bfdb4)a(bfdb4)c5(df4ac)d#5q(eb4g#ee3)"
c$=c$&"i(e5e4e3)(d5d4d3)(c5c4c3)(b4b3b2)"
'build song, ABCA format...
m$=a$&b$&c$&a$
'play song
notes set i$&m$
notes play
'loop until music stops playing
do
until notes_time() => notes_length()
pause 1
inst+=1
if inst <= 118 then loop
Re: Color Circle screen saver thing (iPad/iPhone)
Posted: Sat Feb 21, 2015 3:34 pm
by dE.niz
Hi Dav
I have also made a loop for you today.
It is a MP3 file made with my synths and Daw
let me please know wat you think
i can make many more so ask me.
dE.niz
Re: Color Circle screen saver thing (iPad/iPhone)
Posted: Sat Feb 21, 2015 11:08 pm
by Dav
dE.niz wrote:Hi Dav
I have also made a loop for you today.
It is a MP3 file made with my synths and Daw
let me please know wat you think
i can make many more so ask me.
dE.niz
Hi dE.niz! Thank you for the looping music. That's really nice! I think the style fits the screen saver well. I'm also into music, syths & DAW's. The music apps available for iPad are great.
I appreciate your generosity. Thanks!
- Dav