Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / having prob making a cd player :(

Author
Message
iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 10th Jul 2003 09:09
a lot of coding but oh well
am i using this syntax right?
i also need to know how to use volume in there later
plz help
im lost
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 10th Jul 2003 11:14
at the beggining when you are doing 1=d,2=d,3=d etc swop them round so its d=1,d=2,d=3 etc
also music volume() isn't a command in dbc but it might be in pro?
in the last 2 reminders because you trying to show a variable that isn't a string you need to do them like this

center text 320,230,"The current track that is playing is "+str$(d)
center text 320,260,"The current volume of the track is "+str$(e)

thats pretty much it

hi guys
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 10th Jul 2003 12:00 Edited at: 10th Jul 2003 12:17
for i=1 to 20
if music playing(i)=1 then d=i
next i

is a lot less work, but you don`t need to do that anyway.

you need to use load cdmusic to load the track

ink rgb (1000,1000,1000,),0 is gibberish, you can only go up to rgb(256,256,256) (256*256*256=16777216 colours)

you have a$ and b$ but they don`t have values since you never made them equal anything

this would play track one and do all the checks you need to play a cd properly.

song=1:rem song your gonna play
Tracks= get number of cd tracks():rem er...gets the number of tracks on the cd
if Tracks>0:rem if you can`t find tracks then seems fair to assume no cd is there
rem else the CD is present, play a track
load cdmusic Tracks, song: rem load track one for playback
loop music song :rem and as long as nobody presses space then just play that track over and over
rem User prompt to continue
center text screen width()/2,screen height()/2,"HIT ANY KEY"
wait key
rem Stop and delete CD music
stop music song
delete music song
endif

this was roughly adapted from the help file, just go into help and select the help files for the cd commands and then look at the usage example (this is cut down to clarify things a little), cheers

Mentor.

iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 12th Jul 2003 03:27
THX A LOT! but ill be back

iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 12th Jul 2003 03:35
ok that worked, THANK U FOR THE TIME SAVING LOOP!!!!
but... i dont know how to work the volume one bit

iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 12th Jul 2003 04:00 Edited at: 12th Jul 2003 04:01
I dont have DBPro. It's the trial version. but im getting DB for my birthday. The newbie package.
B-Day=July 28th

ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 12th Jul 2003 10:37
ok this will show you how to change the volume of sounds


and this for music



the 2nd one is the one you want and the command is

set music volume musicnumber,volume

the default value is 100 and it is done in percentages so if the volume was 50 it would be 1/2 as quiet as normal and if the volume was 200 it would be twiice as loud as normal.

***Ordered Dbpro today(friday)****
Lets see how quick amazon really are!!!
iammesol
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location:
Posted: 12th Jul 2003 20:25
thx but i want stuff like


Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 12th Jul 2003 22:28
if returnkey() and (music volume(1)=100) then set music volume 1,200

is the correct command (this is for music 1) BUT it will only double the volume if volume is EXACTLY 100, to get the volume to increase if the current volume is more than 100 then you do

if returnkey() and (music volume(1)>=100) then set music volume 1,200

the >= means greater than or equal too, cheers.

Mentor.

Login to post a reply

Server time is: 2024-11-24 22:42:15
Your offset time is: 2024-11-24 22:42:15