Pages coming from (2004-2013):

Music and New Technologies - Conservatory "A.Casella" in L'Aquila- Italy

Tutorials, papers, scripts and demos on signal processing for sound &  music

Check also links on DSP, which includes also e-books on that subject. Also this page about tools for music and sound signal processing, can be useful. Here you can find the site from where you can download Scilab.

These Scilab and TclTk scripts are widely commented to show how things work, and the use of the tool. 

-- Scilab & TclTk scripts------------------------------------------------------------

Please use these scripts in a correct way. Give credits to the author and quote this site.

General directions for use:

These script are conceived for tutorial purposes. Read comments carefully before using them, in order to clearly understand the operation.

Scilab scripts, directions for use:

First, install Scilab.

Decompress these files everywhere you want.

Double-click on the file having suffix ".sce". Scipad will open and show the script. You can modify it, if needed.

From the scipad menu "Execute", click on "Load into scilab". The script will run.

 Very simple Scilab script to generate a sinusoid. 

A hopefully soft introduction to the usage of Scilab, to generate a sinusoid.

Table oscillator.

Generate a sinusoid both rounded or interpolated. Experiment changing the table size

Producing sound frames starting from single samples (something like a precursor of granular synthesis) in Scilab.

I a frame of  1 sec you can place pulses everywhere you want. Shows a plot of the frame, tohether with its spectrum, and the result is saved into a wave file.  (from a suggestion of  Michelangelo Lupone.).

A more complex Scilab script to estimate transfer functions.

Characterization of  linear systems. The stimulus in the left channel, the response in the right channel. 

The script is interactive (from the Scilab console) and  shows the transfer function.

Click here to download a zip file of these scripts

This  Scilab script demonstrates causal and anticausal filtering.

Relationships between amplitude and phase of a transfer function are important in order to achieve a causal behavior, i.e. in order for a transfer function to be computable in actual real time. As a further exercise, try to modify the script in order to apply to the low-pass filter the phase of an high-pass filter, i.e. changing the sign of the phase. [Updated 24/7/2005]

Click here to get a zip file of the script.

A TclTk script to plot pitch and formants in a (hopefully) useful way.

Wavesurfer is a very good tool for pitch-formant analysis. It has nevertheless some limitation in showing data. Pitch is plotted in the maximum range of 400 Hz, which is not enough for both sing and speech, nor for  musical instruments. Moreover, of formants you can't see the bandwidth. The plot area is very small, so that it is quite  hard to get quantitative information. The underlying TclTk package - SNACK - computes nevertheless more data than those showed, particularly probability of voicing and autocorrelation (for pitch), and bandwidth (for formants). In Wavesurfer you can save this information in ASCII (text) files by right-clicking on the corresponding pane. Pitch data are saved in ".f0" files, while formants data are saved into ".frm" files. This script make use of these files to show pitch and formant data in different ways. You can particularly choose the frequency upper limit, and the linear or logarithmic (octave) frequency scale.   

Being a script, you can open and see it using any text editor (avoid word processors!). it is also multiplatform (Windows, Linux, Solaris, MacIntosh). You must only have TclTk installed in your system (tested with 8.4 version). 

Click here to download this TclTk script.

A Scilab script which shows the four main lop-pass filters of the first order, and related eletronic circuits.

This script shows the Bode diagram of the four filters, which are all causal, being them a simulation of an electronic analog actual discrete circuit. This script makes use of the Scilab embedded TclTk interpreter to show a figure of the corresponding electronic circuits. So, be sure that all these three files are present in the same folder. [Updated 24/7/2005]

Click here to download these scripts

A Scilab script to show the frequency response and the step response of a resonant, 2° order damped system.

This script lets you interactively choose the cut-off (resonant) frequency and the damping factor. It shows the Bode plot and the step response of the system. This script makes use of the Scilab embedded TclTk interpreter to show a figure of a corresponding electronic circuit. So, be sure that all these two files (script and figure) are present in the same folder.
Beware: for unknown reasons, this script runs very slow (it uses a lot of CPU time) in version 3.1.1. It works fine under version 3.0 instead. [Updated 24/7/2005]

Click here to get a zip of  these files.

A simple Scilab Script to illustrate the convolution with an Impulse Response.

This Scilab script allows - even if in a quite rude way - the convolution of short sounds (few tenths of seconds) with an Impulse Response. You can in this way  for instance ear your sound as it would be heard in a Concert Hall or a Theatre. Impulse Response of Theatres, Churches and Concert Halls as well as anechoic sounds are available on the Internet, here for instance (thanks to Angelo Farina). As usual, read the comments before use [Updated 24/7/2005].

Click here to download the script

Scilab Script to show two Sonic Visualiser features files superimposed on the same plot.

You can load a couple of ASCII files coming from feature analysis and see them as two superimposed curves on the same plot. Let follow the comments to further personalize the script.

 Click here to download the script