Jump to content
Corsair Community

[Unofficial Program] Spectrograph Music Visualizer in Linux


CalcProgrammer1

Recommended Posts

You can decrease the delay.

https://github.com/billism1/KeyboardAudio/blob/master/KeyboardAudio/Program.cs

at a quick glance I believe the 256's is how big the buffer is (delay)

 

Sorry, what I mean is that using stereo mix doesn't make the visualizer works, from my side the visualizer only works when i use "Microphone" instead of stereo mix. I believe the cause of delayed is because using the microphone, however i can try deal with the buffer rate to adjust the accuracy of visualizer. But i need to know if there any solution to make stereo mix works.

 

Btw, is there any announcement for wave visualization, or improvement for spectrograph?

Link to comment
Share on other sites

  • Replies 58
  • Created
  • Last Reply
Sorry, what I mean is that using stereo mix doesn't make the visualizer works, from my side the visualizer only works when i use "Microphone" instead of stereo mix. I believe the cause of delayed is because using the microphone, however i can try deal with the buffer rate to adjust the accuracy of visualizer. But i need to know if there any solution to make stereo mix works.

 

Btw, is there any announcement for wave visualization, or improvement for spectrograph?

 

from what i think you're saying:

 

i downloaded and installed Visual Audio Cable, set the recording device to Line 1, and set the playback to Line 1, from there opening up Audio Repeater (MME) (comes with Visual Audio Cable on installation), setting Wave in to Line 1, and Wave out to the speaker of your choice, either computer speakers or headset, that should work for you.

 

if that is not what you mean and you just have lagg using the program then you can do the following:

 

disable the console writer, ( the screen with the " = " ), by adding // infront of

//writers.Add(new ConsoleWriter());

in the Program.cs

 

You can also disable the rainbow, by adding // infront of the following code

//this.red = (byte)(1.5f * (Math.Sin((x / 92.0f) * 2 * 3.14f) + 1));
//this.grn = (byte)(1.5f * (Math.Sin(((x / 92.0f) * 2 * 3.14f) - (6.28f / 3)) + 1));
//this.blu = (byte)(1.5f * (Math.Sin(((x / 92.0f) * 2 * 3.14f) + (6.28f / 3)) + 1));

 

however that will cause the program to crash, so make sure you set the following code

this.SetLed((x + iter) % 92, y, [color="Red"]red, grn, blue[/color]);

to

this.SetLed((x + iter) % 92, y, [color="Red"]0, 0, 0[/color]);

 

or whatever you like, ( that is just the color of the LED's on the keyboard with no music).

 

 

As for improvement or different kind of visualization, on page 3, there is someone who linked a video of someone using VSXu visualization to send the pixels to the keyboard.

 

i managed to track it down to

https://github.com/vovoid/vsxu/blob/master/player/src/application.cpp#L100

right after the rendering, the pixels should be send over to the keyboard, so far i have had no luck making it work, but hopefully soon someone better than me in C/C++ should be able to crack it.

Link to comment
Share on other sites

from what i think you're saying:

 

i downloaded and installed Visual Audio Cable, set the recording device to Line 1, and set the playback to Line 1, from there opening up Audio Repeater (MME) (comes with Visual Audio Cable on installation), setting Wave in to Line 1, and Wave out to the speaker of your choice, either computer speakers or headset, that should work for you.

 

if that is not what you mean and you just have lagg using the program then you can do the following:

 

disable the console writer, ( the screen with the " = " ), by adding // infront of

//writers.Add(new ConsoleWriter());

in the Program.cs

 

You can also disable the rainbow, by adding // infront of the following code

//this.red = (byte)(1.5f * (Math.Sin((x / 92.0f) * 2 * 3.14f) + 1));
//this.grn = (byte)(1.5f * (Math.Sin(((x / 92.0f) * 2 * 3.14f) - (6.28f / 3)) + 1));
//this.blu = (byte)(1.5f * (Math.Sin(((x / 92.0f) * 2 * 3.14f) + (6.28f / 3)) + 1));

 

however that will cause the program to crash, so make sure you set the following code

this.SetLed((x + iter) % 92, y, [color="Red"]red, grn, blue[/color]);

to

this.SetLed((x + iter) % 92, y, [color="Red"]0, 0, 0[/color]);

 

or whatever you like, ( that is just the color of the LED's on the keyboard with no music).

 

 

As for improvement or different kind of visualization, on page 3, there is someone who linked a video of someone using VSXu visualization to send the pixels to the keyboard.

 

i managed to track it down to

https://github.com/vovoid/vsxu/blob/master/player/src/application.cpp#L100

right after the rendering, the pixels should be send over to the keyboard, so far i have had no luck making it work, but hopefully soon someone better than me in C/C++ should be able to crack it.

 

 

I following your guide and the visualizer only works without sound, by settings up the recording and play back as line 1, if set my speaker as default, the sound come back but the visualizer will be non-working.

Link to comment
Share on other sites

I following your guide and the visualizer only works without sound, by settings up the recording and play back as line 1, if set my speaker as default, the sound come back but the visualizer will be non-working.

 

Hmm try it in the following order,

 

1) set playback devices to line 1, as well as recording to line 1.

 

2) if you installed VAC, search and start Audio Repeater (MME) (Search programs and files)

 

3) set Wave in to Line 1. and Wave out to Speakers and just hit start, that should be it, and start up the visualizing program.

Link to comment
Share on other sites

Hmm try it in the following order,

 

1) set playback devices to line 1, as well as recording to line 1.

 

2) if you installed VAC, search and start Audio Repeater (MME) (Search programs and files)

 

3) set Wave in to Line 1. and Wave out to Speakers and just hit start, that should be it, and start up the visualizing program.

 

I also found that it works if follow the settings by sequence, however the visualizer will freeze after few seconds, disable the rainbow background only temporary fixed the issue. Somehow the freeze will randomly happen but within 1 minute

 

PS: May i know which part is to change the spectrograph'color? and also the spectrograph's rate, coz it is too high where i need lower my volume.

Link to comment
Share on other sites

I also found that it works if follow the settings by sequence, however the visualizer will freeze after few seconds, disable the rainbow background only temporary fixed the issue. Somehow the freeze will randomly happen but within 1 minute

 

PS: May i know which part is to change the spectrograph'color? and also the spectrograph's rate, coz it is too high where i need lower my volume.

 

unsure of why it would freeze for you, do you have you Corsair Utility Engine closed ?

 

and when it freezes can you still use your keyboard ? like just the LED's are frozen ?

 

for the color. ( KeyboardWriter.cs)

 

this.SetLed(i, k, [color="Red"]0x07, 0x04, 0x07[/color]);

change the numbers on those from 0 to 7,

 

for the volume, try lowering the amplifier. (Program.cs)

float amplitude = 1.0f;

it is originaly set to 10.0f, i have mine on 1.0f, just play around until you get something you like.

 

if the freeze happends within a minute of starting the program it might be because of a synchronization issue.

another person had that issue, by adding

System.Threading.Thread.Sleep(5)
after each ,
HidD_SetFeature

 

i did not have to do this so if this still does not work for you try to contact the person that did this, he might help you more than i did.

Link to comment
Share on other sites

unsure of why it would freeze for you, do you have you Corsair Utility Engine closed ?

 

and when it freezes can you still use your keyboard ? like just the LED's are frozen ?

 

for the color. ( KeyboardWriter.cs)

 

this.SetLed(i, k, [color="Red"]0x07, 0x04, 0x07[/color]);

change the numbers on those from 0 to 7,

 

for the volume, try lowering the amplifier. (Program.cs)

float amplitude = 1.0f;

it is originaly set to 10.0f, i have mine on 1.0f, just play around until you get something you like.

 

if the freeze happends within a minute of starting the program it might be because of a synchronization issue.

another person had that issue, by adding after each ,

 

i did not have to do this so if this still does not work for you try to contact the person that did this, he might help you more than i did.

 

i discovered that the cause of freeze LED light is due to high frequency setting for the spectrogrtaph, once i set to 0.7f then it solve everything. Thanks man for being so helpful, i really appreciated as you being so patience just to help me. =)

Link to comment
Share on other sites

i discovered that the cause of freeze LED light is due to high frequency setting for the spectrogrtaph, once i set to 0.7f then it solve everything. Thanks man for being so helpful, i really appreciated as you being so patience just to help me. =)

 

Haha no worries, but Calc is the one you should thank, his program.

 

happy you got it sorted.

Link to comment
Share on other sites

  • 1 month later...
I am sorry to bug you guys but I am having difficulty trying to get this up and running. The led's are simply freezing just like SimpleStreet was having. I have tried changing the frequency of the spectrograph to .7 but this seems to not help. I also disabled the rainbow background and that seems to not help too. Can anyone give me a little bit of help. Thanks
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...