LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 02-27-2005, 06:49 PM   #1
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
need info on sound generation


hello, i need to produce sounds in Linux directly from a program, not using files (the program i want needs to generate sound based on various input ... so it can simulate say a hum) ..... i been looking around, but i cant find any info on what these sine / other waves do .... i understand the samples, sample rate, and stuff. but i cant find info on how to convert the numbers from a function into sound

do i take the numbers and change it endness to match the sound card? .... and what do things like "low pass" / "high pass" mean?

also i want to Analise the sound (split it up, similar to equalizers) .... is there any good tutorials on sound generation that i haven't found (i been searching real long, and the best i can find is "what sound waves are" , "examples of sound functions" (various number generating functions) and "how sound is represented in a computer" ... but nothing on the steps involved in generating or manipulating tones

anyone know where to find some good info i can use? (i plan to use SDL for audio i think)
 
Old 02-27-2005, 07:19 PM   #2
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 30
You don't necessarily need to use SDL.

Writing data to /dev/dsp will play sound. Reading data from /dev/dsp will give you data from the capturing device (line-in / microphone, etc).

If you want to change sample-rate, sample-size, etc. a simple ioctl() call can do that, but you'll have to look up the syntax online. You WILL need the proper permissions to use /dev/dsp, so set that up beforehand.
 
Old 02-27-2005, 07:22 PM   #3
itsme86
Senior Member
 
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 53
In addition to what zhangmaike said, low pass and high pass refer to filters. low pass filters allow low-frequency tones to pass through the filter, and high pass ones let high-frequency tones through.
 
Old 03-01-2005, 11:54 AM   #4
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Original Poster
Rep: Reputation: 51
i see, thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sound problem 10.0.... intel 830 chipset, lspci info inside RodCas Slackware 8 02-25-2005 01:27 PM
sound not working,here is some info regarding system,please advise c0ldshadow *BSD 0 11-16-2004 06:01 PM
Wish list: What the next generation OS should be like? vharishankar General 11 09-21-2004 04:27 PM
Users with Sound Blaster cards, please back me up with some info Fear58 General 5 08-09-2004 10:47 PM
online info on slack 10 and sound issues aus9 Slackware - Installation 1 08-05-2004 07:26 AM


All times are GMT -5. The time now is 02:36 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration