Another Making JF page is ready for you. Yesterday and today, I have worked on a project that has been very important in my mind: simple, fast construction of musical samples. Given samples, a person can create a song using SoundTracker or CSound. That means the production of samples becomes a serious business. A person needs samples to work on three elements of music: melody, harmony, and rhythm.
A person can deal with very poor samples if they know what they are doing. If they do not know how to efficiently use poor samples, they are sunk. Some people find good samples and just use them. That is fine for them, but that still leaves someone to create good samples for the artist to use. Who makes samples and how is not your business if you just use samples. If you create samples, you need to know how to make good samples.
There are a variety of methods. I use CSound, a bit of math, analyzing FFT of sounds, and trial and error. This is a good method to create simple sounds. But for more interesting sounds, randomness in the creation is useful. I have created a few tools and methods that generate instruments for CSound.
One is Random Instrument. Random Instrument uses a random number generator to add opcodes and values to a CSound Instrument. Then it plays a few notes. This Random Instrument tool can create hundreds of instruments in less than a second. I can play one note for each of these instruments and pick the exact one that I am interested in. But the Random Instrument could only generate a few dozen different types of sounds. With more data, it could possibly generate a large number of sound types.
But I started a new project instead of expanding Random Instrument. This new project is CSound FM Instrument Generator. It generates FM Instruments using envelopes and pipes. FM is interesting because it can take quickly changing variables for several of its parameters. The parameters of FM are: amplitude, frequency, carrier, modulator, and index (c m a f i in the the yellow triangles).
The favorite inputs for an FM are envelopes. So you see above the Envelope Editor at the top right. It features a simple clickable interface with add and delete. To the right of the buttons are the Min and Max values for the envelope.
Below that is the Structure Editor which a person can implement multiple FMs in series. The plan for the future of this program is to allow any type of connection. Currently, there are only linear connections allowed. That's plenty for me because I've only tested using one FM oscillator at a time. At some point in the future, I'll move onto multiple oscillators. Technically (according to FM synth jargon) I'm using two oscillators and piping the modulator's signal into the pitch of the carrier oscillator. But it's just a technicality.
The idea for CSound FM Instrument Generator is to generate an FM oscillator with many strange envelopes, editable and previewable in a very short amount of time. What makes the keyboard and guitar such good learning instruments? Because they have a built-in feedback model which allows a person to hear what they are creating. Both have melody, harmony, and rhythm built in. Both have just one sample and a handful of envelopes (even though a wav could not express it, CSound could). The CSound FM Instrument Generator has a similar feedback model, but not for melody, harmony, or rhythm, but rather for samples.
Below is an instrument I created in just a few minutes using CSound FM Instrument Generator. If you know CSound, you can probably generate the output normally. If not, I would encourage you to learn CSound first.
; test2.orc instr 113 ; FM instrument 1 k1 linseg 0, p3 * 0.11667, 0.96, p3 * 0.33667, 0.66, p3 * 0.74333, 0.49, p3 * 0.99, 0.015 k2 linseg 0.355, p3 * 0.07, 0.485, p3 * 0.30667, 0.31, p3 * 0.52667, 0.465, p3 * 0.67333, 0.285, p3 * 0.79667, 0.395, p3 * 0.93333, 0.155, p3 * 0.99667, 0.25 k3 linseg 0, p3 * 0.12, 0.37, p3 * 0.23333, 0.235, p3 * 0.63, 0.175, p3 * 0.99, 0.005 k4 linseg 0.005, p3 * 0.37667, 0.23, p3 * 0.49, 0.06, p3 * 0.75, 0.1, p3 * 0.99667, 0.01 k5 linseg 0.27, p3 * 0.10333, 0.455, p3 * 0.22333, 0.345, p3 * 0.29667, 0.54, p3 * 0.37667, 0.4, p3 * 0.50333, 0.495, p3 * 0.60333, 0.495, p3 * 0.74667, 0.35, p3 * 0.81333, 0.25, p3 * 0.99, 0.32 a1 foscil k1*p4, k2*p5, k3*p6, k4*p7, k5*p8, 1 ;a2 foscil 0, 0, 0, 0, 0, 1 ;a3 foscil 0, 0, 0, 0, 0, 1 ;a4 foscil 0, 0, 0, 0, 0, 1 outs a1, a1 endin ; FM instrument 1 ; a.sco i113 0 1 10000 500 1.2 1.1 0.3