# Plucked String (Karplus-Strong) Algorithm

A simple model (based on Karplus-Strong algorithm) may be used to model a plucked string instrument like a guitar. The input-output relationship of the causal LTI system is given by:

y (n) = x(n) + &amp;#945; * [ y (n-N) + y (n – (N+1))]

where

x(n) is a zero mean random variable, uniformly distributed between -1 and 1

y(n) is the output

&amp;#945; is a real-valued constant, whose typical value is 0.5 (experiment with other values and comment)

N controls the pitch of the note; N = floor ( Fs / Fp), where Fs is the sampling frequency in Hz, and Fp is the pitch of the note in Hz. For example, at 8 kHz sampling frequency, N = 20 implies a pitch frequency of 400 Hz.

Using Matlab code:

1. Write a function to generate the output y(n), given &amp;#945; , N and a desired number of output samples. A typical function call may look like, function KS (alpha, N, output_samples).

2. Use the function call to generate a note with a desired pitch frequency.

3. String a sequence of such notes to generate a chord of music. (You don’t have to be a musician, and any sequence of notes is acceptable for the project, but possibly not in real life!)

4. Plot the output, and play out the composed music piece.

Helpful Hints: An 8 kHz sampling frequency is a reasonable choice. You may want to use the standard musical C major scale. The C major scale, covering one octave, is given by the notes {C CS D DS E F FS G GS A AS B}, where CS, DS, FS, GS and AS stand for C-sharp etc. The reference pitch is the note “A above middle C,” and equals 440 Hz. The successive notes differ by a factor of 2^ (1/12). For example, the note C has the pitch of [440*2^ (-9/12)] Hz, and the note B has the pitch of [440*2^ (2/12)] Hz.

Taidot: tietojenkäsittely, tekniikka

Tietoa työnantajasta:
( 0 arvostelua ) Richardson, United States

Projektin tunnus: #427313

## Myönnetty käyttäjälle:

wbellamine

Hello. Please check PM. Thank you.

\$40 USD 0 päivässä
(0 Arvostelua)
1.2

## 3 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön

Ndim

Hi, I'm a PhD Candidate in mechanical engineering (identification of time-varying mechanical systems). Specifically I'm working on AR and ARMA models. The model you describe is an AR model. I'm also an experienc Lisää

\$100 USD 1 päivässä
(12 arvostelua)
3.7
engiflex

See PM for details.

\$100 USD 1 päivässä
(0 arvostelua)
0.0