HITHER GATE MUSIC
HITHER GATE MUSIC
Goal: an ever-changing flow of sonic grains
Starting Point 1 |
End Result (before GrainMill is used) |
All Steps Play Table |
In general, varied and rhythmic sounds work well. If the sound is too steady state, the result may not change enough during the course of playback to remain interesting. Also, if a sound is already very rough to start with, the distortion processing may go over the top, leading to an end result which remains pretty much the same throughout.
However, for this sound-builder sequence, we want to stress the 'ever-changing' aspect. For this we will input pairs of soundfiles into programs which put together selected features from both files. Three varied results from 3 different programs will then be spliced to create the changing sonic pattern. After some harmonic filtering, we then move on to the granulation procedures.
Because processes that use two different soundfiles are to be employed, we select a pair of contrasting inputs: a busy or rhythmic one and a more steady-state one. The Envelope Replace function will transfer the busy or rhythmic amplitude pattern onto the steady-state sound. Using sounds which contrast in this way provides the maximum opportunity to find interesting sonic interactions and varied outputs.
Make copies of the input soundfiles, giving them a single letter name.
We have only to provide a name for the outfiles, in this case just 'c1' and 'c2'. The other parameters use the defaults any other settings refer to multi-channel soundfiles.
Dialogue box:
Default parameters
New name is 'c1.wav'We also make a copy of the second input, naming it 'c2.wav'.
Command:
rem function mode infile outfile
copysfx aklcdp.wav c1.wav
copysfx tomcdt.wav c2.wav
Analyse soundfile to create data needed by spectral operations.
The 'Time Domain' stream of time amplitude data is converted to a detailed frequency amplitude data file. In the graphic interface, the .ana extension is added automatically, but with the Command, we specify it.
We do this for each of the input soundfiles, naming the second one 'd'.
Dialogue box:
Create analysis data
Command:
rem function mode infile outfile
pvoc anal 1 c1 c1.ana
pvoc anal 1 c2 c2.ana
Extract the amplitude profile from one sound and impose it on another.
The first sound opened is the one onto which the envelope is imposed. The second sound is the one from which the envelope is taken. In this case we take rhythm from c2.wav (2
nd input) and impose it onto c1.wav (1st input).The enveloping_window parameter refers to the time-resolution of the envelope extraction process (the time in milliseconds over which to average the envelope amplitude data). Smaller values will achieve a more accurate envelope. 10ms = 0.010 sec (1/100
th of a second.Dialogue box:
Envelope replace
Inputs and outputCommand:
rem function mode impose_infile extract_infile outfile enveloping_window
envel replace 1 c2 c1 cer 10PLAY cer.mp3 (re-enveloped soundfile)
New name: 'c envelope replace'
Join two (or more) different analysis files by interleaving groups of analysis windows.
There is a way of shuffling cards in which the cards alternate (more or less) when the two decks are strummed adjacent to each other. The Interleave process is similar to this. Here we are dealing with analysis windows rather than cards, and we also set how many windows to group together. Then they alternate, a group from the 1
st soundfile followed by a group from the 2nd soundfile. Small window groups result in a fine-grained interleave, while larger groups are more coarse-grained.The rapid interleaving of two different sounds in this manner can result in acoustic serendipities it's a very interesting process.
Dialogue box:
Window group size
Inputs and outputCommand:
rem function inanalfile1 inanalfile2 outanalfile windows
combine interleave c1.ana c2.ana ci.ana 10(Optionally) audition the analysis file with F10 in SoundShaper. Now go straight to Spectral/Convert to Resynthesise ci.ana to create ci.wav.
PLAY ci.mp3 (interleaved soundfile)
New name: 'c interleave'
Put together the loudest components of 2 or more soundfiles.
This is a very unusual mixing process based on the amplitude of the frequencies in the analysis file. For each analysis window, the software compares the amplitude in each file, keeps the loudest window and discards the less loud one(s).
Dialogue box:
Keep loudest frequencies
Inputs and outputCommand:
rem function inanalfile1 in analfile2 outanalfile
combine max c1.ana c2.ana cm.ana(Optionally) audition the analysis file using F10 in Soundshaper. Now go straight to Spectral/Convert to Resynthesise cm.ana to create cm.wav.
PLAY cm.mp3 (randomly mixed soundfile)
New name: 'c envelope max'
Splice together the 3 previous results.
After some experimentation with the inputs used while writing this, I decided to place the Random Mix first, the Interleaving second and the Envelope Replace third that order seemed to sound best. Another order might be better when different inputs are used. Open the first file and then add the next two by selecting them in the splice Select box.
The default splice slope of 15ms is used, so it doesn't need to be specified. The output filename is made up of the deliberately concise names of the 3 inputs. This reminds us of what went into the splice and in what order.
Dialogue box:
3 file splice
Command:
rem function infile1 infile2 infile3 outfile
sfedit join cm ci cer cmcicerPLAY cmcicer.mp3 (spliced soundfiles)
New name: 'c max interleave envelope replace'
Pass the sound through a harmonic filter bank.
The aim here is to add a harmonic dimension to the sound by passing it through a filter bank focused on the harmonics. This means that the frequency foci of the filter frequency bands are determined by multiplying a root frequency by successive integers: 2, 3, 4 etc. This creates the natural overtone series.
We can define the bank of filters in a text file we write ourselves. It contains pitch data, either as frequencies in Herz or as MIDI pitch values. In this case we choose to use the harmonic overtone series option of the BANKFREQS program to help us on our way. This creates a set of frequencies related in this way. We then have to edit the file to add amplitude data in dB (decibels), either to cut or boost the amplitudes. In this way we create cmcicer1h.txt. Note that part of it is shown in the file window of the dialogue box below. [The screenshot mistakenly shows it as cmcicer3h.txt R.F.]
The Q parameter controls how tightly the filter band is restricted to its frequency focus. If very tight, there can be resonance which needs to be reduced by lowering the amplitude values. If broader, the filtering process can reduce the volume too much, and the amplitude values may need to be increased. A broader Q (lower values with USERBANK) allows more of the original sound through. The value of 100 selected here is high enough to produce the harmonic effect desired, but low enough to retain some of the original sound and rhythm.
Dialogue box:
Harmonic filter
Command:
rem function mode infile outfile filterbank_file Q Gain
filter userbank 1 cmcicer cmcicerflth cmcicer1h.txt 100 5PLAY cmcicerflth.mp3 (filtered soundfile)
New name: 'c max interleaved envelope_replace filter_harmonic'
Break up the sound into a series of adjacent tiny segments.
Here we call a simple form of granulation, which only uses a density parameter, for which we select the maximum value, 2. This parameter controls the degree to which the grains overlap (a default grainsize is employed). If 1, the grains will be adjacent, i.e., virtually no change. When greater than 1, they overlap. A value of 2 will overlap them half-way: i.e., 1 ÷ 2, or 0.5. A value of less than one will create gaps between grains.
The result in this case adds a bit of light flapping to the soundfile.
Dialogue box:
Grain overlap density
Command:
rem function mode infile outfile overlap_density
modify brassage 5 cmcicerflth cmcicerflthgrn 2PLAY cmcicerflthgrn.mp3 (filtered soundfile)
New name: 'c max interleaved envelope_replace filter_harmonic granulate'
Analyse cmcicerflthgrn.wav to prepare it for a spectral process.
This now a familar single-step data conversion operation.
Dialogue box:
Create analysis data
Command:
rem function mode infile outfile
pvoc anal 1 cmcicerflthgrn cmcicerflthgrn.ana
Shift the whole spectrum of frequencies with a time contour.
With the following time contour (breakpoint file shift2.brk), we push the frequencies into the stratosphere, and then have them drift downwards.
0 1500 1 1000 1.1 1200 3 700 3.1 900 4.4 50The shift that is made here is a linear one, meaning that the same value (at each time period) is added to each partial value. This tends to squeeze the frequencies together, frequencies which normally are in logarithmic relationship: i.e., doublings are replaced by constants.
Dialogue box:
Linear shift
Command:
rem function mode infile outfile shift_file
strange shift 1 cmcicerflthgrn.ana cmcicerflthgrnshift.ana shift2.brk(Optionally) audition the analysis file using F10 in Soundshaper. Now go straight to Spectral/Convert to Resynthesise cmcicerflthgrnshift.ana to create cmcicerflthgrnshift.wav.
PLAY cmcicerflthgrnshift.mp3. (shifted soundfile)
New name: 'c max interleave envelope_replace filter_harmonic granulate shift'
Use GrainMill to process cmcicerflth.wav.
We now have several parameters which we can set:
- timestretch: 4 factor by which to multiply the length of the output soundfile
- density: 10.2105 also grain overlap, but in this case it can be very much larger than 2!
- grainsize: 22.03 now this can be specified, and we are making it very small, only 0.02203 sec.
- pitch: 0 this is a transposition value in semitones; in the first version it is zero (no change), and in the second version we give it a range of 1 octave.
- scatter: 75% this randomly displaces the time of each grain, here set at 75% of the maximum allowed displacement
- loudness: 0dB to -10.5dB a volume setting which here randomly selects a volume level for each grain between the upper and lower limits we have set
- spatial 0 (L) to 1 (R) pan (horizontal placement between the speakers), here set to full Left-Right range; thus each grain will be randomly placed anywhere between the speakers, including full Left or Right.
- wander: 0.5 (½sec) this creates a 'searchfield' from somewhere within which each grain is taken, i.e., it displaces from where in the infile a given grain is taken.
In running GrainMill we have first to ensure that the 'Working Directory' is set (under Options), then 'Open' a soundfile to granulate. Having done this, the dialogue box is displayed or can be called up by clicking on 'Show Dialog' under 'View'. We can then fill in the values we want. Alternatively, we can close the dialogue box, go to 'Load Settings' under 'File' and select grnflowgm1.grn. However, this will only work if the Working Directory is c:\sdbats. I had to put it somewhere, and selected the C: drive as the one most likely to be available. If your files are elsewere, fill in the dialogue box and then 'Save Settings' under 'File' to the same name, overwriting the existing preset. The preset will then be available for future use.
After making the sound(s), Save it to the name cmcicerflthgm1.wav (and cmcicerflthgm2.wav) so that they will play from this HTML file.
Dialogue box:
Granulate without a pitch range
An alternative version creates a pitch range of an octave in which to place (transpose) the grains. This is done by ticking 'Range' next to the pitch parameter. Boxes for specifying upper and lower transposition values appear, which we set as 7 and -5 respectively. The 7 goes up seven semitones (a Perfect 5
th ) and the -5 goes down five semitones (a Perfect 4th ). 7 + 5 = 12, so the total range is 12 semitones, or one octave.Here is the dialogue box showing this change:
Granulate with a pitch range
Much more can be done with GrainMill to shape the granulated texture: by making the parameters vary over time. The means of doing this come to life when the 'Time Contours' boxes to the right of each parameter are ticked. This enables you to create, load and edit breakpoint files, i.e., automated time contours.
Command:
The command format for this program is so complex that it is very unwieldy, so I only use the GrainMill graphic version.
PLAY cmcicerflthgm1.mp3 (GrainMill soundfile)
PLAY (if made) cmcicerflthgm2.mp3 (GrainMill soundfile)
New name: 'c max interleaved envelope_replace filter_harmonic grainmill'
We can now process cmcicerfltagrnshift.wav with GrainMill as in Step 11, loading this new soundfile and re-using the same Preset: grnflowgm1.grn. My initial results weren't too exciting everything too smoothed out so it will be work exploring changes to the density, grainsize and pitch parameters.
The output soundfile can be named cmcicerflthgrnshiftgm3.wav and, if more changes are made, cmcicerflthgrnshift4.wav, etc.
PLAY
cmcicerflthgrnshiftgm3.mp3 (GrainMill soundfile)
PLAY (if made)
cmcicerflthgrnshiftgm4.mp3 (GrainMill soundfile)
New name: 'c max interleaved envelope_replace filter_harmonic granulate
shift grainmill'
rem grnflow.bat - 'GRAINFLOW' batch file for third set of functions rem Description: multiple file operations combined, filtered & granulated rem Last updated: 28 March 2003 rem Use grnfldel.bat to clear outputs before using again rem Source Pairs (with comments on results after processing): rem aklcdp.wav (1.38 sec) & tomcdt.wav (1.3 sec) - rhythms good rem frogcdt.wav (1.8 sec) & bashdt.wav (1.5 sec) - frogs good rem touccdt.wav (3.0 sec) & hoggdt.wav (3.7 sec) - toucan audible rem touccdt.wav (3.0 sec) & whdtm.wav (2.4 sec) - steadier high pitch echo on rem Step 1. Copy to simple name copysfx aklcdp.wav c1.wav copysfx tomcdt.wav c2.wav rem Step 2. Prepare analysis data files pvoc anal 1 c1 c1.ana pvoc anal 1 c2 c2.ana rem Step 3. Replace d's envelope with c's envel replace 1 c2 c1 cer 10 rem Step 4. Interleave c & d combine interleave c1.ana c2.ana ci.ana 10 pvoc synth ci.ana ci rem Step 5. Random mix based on max amplitude, on window-to-window basis combine max c1.ana c2.ana cm.ana pvoc synth cm.ana cm rem Step 6. Splice the three results together: cm+ci+cer in that order sfedit join cm ci cer cmcicer rem Step 7. Filter, using pre-edited & existing filterbank data file rem (Otherwise create with FILTER BANKFREQS, 100-2000Hz) rem cmcicer1h.txt (HARMONIC) cmcicer2a.txt (ALT HARMONICS) or rem cmcicer3s.txt (SUBHARMONIC). filter userbank 1 cmcicer cmcicerflth cmcicer1h.txt 100 5 rem Step 8. Granulate (only using density parameter) modify brassage 5 cmcicerflth cmcicerflthgrn 2 rem Step 9. Prepare ...grn sound for shift function pvoc anal 1 cmcicerflthgrn.wav cmcicerflthgrn.ana rem Step 10. Time-varying spectral shift rem (NB: check that timings in shift2 .brk match infile length) strange shift 1 cmcicerflthgrn.ana cmcicerflthgrnshift.ana shift2.brk rem Resynthesise the shifted analysis file pvoc synth cmcicerflthgrnshift.ana cmcicerflthgrnshift.wav rem THE FOLLOWING ARE DONE WITH THE GRAPHIC GRAINMILL PROGRAM rem Step 11. Granulate with GrainMill, opening cmcicerflth.wav (or another rem soundfile) and loading grnflowgm1.grn (if able to do so). rem See grnflowgm1.txt for ascii version. rem Outfile(s) should be named cmcicerflthgm1.wav (cmcicerflthgm2.wav rem with pitch range settings, e.g., +7 & -5 to give octave spread) rem Step 12. Granulate with GrainMill opening cmcicerflthgrnshift.wav and rem re-loading (if possible) grnflowgm1.grn. rem Outfile(s) should be named cmcicerflthgrnshiftgm3.wav and rem cmcicerflthgrnshiftgm4.wav echo off
STEP |
PROCESS |
OUTPUT |
---|---|---|
Step 1. | Copy | c1.mp3 c2.mp3 |
Step 2. | Analyse | c1.ana c2.ana |
Step 3. | Envelope Replace | cer.mp3 |
Step 4. | Interleave (Analysis Windows) |
ci.mp3 |
Step 5. | Random Mix | cm.mp3 |
Step 6. | Splice 3 Previous | cmcicer.mp3 |
Step 7. | Filter, Harmonic | cmcicerflth.mp3 |
Step 8. | Granulate | cmcicerflthgrn.mp3 |
Step 9. | Analyse | cmcicerflthgrn.ana |
Step 10. | Linear Shift | cmcicerflthgrnshift.mp3 |
Step 11. | GrainMill on cmcicerflth.wav |
cmcicerflthgm1.mp3
(no transposition) cmcicerflthgm2.mp3 (octave range) |
Step 12. | GrainMill on cmcicerflthgrnshift.mp3 |
cmcicerflthgrnshiftgm3.mp3 (no transposition) cmcicerflthgrnshiftgm4.mp3 (octave range) |
(by Robert Fraser, March 2016)
The Soundshaper screenshots used in this tutorial are out of date in two respects:
To run the GRAINFLOW chain of CDP processes in Soundshaper:
[After each step, you can play the result in the transport panel.]
The next step has been done in GrainMill, which, like Soundshaper, uses the CDP program MODIFY BRASSAGE, but it interprets some of the parameter names and value-ranges differently, making a direct "translation" difficult. Here is an approximation to the Grainmill file cmcicerflthgrnshiftgm4.mp3, mentioned in Step 12: