Jump to content



Photo

Some way to monitor audio channels?


  • Please log in to reply
11 replies to this topic

#1 therks

therks

    Witty quote

  • Active Members
  • PipPipPipPipPipPip
  • 2,163 posts

Posted 12 December 2004 - 10:08 PM

I don't really know if this is the right place to put this, but I figure there isn't any way to do it now, so it's an idea.. of sorts...

Basically, I wanted to know if there's some way I could have AutoIt monitor the audio being put through on my computer, just a simple number would be fine, then I could use GUI abilities to make one of those volume meters or whatever.
To be honest, the reason I want it is for the computer in my room, I had an interesting idea...
[OffTopic]
See, my room is often dark, and I can't find the lightswitch easily, but I was thinking I could write an AutoIt script with GUI, so that whenever a loud noise is made (heard with the microphone) the screen would go fully white. I have a script that works kind of like this now, but it's manual of course, the "light" comes on when I press enter or space. But if I could have it come on with something as simple as walking into the room and, for example, clapping, that would be neat. And obviously there could be better uses for a function like this.
[/OffTopic]
I'm not quite sure how it would work though, the most logical way I can think of would be a function that just returns an integer, something like int SoundGetOutput(int control)?

Also while I'm at it, I might as well ask if there could be a way to set the volume for more than just the Wave control. Maybe a function like null SoundSetVolume(int control, int volumePercent) (And a int SoundGetVolume(int control) while we're at it).

One script that I just thought of that could be made with these two functions.. maybe something that keeps the audio at a decent level? Have the script constantly running in the background, if it detects a certain control getting too loud it lowers the volume on it.

Anyway it's just something I was thinking of, and I'm a know-nothing when it comes to C, so I really have no clue how hard this would be. I'm imagining that getting the output volume would be the most difficult, but I really don't know.

So anyway, thanks for reading the post, hopefully this can spawn some new ideas...

* By "control" I'm referring to the different devices/channels/whatever you want to call them that you could find on like sndvol32.exe (Wave/Midi/CD/Microphone/Etc)

Edited by Saunders, 12 December 2004 - 10:09 PM.






#2 this-is-me

this-is-me

    Pursuer of obscure functionality

  • Active Members
  • PipPipPipPipPipPip
  • 2,372 posts

Posted 12 December 2004 - 10:30 PM

Well, there is already a SoundSetWaveVolume ( percent ) in the unstable version, but I really don't see much support for adding the listening features, since there really aren't that many users that need it.
Who else would I be?

#3 therks

therks

    Witty quote

  • Active Members
  • PipPipPipPipPipPip
  • 2,163 posts

Posted 13 December 2004 - 08:04 AM

Okay, so no adding it to AutoIt, I didn't think that would take. But have you any ideas on how I could go about doing it some other way? Also, I still like the idea of being able to set the volume for more than just the Wave device. Master volume would be nice at least.

*Edit: Is there maybe some DllCall ways of getting/setting volume for other devices?

*Edit2: Well I've been perusing Google and it seems that all the audio stuff is controlled with WinMM.dll, I've been able to find all kinds of functions and stuff pertaining to it, but I can't make heads nor tails of it. This page is looking promising as far as setting master volume goes, but I can't figure out how to do what he's doing with DllCall, or if I even can.

Edited by Saunders, 13 December 2004 - 08:38 AM.


#4 techguy86

techguy86

    Wayfarer

  • Active Members
  • Pip
  • 74 posts

Posted 06 January 2005 - 10:22 PM

I agree with you Saunders. Something such as audio listen would be helpful. I'm for it. Maybe it could be used for computer control by voice in the future. Voice recognition is becoming popular.
My Programs:Dissolve (Updated 5-30-06)Credit Card Validator (Not created as of yet)Master Lock Combination Cracker (Updated 7-08-07)Go Siteseeing:My Website: - Click HereCyberZeroCool's Website - Click Here

#5 therks

therks

    Witty quote

  • Active Members
  • PipPipPipPipPipPip
  • 2,163 posts

Posted 07 January 2005 - 08:33 AM

Yay, support for an old idea!

#6 herewasplato

herewasplato

    Most Senile Poster

  • Active Members
  • PipPipPipPipPipPip
  • 4,426 posts

Posted 07 January 2005 - 12:49 PM

seems like a lot of work for a new version of "The Clapper"
http://www.youcansave.com/clap.asp

but I could use such controls also... I just did not think that there was enough support for it to even ask......
..

#7 SvenP

SvenP

    AutoIt COMposer

  • Developers
  • 639 posts

Posted 08 January 2005 - 11:53 PM

Hi,

It's 00:50AM and I'm a geek. I ripped the MSDN library apart and here it is:
An AutoIt script to read your audio input level.

It works only from version 3.0.103 and up, because it uses the famous DLLCall function !


See attachment.

It needs a lot of rework, I know. It's just a first attempt.

Be sure you make some noise on any audio-in device, otherwise it will be a bit silent..


Regards,

-Sven

Attached Files



#8 therks

therks

    Witty quote

  • Active Members
  • PipPipPipPipPipPip
  • 2,163 posts

Posted 11 January 2005 - 09:47 PM

Hi,

It's 00:50AM and I'm a geek.  I ripped the MSDN library apart and here it is:
An AutoIt script to read your audio input level.

It works only from version 3.0.103 and up, because it uses the famous DLLCall function !
See attachment.

It needs a lot of rework, I know.  It's just a first attempt.

Be sure you make some noise on any audio-in device, otherwise it will be a bit silent..
Regards,

-Sven

<{POST_SNAPBACK}>

Hey wow, that's pretty cool. I'm trying to play with it and get it a little more stable, but I can't understand a darn thing about it haha.
It seems to be monitoring the audio sporadically... like, if I make no noise it's jumping back and forth between 0 to 3, probably hearing ambient noise like the tower's fans and such. But if I make noise (so far I'm just blowing in the microphone) it jumps up high, but then back down to 0, and back up, and so on. Good job Sven, and I can't wait to see what you might do to further this.

#9 Helge

Helge

    Yup

  • Active Members
  • PipPipPipPipPipPip
  • 2,049 posts

Posted 12 January 2005 - 07:10 AM

Haven`t tested it yet, but it sure sounds great !
Gonna test it out next time I get home.

Good work SvenP !

#10 Cpc197c

Cpc197c

    Seeker

  • New Members
  • 8 posts

Posted 15 March 2006 - 06:35 PM

Hi,

It's 00:50AM and I'm a geek. I ripped the MSDN library apart and here it is:
An AutoIt script to read your audio input level.

It works only from version 3.0.103 and up, because it uses the famous DLLCall function !
See attachment.

It needs a lot of rework, I know. It's just a first attempt.

Be sure you make some noise on any audio-in device, otherwise it will be a bit silent..
Regards,

-Sven


SvenP, wondering if you are still on the fourms.... if so, how could you change this script to monitor Stereo Mix instead on Audio In, if it is even possible.

#11 user52

user52

    Wayfarer

  • Active Members
  • Pip
  • 61 posts

Posted 11 December 2006 - 11:26 PM

any way to detect a particular sound? perhaps looking for a pattern in the sound slider. this is probably a long shot... thanks

#12 Elvira

Elvira

    Seeker

  • New Members
  • 2 posts

Posted 08 February 2008 - 01:50 PM

any way to detect a particular sound? perhaps looking for a pattern in the sound slider. this is probably a long shot... thanks


i'm checking for this as well :)
Or if it's possible to check which sound file is played in this moment.
Thanks in advance




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users