rearrange files some a few cleanups, too.

This commit is contained in:
cnlohr 2015-04-04 22:16:55 -04:00
parent ec4f175c2b
commit f80dd24a8d
9 changed files with 16 additions and 13 deletions

View file

@ -13,10 +13,10 @@ LDLIBS:=-lpthread -lasound -lm -lpulse-simple -lpulse
CFLAGS:=-g -Os -flto -Wall
EXTRALIBS:=-lusb-1.0
colorchord : os_generic.o main.o dft.o decompose.o filter.o color.o sort.o notefinder.o util.o outdrivers.o $(RAWDRAW) $(SOUND) $(OUTS) parameters.o chash.o DFT32.o
colorchord : os_generic.o main.o dft.o decompose.o filter.o color.o sort.o notefinder.o util.o outdrivers.o $(RAWDRAW) $(SOUND) $(OUTS) parameters.o chash.o embeddedcommon/DFT32.o
gcc -o $@ $^ $(CFLAGS) $(LDLIBS) $(EXTRALIBS) $(RAWDRAWLIBS)
colorchord.exe : os_generic.c main.c dft.c decompose.c filter.c color.c sort.c notefinder.c util.c outdrivers.c DrawFunctions.c parameters.c chash.c WinDriver.c sound.c sound_null.c sound_win.c OutputVoronoi.c DisplayArray.c OutputLinear.c DisplayPie.c DisplayNetwork.c DFT32.c
colorchord.exe : os_generic.c main.c dft.c decompose.c filter.c color.c sort.c notefinder.c util.c outdrivers.c DrawFunctions.c parameters.c chash.c WinDriver.c sound.c sound_null.c sound_win.c OutputVoronoi.c DisplayArray.c OutputLinear.c DisplayPie.c DisplayNetwork.c embeddedcommon/DFT32.c
$(WINGCC) $(WINGCCFLAGS) -o $@ $^ $(WINLDFLAGS)

View file

@ -291,7 +291,7 @@ void HandleFrameInfo()
note_peak_amps2[marked_note] =
note_peak_amps2[marked_note] -
(note_peak_amps2[marked_note]>>AMP_2_IIR_BITS) +
(this>>(AMP_2_IIR_BITS-3));
((this<<3)>>(AMP_2_IIR_BITS));
}
}
}
@ -325,7 +325,7 @@ void HandleFrameInfo()
distance = ((1<<(SEMIBITSPERBIN))*FIXBPERO) - distance;
}
if( distance > MAX_JUMP_DISTANCE * 2 )
if( distance > MAX_COMBINE_DISTANCE )
{
continue;
}

View file

@ -35,21 +35,23 @@
//distance times two.
#define MAX_JUMP_DISTANCE 4
#define MAX_COMBINE_DISTANCE 7
//These control how quickly the IIR for the note strengths respond. AMP 1 is
//the response for the slow-response, or what we use to determine size of
//splotches, AMP 2 is the quick response, or what we use to see the visual
//strength of the notes.
#define AMP_1_IIR_BITS 5
#define AMP_2_IIR_BITS 3
#define AMP_2_IIR_BITS 2
//This is the amplitude, coming from folded_bins. If the value is below this
//it is considered a non-note.
#define MIN_AMP_FOR_NOTE 128
#define MIN_AMP_FOR_NOTE 80
//If the strength of a note falls below this, the note will disappear, and be
//recycled back into the unused list of notes.
#define MINIMUM_AMP_FOR_NOTE_TO_DISAPPEAR 100
#define MINIMUM_AMP_FOR_NOTE_TO_DISAPPEAR 64

View file

@ -83,14 +83,15 @@ void UpdateLinearLEDs()
uint16_t local_peak_amps2[MAXNOTES];
uint8_t local_peak_freq[MAXNOTES];
//Make a copy of all of the variables into local ones so we don't have to keep double-dereferencing.
for( i = 0; i < sorted_map_count; i++ )
{
printf( "%5d ", local_peak_amps[i] );
//printf( "%5d ", local_peak_amps[i] );
local_peak_amps[i] = note_peak_amps[sorted_note_map[i]] - note_nerf_a;
local_peak_amps2[i] = note_peak_amps2[sorted_note_map[i]];
local_peak_freq[i] = note_peak_freqs[sorted_note_map[i]];
}
printf( "\n" );
// printf( "\n" );
for( i = 0; i < sorted_map_count; i++ )
{

View file

@ -5,7 +5,7 @@
//Controls brightness
#define NOTE_FINAL_AMP 16 //Number from 0...255
#define NOTE_FINAL_AMP 12 //Number from 0...255
//Controls, basically, the minimum size of the splotches.
#define NERF_NOTE_PORP 15 //value from 0 to 255

View file

@ -1,9 +1,9 @@
all : embeddedcc
CFLAGS:=-Ofast -DCCEMBEDDED -I.. -flto -m32 -DDFREQ=11025
CFLAGS:=-Ofast -DCCEMBEDDED -I.. -flto -m32 -DDFREQ=11025 -I../embeddedcommon
LDFLAGS:=-ffunction-sections -Wl,--gc-sections -fno-asynchronous-unwind-tables -Wl,--strip-all
embeddedcc : ../embeddednf.c ../DFT32.c embeddedcc.c ../embeddedout.c
embeddedcc : ../embeddedcommon/embeddednf.c ../embeddedcommon/DFT32.c embeddedcc.c ../embeddedcommon/embeddedout.c
gcc -o $@ $^ $(CFLAGS) $(LDFLAGS)
runembedded : embeddedcc

View file

@ -63,7 +63,7 @@ int main()
Push8BitIntegerSkippy( (int8_t)cs );
#endif
wf++;
if( wf == 64 )
if( wf == 128 )
{
NewFrame();
wf = 0;