|
S I L E N C E / Version 2.0Vineyard Productions 5 October 1996 |
Welcome
|
Copyright (C) 1996 by Michael Gogins.
|
Welcome to Silence, a system for making music on computers by means of software alone.
Silence is especially designed to support algorithmic composition and synthesis. I made it for my own very specific purposes, but I will be happy if you also find it useful. Silence consists of a number of components designed to work with each other, with Csound, with standard MIDI sequencers and soundfile editors, and with programming languages.
The basic idea is that you write whatever software you want or need to make notes, which are just six numbers each, and you put them into Silence. Silence then takes care of making the notes into music, either as MIDI sequences or as soundfiles (using Csound).
I have thrown in a bibliography of the books I used to make this system, also a page of links to sites I find useful in this field.
WCsound.dll | A Visual C++ 4.1 ActiveX object providing a graphical user interface, score manager, and Midi sequence translator for Csound. |
WCsound.exe | A Visual C++ 4.1 standalone program that runs Wcsound.dll from the command line; useful for translating Midi sequences to and from Csound scores. |
Grifs.exe | A Visual C++ 4.1 program that makes soundfiles using recurrent iterated function systems and the Gabor transform. |
Rifs.exe | A Visual Basic 4.0 program that makes soundfiles using recurrent iterated function systems and Csound. NOTE: Requires the Visual Basic 4.0 32-bit runtime (VB40032.dll). |
LinMus.exe | A Visual C++ 4.1 program that generates scores using Lindenmayer systems; uses WCsound.dll to manage the scores. |
ScrnMuse.exe | A Visual C++ 4.1 program that translates screen shots of images from the Windows clipboard into WCsound scores, Csound scores, or Midi files; useful for translating fractals from Fractint into music; uses WCsound.dll to manage the scores. Also translates screen shots into Csound heterodyne filter analysis (ads) files; by then using Csound's adsyn instrument with the .ads file, you can turn the fractal image directly into a sound. |
MCsound.dll | A MathLink program enabling WCsound.dll to serve as a Mathematica add-in. I sometimes use Mathematica for algorithmic composition and mathematical manipulation of scores. |
Csound.exe | A freely available software sound synthesis system that I have optimized for Win32 and extended with plugin opcodes. |
STK.OPC | A public domain Win32 shared libary implementing Perry R. Cook's Synthesis Toolkit 95 as plugin opcodes for Csound.exe. |
Silence is copyright (C) 1996 by Michael Gogins, all rights reserved.
This software is not freeware.
You are permitted and encouraged to redistribute these files in the form of Silence.zip without charge or limit. You are not permitted to redistribute only a part of the proprietary executable files, or to modify the proprietary executable files and redistribute them.
There is no charge for purely private use of Silence. However, if you use any of the proprietary executable files listed above to make music for other people, or to create software for other people, you must purchase a software license by sending a check for $60 to the address above, payable to Michael Gogins.
All music files (including Midi files, WCsound score (.osc) files, and Csound score (.sco) files) in this distribution are copyright by Michael Gogins. You are not permitted to play these files in public, or to perform the music in them in public, without written permission in advance by him.
Note that Csound.exe and STK.OPC are included in this distribution, but are not subject to this license. They have their own licenses under the terms of which they are freely available to use or modify for the purposes of education and research. Csound is copyrighted by MIT. The Csound copyright notice may be found in Csound.txt. STK.OPC is based on code and algorithms in the Synthesis Toolkit 95 by Perry R. Cook, with the exception of my implementation of his instruments as Csound opcodes, and the Synthesis Toolkit notice may be found in STK.txt; Mr. Cook's header files with his notes on patent issues may be found in the Rawwaves subdirectory of this distribution.
In other words, you can get my version of Csound.exe from this distribution and use it as much as you like all by itself or with STK.OPC without owing me anything. However, if you use WCSound or any of the other proprietary files listed above to make music for the public, you owe me something.
Silence requires Windows 95 or Windows NT for Pentium or higher microprocessors.
Silence likes to have a sound card and a Midi port installed.
Silence does not have a digitual audio waveform editor, a music notation editor, or a Midi sequencer built in. Silence is designed to work with other waveform editors and hard disk recorders, notation editors, and sequencers.
If you don't have Silence.zip, you can download it from here.
Once you've downloaded silence.zip, create a Silence directory on your hard disk and unzip the files in silence.zip into it. The Silence directory should have a Rawwaves subdirectory containing all the "raw" soundfiles that the Cook opcodes plugin STK.OPC uses.
The WCsound.dll shared library must be registered with Windows. If you simply run WCsound.exe, it will attempt to do this for you. If that fails, run:
RegSvr32.exe WCsound.dll
Silence uses the Windows shell to play or edit music files. Normally, Windows has pre-defined "open" shell actions for wav and mid files, usually using the Windows media player Mplayer.exe. If you want to enable Silence to invoke your Midi sequencer or soundfile editor, you must register "Edit" actions for your Midi sequencer, soundfile editor, media player, etc., with the Windows shell ("My Computer" View menu, Options command, File types tab, Edit button, New button) for .mid, .wav, and perhaps .aif files. You can also use shell registration to redefine the "open" actions to use some other program besides the usual Mplayer.exe to play music files.
And of course you must install Csound, either from silence.zip or from another archive such as the one at Leeds University.
WCsound is a Windows 95 graphical front end, orchestra and score manager, and Midi sequence translator for Csound, one of the leading software sound synthesis systems for Unix and Windows.
Csound is widely used both to teach computer music, and to realize computer music. It is perhaps the most widely used software sound synthesis system in the world, and is certainly the most widely used on IBM-compatible personal computers. Csound IS freely available and may be used without charge for education and research in accordance with its own software license and copyright. See the Csound.txt file for this copyright.
Csound is available on the World Wide Web from many locations. The most useful location for the purposes of Silence is Leeds University, where John Fitch does us all a great service by maintaining several versions of Csound that run on IBM compatible personal computers, and that includes new opcodes contributed by engineers and composers all over the world. Another notable site for Csound is the Amsterdam Catalogue of Csound instruments.
However, Csound is a command-line program that reads a separate orchestra and score file, and perhaps other files, to produce a piece of music. WCsound provides a convenient graphical user interface for Csound; stores function statements (wavetable definitions), instrument definitions, and instrument statements (notes) in one file; and translates standard format 1 Midi files to and from Csound scores. The WCsound instruments are contained in an "orchestra" library, and the user selects from the library to build up an "arrangement" of instruments for actual use by the score. Furthermore, WCsound is a shared library that readily plugs into other programs using ActiveX classes.
Indeed, WCsound is mainly designed to serve as a score manager component for algorithmic composition programs, and it can interface with such programs in several ways. WCsound works as a standalone executable (WCsound.exe) and as an ActiveX object (WCsound.dll).
For example, in Visual Basic 4.0, read in WCsound.tlb from the Tools menu References command, and write:
Dim CS As New CSOUND
CS.NoteAdd 2, 4.25, 3, 9, 72, .25, 10
CS.NoteAdd 4, 4.25, 6, 8.166667, 72, 1.25, 10
CS.DoModal
When run standalone, WCSound will attempt to open any .osc, .orc, .sco, or .mid file that is passed as a command line argument:
WCSound filename.xxx
Additional .orc, .mid, or .sco files will also be read and merged with the already opened file. This is convenient for opening an .osc file containing a standard orchestra and functions, and then importing into it an algorithmically generated .sco file, or a midifile:
WCSound template.osc generated.sco
WCSound functions.sco orchestra.orc generated.sco
WCSound functions.sco orchestra.orc sequenced.mid
If you want to use the the piano roll display, the rescaling commands, or the Midifile translation commands, you must follow the convention that all notes ("i" statements) in score (.sco) files use the following format for their first 6 parameter fields:
p1 Instrument number from 1 to 200.
p2 Starting time of note in seconds.
p3 Length of note in seconds.
p4 Octave (pitch) of note in linear octaves (middle C = 8.0).
p5 Decibels (loudness) of note from 0 to 96.
p6 Pan from left (-1) through center (0) to right (+1).
pn Additional pfields may be used (e.g. for instrument control).
Try using affine transformation matrices in Mathematica to perform serial compositional transformations of notes and rows of notes!
From the "Orchestra" menu, select the "Import .." command, and import as many orc files as you like to read in their instrument definitions.
From the "Functions" menu, select the "Import..." command, and import (only) the function definitions required by the orchestra from the appropriate sco files.
From the "Score" menu, select the "Import..." command, and import (only) the note definitions from the sco file you want to use.
From the "Orchestra" menu, select the "Edit" command. In the "Orchestra" dialog, select an instrument in the right-hand "Instruments" list and use the "Edit" button to open the "Instrument definition" dialog, in which you should name the instrument, and can edit its code.
In the "Orchestra" dialog, create an arrangement by double-clicking on instrument names in the right-hand "Instruments" list to move them into the left-hand "Arrangement" list, which is the actual set of instruments that will be used to render the score. You can change the instrument numbers by moving the instrument names up and down in the arrangement with the "Up" and "Down" buttons.
From the "File" menu, select the "Save as..." command to save the osc file.
From the "Soundfile" menu, select the "Render" command to compile the soundfile defined by the arrangement and score.
From the "Soundfile" menu, select the "Play" command to play the completed soundfile using the Windows shell.
Please report any bugs to me. Thank you.
In addition to providing a friendlier interface to Csound, I have also made changes in Csound itself.
In particular, I have implemented...
Csound will now add to its instrument table any plugin instrument libraries that it finds. These libraries have the filename extension "OPC" and are loaded either from the local directory, or from the directory specified by the environment variable OPCODEDIR. As a demonstration of this facility, as well as an enhancement to Csound, I have included STK.OPC, a plugin library containing Csound implementations of all the physical modeling instruments in Perry R. Cook's Synthesis Toolkit 95.
marimba
vibraphone
agogobell
plucked
mandolin
clarinet
flute
brass
bowed
rhodes
wurlitzer
tubularbell
heavymetal
percussiveflute
hammond
fmvoices
minimoog
voiceformant
These all work on the same plan, which is demonstrated in the "Cook Bowed String Model" instrument in Template.osc. For each of these opcodes, the Csound manual page would be like this one :
ar bowed xcps, xamp, xconstatus, xcondata1, xcondata2, xmodwheel
Audio output is a physical model of the named instrument based on waveguide synthesis, frequency modulation synthesis, or modal synthesis.
There are no specifically initialization-time variables.
Each opcode library may contain any number of new opcodes. Each library must export and define the following structure which Csound calls to register its opcodes:
/* * Signature for opcode registration function. * Both Csound and opcode must be compiled * with 8 byte structure member alignment. */ typedef PUBLIC long (CSOpcodeRegisterType)(// Used to iterate through all opcodes in a library. long OpcodeSubscript, // Csound audio sampling rate in Hz. float *SamplingRateIn, // Csound control sampling rate in Hz. float *KontrolRateIn, // Control samples per audio sample. int *AudioSamplesPerKontrolSampleIn, // Channels in the soundfile. int *ChannelCountIn, // Address of the function table array in Csound. FUNC *FunctionTablesIn[], // Address of the opcode's dispatch table entry, // to be filled in by the opcode library. OENTRY *OpcodeEntryOut);
This CSOpcodeRegister function either registers a different opcode
for each OpcodeSubscript and returns 1, or it fails and returns
0. The opcode library is responsible for filling in the the arguments to
CSOpcodeRegister, in particular the members of the OENTRY
structure, especially the addresses of the opcode's signal processing
functions.
Essentially, OENTRY is the virtual base class for Csound opcodes; the OENTRY structure contains templates for the return types and argument types of 3 virtual functions, which are called on opcode initialization, on every k or control sample, and on every a or audio sample. The OENTRY structure also contains references to the pfields for the note being processed by the opcode, and to the audio signal output array.
See the Csound manual for more information on how to create new opcodes.
Computers have grown in power and memory since Csound was written. I have increased the capacity of the adsyn opcode from 50 partials to 1024, in order to be able to render Graphics Interchange Format files directly as sounds using time-stretched additive synthesis.