Butterfly Garden
2023 - Interactive Virtual Reality Experience
2023 - Interactive Virtual Reality Experience
Though a video recording of Butterfly Garden does not currently exist, this soundscape features recordings from a few instances of the CSound synth I created along with natural ambience and Katie's voiceover which gives facts about butterflies.
Program Note: A collaborative work between myself, visual artist and Geoscientist Katherine Chambers, and Computer Scientist Gawain Liu, this virtual reality experience was created over the course of a four week long period in the winter between semesters at Oberlin. The first few weeks of this workshop provided us with information about mechanics within the game engine Unity 3D as well as basic instruction in the programming language CSound and the ways in which the two softwares can interact. We used a landscape builder to create an environment that minimized render distance to ease strain on the GPU and a particle system of butterflies rendered as manipulated billboards. The butterflies were illustrated by Chambers, who also provided a number of facts about butterflies in a voice over I helped her record. The entire VR experience was meant to replicate a documentary about the mating season of Monarch butterflies in an immersive environment. Sonically, I created a generative sequencer and basic FM synth within CSound which, combined with nature recordings, created a soundscape akin to the nature documentaries that inspired the creation of this work.
This piece was created as part of Dr. Chris Poovey's 2023 Winter Term for Immersive Digital Media and debuted at the final concert for that Winter Term course. A recording of this piece does not yet exist, although when I create one I will embed it here. For now, I will include a fixed soundscape approximation of the auditory experience of Butterfly Garden. I will also include some screenshots of the Unity project file to help demonstrate what we had set up, as well as the CSound synth I created for the project.
Below is the CSound Code I wrote to create the adaptive score, which is also synthesized in game. It's pretty messy, but when copy/pasted into Cabbage (a CSound IDE) it should generate random notes within a pentatonic collection. The user will be able to control which note the collection is built off of, how fast the notes are produced and how much FM is applied to each note with sliders.
This code snippet also includes some things I started working on but didn't end up using in the final simulation. Learning CSound was a cool process though, so hopefully I'll be able to revisit them!
<Cabbage>
form caption("Butterfly Jawn") size(118, 150), guiMode("queue") pluginId("def1")
//rslider bounds(8, 8, 100, 100), channel("basePitch"), range(36, 60, 36, 1, 1), text("basePitch"), trackerColour("lime"), outlineColour(0, 0, 0, 50), textColour("black")
rslider bounds(8, 8, 50, 50), channel("Rate"), range(3, 15, 5, 1, 0.01), text("Rate"), trackerColour("lime"), outlineColour(0, 0, 0, 50), textColour("black")
rslider bounds(58, 58, 50, 50), channel("Tone"), range(0, 10, 0, 1, 0.01), text("Tone"), trackerColour("lime"), outlineColour(0, 0, 0, 50), textColour("black")
rslider bounds(58, 8, 50, 50), channel("Chance"), range(0, 1000, 0, 1, 1), text("Chance"), trackerColour("lime"), outlineColour(0, 0, 0, 50), textColour("black")
button bounds(8,58, 50, 50), channel("Collection"), text("turn on", "turn off")
//***volume controlled by player position
button bounds(8,118, 100, 24), channel("state"), text("turn on", "turn off")
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d
</CsOptions>
<CsInstruments>
; Initialize the global variables.
ksmps = 32
nchnls = 2
0dbfs = 1
giPenta ftgen 100, 0, 5, 2, 0, 2, 3, 5, 6
instr 1
//This instrument will trigger one of the other intruments at a given pitch for a duration
kcount init 0 //creates a counter the starts at 0 and only is set here at initalization
//***Add another array for different pentatonic modes controled by combobox
kPentaArr[] fillarray 0, 2, 3, 5, 6
kSpecialArr[] fillarray 0, 3, 5, 10, 5
kOctaveArr[] fillarray 48, 60, 72, 84, 96
kRate chnget "Rate" //grab the base pitch from the cabbage GUI
kstate chnget "state"
kCollection chnget "Collection"
kchance chnget "Chance"
kSemi chnget "SemiSelect"
ktick metro kRate
if ktick == 1 && kstate == 1 then //If the metro is triggered
//***1) They need to interact 2) they need to do something special 3) they need to have something that creates climax
//***make each note in the pentatonic move up as user moves to zones, then once they visit all zones something large happens, this process happens perpetually with pentatonic moving up infinite semitones
//***somewhere in here add note on/off probablility
//***add certain rhythmic/tonal gestures with the ft tables
kPenta random 0, 4
kOctave random 0, 4
kprob random 0,1000
kRand random 0,0.7
if kprob > (kchance) then
if kCollection == 1 then
event "i", 4, 0, 1, kSpecialArr[kPenta]+kOctaveArr[kOctave], kRand //Trigger instrument
else
event "i", 4, 0, 1, kPentaArr[kPenta]+kOctaveArr[kOctave], kRand //Trigger instrument
endif
endif
kcount += 1
kcount = kcount % 16
endif
endin
//***maybe make another instrument here that functions as a pedal either in this script or in a
//different one
instr 4
//Simple FM kick
//The P feilds represent the instruments arguments p3 is duration, p4 is pitch, p5 is velocity
kTone chnget "Tone"
kRate chnget "Rate"
kRate = 1/kRate
afm linsegr 4, 0.1, 2, 0, 0.1
kpitch linseg p4, p4, p4//pitch envelope
aenv adsr 0.1, 1, 0, 0.1 //amplitude envelope
anote foscil 10/127, mtof(kpitch), 1, 1, kTone*p5 //FM oscilator
//aenv adsr 0.1, 1, 0, 0.1 //amplitude envelope
asig = anote*aenv
//filter section
ahp butterhp asig, 150
abr1 butterbr ahp, 630, 100
abr2 butterbr abr1, 5000, 100
alp butterlp abr2, 6000
outs alp, alp
endin
//How to edit tables
instr 5
ival table 0, 100
tablew ival+1, 0, 100
endin
</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
f0 z
//f 1 0 0 1 "./UHH_ElectroHatC_Hit-06.wav" 0 0 0
;starts instrument 1 and runs it for a week
i1 0 [60*60*24*7]
</CsScore>
</CsoundSynthesizer>