de en sk
Home > Products > Struck Instrument Simulator

Struck Instrument Simulator

© Ing. Radovan Konečný - radkon, 2013-2016


Go to Models and samples.

This project is one of the components of a virtual music studio.

downloadThe simulator program is free on request.

About the project

The goal of the project was to create a simpler and more efficient modal decomposition model player than my more complicated and slower project Sound modelling - modal decomposition. Since many of the sounds I've decided to model have the character of a struck musical instrument, and each harmonic component is an exponentially decaying harmonic signal (sine), I decided to create a separate project that would be limited to just such sounds. It is true that the easier the player is, the faster and more usable when playing real-time.

The struck instrument simulator works on the principle of modal decomposition, that is to say the imaginative separation of sound into individual harmonic components or modes (but they do not have to be an integer multiple of the basic frequency of the tone) and their separate playback by means of harmonic (sine) oscillators. The resulting sound is generated by summing up the signals of each oscillator. This is not about simulating the physical properties of a musical instrument (e.g. string), but rather about simulating the sound created by the musical instrument. Therefore, it is possible to create good models without measuring the physical and acoustic properties of the musical instrument, and audio recordings (of course appropriate) are enough.

The simulation (or modelling) of a musical instrument is divided into two independent but necessary phases:

  • creating a model, i.e. rules on the behavior of individual harmonic components. The model can be created either by frequency-time analysis of an existing sound or by mathematical algorithm (creating synthetic sound). At the end of this phase is the model as only a set of information about harmonic components (or vibration modes) and their behavior over time,
  • playing the model with a set of harmonic (sine) oscillators. The oscillators are set according to model information. One-tone playback usually provides hundreds or thousands of oscillators.

Since the modal decomposition player has full control over the individual harmonic components, it is possible to change several interesting parameters of the sound:

  • change the overall tuning of the tone without affecting the time parameters of the sound (e.g. the envelope),
  • shift the tuning of higher harmonics (so-called inharmonicity),
  • manage the envelope of individual harmonics (e.g. attack or decay time),
  • control the volume of each harmonic - so change the color of the sound even without using a digital filter or equalizer,
  • simply add vibrato or tremolo,
  • to change the initial phase of harmonic components,
  • ensure a more realistic ending of the tone (e.g. when you release the key),
  • turn off those harmonic components that would be above the acoustic band and cause problems in meeting the sampling condition (i.e. the frequency must be less than half the sampling rate),
  • turn off harmonic components under the acoustic band (e.g. below 20 Hz).

In this project I was limited to a few basic parameters of harmonic components:

  • frequency of the harmonic component,
  • amplitude of the harmonic component,
  • place the harmonic component in the stereo (center, left channel or right channel, inverted center),
  • the (linear) rise of the harmonic component (Attack-time),
  • time of the (exponential) decay of the harmonic component (Decay-time),
  • initial phase of the harmonic component,
  • changing the harmonic component's ending at the end of the tone (e.g. when the key is released).

The player itself allows to control some model parameters - tuning, decay time, and so on. It is also possible to create a multi-layer model (i.e. for a particular tone and velocity contains a set of slightly different oscillator settings), and one layer is randomly selected when playing. When repeating one tone, it does not always sound the same, which sounds more better.

In addition to playing back harmonic components (sines), my simulator is also able to play signals from white noise filtering. Each oscillator can therefore work either as a harmonic oscillator or as a noise generator, with noise filtered by a resonator digital filter, and it is possible to determine the center frequency, the quality of the filter and the order of the filter. This feature is intended to simplify simulation of the foley sound components - for example hammer strike, hits, and so on. With a high quality of the filter, the noise generator can also be used as a generator of a nearly harmonic signal, but it is not purely harmonic and regular, but has a bandwidth in the frequency range (the sine does not have it). It also has a random character and two same tones will not sound the same. See samples of NoiseSaw, NoiseSquare or NoiseGlockenspiel. (A similar principle also uses my Sound modelling - NoiseSaw project.)

The program works with MIDI and with NetSound. It also supports ASIO audio devices (smaller sound latency).

Screenshot:

screenshot

The second part of the project is the algorithms for creating the model - i.e. the rules of (the above mentioned) properties of all harmonic components for individual tones and velocity. Several usable synthetic models have already been created (see samples and models below). The long-term plan also includes the development of a software environment in which it will be possible to create a model from existing sound recordings. It will be the so-called resynthesis of musical instruments. Some of the experiments are also in the following sample table.

Models and samples

(Note: Some sound samples may not work in Internet Explorer.)

Synthetic sounds Sound samples Model file
Wire3

downloadWire3.model (841 kB)
Glockenspiel

downloadGlockenspiel.model (156 kB)
NoiseGlockenspiel

(Q=100)

(Q=100, 500% decay)

(Q=40, 1000% attack, 500% decay)

downloadNoiseGlockenspiel.model (92 kB)
NoiseSaw.2

(Q=100)

(Q=100, 300% decay)

(Q=100, 300% decay)

in music

in music

(Q=60)

(Q=60, 300% decay)

(Q=60, 300% decay, without filters)

downloadNoiseSaw.2.model (193 kB)
NoiseSquare.2

(Q=100)

(Q=100, 300% decay)

(Q=60)

(Q=60, 300% decay)

downloadNoiseSquare.2.model (104 kB)
SawStrike (saw-waveform-style strike)

downloadSawStrike.model (178 kB)
Harp (harp-like string instrument)

(50% decay, 500% release)

downloadHarp.model (153 kB)
NoiseHarp (noise-version of the harp model)

downloadNoiseHarp.model (206 kB)
Tank drum

downloadTankDrum.model (23 kB)
Sine waveform

downloadSine.model (0.7 kB)
Triangle waveform

downloadTriangle.model (95 kB)
Square waveform

downloadSquare.model (82 kB)
Saw waveform

downloadSaw.model (152 kB)
Resynthesis if real sounds Sound samples Model file
Test - glockenspiel

(original and resynthesis)

 
Choir
(related project)

(resynthesis of my voice)

downloadRkChoir40.2.model (33 kB)

Utilities:

Virtual keyboard for NetSound
MID-file player via NetSound
MID-editor with playback via NetSound
Interactive music system INGENIA
Copyright © 2009-2024 Ing. Radovan Konečný - radkon. All rights reserved.