Here is the patch which produced Liquid Sound:
"temp/in.mid" ReadMidiFile
^t1
^t2
^t3
^t4
^t5
?t1 Println
?t2 Println
?t3 Println
?t4 Println
?t5 Println
[
Reverberator
============
]
{
?signal Magnitude !mag
(>signal,?grain-length Silence)Concatenate !signal
(
(?mag,0)Eq,
{
},
{
(>signal,?grain-length Silence)Concatenate !signal
>signal FrequencyDomain !signal
(>convol,>signal)CrossMultiply !signal
>signal TimeDomain !signal
?signal Magnitude !newMag
(>signal,(>mag,>newMag)/)NumericVolume !signal
[ tail out clicks due to amplitude at end of signal ]
(
(
(0,1),
(100,1),
((?signal Length,100)-,1),
(?signal Length,0)
)NumericShape,
>signal
)multiply !signal
}
)Choose Invoke
>signal
}!reverb-inner
{
?convol Length !grain-length
[ ("Convolving SignalLength:",?signal Length," ConvolutionLength:",?convol Length)Println ]
(>convol,?grain-length Silence)Concatenate FrequencyDomain !convol
Bunch !out
(
(>signal,?grain-length)Granulate,
{
^signal ^time
((?reverb-inner Do,>time),>out)AddEnd !out
}
)InvokeAll
>out MixAt Normalise
}!reverb
{
?length !outLen
(?length,1.01)* !length
{
?length Silence !signal
1 !volume
?pitch !harmonic
(
(
(1,1),
(2.001, 0.5),
(3.002, 0.1),
(4.003, 0.25),
(5.004, 0.05),
(6.005, 0.125),
(8.006, 0.0625),
(9.007, 0.0125),
(11.009,0.01),
(13.01, 0.005),
(15.011,0.0025),
(19.013,0.0015)
),
{
^harmonic ^volume
("Pitch",?pitch,"Harmonic",?harmonic,"Volume",?volume,"Length",?length)Println
(>harmonic,?pitch)* !harmonic
{
(?length,50)/ WhiteNoise !wave
(>wave,100,4)ButterworthLowPass !wave
(>wave, 10,1)ButterworthHighPass !wave
(>wave,0.01)DirectRelength !wave
(0,?length,>wave)Cut Normalise !wave
(1,>wave)DirectMix !wave
}!makeWaves
?makeWaves Do pcnt+25 !phase
?makeWaves Do pcnt+25 !volumeWave
(>volumeWave,2)Power Normalise !volumeWave
(>volumeWave,2)Power Normalise !volumeWave
(
(
(
(?harmonic,>phase)PhaseModulatedSinWave,
?volumeWave
)Multiply,
?volume
)NumericVolume,
>signal
)Mix !signal
?length WhiteNoise !noise
(?noise,?pitch,2)ButterworthHighPass !noise
(?noise,?pitch,2)ButterworthLowPass !noise
>noise Normalise !noise
(?noise,?pitch,2)ButterworthHighPass !noise
(?noise,?pitch,2)ButterworthLowPass !noise
(
>noise Normalise pcnt+5,
>signal Normalise pcnt+95
)Mix !signal
}
)InvokeAll
>signal Normalise
} !makeTriangle
?makeTriangle Do !signal !root
(
(?outlen,2100)gt,
{
1000 !point
((0,0),(?point,1),((?outLen,?point)-,1),(?outLen,0))NumericShape !venv
},{
(?outlen,0.5)* !point
((0,0),(100,1),((?outLen,?point)-,1),(?outLen,0))NumericShape !venv
}
)Choose Invoke
((0,0),(?point,1),((?outLen,?point)-,1),(?outLen,0))NumericShape !venv
(
?venv,
>signal
)Multiply !signal
(
>signal,
>velocity
)NumericVolume
} !chord
{
Bunch !notes
0 !count
(
?track,
{
^tickOn ^tickOff ^note ^key ^velocity
(
(?count,?notesToPlay)lt,
{
[ Set up the note ]
(?tickOn,?beat)* !at
((?tickOff,?tickOn)-,?beat)* !length
(Semitone,?key)** !multi
(?baseSound,>multi)* !pitch
(>pitch,2)/ !pitch
(>pitch,6)/ !pitch
(>velocity,100)/ !velocity
(>length,1000)+ !length
("Note at",?at) Println
[ Play the note ]
((?chord Do,?at),>notes)AddEnd !notes
},{
}
)Choose Invoke
(>count,1)+ !count
}
)InvokeAll
>notes MixAt Normalise
}!play
"C0" Note !baseSound
75.00 !beat
2000 !shortCut
1000 !notesToPlay
?t2 !track
?play Do !left
?play Do !right
[(?left TrimSilence, ?right TrimSilence )StereoMonitor]
"temp/reverba.wav" ReadFile ^revl ^revr
?left !signal >revl !convol ?reverb Do Normalise !wleft
?right !signal >revr !convol ?reverb Do Normalise !wright
"temp/reverbb.wav" ReadFile ^revl ^revr
?left !signal >revl !convol ?reverb Do Normalise !vwleft
?right !signal >revr !convol ?reverb Do Normalise !vwright
{
(
>wleft pcnt+50,
>vwleft pcnt+20,
>left pcnt+30
)Mix Normalise
} Do !left
{
(
>wright pcnt+50,
>vwright pcnt+20,
>right pcnt+30,
)Mix Normalise
}Do !right
"Done" Println
((>left,>right),"temp/temp1.wav")WriteFile32
No comments:
Post a Comment