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) + α * [ y (n-N) + y (n – (N+1))]


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

y(n) is the output

α 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 α , 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

Näytä lisää: karplus strong algorithm, plucked string karplus strong algorithm matlab, karplus strong, plucked string karplus strong algorithm, karplus strong matlab, plucked string using karplus strong algorithm matlab, karplus strong algorithm matlab, karplus strong guitar string algorithm, simple plucked string karplus strong algorithm matlab code, karplus strong chord matlab, plucked string karplus strong algorithm matlab code, simple karplus algorithm, plucked string matlab code, plucked string code, plucked string using karplus strong algorithm, karplus strong plucked string matlab, plucked instrument matlab code, karplus strong frequency, karplus strong model matlab, karplus strong algorithm code, matlab karplus, matlab karplus string, use of algorithm, use algorithm, to string

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

Projektin tunnus: #427313

Myönnetty käyttäjälle:


Hello. Please check PM. Thank you.

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

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


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)

See PM for details.

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