| Message written at 17 Feb 1998 11:19:43 +0000
In-reply-to: (message from Brian Redfern on Mon,
27 Aug 1956 20:55:18 +0000)
There are ways of getting acceptable drums without samples. There
were some time back a number of bass drum orchestras posted on this
list (I still have at least one in my files from Marc R.) and I have
found the drum I found in the test orchestras quite what I wanted. It
may have been a Risset instrument? Looking at my home web page you
can actually down-load this orchestra.
==John ffitch
Examples....
;;;-------------- bdmodel.orc ----------------------------
sr = 44100
kr = 441
ksmps = 100
;
; Bass drum model : see end of file for some word...
;
instr 1
; - Some values to start with
imixt init 0.005
igain init p4
; - low osc adsr
ilat1 init p5
ilat2 init p6
ilat3 init p7
ilav1 init p8
; - low osc freq
ilfv1 init p9
ilft1 init p10
ilfv2 init p11
ilfv3 init p12
; - Noize osc adsr
inat1 init p13
inav1 init p14
inat2 init p15
; - Noiz osc freq
infv1 init 16
; --- Crude implementation
; - Low osc
itail = p3-ilat1-ilat2-ilat3
alamp linseg 0, ilat1, 1, ilat2, 1, ilat3, ilav1, itail, 0
alfrq expseg ilfv1, ilft1, ilfv2, p3-ilft1, ilfv3
alow oscil alamp*igain, alfrq, 1
; - Noize osc
anamp linseg 0, inat1, inav1, inat2, 0, p3, 0
anfrq = infv1
anrnd rand anamp
anoiz oscil anrnd*igain, anfrq, 1
; - Generate output
out alow+anoiz
endin
;
; Bass Drum Model - Marc Resibois - Sept 95
;
; (aka mr@nit.be - 100126.1007@compuserve.com)
;
;
; This is an attempt to have a parametrisable bass drum model that
; can fit a large number of sounds type and variation. As it is now,
; it is composed of two elements : A low oscillator modelling the
; global "reverberation" of the instrument and a random-like element
; that models the perturbation of the transient hit. The implementation
; of this orchestra is brutal : all the parameters are decoupled but I
; thought it was a good way to start experimenting...
; Here's how each element is modelled :
;
; 1) Low-pitch part:
;
; The amplitude is just a sine oscillator whose amplitude and frequency follows
; an envelope
;
; The amplitude envelope is linear and as follows :
;
;
; |
; 1 + _________
; | / \
; | / \
; | / \
; | / \
; | / \
; ilav1 + / \
; | / '.
; | / '.
; |/ '.
; 0 +--------|---------|----|-----|------------------
; <-ilat1-> <-ilat2-> <-|-> |
; ilat3 |
; |
; <-----------p3--------------->
;
; ilatx = Init-time Low Amplitude Time
; ilavx = Init-time Low Amplitude Value
;
; Typically, ilat1 is fairely short ( < 5msec ). The others can be used to
; control how much "power" effect is given in the first phase versus the overall
; power.
;
; 2) Frequency envelope :
;
; The frequency envelope is a two-segment _exponential_ envelope (not as drawn).
;
; |
; |
; ilfv1 +
; |\
; | \
; | \
; | \
; ilfv2 + \
; | '.
; | '.
; ilfv3 + '.
; |
; +-----|----|-------------------------
; |
; |
; <---p3---->
;
; ilftx = Init-time Low Frequency Time
; ilfvx = Init-time Low Frequency Value
;
; The frequency values have to be quite low in order to avoid pitch sweep effet.
; Typically, they should be under 100Hz so that pitch identification becomes
; difficult.
;
; 2) "High" pitched random noise
;
; This element is made using a sine oscillator whose amplitude is modulated
; by a two segment envelope followed by a random generator.
; ________ ________ ________
; | | | /\ | | |
; | Sine | ---> | / \ | ---> | Rand |
; |________| |________| |________|
;
; The frequency of the sine oscillator is iconstant and stored in infv1
; ( init noise freq value ). It can be used to change the flavor of the
; transient sound.
;
; The envelope looks like this :
;
; |
; |
; |
; infv1 + /'.
; | / '.
; | / '.
; | / '.
; | / '.
; |/ '.
; +------|-----------|------->
; <- inft2 ->
;
; infv1 will determine how much the transient sound will be heard with respect
; to the low osc part. inft1/inft2 have to be very short (about some msec) in
; order to be only hints of sound and not sound in itself.
;
;
; Well, this is it. Ideally, the parameters have to be now linked together in
; order to have a small number of parameters controlling one type of drum. I
; think there's enough room to play there....
;
; Hope you'll enjoy,
;
; Marc.
;
; PS: a small note on modelling low-freq sounds: I found out that the sound card
; are not a very good way of testing the sound. They clearly lack of response
; there, especially when compared to even cheap -?- samplers. I rather go
; through digital transfert on my sampler an listen the sound coming form there.
------------------------------------------------------------------------
;;;-------------------------------- bdmodel.sco
;;;-----------------------------------------------------------
f1 0 4096 10 1 0 ; basic wave table ( sine wave )
; Parameters
; inum start duration gain ilat1 ilat2 ilat3 ilav1 ilfv1 ilft1 ilfv2 ilfv3 inat1 inav1 inat2 infv1
i1 0 0.15 20000 0.005 0.01 0.01 0.4 200 0.07 30 25 0.005 0.8 0.005 100
e
;
; IMPORTANT NOTE:
;
; If you got this from e-mail, mind out that the lines might be cut at 80 char
; and might require re-merging !
;
------------------------------------------------------------------------
instr 4,5
;Start dur baseamp ampinc Noise/cps loc Timbre
;p2 p3 p4 p5 p6 p7 p8
; The only difference between the two drums here is the base frequency
if p1==5 igoto high
;; Instrument 4
i2 = cpspch(p8) ; 11; 12.5
igoto common
high: ;; Instrument 5
i2 = cpspch(20)
common:
i1 = 1/p3 ; once per duration - for envelopes
i3 = 2*(p4+p5)/2 ; these three assignments balance the three
i4 = 2*(p4+p5)/6 ; branches of the drum instrument
i5 = (p4+p5)/2.1 ;
; branch 1 - NOISE
a1 oscili i3,i1,2 ; generate steep exponential envelope
a1 randi a1,p6/2 ; generate band of noise with freq. given by p5
a1 oscili a1,500,4 ; use noise band for amp input - ring mod.
; branch 2 - INHARM
a2 oscili i4,i1,2 ; steep envelope with lower amplitude than a1
a2 oscili a2,i2*.1,3 ; generate inharmonic partials - 1,1.6,2.2,2.3
; branch 3 - FUND
a3 oscili i5,i1,1 ; decay of f1 is less steep than f2
a3 oscili a3,i2,4 ; generates fundamental tone
; global envelope to prevent clicking
a4 linseg 1,p3-.05,1,.05,0,.01,0
a5 = a4*(a1+a2+a3)
a6 = a5*sqrt(p7)
a7 = a5*sqrt(1-p7)
outs a6, a7
endin |