220C Research Seminar in Computer-Generated Music, Spring, 2006
Adaptive Approach for PCM Sound Font Data Compression
Project Homepage
Kevin Kuang
kuangzn (at) ccrma.stanford.edu

Abstract
This project is a continual work of my previous adaptive project, which utilized a sinusoid signal (with the same frequency) to simulate the plucked string sound, using the updated weights at every setup (like a sliding FIR, or two point convolution), and the result was perfectly optimal to the original sound in the least square sense. For achieving data compression of any sound resources, an adaptive LMS (least mean square) approach to design the suitable FIR loop filter is presented. For sinusoid signals, result shows the system generate reasonable synthesis output, for physical modeling plucked string sound (with fixed frequency), more research needed to be done to fix some problems, such as minimum phase, integer number of exact period, etc.

Introduction
The Karplus-Strong algorithm can be physically interpreted as a rigidly terminated ideal string with the simplest damping filter, the traditional way to design the damping filter is to estimated the T60 of different frequencies and design the loop filter to simulate the energy decay. Ideally, using the adaptive approach can find the energy decay information by using two adjacent two periods of the sound source, despite of the trade-off between number of LMS weights and quality of the damping filter. Once we find out the relationship between any two adjacent periods of a sound source, instead of storage of whole sound source, we can use the first period of those relationship to reconstruct the sound. Finding the loop FIR filter(s) can be used to general audio PCM sound font data compression, or take the place of simply looping at the end of the sound font. More interestingly, if the two ''adjacent'' periods belong to two different sound source, it will create an interesting new sound source, and by controlling the FIR filters, we can define the likeness of the synthesis sound to either of its input.

System Setup
The adaptive LMS system is driven by a pink noise, length 5000 samples, the LMS filter after input filter ( [n-1] period ) simulates the desired filter ( [n] period ), different step size and weights are tried for better result.







Results

For sinusoid signal





For KS physical model sound samples




For real recording sound samples


For two different sound sources



Future works

rectangular, windowing adaptive

adaptive predictor

echo density (STFT) division

More questions:

What's the best iteration steps for finding the LMS weights?

How many numbers of weights are psychoacoustic enough?

How many periods in a group will be more computational efficient and acoustic sufficient?

If a robust system is designe





Project Status ( updating ... )

May 9, 2006
Revised my system diagram, used NLMS instead of LMS, used long white noise or sinusoid with as my excitation signal so that the NLMS
has longer iteration numbers. But, it's converged very well, more works need to be done.

May 2, 2006

Found out one point delay in my previous works was caused by a simply Matlab bug. See figure below. There is no delay/discontinues
if the number of the adaptive weight is 1, which means it's a ''zero'' order filter, or say it's a scaling. However, trade off between number
of weights and similarity of output signal is significant, the more weights the better the output, but before the problem of non-zero-phase FIR
is fixed, the more weights mean the more discontinue. Another trade off is the number of period vs quality of output, the more
period we use, the better the weight will converge to, then the FIR itself will be more optimized in the least square sense, however,
the output signal is less optimized because it is difficult to have the output signal be exact while using 2nd order FIR filtering.
From now on, my works will try to focus on finding new ways to design adaptive zero-phase FIR filter, and decide what's the practical
number of weights and period will be used to make the output sounds good.

Original guitar wav file
New no delay zero order FIR fix at 33 wav file


Figure, fixed zero phase problem by setting number of weight is 1.

April 24, 2006







April 13, 2006

Improved the sound using series of FIR filters, tried using fixed weights for different fix location













Fig. 1 The first plot is the original plucked guitar string, second is the synthesis result of a sliding 2 order FIR filter using the updated weights in the adaptive system every step, the third is the synthesis result using the last updated weights in one period adaptive calculation, it's implemented by 25 series of 20 order FIR filters with.


April 10, 2006:
Revised a little bit on my previous works, generate two synthesis sounds, (see Fig 1.) The goal is to make find the correct
FIR filter coefficients from the adaptive system, to generate something hopefully have reasonable result for string sounds.
I have to deal with the trade-off in terms of number of adaptive weights, length of the input signal being used and the quality
of the sound. The FIR is not zero phase, so it causes delay in time domain which I need to fix that. Much more careful revise
of the code is needed for a acceptable result.

Original string (wav)
Done: Synthesis string with sliding filters (wav)
My target is to make this one better: Synthesis string with 25 series of FIR filters (wav)


Reference
[1]
Julius O. Smith online book, http://ccrma.stanford.edu/~jos/SimpleStrings/Extended_Karplus_Strong_EKS_Algorithm.html