First inroads to turbo8

This commit is contained in:
cnlohr 2019-03-28 06:29:48 -04:00
parent 8e628ab602
commit b9dc46c701
7 changed files with 384 additions and 6 deletions

View file

@ -17,7 +17,7 @@ LDLIBS:=-lpthread -lasound -lm -lpulse-simple -lpulse -ludev -lrt
CFLAGS:=-g -O0 -flto -Wall -ffast-math -I../embeddedcommon -I. -DICACHE_FLASH_ATTR=
EXTRALIBS:=-lusb-1.0
colorchord : os_generic.o main.o dft.o decompose.o filter.o color.o notefinder.o util.o outdrivers.o $(RAWDRAW) $(SOUND) $(OUTS) parameters.o chash.o hook.o ../embeddedcommon/DFT32.o configs.o
colorchord : os_generic.o main.o dft.o decompose.o filter.o color.o notefinder.o util.o outdrivers.o $(RAWDRAW) $(SOUND) $(OUTS) parameters.o chash.o hook.o ../embeddedcommon/DFT32.o configs.o ../embeddedcommon/DFT8Turbo.o
gcc -o $@ $^ $(CFLAGS) $(LDLIBS) $(EXTRALIBS) $(RAWDRAWLIBS)

View file

@ -58,8 +58,9 @@ octaves = 5
# 1 = DFT Progressive
# 2 = DFT Progressive Integer
# 3 = DFT Progressive Integer Skippy
# 4 = Integer, 32-Bit, Progressive, Skippy.
do_progressive_dft = 4
# 4 = Integer, 32-Bit, Progressive, Skippy. (wow, this actually works)
# 5 = 8-bit turbo test.
do_progressive_dft = 5
filter_iter = 2

View file

@ -11,6 +11,7 @@
#include "filter.h"
#include "decompose.h"
#include "DFT32.h"
#include "DFT8Turbo.h"
struct NoteFinder * CreateNoteFinder( int spsRec )
{
@ -199,6 +200,9 @@ void RunNoteFinder( struct NoteFinder * nf, const float * audio_stream, int head
case 4:
DoDFTProgressive32( dftbins, nf->frequencies, freqs, audio_stream, head, buffersize, nf->dft_q, nf->dft_speedup );
break;
case 5:
DoDFT8BitTurbo( dftbins, nf->frequencies, freqs, audio_stream, head, buffersize, nf->dft_q, nf->dft_speedup );
break;
default:
fprintf( stderr, "Error: No DFT Seleced\n" );
}

103
colorchord2/turbo8bit.conf Normal file
View file

@ -0,0 +1,103 @@
# This is the configuration file for colorchord.
# Most values are already defaulted in the software.
# This file is constantly checked for new versions.
# \r, and ; are used as terminators, so you can put
# multiple entries on the same line.
#Whether to limit the control loop to ~60ish FPS.
cpu_autolimit = 1
#General GUI properties.
title = PA Test
set_screenx = 720
set_screeny = 480
#Sound properties.
buffer = 384
play = 0
rec = 1
channels = 2
samplerate = 16000
wininput = -1
#Compiled version will default this.
#sound_source = ALSA
#-1 indicates left and right, 0 left, 1 right.
sample_channel = -1
sourcename = default
#alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
#default
# alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
#alsa_output.pci-0000_00_1f.3.analog-stereo.monitor << New laptop
#use pactl list | grep pci- | grep monitor
##################################
# General ColorChord properties. #
##################################
# How much to amplify the incoming signal.
amplify = 2.0
# What is the base note? I.e. the lowest note.
# Note that it won't have very much impact until an octave up though!
base_hz = 110
# This is only used when dealing with the slow decompose (now defunct)
# decompose_iterations = 1000
# default_sigma = 1.4000
# DFT properties for the DFT up top.
dft_iir = 0.6
dft_q = 20.0000
dft_speedup = 1000.0000
octaves = 5
# Should we use a progressive DFT?
# 0 = DFT Quick
# 1 = DFT Progressive
# 2 = DFT Progressive Integer
# 3 = DFT Progressive Integer Skippy
# 4 = Integer, 32-Bit, Progressive, Skippy. (wow, this actually works)
# 5 = 8-bit turbo test.
do_progressive_dft = 5
filter_iter = 2
filter_strength = .5
# How many bins per octave to use?
freqbins = 24
# For the final note information... How much to slack everything?
note_attach_amp_iir = 0.3500
note_attach_amp_iir2 = 0.250
note_attach_freq_iir = 0.3000
#How many bins a note can jump from frame to frame to be considered a slide.
#this is used to prevent notes from popping in and out a lot.
note_combine_distance = 0.5000
note_jumpability = 1.8000
note_minimum_new_distribution_value = 0.0200
note_out_chop = 0.05000
#compress_coefficient = 4.0
#compress_exponent = .5
#=======================================================================
#Outputs
This is a vornoi thing:
outdrivers = OutputVoronoi, DisplayArray
lightx = 64
lighty = 32
fromsides = 1
shape_cutoff = 0.03
satamp = 5.000
amppow = 2.510
distpow = 1.500