Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact
A1VBCode Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      

Home » Visual Basic (VB 4/5/6) » General Visual Basic » Displaying a Visual Representation of Audio...


Displaying a Visual Representation of Audio...Expand / Collapse
Author
Message
Posted 10/7/2008 6:08:48 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/7/2008 5:23:02 PM
Posts: 3, Visits: 10
Hello,

Does anyone have any ideas how you can code an application in VB that displays a visual representation (e.g. moving bars) of audio inputted to the computer on the line in port?

If possible as well, could it change colours depending on the volume level? Red if below a certain value - quiet - amber for medium and green for when the volume is at an acceptable level.

If anyone has any ideas, I would be grateful if you could let me know!

This is the kind of thing I mean by 'moving bars' if you are unsure:

Thanks a lot,

JHedges

Post #25916
Posted 10/7/2008 8:30:31 AM


Forum God

Forum GodForum GodForum GodForum GodForum GodForum GodForum GodForum God

Group: Forum Members
Last Login: Today @ 8:45:13 AM
Posts: 349, Visits: 1,705
Welcome to A1! Check out this link. It contains info that should give you ideas.

http://www.vbforums.com/showthread.php?t=388312&highlight=sound+event

 

"So much to learn. So little time to do it. Wise men know it's later than one thinks"!

***Vote here to make Keith a Moderator***

http://www.a1vbcode.com/vbforums/FindPost23630.aspx

Post #25917
Posted 10/7/2008 10:31:29 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/7/2008 5:23:02 PM
Posts: 3, Visits: 10
Thanks for making me welcome CDRIVE - I have had a look at the links and will have a delve through, if anyone can post some code by itself that can do the job I would be very grateful!

Cheers,

JHedges
Post #25918
Posted 10/7/2008 1:17:56 PM


Forum God

Forum GodForum GodForum GodForum GodForum GodForum GodForum GodForum God

Group: Forum Members
Last Login: Yesterday @ 4:36:16 PM
Posts: 1,463, Visits: 3,400
Welcome to A1vbcode JHedges

JHedges (10/7/2008)
Hello,

Does anyone have any ideas how you can code an application in VB that displays a visual representation (e.g. moving bars) of audio inputted to the computer on the line in port?

I don't know about representing audio input but making moving bars depending upon a variable isn't a problem. You would just use a Shape and set the FillColor to what ever you want to show. When the variable is a certain value change the FillColor to suit. You would vary the Width of the Shape depending upon the variable a bit like a progressbar. 

Keith

http://www.martin2k.co.uk/forums/

I've been programming with VB for 12 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
Post #25925
Posted 10/7/2008 1:22:35 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/7/2008 5:23:02 PM
Posts: 3, Visits: 10
Hiya Keith,

That is very useful... thanks ever so much! I will do it as you described - only thing I need to find out now is how to represent the audio input, like you say.

All help will be greatly appreciated.

Cheers,

JHedges
Post #25926
Posted 10/7/2008 1:30:36 PM


Forum God

Forum GodForum GodForum GodForum GodForum GodForum GodForum GodForum God

Group: Forum Members
Last Login: Yesterday @ 4:36:16 PM
Posts: 1,463, Visits: 3,400
JHedges (10/7/2008)

only thing I need to find out now is how to represent the audio input, like you say.

Yes that is your main problem. What I would suggest is you do a search on PSC thats the best web site for all types of VB apps. I'm sure someone as made something.

Keith

http://www.martin2k.co.uk/forums/

I've been programming with VB for 12 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
Post #25928
Posted 10/7/2008 5:00:05 PM


Forum God

Forum GodForum GodForum GodForum GodForum GodForum GodForum GodForum God

Group: Forum Members
Last Login: Today @ 8:45:13 AM
Posts: 349, Visits: 1,705
JHedges (10/7/2008)
Thanks for making me welcome CDRIVE - I have had a look at the links and will have a delve through, if anyone can post some code by itself that can do the job I would be very grateful!

Cheers,

JHedges

J, the link that I gave you contains another link to a complete app. 'Direct Sound' inputs sound from either your Mic jack or Media Player. Actually, it gets it off your sound card. It then displays the audio on a virtual oscilloscope. It's not difficult to find the sub within the app where you can extract the 'amplitude' variable (a Long or Integer.. don't remember which) that follows the audio amplitude. This variable can be used to change the size and colors of your rectangles. Programming is 50% imagination, that includes the ability to see someone else's app and realize that it contains 90% of the code that you're looking for.

 

"So much to learn. So little time to do it. Wise men know it's later than one thinks"!

***Vote here to make Keith a Moderator***

http://www.a1vbcode.com/vbforums/FindPost23630.aspx

Post #25931
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Brian, Peter

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 12:36pm