The Corsair User Forums  

Go Back   The Corsair User Forums > Corsair Product Discussion > Keyboards and Mice

Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 7 votes, 5.00 average. Display Modes
  #1  
Old 12-04-2014, 12:30 AM
Billism Billism is offline
Registered User
 
Join Date: Nov 2014
Location: Houston, TX
Posts: 13
POST ID # = 744980
Billism Reputation: 10
Default Spectrogram in .Net C#

In case anyone is interested, I ported the C++ spectrogram program that CalcProgrammer1 made, to .Net C#.

His original post:
http://forum.corsair.com/v3/showthread.php?t=133471

The .Net project:
https://github.com/billism1/KeyboardAudio

Video of it in action:

Last edited by Billism; 12-04-2014 at 07:38 AM.
Reply With Quote


  #2  
Old 12-04-2014, 01:02 AM
CalcProgrammer1 CalcProgrammer1 is offline
Registered User
CalcProgrammer1's PC Specs
 
Join Date: Oct 2014
Posts: 120
POST ID # = 744981
CalcProgrammer1 Reputation: 20
Default

Awesome! Have a video of it in action?
Reply With Quote


  #3  
Old 12-04-2014, 07:39 AM
Billism Billism is offline
Registered User
 
Join Date: Nov 2014
Location: Houston, TX
Posts: 13
POST ID # = 745009
Billism Reputation: 10
Default

Quote:
Originally Posted by CalcProgrammer1 View Post
Awesome! Have a video of it in action?
I just edited the post to include it.

Thanks again for your awesome work!
Reply With Quote


  #4  
Old 12-08-2014, 03:17 AM
Battlerobot Battlerobot is offline
Registered User
 
Join Date: Dec 2014
Posts: 5
POST ID # = 745580
Battlerobot Reputation: 10
Default

Complete noob here. How would I go about using this?
Reply With Quote


  #5  
Old 12-09-2014, 09:14 AM
SimpleStreet SimpleStreet is offline
Registered User
 
Join Date: Nov 2014
Posts: 36
POST ID # = 745863
SimpleStreet Reputation: 10
Default

Quote:
Originally Posted by Battlerobot View Post
Complete noob here. How would I go about using this?
You will need a program to compile the code from his Github, i suggest using Visual studio, easy installation and free.

It is noted that OpenTK is needed to make the program work, so you will need to install that as well.

all that is remaining is acctually getting the code from Github, run it in visual studio, and that should be it i belive ?, you may need to exit the corsair software thing, that might get in the way of making it run properly.
Reply With Quote


  #6  
Old 12-09-2014, 07:07 PM
Billism Billism is offline
Registered User
 
Join Date: Nov 2014
Location: Houston, TX
Posts: 13
POST ID # = 745980
Billism Reputation: 10
Default

Quote:
Originally Posted by SimpleStreet View Post
You will need a program to compile the code from his Github, i suggest using Visual studio, easy installation and free.

It is noted that OpenTK is needed to make the program work, so you will need to install that as well.

all that is remaining is acctually getting the code from Github, run it in visual studio, and that should be it i belive ?, you may need to exit the corsair software thing, that might get in the way of making it run properly.
Basically, yea. However, using Visual Studio 2012/2013 and NuGet (on by default), the OpenTK library should download automatically when you build.

The pre-built Windows binaries can be downloaded from here:
https://drive.google.com/open?id=0B8...ZUE&authuser=0

Though, this has not been tested on any other machine than my own.
Reply With Quote


  #7  
Old 12-09-2014, 10:19 PM
SimpleStreet SimpleStreet is offline
Registered User
 
Join Date: Nov 2014
Posts: 36
POST ID # = 746008
SimpleStreet Reputation: 10
Default

Quote:
Originally Posted by Billism View Post
Basically, yea. However, using Visual Studio 2012/2013 and NuGet (on by default), the OpenTK library should download automatically when you build.

The pre-built Windows binaries can be downloaded from here:
https://drive.google.com/open?id=0B8...ZUE&authuser=0

Though, this has not been tested on any other machine than my own.
Just gave it a go and it seems to work nicely,

however i had to get the code and change the amplifier down to like 1 to make you being able to see it following the music, other than that it looks very nice good job

