*SculptTool Tutorial*
by Stanko Juzbasic
First of
all...
Scroll to the bottom of the page and
read the conditions of using the program. If you disagree, no
hard feelings, just don't use it.
What is SculptTool
It's a little computer music research utility which can import, modify,
convert, export and synthesize audio analisys files saved in text
format.
What was it made for
I got inspired by IRCAM's AudioSculpt. It could display an analyzed tone as both, image and text. That's one of the amazing inventions in the field of computer aided sound design. I got as much inspired by SCULPT, a cool RTcmix instrument, written by Brad Garton, which placed AudioSculpt partial tracking files into makegens. So, the program owes its name to the both. I wished there was a link in between, an editor capable of musically meaningful manipulations of those partials. Since there was none, I had to take a little effort in order to write one. However, having started the project, during my Fulbright Visiting Research at Columbia University CMC I had no idea what I was after, just a bit of intuition. So I had to hear how it could sound. After a few vicious circles of code writing, learning, debugging and composing it grew up into a small self-standing application. It is still a work at its begining. I am in the middle of discovering what could be a short and transparent way between music representation and auditory effect in this particular case. Feedback from anybody's experience with ST could greatly contribute to my project.
What does it do
It reads partial tracking files, additive analysis files and interprets them as sets of partials, which can then get cut, copied, pasted, sorted, scaled, transposed, mirrored, inverted, warped as well as artificially generated. Partials can also get filtered by means of linear prediction (LPC) files saved in text format.
Basic concepts
SculptTool accepts command line arguments from console and reads sound analysis data from sound analysis files on the disk. It can also return interactive messages to the console and write audio files or synthesis score files to the disk. You can redirect console input or/and output, so it will read command line arguments from the script file, instead of console and write the messages to a log file on the disk. Depending on the first command line argument you choose it will work in either interactive or automatic mode. In Macintosh version you will have to write this first argument into a separate command-line dialog-box.
How to work with it
It accepts command-line arguments either manually, while running
in interactive mode or from a script-file in automatic mode. It has a
UNIX-like shell/console interface and works under both MacOS and UNIX
operating systems. If you want to explore what to do with it, you will
use interactive mode. In the interactive mode the shell displays
prompts which direct the user. An extensive on-line help is provided at
each step of the work. Once you make your ideas clear, you can write
command-line scripts into a score file and SculptTool will process them
automatically.
What kind of hardware is needed
A PowerPC, IntelX86 or MIPS hardware platform with at least 32 MBytes of RAM. You will benefit very much from a speedy machine; SculptTool does a huge amount of floating-point data crunching. Special sound hardware is preferd (you would probably want to listen to your work) but it is not required, since all the processing and audio synthesis is file-based. A large and fast hard disk with a few hundred free megabytes is very helpful.
Operating systems (working with current version v.
0.5.1):
MacOS: 8.5x, 8.x, 7.6.1
PowerPC
UNIX: LinuxPPC: kernel
v. 2.2.12
RedHatLinux: v.6.0
Irix: v.6.5
What do you have to know about computers
You are supposed to be some kind of computer music practitioner
already. The concepts of additive synthesis, phase-vocoding and
algorithmic comosition should ring a bell. You'd have to know a few
basic concepts in UNIX-style computer interface, such as console,
shell, input/output redirection, command-line arguments as well.
You will know that much for sure if you are already familiar with
IRCAM's Audiosculpt and Diphone , and Columbia CMC's RTcmix. If you are
not, hurry-up, download the RTcmix? from Columbia
CMC's web page and apply for membership in Forum
IRCAM's Sound Design Group. Apart from that, there are a few
more details worth taking into account:
What is "partials"
A few mathematical theories of musical tone, dating back to 19th
century teach that musical tones can be decomposed into sets of
primitive contours, simultanously independent but co-related. Their
qualities (time, frequency, loudness) partially contribute to the
overall qualities of tones (pitch, timbre, integrity), so they are
called partials. A partial in itself is an enveloped sinewave.
A sinewave is the simplest model of tone, which cannot be decomposed
any further. It sounds dull and resembles to the sound of a tuning
fork. An envelope is a contour, tracking the development of
frequency and loudness over time. A partials' tracking file is
really a text file which stores descriptions of these envelopes.
Where's the difference between FFTsand partials?
F(ast) F(ourier) T(ransform) is a method of analyzing, filtering and resynthesizing spectral contents of a digitally recorded signal. As useful as it is in the field of sound design (cross-synthesis, de-noising, reverberation, data compression, phase-vocoding etc?) I found it somewhat frustrating in terms of looking for plain musical fun of freely decomposing, tweaking and recomposing sounds in controlable, but fairly unpredicted ways. Therefore I gladly abandoned the trendy quest for "artifact-free" computer music for taking a chance to make something appear as harmony, which in another moment can be made to appear as pitch, or as color? Partials, as text files posessed a rare duality of being an aspect of sound representation, but also consisting of contours that could be shaped by means of music composition. This is how a tipical partials file looks like:
( PARTIALS 4
( POINTS 66
0.023 107.483
4.905
0.029 106.906
6.393
0.035 106.892
7.218
... ...
... ...
0.401 161.814
-10.837
)
( POINTS 43
0.023 317.816
-0.924
0.029 320.954
0.352
0.035 322.549
1.272
... ...
... ...
0.267 387.598
-15.703
)
( POINTS 34
0.023 409.369
-3.463
0.029 422.257
-2.888
0.035 427.591
-2.146
... ...
... ...
0.215 484.361
-13.998
)
( POINTS 22
0.058 226.494
-8.304
0.064 226.317
-7.738
0.070 220.751
-5.203
... ...
... ...
0.180 250.804
-4.006
)
)
(Dotted lines spare sone space for this example - not to write the
entire file - which is pretty long)
It's actually a LISP list, originally created for export option to
IRCAM's PatchWork. It is really cool as a vehicle for composing
instrumental, orchestral and electro-acoustic music. Since I have been
slightly embarrased with MIDI with its limitations as such, I
thought this could also work other way around.
Known artifacts
Partials can be taken and interpreted as control data for time-varying
additive synthesis. Hence, the properties of partials happen to be
suitable with well structured tones, which can be modeled by a finite
number of continous oscillators. There are no good ways of representing
irregular, chaotic sounds with partials. The noisier the sound is, the
more pronounced this weakness shall appear.
Where to get these partials form
There are four possible sources: AudioSculpt, Diphone, and AddAn (in
MacOS). They are parts of IRCAM's ForumWare bundle. How to create
partials is described in detail in AudioSculpt manual. Diphone and AddAn
generate so-called .F0 (fundamental estimation) and .ADD (additive
analysis) files; they get converted into partials later, during import
into SculptTool. So, if you don't have these programs already,
you can apply for Forum membership www.ircam.fr.
This will cost you an annual subscription fee, but it is worth it. Recently
I have also updated the UNIX program Ceres3
to export IRCAM partials as well. This program is free and can be
downloaded from my home page.
SculptTool 0.5b
Before you start
The letter "b" behind the program's name means it is a "beta" version, i.e a test version, and not a completed work. Having your feedback will help me to complete my work in a way which would be more consistent, stable, fool-proof and easy to use.
Starting the Program
Before you start make sure that analysis files (partials, .ADD, .F0, lpc, whatsoever) are in the same directory (folder) as the program. The score (script) file can be elsewhere. Here is a brief description how to start the program, depending on which platform you are using.
MacOS
In "Finder>File>Get Info" menu, make sure you have reserved at least 6 megabytes of RAM for the program. It is very memory-hungry.
Upon double-clicking the icon a command-line box will ask you to enter proper arguments. Your choice defines how the program will behave. You precede the program options with double minus [--]. You have the following options, so far:
[c] initializes console & status line (automatic
mode)
[q] auto-quits on 'done'(automatic mode only!)
[n] disables lots of interactive shell messages
[d] prints debug data (incompatible with [n] )
To work in automatic mode, you have to
choose i/o redirection files, type-in options (I prefer [--c]), then
press 'return'.
NOTE:You cannot redirect input/output in
the command-line box (SculptTool</Desktop/Score) Youn must use the
radio buttons.
Redirecting console output (to a log file) is not recommended in this version (0.5b), because it can't work in the background. On the other hand, by not selecting [q], you will have to quit the shell manually, after the program has terminated. The shell will ask you if you wanted to save the log file.
To work in interactive mode type optional
arguments; press <return>.
Upon that, the program will open its own blue console window titled
"SculptTool Shell". The shell will interactively accept
arguments from the keyboard, returning on-line help to the console. If
you are not sure what these messages mean, you can always press [?], [-h] or [-i], as well as consult these pages.
UNIX
If the system is equipped with an X-window GUI or not, it doesn't affect the way how you will use the program. Since the console is provided at the system level you start the program like any other UNIX program:
SculptTool [--options][<score_file][>log_file]
OPTIONS: [n] disables lots of
interactive shell messages
[d] prints debug data (incompatible with
[n] )
To work in automatic mode type-in options (I prefer [--n]), type-in i/o redirection files; press <return>.
To work in interactive mode type optional arguments; press <return>. The shell will interactively accept arguments from the keyboard, returning on line help to the console. If you are not sure what these messages mean, you can always press [?], [-h] or [-i], as well as consult these pages.
The exception is IRIX OS, which has a similar front end to the MacOS version and can be started by double-clicking the xsculpttool icon:
The script and log files can be dropped to the Finder drop-pockets, the radio-boxes toggle between the console and script (log files), the command line text field lets you enter the following options:
First option must be preceded by --, for example: --d tcsh
The Process button starts then the process, Reset kills the SculptTool shell, Quit quits the program. The helper shell can be then invoked directly from the SculptTool shell by typing:
:sh
Tutorial 01:
Guided tour
Launch SculptTool
MacOS Command: --c
Use radio buttons to select file [tour]
UNIX Command: SculptTool <tour
Tutorial 02:
Import and analysis of partials
Launch SculptTool
MacOS Command: --c
UNIX Command: SculptTool
[-o]
<return> (open)
[pt]
<return> (type of file; pt = partials)
[TABLA.pt] <return>
(name of file)
[i]
<return> (import partials)
[a],[g] or [h] <return>
(look for aritmetic, geometric or harmonic
relationship among partials)
Here you have two possibilities. Either
[pitch]
<return> (perform pitch estimation)
[0 0.5]
<return> (p1 = attack; 0 = discard
partials which don't attack simultanously)
(p2 = detuning; 0.5 = 1/2 of a half-step)
[440.0]
<return> (master tuning in cps)
or
[pitch-s]
<return> (pitch estimation save to file)
[0 0.5]
<return> (p1 = attack; 0 = discard partials
which don't attack simultanously)
(p2 = detuning; 0.5 = 1/2 of a half-step)
[440.0]
<return> (master tuning in cps)
[TABLA.af] <return>
(name of analysis file)
The analysis file is a normal text file which can be read in a standard text editor.
Tutorial 03
Exporting partials
Without quitting the program, proceed to the following session:
Format: CMIX - SCULPT
[expor]
<return> (export command)
[sculpt]
<return> (sculpt command)
[TABLA.sculpt] <return> (score-file name)
[TABLA.snd] <return>
(sound-file name)
[0. 1. 10000 .5] <return>
(sculpt parameters)
(=start_offset time_stretch overall_amp stereo_spread)
Format: CMIX - overlap/add
[expor]
<return> (export command)
[over]
<return> (overlap/add command)
[TABLA.sco] <return>
(score-file name)
[TABLA1.snd] <return>
(sound-file name)
[0. 2. 5000 4. 2] <return>
(overlap/add parameters)
(p0 = start_offset in secs.)
(p1 = time_stretch factor; 2. = twice)
(p2 = overall_amplitude)
(p3 = window step factor)
(window function 1 = Hamming, 2 = Kaiser)
[33]
<return> (number of points per window)
Format: MacCMIX - overlap/add
[expor]
<return> (export command)
[mac]
<return> (Mac-cmix overlap/add command)
[TABLA.script] <return> (score-file name)
[TABLA.AIF] <return>
(sound-file name)
[0. .5. 6.5 2. 2] <return>
(overlap/add parameters)
(p0 = start_offset in secs.)
(p1 = time_stretch factor; .5 = half)
(p2 = amplitude_scale in dB)
(p3 = window step factor)
(window function 1 = Hamming, 2 = Kaiser
3 = triangular)
[17]
<return> (number of points per window)
Be careful with MacCMIX score files. Since MacCMIX uses AppleScript
Editor, which cannot accept files larger than 32k, this will be the
upper limit in score-file size. SculptTool can generate larger files
nevertheless, only Script Editor won't recognize them.
Format: Diphone - .FO and .ADD
[expor]
<return> (export command)
[diph]
<return> (Diphone command)
[TABLA]
<return> (score-files common_name)
(SculptTool will create two files Diphone needs with proper sufixes:
[common_name.FO] = fundamental
[common_name.ADD] = additive )
Format: Audiosculpt partials
[expor]
<return> (export command)
[aud]
<return> (Diphone command)
[TABLA.part] <return>
(score-files common_name)
If you export partials to the same .pt file from which they have been
imported, the partials shall get appended and the list updated, unless
otherwise specified (see help file [expor ?]).
Hint: This export command can also be used for repairing some
corrupt Audiosculpt .pt files. SculptTool will recognize them and
repair them.
Tutorial 04
Synthesize, clear, convert and quit
Although you can export partials to synthesis engines of Diphone, RTcmix, or MacCmix, SculptTool also includes a high-precision file-based oscillator bank synthesizer. It is a bit slow, but very easy to use. It only has one command and three options (the third would be a "no-options" option). Without quitting the program, proceed to the following session:
[synth-a]
<return> (option [-f] removes
intermediate float file)
(option [-a] would not create AIFF file)
[TABLA]
<return> (sound-file name)
(SculptTool will append .fp sufix for the float file)
[clear-p] <return> (option [-p] removes partials from memory)
[-c]
<return> (convert command)
[TABLA.fp][-f2a] <return> (file name;
float to AIFF conversion)
[-q]
<return> (quit SculptTool)
FILE>QUIT or
<cmd> [q] in MacOS (quit
shell & console).
(SculptTool has appended .AIFF sufix and creator_type if in MacOS)
Just double-click the file's icon; it will open in AudioSculpt.
Tutorial 05
Making scripts
If you know what you are after, you can combine the above listed tutorial commands into a single script and the program will execute automatically. The result you shall get is really not a big deal. It is just an example. Before you proceed, please remove or trash following files:
TABLA.AIFF, TABLA.fp, TABLA.script, TABLA.sco, TABLA. sculpt, TABLA.F0 and TABLA.ADD.
The tutorial script would look like this (10 lines of code):
-o pt TABLA.pt i h
pitch-s 0 .5 440. TABLA.an
expor sculpt TABLA.sculpt
TABLA.snd 0. 1. 10000 .5
expor over TABLA.sco
TABLA1.snd 0. 2. 5000 4. 2 33
expor mac TABLA.script
TABLA.AIF 0. 1. 9000 2. 2 17
expor diph TABLA
synth-a TABLA
clear-p
-c TABLA.fp-f2a
-q
You have it in Tutorial files folder as
Tutorial_05. Most of the following tutorials are also covered with
tutorial scripts. For your convenience, please don't just use
them before you get used to them. Instead, start your work with the
program in the manual, interactive mode.
Launch SculptTool:
MacOS: [--c] (into command line box)
use radio buttons and "open" dialog to locate [inFile].
<return>
<return>
and the program will run until it completes execution, then it will
quit.
Choose menu: FILE>QUIT or <cmd>[q] (quit shell & console).
UNIX: [SculptTool
<inFile]<return>
and the program will run until it completes execution, then it will
automatically quit.
Tutorial 06:
Diphone import and editing
SculptTool is capable of importing Diphone additive analysis files and converting them into partials. These partials can then be edited the same way as if they have been imported from a partials' AudioSculpt file.
Launch SculptTool
[-o]
<return>
[ad]
<return>
[clang.ADD] <return>
[5]
<return> (point-to-point frequency jump limit
in %)
[h]
<return> (look for harmonic
relationship among partials)
[pitch-s]
<return> (pitch estimation-save to file)
[0 .5]
<return>
[440.]
<return>
[estimation] <return>
It's here where the interesting part begins. If you open the file
[estimation] in a text editor, you will get an overview of how the
partials are related to each other. By choosing the [edit_] command,
you will be able to separate several sets of partials from the memory.
It would look like this:
/* Source file----"clang.ADD"
PARTIAL ANALYSIS
start time part.dur.
avg.freq avg.amp.
h_family# ord.no#
Oct*¢
part.# 1
0.050 0.430
325.27 -25.48
1
1.00 8* 376
part.# 2
0.050 0.210
653.25 -27.60
1
2.01 8* 376
part.# 3
0.050 0.590
983.73 -34.83
1
3.02 8* 376
...
...
part.# 15
0.050 0.640
1468.90 -35.96
0
0.00 10* 586
part.# 16
0.050 2.060
1676.54 -40.92
0
0.00 10* 815
...
...
part.# 20
0.050 1.810
454.64 -33.80
2
1.00 8* 956
part.# 21
0.050 0.710
916.95 -36.22
2
2.02 8* 956
...
...
part.# 31
0.080 0.040
1679.83 -26.65
0
0.00 10* 819
*/
It is a list of partials with corresponding start times, durations, and other average values. What stays in last three columns is of particular interest at the moment:
As already mentioned, during import SculptTool performs a series
of cross checks among partials to determine how they are related to
each others. As result it selects partials into sets of harmonic
families upon following key:
h_family#(value) explanation
0 inharmonic partial with no valid relation to others within given
constraints
1,2,3? sets (families) of in related partials in the time order of
appearance
ord.no# explanation
a.bc harmonic multiplier
1.00 fundamental
3.00 third harmonic of the set
6.02 sixth harmonic of the set
Oct*¢ (value) explanation
8*377 Octave*cent pitch of the set (family)
Please note that all inharmonic partials have the ord.no# od zero, because there is no "harmonic order" among them, but each has its own pitch, i.e, all inharmonic partials are treated as one set of independent pitches.
Back to SculptTool we type:
[edit_]
<return> (call edit menu)
[cut]
<return> (call cut)
[+0]
<return> (select inharmonic candidates to be
cut)
Selection works like this:
+ means we want to select something
0,1,... ...,n [h_family#] number
or
8.,8.5 [Oct] values of the sets
or
8*0,8*702 [Oct*¢] values of the sets
Please remark you cannot mix family numbers Octs and Oct*cents within a single selection.
Everything that's being cut or copied SculptTool saves into a file "partials.clip" it creates. It is a standard Audiosculpt? partials file format.
Back to SculptTool we type:
[re-ev]
<return> (re-evaluate
what's left)
[h]
<return>
(harmonic relationship)
[pitch]
<return>
(re-estimate pitch)
[0 .5]
<return>
[440.]
<return>
[expor]
<return> (export
what's left)
[aud]
<return> (audiosculpt
partials file format)
[clang_h.pt]<return>
(name of the file)
For convenience of a further example we have saved the partials as "clang_h.pt" file.
[edit_ ]
<return>
[clear+8*956]
<return>
[synth-a ]
<return>
[clangd]
<return> (file name)
[clear-p]
<return> (clear all partials)
Here we have synthesized the first portion of the sound file. Prior to re importing the before-latest version of partials we clear (discard) partials that we have just synthesized because we don't need them anymore.
[-o]
<return>
[pt ]
<return>
[clang_h.pt ]
<return>
[i ]
<return>
[h]
<return>
[pitch]
<return>
[0 .5 ]
<return>
[440.]
<return>
[edit_]
<return>
[clear+8*376]
<return>
[expor]
<return> (export
what's left)
[aud]
<return> (audiosculpt
partials file format)
[clang_h.pt]
<return> (name of the
file)
[synth-a]
<return> (append new
audio data to the
[clangd]
<return>
float file "clangd")
[clear-p]
<return> (clear
partials we won't need)
[-o]
<return> (import)
[pt]
<return> (partials)
[partials.clip]
<return> (inharmonic from clipboard)
[i]
<return>
[h]
<return>
[expor]
<return> (append partials...
[aud]
<return>
... to the audiosculpt file...
[clang_h.pt]
<return>
...in case we may need them)
[synth-a]
<return> (append new audio data to the...
[clangd]
<return>
...float file "clangd")
[clear-p]
<return> (clear partials we won't need)
Finally to listen to what we've done we have to convert synthesized sound file to AIFF format (only playable audio file SculptTool supports so far).
[-c ]
<return> (convert)
[clangd.fp-f2a]
<return> ("filename".fp-f2a = float
to AIFF)
[-q]
<return>
Double-click file "clangd.AIFF", it will automatically open in AudioSculpt. If you don't use it, it can be listened to from any audio player program that suppotrs AIFF files.
Summary:
One can try to play with some other tutorial files in the similar way in order to compare one's experience of what's being heard with how it is achieved, and look for things which sound attractive. If we knew what we were after we could have combined all this tutorial into a single script (21 lines of code):
-o ad clang.ADD 5 h
pitch-s 0 .5 440. estimation
edit_ cut+0
re-ev h
pitch 0 .5 440.
expor aud clang_h.pt
edit_ clear+8*956
synth-a clangd
clear-p
-o pt clang_h.pt i h
pitch 0 .5 440.
edit_ clear+8*376
expor aud clang_h.pt
synth-a clangd
clear-p
-o pt partials.clip i h
expor aud clang_h.pt
synth-a clangd
clear-p
-c clangd.fp-f2a
-q
Tutorial 07
Scaling partials
Listen to the sound clangd.AIFF. Sounds slow? Boring? It does not
matter, because we have the file "clang_h.pt" in which all
the prtials have been stored. We just have to import it and adjust it
using SculptTool's command [scale]. Here is the example:
[-o]
<return>
[pt ]
<return>
[clang_h.pt ] <return>
[i ]
<return>
[h]
<return>
[pitch]
<return>
[0 .5 ]
<return>
[440.]
<return>
[modif]
<return>
(modify partials menu)
[scale]
<return>
[-2.0,1.,0.,.4] <return>
(scale parameters*)
[+a]
<return>
(apply to all partials)
[re-ev]
<return>
(re-evaluation)
[h]
<return>
[pitch]
<return>
[0 .5]
<return>
[440.]
<return>
[synth]
<return>
[clangdScaled] <return>
[-q]
<return>
*A few words about the scale parameters:
Usage: [p1,p2,p3,p4]
p1 = time scale : positive value = multiply current duration by p1
negative value = set the duration to be as long as p1
p2 = frequency scale: btw. O. & 1. = reduce deviation from average
freq.
value of 1. = make no change
more than 1.= increase deviation from average freq.
p3 = overall gain change = decibel value (0. = no change)
p4 = dynamic gain change 0. = flatten to average (no dynamics)
btw. 0. & 1. = reduce dynamics
value of 1. = make no change
more than 1.= increase dynamics**
**This parameter can have drastic effect on sound. So it is good
to use it in combination with other three parameters. Experiment
tweaking the values and listen to the results of your work.
Variable time duration scaling
Only linear time scaling exists so far. After importing and estimating partials
-o pt TABLA.pt i h
pitch 0 .5 440.
select [modif var_t],[start_time end_time],[ stretch_factor(at end time)]. Parameters ar separated by a comma. At start time the stretch-factor is "1", at end is what you specify it. If you chose -1 as end time the program would take the end time at actual end-of-file:
modif var_t 0.1,0.3,5.0 +a
synth TABLA_stretched
-q
The option [+a] is the selection option (all partials are selected).
Tutorial 08
"Partials' counterpoint"
This is a SculptTool's strong point. I adopted this name for a program menu because I was challenged to modify partials by applying some guidelines of motivic development to independent sets of partials, hence, offset(canon), transposition, mirroring, retrogression...
Offset:
Either copy this script and run it automatically (give it whichever name you like), or do a step by step interactive session to get more familiar with the program:
-o pt p.p i h
pitch 0 .5 440.
modif count offs+0 0.5
synth offs_inh
-q
This script looks for all inharmonic partials in a file, than offsets them for half a second. Listen to the file offs_inh.AIFF to understand the result.
Transposition:
Same as above: Please take a look at the following script:
-o pt p.p i h
pitch 0 .5 440.
modif count offs+8.314 0.75
modif count trans+8.314 0.75
synth offtrans
-q
It first asks the program to offset (delay) partials of "oct" 8.314, then transposes the delayed partials for a minor third downward.
Mirroring & retrogression:
Let us now combine two previous commands with two new commands in the following script:
-o pt p.p i h
pitch 0 .5 440.
modif count offs+8.314 0.75
modif count trans+8.314 0.75
modif count offs+0 1.0
modif count mirr+0 9.0
modif count offs+7.041,7.963
1.1
modif count retr+7.041,7.963
synth offtranmirret
-q
Please listen to the sound offtranmirret.AIFF and you will notice that retrogression does not play the entire sound backward, but inverts in time the amplitude and frequency contours of each selected partial. This means that each selected partial will start where it has started and end where it has ended before, just with ending feeling at the start and starting feeling at the end. Let us do one more example to make it more clear:
-o pt p.p i h
pitch 0 .5 440.
modif count retr+a
synth retrogression
-q
If you listen to the fie retrogression.AIFF you will get this
particular effect more clearly.
Tutorial 09
Warping
In ScupltTool there are two types of partials' warping: one which gradually displaces partials from their former position toward a target frequency, over a period of time, and another which makes partials complexly oscillate around this frequency, within the specified period. If this period is longer than the "sound-length" partials will never reach the target frequency, if it is shorter, they will "fly away" after having reached it. Further on, if you include the "harmonic lock" option, all non-fundamental harmonics shall move locked toward their respective harmonic multiples of the frequency being selected. Let us compare four flavors of warping on a simple sawtooth waveform. This is how you make it:
-o pt saw.p i h
pitch 0 .5 440.
modif count warp+6.75 261. .3
1.5 0
synth-a warped
clear-p
-o pt saw.p i h
pitch 0 .5 440.
modif count warp+6.75 261. .3
1.5 1
synth-a warped
clear-p
-o pt saw.p i h
pitch 0 .5 440.
modif count c_wa+6.75 261. .3
1.5 0
synth-a warped
clear-p
-o pt saw.p i h
pitch 0 .5 440.
modif count c_wa+6.75 261. .3
1.5 1
synth-a warped
clear-p
-c warped.fp-f2a
-q
Tutorial 10
Grid-pitch
Imagine a graphical concept in a non-graphical user environment: it is a piano keyboard made of zeroes and ones. As you play a scale, mark the keys you hit (1), leave blank the ones you skip (0). If you play a C-major scale it looks like this: white keys are "ones", black keys are zeroes:
1 0 1 0 1 1 0 1 0 1 0 1
-no black key is hit
A twelve tone scale would look like this:
1 1 1 1 1 1 1 1 1 1 1 1
-all 12 keys are hit
A hexatonic scale would look like this:
1 0 1 0 1 0 1 0 1 0 1 0
-no half-step intervals
An octatonic half-diminished scale would be represented in this way:
1 1 0 1 1 0 1 1 0 1 1 0
etc...
That's enough about scales. What matters next is the root pitch.
Let's put it into an example. Suppose we would like to warp some partials, so that the movement is constrained to a specific scale:
-o pt saw.p i h
pitch 0 .5 440.
modif count warp+6.75 440. .3
1.5 0
modif count grid+a 1 0 1 0 1 0
1 0 1 0 1 0 5.75,440.
synth gridded
-q
Third line of a script calls the [grid]command[+a] (to be applied on
all partials), followed by a hexatonic whole-step scale, followed by
the root pitch (expressed in [oct] or in [oct*¢]. Tuning is
expressed in cps. and is separated by a comma. Caution: If you omit the
selection option, the program will report an error, if you omit it
within a script, it will misinterpret the following commands.
Much more interesting sound can be produced starting with a
complex source file and applying processing of various kind to
different sets of partials.
Tutorial 11
Fundamental estimation files and artificial harmonics
As already mentioned, ST can import fundamental estimation files. However, there are two types of fundamental estimation files: ones which tracks both frequencies and amp_dBs of the fundamental, and others which track only frequencis. ST can recognize the file type and therefore import both, but cannot reconstruct the missing amp_dB information. Example:
-o f0 snip.F0 h
pitch 0 .5 440.
modif artif 8-p +a
expor aud snip_art.pt
synth snip_art
clear-p
-q
In line 3 we generate eight new prime harmonics (-p) atop of all selected fundamentals (+a). In this case you have only one, but nevertheless you have to specify a selection, else the program will hang until you select something. You can also do the same thing with more partials at once. Options in generating artificial harmonics are following:
-a (all) = 2,3,4,5,6,7,8,9
-o (odd) = 3,5,7,9,11,13,15,17
-e (even) = 2,4,6,8,10,12,14,16
-p (prime) = 3,5,7,11,13,17,23,29
-s (sub) = 0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5
In this version you can generate no more than eight artificial
garmonics per fundamental selected.
Tutorial 12
Source filtering
You can change the dynamics of partials by applying any of the two filtering commands: fliter [filte] or dynamic filter [dyn_f]: both read the filtering function from an LPC text file. The difference is that in first cae you will have to open the LPC file and select one of the spectral envelopes to be your filtering function. Let's follow both examples:
-o pt saw.p i h
pitch 0 .5 440.
modif dyn_f aa.lpc n
expor aud saw_dynfilt.pt
synth saw_dynfilt
-q
Option [n] in third line means we don't want to create a residual file.
-o pt saw.p i h
pitch 0 .5 440.
modif dyn_f aa.lpc 80 y
expor aud saw_filt.pt
synth saw_filt
-q
Option [80 y] in third line means we select the 80-th spectral envelope from the lpc file [aa.lpc] and apply it to partials.
Hint: Lpc is known to be somewhat unpredictable. If you experience clicks, try to use the consolidation command.
Tutorial 13
Error handling
Ocasionally you may make mistakes in your script, or search for data which don't exist.Take this script as example:
-o ad clang.ADD 5 h
pitch-s 0 .5 440. estimation
edit_ cut+8*476,8*856
re-ev h
pitch 0 .5 440.
expor aud clang_h.pt
synth-a clan1gd
clear-p
-o pt partials.clip i h
pitch 0 .5 440.
synth-a clan1gd
clear-p
-c clan1gd.fp-f2a
-q
In line 3 it looks for partials which don't exist in the source file
"clang.ADD". In interactive mode, ST would hang waiting
for data with which it could do something, so it would get stuck in en
infinite loop. In automatic mode it would quit upon
finding garbage data in the script. So, just start it in the
non-interactive mode (option --n or --cn ), than redirect the output to
the file SculptTool.log and the program would quit automatically.
Tutorial 14
Band-filtering tool for AudioSculpt
Let's try to unscramble two musical parts in the sound file
"miles&gil" that you'll find in SculptTool folder. Having
used
the partial tracking in AudioSculpt we can delete all partials except
for the one which seems to be the fundamental of the
melodic line. That one has been exported to the file
"miles.pt". To take true advantage of the powerful Band
Filter option,
we must use SculptTool.
Let us use the following script to generate huge parameter files that
AudioSculpt needs in order to perform band filtering.
Either type it manually into the shell or use the script
"0.5b5test":
-o pt miles1.pt i m
expor ban miles
-q
The program will generate two files: "miles_pass" and "miles_stop" needed in pass- and stop- band filtering.
Open AudioSculpt. Select "Use command line" from the Process
menu. A command line box will appear. Copy
the command line arguments from the "Band-filter command
lines" file. Click "Process".
Anything unclear? Well, you can consult AudioSculpt User's Manual.
Enjoy SculptTool!
End of Tutorial
Command reference:
Known bugs:
*Converge command does not work properly and shoud be avoided so far.
*Pitch recognition algorithm is very simple and is relying on simultaniety and order of appearance. It means that in some cases a number of partials won't be recognized as harmonics eventhough they are.
*Scripting is nor completely fool-proof. This is because the users' error catching code in the parser is not completed.
Unknown bugs:
Please report those to:
stanko.juzbasic@zg.tel.hr
Selected literature:
1. C.Roads: the computer music
tutorial (ISBN 0-262-68082-3, mit press)
2. I.Xenakis: formalized music
(university microfilms international)
3. T.Kientzle: a programmer's
guide to sound (ISBN 0-201-41972-6, addison-wesley)
4. Deitel/Deitel: C - how to
program (ISBN 0-13-226119-7, prentice hall)
5. macintosh programmer's
toolbox assistant (ISBN 0-201-96642-5)
6. B.Garton: cmix tutorial
(rtcmix home page, www.music.columbia.edu)
7. audiosculpt and
diphone manuals (parts of documentation of the ircam's forumware bundle)
Disclaimer:
Within this tutorial I have tried to be as helpful as I could, but you still run SculptTool at your own risk. By no means will I nor can I guarantee that the program will work on your particular machine and platform the way it should. In other words, please read this carefully:
NO WARRANTY
1. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
2. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS