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.

Program Announcements / PCSpeaker - A fun little Melody app

Author
Message
Jess T
Retired Moderator
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 17th Aug 2004 22:30
Greetings!

PCSpeaker is a little app I made over about 3 nights while catching up on things I had missed in the two weeks I was gone, and boy-o-boy it was fun to make this!

The idea behind the application is that it uses the PC Speaker ( the one on your motherboard ) to make "beeps". I have then extended the idea so that it can read a file in, and play a little tune, which sounds alot like those old Monophonic ringtones for mobile phones.

I know, you're probably thinking, "Pfft, what a waste of time!" But, give it a chance, it's actually quite cute :p

There's no screeny's to show you, as the entire program involves about 3 prompts.

Also, as the tunes sound so remarkably like Ringtones, I created a converter that can take almost any valid RTTTL ringtone format and convert it into my own .pcs format for use with the PCSpeaker app

To Download PCSpeaker, go Here ( ~625KB )

If you want to get some more of your own tunes, a good site to get free RTTTL ringtones to be converted for use with PCSpeaker is http://www.free-ringtones.uk.com/free-nokia-ringtones-0-9.html
But, there's plenty more out there!

Also, if you feel a sound doesnt quite come out right, you can check what the RTTTL tune should sound like Here. ( There are some stray notes and other odd happenings that I haven't quite worked out as yet )

I must note that the minimum OS for this is Win NT and above, as it makes use of an API function which was not available previous to NT.

With the .rar file, is a README.txt file... Read it! It eplains everything in there so you can't get confused!

Enjoy!
Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Manticore Night
20
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 18th Aug 2004 03:44
I got into the first screen, but it won't let me type.

It's amazing how much TV has raised us. (Bart Simpson)
eat much pie
20
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 18th Aug 2004 04:47
same here


Checkpoint Router: my very own AI routing program: http://eatmuchpie.dbspot.com
Sam Wright
Jess T
Retired Moderator
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 18th Aug 2004 19:56 Edited at: 18th Aug 2004 20:08
Ok, ok... Urg what a stuff up!

It was that darn issue with the window caption and the exe file name being the same, where it stops accepting all user input!
That was a hard one to debug!
Thank God for the Bug's forum!

[EDIT]
Ok, Here is the whole package that is available as stated in the previous post, since the same issue occured with both EXE's, I had to repack the lot together again;
Complete Package ( ~ 630KB )
[/EDIT]

Sorry for those that downloaded it and found that problem! And thanks be to you for reporting it

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 20th Aug 2004 04:14
I'm guessing it wasn't made in DB.
I wrote a few songs out in QB that used the pc speaker. One was metallica's "master of puppets", and i forget the other ones. Oh, and I had QB source code somewhere that allowed you to play the sound in the background.

"eureka" - Archimedes
Jess T
Retired Moderator
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 21st Aug 2004 10:07
Phaelax, It's made in DBP
Can't you tell by the DBP icon on the exe's? lol.

Also, how can the sound play "in the background" through the PC Speaker? You can't control the volume as far as I'm aware...

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 23rd Aug 2004 15:07
How'd you send signals to the speaker in DB? There's no support for that.
Volume has nothing to do with playing the sound in the background. I don't remember how its done, but I believe the original coder used some sort of register access in QB.

"eureka" - Archimedes
Jess T
Retired Moderator
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 24th Aug 2004 10:47
lol Phaelax, I just did a call to a Win API function

Not too hard, just call the function with the required frequency and length in milliseconds, and voila!

What exactly do you mean when you say playin in the "background"?

Jess.

PS anyone else tried this? 'Tis quite good I say


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Hell Dragonz43
19
Years of Service
User Offline
Joined: 27th Jul 2004
Location: at home or at work
Posted: 24th Aug 2004 11:23
Could u post an example of calling that win API function? Thanks.


www.freewebs.com/mycomputergames
QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 24th Aug 2004 15:48
It just gives me a black screen then quits out

Jess T
Retired Moderator
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 24th Aug 2004 17:50 Edited at: 24th Aug 2004 17:51
Quoth,

Hmmm, have a look in the exe dir, and see if there's a file called Crash_On_[date].txt, and if so, can you tell me the contents of that file please?

Dragonz43,

Sure, why not?


That's just a really simple example, but you can build on it just as I have if you want to

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Hell Dragonz43
19
Years of Service
User Offline
Joined: 27th Jul 2004
Location: at home or at work
Posted: 25th Aug 2004 11:56 Edited at: 25th Aug 2004 11:57
I dont mean to sound rude or anything. But WHY THE HECK does it say delete DLL? Is this some kinda trick??? WHy does it delete that DLL? Thats a important system DLL. But besides that... This program is cool!


www.freewebs.com/mycomputergames
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 25th Aug 2004 12:48
I thought you said somewhere that the window is frozen while the sound played. If so, then that means the sound code is in the foreground. Nothing can happen until it finishes its routine. If it was in the background, other code would be executed.

"eureka" - Archimedes
Jess T
Retired Moderator
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 25th Aug 2004 13:27
Dragonz43,
Delete DLL simply unloads the DLL from the app's memory, it doesn't actually delete the DLL.

Phaelax,
Hmm, ok... From my source, when the "Beep" function is called, it doesn't give control to the calling window again untill the sound is finished doing what it's doing.

If I could get that code, that would be really, really nice Phaelax, as I am involved in a little project with a friend of mine where the PC Speaker was a major part.

Thanks
Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Hell Dragonz43
19
Years of Service
User Offline
Joined: 27th Jul 2004
Location: at home or at work
Posted: 25th Aug 2004 14:00
Ohhhhhhhhhhh... LOL. thanks.


www.freewebs.com/mycomputergames
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 25th Aug 2004 21:31
yah i did some music in QB as well...mostly star wars and pirates of the carrabien(spelled wrong)..using piano sheet music to get the melody(it can only play one note at a time...)

"We make the worst games in the universe."
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 26th Aug 2004 02:48 Edited at: 26th Aug 2004 02:52
Quote: "I dont mean to sound rude or anything. But WHY THE HECK does it say delete DLL? Is this some kinda trick??? WHy does it delete that DLL? Thats a important system DLL."


You're quick to make assumptions j/k

Jess:

Very nice code! very nice indeed

Although the app itself silently quits on me at startup. THere's no crash_on file.

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Yart
19
Years of Service
User Offline
Joined: 23rd Jun 2004
Location: Turkey Sandwich
Posted: 26th Aug 2004 11:40 Edited at: 26th Aug 2004 11:40
WHOA! THAT IS FRICKEN AWESOME! I LOVE PC SPEAKER SOUNDS!

I wanna be the first to invent Surround Sound for PC Speakers where the sound comes from 4 different directions... LOL!

Pie!
Jess T
Retired Moderator
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 27th Aug 2004 14:22
Thanks David

I'll have to have a look at the code again and see why it is that it is that it doesn't run...

Yart,
Did you get the app itself to work, or just the code?

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Jess T
Retired Moderator
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 28th Aug 2004 16:01
Ok,
For those of you that the PCSpeaker.exe file was quiting silently on, I have updated the package to fix this...

It's available at the same location as before, Here

This should clear some things up. If it doesn't, and it still silently crash's on you, then post it up and I'll have another look at what's wrong.

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Jess T
Retired Moderator
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 29th Aug 2004 00:56
Ok, here's an update on the RTTTL-pcs converter:

I have fixed the note lenght issue.
Fixed the issue with the tempo.
Fixed the issue with the actual notes.
Rewrote the string parser for the converter.

There is still a bug where the converter writes a null sound instead of a proper note... I can't seem to pin point what's wrong though, so watch this space!

Also, with this update, I have redone all the example files, so those that have downloaded it, I suggest haveing a listen to the new ones, because they do sound 110% better.
And, those of you who haven't downloaded PCSpeaker, well, what's with you?

You can get the updated coverter Here. ( ~210KB )
And the full package Here. ( ~610KB )

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 29th Aug 2004 04:44 Edited at: 29th Aug 2004 04:49
lol...i didn't read the "readme" file and i got the funny message

you have the voyager song in there!!!!! my family watched every single voyager! and that was the only tv we watched...

that music makes me want to cry...brings back so many memories

(BTW the docter is my favourite character )

"We make the worst games in the universe."
Jess T
Retired Moderator
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 29th Aug 2004 12:25
Peter_H,
I'm glad you like it

You can make your own files too if you want

Also, if anyone does make their own .pcs files, post them up for all to see

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 29th Aug 2004 21:59
Aaaah, yes Voyager. They still how it on Sky but I've seen them all

Jess: I'll try later. Not on my dev pc atm.

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 29th Aug 2004 22:35 Edited at: 29th Aug 2004 22:36
how do i make my own? i would like to make a complete version of the voyager theme song...(of course i could always just write it in qbasic...but then there's all the messy dos stuff...i like this because i can just click on the file and run it)

"We make the worst games in the universe."
Jess T
Retired Moderator
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 29th Aug 2004 22:46 Edited at: 29th Aug 2004 23:19
Ah, well, it's not quite "make your own", more of "convert one from RTTTL format to .pcs format useing my included RTTTL-pcs.exe converter"



I have actually had a request to have a proper GUI, with full sound adding/editing features built up for it, but TBH, I think that's a bit of a waste of time seen as about 5 people use it

Jess.

[EDIT]
Again, I must emphazise that you read the README file people! it is helpfull, but only if you READ IT.
[/EDIT]

[EDIT2]
If you know the frequency of the notes, and their lengths ( in milliseconds, which is easy enough to calculate from the bpm and the scale ), then you can just follow the pcstemplate.txt file and write it all into a file
[/EDIT2]


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 30th Aug 2004 05:39
ya...the voyager song was almost perfect...but the third to last note was too short so i fixed it...here is the correct version
Quote: "Voyager
100
1
45
554;856
369;856
739;856
698;428
554;428
554;428
622;428
622;428
554;428
932;856
739;428
32767;214
622;214
554;214
369;214
369;856
32767;214
554;214
415;214
277;214
277;856
415;428
369;1712
32767;214
369;856
415;428
466;428
493;428
554;428
587;428
659;428
739;856
493;428
739;428
783;1712
739;856
493;428
739;428
783;856
493;428
783;428
830;1140(note here was 570ms i changed it because it was too short...now it's better)
932;428
830;856
0;856"

now it is perfect though it's still missing some of the song...but at least what it has is right

"We make the worst games in the universe."
Jess T
Retired Moderator
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 30th Aug 2004 07:16 Edited at: 30th Aug 2004 21:45
heh, that sounds really nice, glad to know your getting involved a bit there [EDIT] Peter [/EDIT]

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 30th Aug 2004 07:19 Edited at: 30th Aug 2004 07:20
Quote: "heh, that sounds really nice, glad to know your getting involved a bit there Manticore

Jess.

"

huh?
did you post in the wrong thread or get my name mixed up?

"We make the worst games in the universe."
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 30th Aug 2004 07:29 Edited at: 30th Aug 2004 07:42
Um..I opened one of the .pcs files that came with pcspeaker... pointed it to pcspeaker.exe, and told it to loop 10 times, but i couldnt hear anything?

[edit] never mind, got it to work. Awesome program jess! hey also a way you can save it as "notes" (c, d, e, g,) so i can play it on the guitar/piano ? also, do you mind if i look at your source code? i wanted to make a program sort of like this but could figure out how.

Thanks, and great prog again man!

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
Jess T
Retired Moderator
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 30th Aug 2004 21:49
Peter,
D'oh, sorry, my mind was else where when I posted that, wont happen again

Homie,
I could quite easily save it as notes, but you'll have to tell me the exact format and how to distinguish between octaves etc, otherwise, I might just confuse you

The source code, I wont release, not just yet, but here is a simple example of how to do it:

Should work in both DBC and DBP.

The rest of the program is simply reading in the file and storing the notes then sending that to the function - You can figure that out

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 30th Aug 2004 22:54
could you just tell me what frequencies are which notes?
i.e.

middle c is "c"
to go up an octave add a 1(i.e. c1 is one octave up from middle c)
to show negative octaves use "-"(i.e. -c1 is one octave below middle c)

"diagram"
---------(middle c)------------
---------------c---------------
----------------d--------------
-----------------e-------------
------------------f------------
-------------------g-----------
--------------------c1---------

"We make the worst games in the universe."
Indian Homie G
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 31st Aug 2004 14:25
Format, I dont care, and if i know the tunes i could probably figure it out, Ive been playng piano for a looooong time and if ive heard the song i could probably distinguish the octave

AMD Athlon XP 3000+, S3 Deltachrome s8, 512 PC3200 RAM, 160 GB HD
ToXic
21
Years of Service
User Offline
Joined: 8th Sep 2002
Location: Australia
Posted: 31st Aug 2004 18:02
Had a lot of fun with this,
Thank you.

ToXic.
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 31st Aug 2004 23:16 Edited at: 31st Aug 2004 23:16
yeah same as homie g...want to know the notes for piano...

"We make the worst games in the universe."
Jess T
Retired Moderator
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 1st Sep 2004 00:29
Homie & Peter,
I'll do that as soon as I have the time ( TBH, it should only take me abotu 10 minutes, but I am anticipating lots of bugs so it will take longer )

Toxic,
Thanks I'm glad you enjoyed it! Be sure to tell your friends!

Have a great time everyone

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
BearCDPOLD
20
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 3rd Sep 2004 08:17
Haha, I love that little Austin Powers one.

This is really cool Jess.

Crazy Donut Productions, Current Project: Project Starbuks
Sony stole our name!

Login to post a reply

Server time is: 2024-05-19 15:13:34
Your offset time is: 2024-05-19 15:13:34