Skip to content

Commit

Permalink
Tweaked the VU vis a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaedyn Draper committed Sep 15, 2014
1 parent 75c9235 commit 11115a1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Binary file modified Release/vis_roccat.dll
Binary file not shown.
12 changes: 7 additions & 5 deletions vis_roccat/SpectrumAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,21 @@ int columns[22][6] =
BYTE blue = 0;

int last=mod->waveformData[0][0];
int total=0;
for(int waveformSlot = 1; waveformSlot < 144; ++waveformSlot)
double total=0;
for(int waveformSlot = 1; waveformSlot < 576; ++waveformSlot)
{
total += abs(last - mod->waveformData[0][waveformSlot]);
last = mod->waveformData[0][waveformSlot];
}
total /= 72;
total /= 288;
if(total > 127)
{
total = 127;
}
double ratio = 1.0-double(total)/127.0;
ratio /= 0.9;
double ratio = double(total)/127.0;
//The whole ratio just doesn't have enough variation in it for the set of lights the Roccat devices are capable of.
//Cut it in half since most things seem to stay under 0.5 anyway.
ratio /= 0.5;
if(ratio > 1.0)
{
ratio = 1.0;
Expand Down
2 changes: 1 addition & 1 deletion vis_roccat/vis_roccat.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(ProjectDir)\..\3rdParty\Roccat\Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(ProjectDir)\Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>Roccat Talk SDK.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
Expand Down

0 comments on commit 11115a1

Please sign in to comment.