<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Bill's granular-based time stretching used in Leviathan is one of the first and the most elegant solutions to changing the time scale of sampled sounds in the time domain without changing the pitch. And Leviathan is still one of the most beautiful pieces using that technique nearly 40 years later! I used Bill's code (thank you Bill!!) in my own piece Il Nome right around the time Bill composed Leviathan and inspired by his code I made a version of the technique as a Csound unit generator a few years later, over-used it for a decade, and then in SuperCollider!</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Feb 20, 2025 at 5:42 PM James Hearon <<a href="mailto:j_hearon@hotmail.com">j_hearon@hotmail.com</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg8333929747575148032"><div dir="ltr" id="m_8333929747575148032pfptBanner47uhefv" style="display:block;text-align:left;margin:16px 0px;padding:8px 16px;border-radius:4px;min-width:200px;background-color:rgb(208,216,220);border-top:4px solid rgb(144,164,174)"><div id="m_8333929747575148032pfptBanner47uhefv" style="float:left;display:block;margin:0px 0px 1px;max-width:600px"><div id="m_8333929747575148032pfptBanner47uhefv" style="font-weight:normal;display:block;background-color:rgb(208,216,220);color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:12px;line-height:18px;margin-top:2px"><span style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;background-color:rgb(255,255,255)">re: Leviathan listening.</span></div></div></div><div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Nice piece which is made more enjoyable by an understanding of the technique used to create it (wave sequencing).</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I was intrigued by this technique, which seemed to have a basis in the Korg Wavestation.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
But the description I found online read something like:</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
"Single-cycle waveforms in succession with cross fades etc. Place the cycle in a table and use an array of tables for the oscillator. Morph between different single-cycle waveforms (tables) while playing.Use multiple oscillators. Can use looping (forward and
back), of all steps as well as individual cycles, and modulation (forward and back) as well."</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I was giving this a primitive try in Snd and not sure I was on the right track. I found make-wave-train (instead of oscillator playing tables) was a bit more accurate than pure table-lookup for some reason, and therefore just wrote the waveforms directly to
vectors. I couldn't understand the need for a single-cycle waveform, but maybe that's a Korg thing. </div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Be interested to know if there was a much better approach I probably missed.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(definstrument (mysequence start-time duration frequency size amp (amp-env '(0 0 2 .5 3 -.25 5 0)) sampling-rate )</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(let* ((beg (floor (* start-time sampling-rate)))</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(end (+ beg (floor (* duration sampling-rate))))</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(fsize size)</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(dur (/ fsize sampling-rate))</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(myenv (make-env amp-env :duration dur :scaler 1.0))</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(myvec (make-float-vector fsize)) ;envel vector for waveform</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(fadeinout (make-env '(0 0 1 .25 3 1.0 5 0):duration duration :scaler 1.0)) ;crossfade</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
)</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(do ((k 0 (+ k 1))) </div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
((>= k fsize)) </div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(set! (myvec k) (myenv k)) ;place env values in float-vector </div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
) </div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(let ((gen (make-wave-train </div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
:frequency frequency</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
:initial-phase 0.0</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
:wave myvec</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
:size fsize</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
:type mus-interp-none</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
)))</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(do ((i beg (+ i 1)))</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
((= i end))</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(outa i (* amp (* (env fadeinout) (wave-train gen))))) </div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
))) </div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(with-sound (:play #f :srate 48000 :channels 1</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
:header-type mus-riff</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
:statistics #t)</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(mysequence 0 2 440.0 128 0.5 '(0 0 2 .5 3 -.5 5 0) 48000)</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
(mysequence 1 2 440.0 128 0.5 '(0 0 1 1 2 -1 3 1 4 -1 5 0) 48000)</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
)</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
...by the way, there's a nice line in Moby Dick where Gregory Peck refers to the white whale as a leviathan.</div>
</div>
_______________________________________________<br>
Cmdist mailing list<br>
<a href="mailto:Cmdist@ccrma.stanford.edu" target="_blank">Cmdist@ccrma.stanford.edu</a><br>
<a href="https://urldefense.com/v3/__https://cm-mail.stanford.edu/mailman/listinfo/cmdist__;!!K-Hz7m0Vt54!g_qLaVgMQw2iewlxM9hjHFX3CinQ3sIpJaTcVRqyqv0nMIZ-iP351v52mSVROGC4x-iMJZleSLsqbaeIZu5SM7E$" rel="noreferrer" target="_blank">https://urldefense.com/v3/__https://cm-mail.stanford.edu/mailman/listinfo/cmdist__;!!K-Hz7m0Vt54!g_qLaVgMQw2iewlxM9hjHFX3CinQ3sIpJaTcVRqyqv0nMIZ-iP351v52mSVROGC4x-iMJZleSLsqbaeIZu5SM7E$</a> <br>
</div></blockquote></div></div>