Sound Bath

Completed 2024.05.27
Duration: indefinite
Ensemble: Csound

Sound Bath is meditative sound work available at:

https://kunstmusik.github.io/sound-bath

It is a WebAudio Csound project that can be installed for offline use as a Progressive Web Application. Source code is available at:

https://github.com/kunstmusik/sound-bath

Technical Information

The project started its life as a live coding session that I later worked into a web application. CSD files in the root can be used to render the project with desktop Csound in realtime and to disk. Hopefully the project may be useful for others creating their own Web Csound projects. 

Rendered Example

A 4-hour rendered excerpt is available below:

Eulerroom Equinox: Live Code Performance

I had the great pleasure to perform as part of the Eulerroom Equinox live coding event yesterday. It has been an amazing four days of live code streams from around the world and I’m grateful to the organizers for their incredible work putting this all together. Bravo to everyone and thanks to all of the incredible performers and presenters, very inspiring!

Web Audio Conference 2019

I was very happy to attend and present at this year’s WebAudio Conference. The NTNU did an incredible job hosting and organizing the event and there was a great variety of research presented. I was noting to myself throughout the conference how it seems to get better each year for both the software and technology shown and the musical performances performed. I think it’s a sign of the level of maturity of the browser platform as a whole that it can support high-level musical work today.

For those who might be interested, all of the sessions were recorded and streamed online. Archives are available here.

For my own work, I presented on the Csound-WebIDE here:

(Note: I misspoke about Chowning’s work and said “parallel carrier, single modulator” when I should have said “parallel modulator, single carrier”.)

I also participated in the jam session by live coding with Csound here:

Great to see old friends and meet new ones. I hope to make it to next year’s conference in Barcelona!

Sound Design: Ring Mod with low-frequency modulations

Audio example of Ring Modulation with low-frequency modulations

Experiments with complex ring modulation and low-frequency modulations for sound design. Each ring modulation generates sidebands for the previous signal and with four ring modulations up to 16 frequencies could be generated. Modulating with ring modulation leads to interesting, synthetic sounds due to the ratios of frequencies changing over time. Having multiple orders of ring modulations allowed for interesting patterns of spectrums to develop (see spectrogram).

Spectrogram from Audacity (2048 bin size, 0-16000 Hz, linear)

This example has two instruments, RM1 and RM2. RM1 uses exponential envelopes to start and end at harmonic ratios but has different rates of change due to different starting ratios. (Mentioned here as ratios since the outputs are being used to multiply the p4 base frequency.) RM2 is a variation on RM1 and uses a sawtooth LFO for one of the modulations. Both use a high-pass filter to remove frequencies generated below the base frequency.

The score plays a pattern with RM1 twice, once with 0.5 durations and again
with 0.25 durations. This sounded to me like they could be used as a simple
laser sound in a game or as a component of more complex laser sound design. The score then has a 20 second long note for RM2 that gives it enough time to hear the evolving frequency patterns.

Sound Design: FM with Modulations

Audio Example of Complex FM sound with modulations to indices

Complex FM (4 operator, what Chowning and Bristow calls Parallel Carrier,
Independent Modulator in “FM Theory and Applications”). The two operator stacks are using 4:2 and 1:1 C:M ratios. expseg envelopes are used to modulate the overall shape of indices and unipolar square lfo’s are used for an additional layer of modulation. I thought the 12 and 3 Hertz for the lfo’s gave some nice texture between the two layers.

I think it probably works best in the low end to middle of the frequency range. The result using pch of 5.00 reminded me of things heard in some progressive house tracks.

randcubic glissandi: random line with cubic interpolation

Audio example of randcubic used for glissandi

Custom Csound user-defined opcode randcubic to generate cubic interpolated lines. Example above uses randcubic for achieving time-varying glissandi with multiple voices.

Based on code from http://paulbourke.net/miscellaneous/interpolation/.

Code for UDO is as follows:

opcode randcubic, a,kk
  kamp, kfreq xin
  
  ky0 init random:i(-1, 1)
  ky1 init random:i(-1, 1)
  ky2 init random:i(-1, 1)
  ky3 init random:i(-1, 1)  
  
  kcount init 0
  asig init 0
  
  kperiod = sr / kfreq
  kndx = 0
  
  while (kndx < ksmps) do
    ka0 = ky3 - ky2 - ky0 + ky1
   	ka1 = ky0 - ky1 - ka0
    ka2 = ky2 - ky0
    ka3 = ky1
    
    kmu = kcount / kperiod
    kmu2 = kmu * kmu
    
    asig[kndx] = ka0 * kmu * kmu2 + ka1 * kmu2 + ka2 * kmu + ka3
    
    kcount += 1
    
    if(kcount > kperiod) then
      ky0 = ky1
  	  ky1 = ky2 
  	  ky2 = ky3       
      ky3 = random:k(-1, 1)  
      kcount -= kperiod
    endif
    
    kndx += 1
  od
    
  asig *= kamp
    
  xout asig
  
endop
Published
Categorized as csound Tagged

Live Code: 2019-08-14

Live code session using left-shift patterns and double modulus constraints.

(First time using OBS on a new Mac, video is slightly behind the audio…)