Real-time synthesis of a morphable church bell

Author: Kees van den Doel


This applet allows you to simulate a bell. You can strike the bell with mallets of varying hardness (first slider). The bell is modeled by 50 modes, of which 30 or so contribute significantly. With the second slider you can adjust the number of modes to hear how this affects the quality. You can scale all modes up or down with the "bell freq." slider.

The last slider "morphs" the sound. What does that mean? The bell has 50 modal frequencies. This spans a 50 dimensional parameter space. The true bell model was fitted to a real bell sound, and corresponds to a point in this 50 dimensional space. The last slider moves you away from that point on a straight line in a random direction. By pressing the bottom right button you can generate a new random direction away from the realistic bell sound.

Source code: Source code:

import jass.render.*;
import jass.engine.*;
import jass.generators.*;
import java.util.*;
import java.net.*;
import java.io.*;

public class BellApplet extends AppletController {

    SourcePlayer player;
    ModalModel mm,mmOrg;
    ModalObjectWithOneContact bell;
    OneShotBuffer force;
    double hitFreq = .333;
    BellToller bellToller;
    float[] w; // warp direction
    String syfile = "../data/bell4.sy";
    
    public void setNSliders() {
        nsliders = 5;
    }

    public void setNButtons() {
        nbuttons = 2;
    }
    
    void randWarp() {
        for(int i=0;i