May i ask where you found the FFT algorithm ?

NVM it seems like i cant read, i found it

Last edited by SimpleStreet; 12-09-2014 at 10:30 PM.
Reply With Quote


  #8  
Old 12-10-2014, 05:28 AM
swarfega's Avatar
swarfega swarfega is offline
Registered User
swarfega's PC Specs
 
Join Date: Oct 2014
Posts: 115
POST ID # = 746057
swarfega Reputation: 13
Default

Just like the other project, it makes my keyboard lights freeze so doesn't work.
Reply With Quote


  #9  
Old 12-10-2014, 05:54 AM
Corski Corski is offline
Registered User
 
Join Date: Dec 2014
Posts: 7
POST ID # = 746060
Corski Reputation: 10
Default

I also experience the LEDs feezing up. It seems to lag out after about a second of input. I tracked it down to the HidD_SetFeature method blocking after a couple of write calls. Could it be because I'm connected via 1 USB3.0 cable instead of 2 USB2.0 connections?
Reply With Quote


  #10  
Old 12-10-2014, 10:06 AM
Corski Corski is offline
Registered User
 
Join Date: Dec 2014
Posts: 7
POST ID # = 746097
Corski Reputation: 10
Default

Ok, it appears to indeed be a synchronization issue. If I put in a delay after each HidD_SetFeature call by inserting System.Threading.Thread.Sleep(5), it works!
Many thanks Billism and CalcProgrammer1!

Last edited by Corski; 12-10-2014 at 12:50 PM.
Reply With Quote


  #11  
Old 12-11-2014, 01:53 AM
SimpleStreet SimpleStreet is offline
Registered User
 
Join Date: Nov 2014
Posts: 36
POST ID # = 746241
SimpleStreet Reputation: 10
Default

Quote:
Originally Posted by swarfega View Post
Just like the other project, it makes my keyboard lights freeze so doesn't work.
the only time i had the keyboard light freeze was when i tried to run the program when CUE was active, have you tried to close the software before running the program ?
Reply With Quote


  #12  
Old 12-15-2014, 09:22 PM
Battlerobot Battlerobot is offline
Registered User
 
Join Date: Dec 2014
Posts: 5
POST ID # = 747118
Battlerobot Reputation: 10
Default Im getting an error

I'm getting an error when I try to run the program on Visual Studio
An unhandled exception of type 'OpenTK.Audio.AudioDeviceException' occurred in OpenTK.dll

Additional information: All attempts to open capture devices returned IntPtr.Zero. See debug log for verbose list.
Reply With Quote


  #13  
Old 12-21-2014, 01:12 PM
Billism Billism is offline
Registered User
 
Join Date: Nov 2014
Location: Houston, TX
Posts: 13
POST ID # = 748237
Billism Reputation: 10
Default

Quote:
Originally Posted by Battlerobot View Post
I'm getting an error when I try to run the program on Visual Studio
An unhandled exception of type 'OpenTK.Audio.AudioDeviceException' occurred in OpenTK.dll

Additional information: All attempts to open capture devices returned IntPtr.Zero. See debug log for verbose list.
Can you provide the stack trace? Also, can you check to make sure you do indeed have a default audio input device? For the purpose of this program, we want a loopback device, such as Windows' "Stereo Mix" as the default audio input device.
Reply With Quote


  #14  
Old 12-21-2014, 03:42 PM
Jeffery Sanders Jeffery Sanders is offline
Registered User
Jeffery Sanders's PC Specs
 
Join Date: Sep 2014
Location: Novi Pazar Нови Пазар
Posts: 16
POST ID # = 748263
Jeffery Sanders Reputation: 10
Default

Works great here as well. Just had to turn off CUE, but that has already been stated. Thanks for porting!!!
Reply With Quote


  #15  
Old 12-24-2014, 04:14 PM
ScarredMecha ScarredMecha is offline
Registered User
ScarredMecha's PC Specs
 
Join Date: Nov 2014
Posts: 1,162
POST ID # = 748793
ScarredMecha Reputation: 14
Default

Why is it so "noisy" when there's no sound input/output?

EDIT: figured it out

Last edited by ScarredMecha; 12-29-2014 at 06:10 AM.
Reply With Quote


Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:12 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.