flat assembler
Message board for the users of flat assembler.

Index > Windows > How to produce sound on PC Speaker ?

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
sylwek32



Joined: 27 Apr 2006
Posts: 339
sylwek32
Hello FASMers Very Happy

Got a new question..

How can i generate sounds with FASM on a PC Speaker ?

e.G.

- a KICK Drum (very simple)
- a SNARE Drum (very simple)
- or a SAW synthie sound...

Please help me..

PS: I can give you webspace if you want
Post 10 Jun 2006, 21:29
View user's profile Send private message Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
Post 10 Jun 2006, 21:37
View user's profile Send private message Visit poster's website Reply with quote
sylwek32



Joined: 27 Apr 2006
Posts: 339
sylwek32
sorry.. you havnt understand me..

i mean the INTERNAL PC SPEAKER which is on every pc´s board and produces the beep on the bootup post process..
Post 10 Jun 2006, 22:03
View user's profile Send private message Reply with quote
UCM



Joined: 25 Feb 2005
Posts: 285
Location: Canada
UCM
Well, as far as I know, Windows provides very very few facilities for creating sounds on the PC speaker. Maybe a series of Beeps and Sleeps could work, but would be very complicated.
Post 10 Jun 2006, 22:27
View user's profile Send private message Reply with quote
sylwek32



Joined: 27 Apr 2006
Posts: 339
sylwek32
Here i made a simple test wich uses the windows beep command..

But its sh|tty ^^


RAR Password is sylwek32


Description:
Download
Filename: ff.rar
Filesize: 564 Bytes
Downloaded: 52 Time(s)

Post 10 Jun 2006, 22:37
View user's profile Send private message Reply with quote
Quantum



Joined: 24 Jun 2005
Posts: 122
Quantum
2 UCM:
You get less restrictive access to PC speaker in DOS (DVM also works fine). It's possible sequencing the basic notes to make some lo-fi midi-like tunes. The only problem is timing an appripriate delay, because it depend's on CPU clock. There was a nice DOS music player in some of the older topics @ wasm.ru, but it's not available now Sad
Post 11 Jun 2006, 03:11
View user's profile Send private message Reply with quote
sylwek32



Joined: 27 Apr 2006
Posts: 339
sylwek32
wasm.ru says "due to anonimous (no one claimed responsibility) DDoS-attack made by unknown terrorists we had to move to another place. check within fortnight."

Sad

Does somebody know the new url ?
Post 11 Jun 2006, 13:26
View user's profile Send private message Reply with quote
Quantum



Joined: 24 Jun 2005
Posts: 122
Quantum
2 sylwek32:
Quote:

Does somebody know the new url ?

It's not a mirror of the old wasm, but a new forum-centric project.
Post 11 Jun 2006, 15:25
View user's profile Send private message Reply with quote
saigon



Joined: 29 May 2006
Posts: 62
saigon
I found something interesting:
http://www.cubic.org/player/screenshot.html

It looks like a very promising engine, but I haven't tested it.
It should play MP3's propably on a PC speaker (which does the beeps)
Post 11 Jun 2006, 18:13
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7721
Location: Kraków, Poland
Tomasz Grysztar
It was (and perhaps still is) a really great player for DOS, however it didn't support PC speaker as an output.

I recall the Interia Player did support PC speaker output and was said to be 100% assembly code, however the source was never released to the public.
Post 11 Jun 2006, 18:33
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
I'd suggest searching http://www.sac.sk (under /SOUND/) for something since they have lots of MOD player stuff, some with source, etc.

Or, try the following (no source, and I personally couldn't get to work):

Quote:
MP3PC.EXE 70,021 bytes DOS32

Got no sound card? MP3PC plays MP3 files through your PC speaker! For some reason I like to make programs work through the PC speaker. Some people still don't know that it's possible to play real sounds through it. Unfortunately, you must run this in pure DOS mode for it to work.
Post 11 Jun 2006, 18:58
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7721
Location: Kraków, Poland
Tomasz Grysztar
Here's some nice library: http://www.programmersheaven.com/zone10/cat135/15982.htm (pure DOS only, however, and it seems to lack the complete sources).

As for Windows, there's a driver for Win95/98/Me that allows to play samples on PC speaker:
http://support.microsoft.com/kb/q138857/

It's hard to find something with full source code, however.
Post 11 Jun 2006, 19:18
View user's profile Send private message Visit poster's website Reply with quote
sylwek32



Joined: 27 Apr 2006
Posts: 339
sylwek32
@all:

Thank you very much for your help..

@rugxulo

Doesnt work Sad
But thanks..

@tomasz:
the lib is nice , but i have no "c"

and i know the win driver...
but it hungs the pc..
Post 11 Jun 2006, 22:23
View user's profile Send private message Reply with quote
sylwek32



Joined: 27 Apr 2006
Posts: 339
sylwek32
Does somebody know a website where i can download C ?
Post 11 Jun 2006, 22:27
View user's profile Send private message Reply with quote
Quantum



Joined: 24 Jun 2005
Posts: 122
Quantum
2 sylwek32: Do you mean a C compiler? Which one?

Visual C/C++:
http://msdn.microsoft.com/vstudio/express/visualc/

Borland C++:
http://www.borland.com/downloads/download_cbuilder.html

GCC:
Well, It comes with Cygwin, AFAIR.

Intel C/C++:
Not free
Post 12 Jun 2006, 00:41
View user's profile Send private message Reply with quote
blacky



Joined: 06 Apr 2006
Posts: 32
Location: JA
blacky
Post 12 Jun 2006, 01:08
View user's profile Send private message MSN Messenger Reply with quote
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav
also search for LCC (free c compiler)
Post 13 Jun 2006, 08:16
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
Post 14 Jun 2006, 20:55
View user's profile Send private message Visit poster's website Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak
Can't copy any of the code there... IT has syntax errors and i don't know enough about ASM to edit out the syntax errors...
Post 22 Jul 2006, 09:40
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
yetifoot



Joined: 20 May 2006
Posts: 7
yetifoot
Hello, I was the poster of the mentioned FreeBASIC/ASM code. I basically borrowed from two websites. Maybe these will help. They only do simple beep with freq/duration, but perhaps you can modify them to work the way you want. Something to note though is that only admins on modern windows can do port access (without some hack), so in that instance i used the Beep function in the WinAPI.

http://www.frontiernet.net/~fys/snd.htm
http://delphi.about.com/cs/adptips2003/a/bltip0303_3.htm
Post 23 Jul 2006, 02:41
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.