A video walk through that shows how to utilize Logic Pro X functions to create a MIDI sampler and to generate rhythmic MIDI material to drive the sampler in just 3 minutes. Listen to my track “Informatics” on Spotify: https://open.spotify.com/album/2L66Qioblp5FaBQwPzwcex?si=SHiqnMdQSdWyCnOLq1ciNw that uses the technique.
While teaching Data Sonification at the University of Oregon, we talked a lot about inference preservation, communication of idea, filtering and bias of data, and by extension, tool building as a process for supporting sonic hypotheses. To that end, I wanted to empower students with their own work inside Kyma, so we spent a class walking through the process of Encapsulation.
Encapsulation allows one to take a Sound and “create a simpler, cleaner interface for that Sound by reducing the number of controls and putting them all on the same level. Encapsulating a Sound does not make it more computationally efficient, but it does present a clearer control interface between you and the Sound” (Kyma X Revealed 2004: 293). Or, another computer music way to say it…
For those familiar with NeverEngine Labs, one can understand the power of encapsulation to create some really great Sounds that serve compositional, sonic, aesthetic, and educational goals. Encapsulated Sounds can help one save time, grow as a practitioner, and engage with the growing Kyma community. Tool building and sharing also invites positive activities like research, collaboration, and publication. The Kyma X Revealed section on Encapsulation (pp. 293-303) is a great starter, but can be a difficult first reference for the uninitiated. This article seeks to provide a current walkthrough of encapsulation that supplements existing documentation.
What will you need? Head over to the Kyma Community Library (https://kyma.symbolicsound.com/library/encapsulation-walkthrough/) to grab walkthrough files, but beyond this article, you will find Kyma X Revealed (293-303), any software to create a .png icon (e.g. Adobe Illustrator, Photoshop), and your design thinking hat helpful.
The process to Encapsulation follows five basic steps.
1. Create a Sound(s) to encapsulate
2. Define your controls and change the values (numbers or !EventVariables) to ?vars
3. Create a new class (Action > “New class from example”)
4. Add default values to the controls to open up Class Editor
5. Add descriptions and icon, set parameter types, and close to Save Class.
Step 1. I created a simple Sound to encapsulate (Figure 1).
The Kyma Sound to encapsulate, a one-sample wide impulse of N-samples long, is meant for controlling the amplitude of a single band in a spectral analysis of the same sample length (e.g. 256 samples). Bearing this user case in mind, where the encapsulated Sound will effect a spectral analysis’ amplitudes, Figures 2 and 3 depict the parameters fields of the two Sounds that create the effect (SyntheticSpectrumFromArray and DelayWithFeedback, respectively).
Step 2. I labelled the most helpful controls for the encapsulation process as green ?variables (Figure 2 and 3). Green ?variables are what enable a user to access parameter fields after encapsulation. The three user parameters, ?ImpulseAmplitude, ?samples, and ?Delay provide the user with the ability to control the amplitude of any single partial in a spectral analysis of n-window size. SyntheticSpectrumFromArray (Figure 2) creates a n-sample long spectrum with only one envelope. Since Kyma handles spectrums in the time domain as Amplitudes in the Left channel and Frequencies in the Right Channel, we treat the Partials parameter field more like the Sample length of the analysis. A single envelope is generated with the Envelope parameter field set to 1, there will only be one partial to control, with all other envelope amplitudes set to 0. That single envelope’s gain is controlled by ?ImpulseAmplitude. The Left Channel is selected, which means the SyntheticSpectrum Sound will only impact the spectrum partial’s amplitude, not its frequency. [See Gustav Scholda’s in-depth video for how spectral analysis works in Kyma and how to spectrally manipulate frequency and amplitude.]
?samples is meant to match the length of the spectral analysis it will later control. The delay length is also set to the same length, as DelayWithFeedback enables the single envelope to “scrub” across the sample length. In essence, ?Delay enables a user to select which partial’s amplitude they will effect.
Footnote: An esoteric note about this particular Sound. The Amplitudes parameter field of SyntheticSpectrumFromArray expects an array. Because the variable ?ImpulseAmplitude is a green ?variable, Kyma will prompt and ask the user if the ?variable is an “Element” or an “Array.” Because the Sound is meant to control a single partial, the ?variable is an “Element,” not an “Array.”
Step 3. Time for Encapsulation. From the main menu, select Action > New class from example (Figure 4).
Step 4. The menu selection will then generate a user prompt to add default values to the three green ?variables (Figure 5). All variables are “Values” and whatever is entered will generate defaults values one may alter later. For now, one may enter 1 for ?ImpulseAmplitude, 256 for ?samples, and 0 for ?Delay.
Step 5. The real encapsulation work begins adding Class name, descriptions, icon, and Input/Output type for formatting look and feel. Figures 6 and 7 depict the encapsulation editing process before and after.
The various fields altered for the encapsulation are as follow. Name is the name of the class, which can be searched for. Class description is the overall description, which can include overall sonic description, use cases, and user specific comments.
Parameters are designated before creating a new class. Each ?var ends up as a parameter field. For example, ?samples becomes the parameter field “Samples.” Naming a ?var sets the Class parameter field name. The parameter field in the Class editor contains our default value from the previous step, but can be changed in the editor. In addition, the Parameter options in the left tab will enable one to set Type, Field Type, and Category of the Parameter altering how the parameter field behaves and looks. Figure 7 depicts two of three parameter fields and these options.
Close the Editor window to save the class. You may always edit the class by choosing the “Edit class” option from the Action menu (Action > Edit class). Figure 8 shows the completed encapsulated sound.
Figure 9 depicts our new One Sample-Wide Impulse Class played through a 256 sample-wide oscilloscope. Since the delay is set to 0.5, we see our single sample residing in the middle of the oscilloscope (128th sample). Because the single sample may be moved in time (Delay parameter) and has control of gain (ImpulseAmplitude parameter), the Class may be used as a partial picker in Spectral Analysis.
Figure 10 depicts spectral analysis in Kyma, where amplitude and frequencies are divided between left and right channels. The first partial is displayed as the first sample, second partial as second sample, etc. Understanding this concept, we may use One Sample-Wide Impulse to control (read multiply) amplitudes of the left channel in a spectral analysis.
Figure 11 shows how an encapsulated Sound is used to multiply against amplitudes of a Spectral Analysis.
Figure 12 shows oscilloscope view of partials, with single sample wide (one partial) amplitude control. Delay is set relative (0-1) to the 256 partials in the analysis.
Two audio examples using Beck “Dreams” to depict the One Sample-Wide Impulse Class in use as a partial picker.
Audio 1. Beck “Dreams” running through live spectral analysis using a 256 sample window. No partial picking.
Audio 2. Beck “Dreams” with the One Sample-Wide Impulse class controlling playback of a single partial of the 256 sample live spectral analysis. Audio sweeps from a singular low partial to high partial selection and then back down again.
On Music faculty at Hamilton College since 1979, Samuel Pellman devoted his life to making music with students and turning them onto art. I was happily one of those students. After all, it was Sam who led me to pursue my graduate degree in Music. I’ve since earned my Music doctorate and had the opportunity to catch up with Sam at a few Kyma conferences over the past few years.
Sam was a sturdy mentor and friend, and one I knew I could bounce any idea or question off of. He was just someone I counted on being there when I could use a little help. Tragically, all that changed in November 2017 when Sam was struck and killed while out riding his bike. As previous students, Ben (H’14) and I (H’03) look back and see there is much to be gained from Sam’s work, his presence, and his joie de vivre. Sam’s ideas are woven into the sonic fabric of Kyma. Sam may have been at times quiet and his voice soft, but his work remains a powerful force in the sonic arts. His pitch design for Flight 93 National Memorial (Tower of Voices) sonically embodies the dead in a way that pushes sound to the forefront of remembrance. The National Memorial is one of the first in the country to embrace sound as its defining factor. Sam also developed digital interactive sound installations in the 80s and 90s when MIDI and digital sensors were first coming on line. And Sam’s music hoists micro-tonality and its mathematical roots of equal temperament to the aural top, creating interesting and complex structures amidst electronic synthesis techniques. We will discuss the threads in Sam’s work, especially those using Kyma, and how these threads intertwine with his ultimate work, Tower of Voices.
This webpage contains embedded links that jump to the musical or cultural reference. We encourage you to listen, click, and read along with us as we talk about Sam Pellman and his work. Feel free to skip to the bottom for videos and links.
///// Sam at the Kyma International Sound Symposium (KISS) /////
Over the last eight years, Sam presented work at KISS five times: 2010, 2012, 2014, 2015, and 2017. Sam grew up an organist; he regularly performed at the Clinton United Methodist Church and during the convocation ceremonies at Hamilton College. Yet, much of Sam’s work at Kyma conferences were interspersed with whole-number ratios and micro-tonal temperaments. Sam compositionally split the twelve divisions of the octave as much as he performed within their boundaries. For example, Sam’s various Peculiar Galaxies, which are part of his Selected Galaxies (KISS 2012; Ravello Records 7912), uses pitches “based on a dorian scale, tuned in 5-limit just-intonation, that is friendly to both quartal and tertian harmonies (i.e., harmonies built of fourths or thirds, respectively)” (Pellman 2012a; 2012b; 2012c).
The Selected Galaxies album also includes Selected Cosmos (KISS 2014), which is a two-tone sonification of human DNA (as reported by the Human Genome Project) using Kyma. Sam supports these two sequences of pitch and timbre by drone timbres, whose pitches are Shepard-filtered tones, “54 octaves above the sound emitted by an active galactic nucleus in the Perseus Cluster.” (Pellman 2015).
///// Tower of Voices /////
Sam’s ultimate work, and perhaps the one which will become his most memorable, is his pitch design for Tower of Voices. Tower of Voices is a visual and audible reminder of the heroism of the 40 passengers and crew of United Flight 93 that was hijacked and crashed in Shanksville, Pa., on Sept. 11, 2001. According to the National Park Service, “there are no other chime structures like this in the world” (NPS 2018). The Tower is 93 feet tall with 40 chimes measuring from 59 1/4″ to 97 7/16″ with walls “designed to optimize air flow… to reach the interior chime chamber” (ibid). Sam’s pitch design of the forty chimes “allows the sound produced by individual chimes to be musically compatible with the sound produced by the other chimes in the Tower. The intent is to create a set of forty tones (voices) that can connote through consonance the serenity and nobility of the site while also through dissonance recalling the event that consecrated the site” (ibid). While Sam designed the frequencies of the forty chimes, the chimes were built by Gregg Payne, an artist based in Chico, CA.
The Tower of Voices has eight columns with five chimes in each column. Sam indicated in his files preferences for particular groupings of chimes and he collected them horizontally. For tuning the chimes, Sam based his work on whole-number ratios. “The tuning ratios indicate the frequencies of the chimes relative to a middle-C of 264 hz. The chimes are tuned according to a system of just intonation, based on whole-number ratios” (Pellman 2017). Sam went through five versions of his tuning system before settling on the final system, as shown below in Table 1. Each cell in Table 1 depicts the pitch, frequency, and whole-number ratio (in relation to C=264hz) of each chime tone.
Table 1. Tower of Voices Pitch Design
Sam created several sonic prototypes/models throughout the build. Aluminum chimes were recorded in Tuzigoot, AZ, which Sam then used for modeling the sound of the forty chimes. One of the most striking auralizations is his October 2016 prototype built using Kyma, and which is still available on the National Park Service website for Tower of Voices. That same prototype can also be heard below.
Inside Kyma, Sam used multiple Sample Sounds played through a single MIDIVoice object that was triggered using a custom Max/MSP patch (sending MIDI note on/off messages). Sam’s model uses a lot of memory, and his Kyma’s Multigrid model is only able to playback on a Paca(rana). To optimize playback on just a Paca, we leveraged the MIDIVoice Sound script, and in turn, we were able to keep all the ratios in a single script array, referencing a single 264hz audio sample.
While the Tower of Voices model doesn’t represent Sam’s final pitch design, Sam did create a final auralization before his death based on his final v05.1 tuning design. For his aural model, Sam relied on a custom Max/MSP patch playing back buffers of five audio files at various speeds (read frequencies). The model runs by generating random timing bangs, where each bang selects a new number from a Coll object (an array list of pitch ratios and audio file names). The output of the Coll object first selects the appropriate audio sample to playback and then alters the sample playback speed based upon the pitch ratio. A final bang plays back the audio file. The use of a poly~ object in the patch allows multiple chimes to be played back simultaneously.
Sam never made a Kyma version of his latest tuning design, and since one can hear digital artifacts in the Max/MSP model, we decided to merge Sam’s tuning design inside Kyma. We wanted to hear the tuning design with the same high fidelity that Kyma delivers. Using our optimized Kyma Sound of a single MIDIVoice Sound script, we took Sam’s v05.1 tuning design and input these ratios into the script’s pitch array. The result is all at once beautiful and all Sam. We recorded a short bit of Sam’s final tuning design using Kyma, which can be heard in the audio player immediately below.
Sam’s compositional work is a by-product of his tireless passion for students and ideas, collaborative learning and theoretical concepts, and the intersection of science and the arts. Sam’s upbeat ethics, positive attitude, and dedication to the hope and optimism of the arts to construct meaningful dialogue has helped create a catalog of meaningful works. We know Sam will live on in the memory of the Tower of Voices, where each and every time a chime is rung remembering those who lost their lives on Flight 93, his ideas sound out across the valley of Shanksville, PA.
///// More About Sam /////
Sam Pellman studied with David Cope, Karel Husa, and Robert Palmer. Sam was co-director of the Studio for Transmedia Arts and Related Studies at Hamilton College and oversaw the development of Hamilton’s multi-million dollar Kennedy Center for Theatre and the Studio Arts. Sam served as Associate Dean of the Faculty, Posse mentor, and was recipient of Hamilton College’s 2015 Alumni Association’s Distinguished Service Award. Sam’s work can be heard on Innova and Ravello Record labels, and found at: http://academics.hamilton.edu/music/spellman/MfS/MfS.htm
///// Selections of Sam’s work /////
///// References /////
- Kyma International Sound Symposium. 2018. url: https://kiss2018.symbolicsound.com/
- National Park Service. 2018. Tower of Voices. Website. Visited August 20, 2018. Last Updated May 11, 2018. url: https://www.nps.gov/flni/getinvolved/tower-of-voices.htm
- Sam Pellman. 2012a. Peculiar Galaxies: NGC4038/4039. Vimeo.com. url: https://vimeo.com/53996649
- Sam Pellman. 2012b. Peculiar Galaxies: UGC4881. Vimeo.com. url: https://vimeo.com/53996648
- Sam Pellman. 2012c. Peculiar Galaxies: NGC1427 and NGC 4449. Vimeo.com. url: https://vimeo.com/53996647
- Sam Pellman. 2015. Selected Cosmos. Vimeo.com. url: https://vimeo.com/112973185
- Sam Pellman. 2017. Archives of Sam Pellman. Tower of Voices project folder.
///// Additional Links /////
- Society of Composers: Sam Pellman. http://www.societyofcomposers.org/members/SamuelPellman/
- Sam Pellman on Vimeo. https://vimeo.com/user1719627
- Hamilton College News. 2015. Samuel F. Pellman receives 2015 Distinguished Service Award. https://www.hamilton.edu/alumni/aa/distinguished-service-award-recipients/sam-pellman
- Sam Pellmans’ Composer Site on Hamilton College server. Lots of listening here! http://academics.hamilton.edu/music/spellman/MfS/MfS.htm
- Sam Pellman Obituary. http://www.legacy.com/obituaries/uticaod/obituary.aspx?n=samuel-pellman&pid=187215958&fhid=13171
- Paul Murdoch Architects (Tower of Voices). https://www.paulmurdocharchitects.com/tower-of-voices-part-of-flight-93-national-memorial/
My Audio Recording Techniques III (Spring 2018) course had ten weeks to select and recreate a recorded song of their choice. They voted on producing a recreation of Massive Attack’s “Teardrop.” The goal was to get the song as close as they could to the original recording. They recorded, mixed, and mastered (and played parts!) all elements of the song in just under ten weeks, after they voted on this tune. I am so proud of my students and what they were able to do. I am posting here to give me (and I hope you!) a smile when one needs it.
Ever since Cycling 74 introduced the idea of packages in Max 6.1, I’ve been pretty excited. Previously, there wasn’t a great way to distribute and install tools, objects, externals, media. And if you wanted to use anyone else’s tools, you had to wade through the murky collection of application directories and dump in single files–an unfailing way to ensure that you’d have to re-install these tools after a Max/MSP update.
With packages, Cycling 74 got rid of the mess. Tool creation, installation, and for me, distribution is clear and simple. Even if I’m developing my own set of abstractions for nobody’s computer but my own, packages provide a platform for a confident working-practice with long-term benefits. This post is meant to outline the pros of Max packages by walking through a working example of how one can set up her/his own Max package.
While I have created several Max packages since 2014, the post will outline my latest Max package, Korg Nano. It’s a basic example, two objects that comprise a software implementation of the Korg nanoKontrol USB controller, certainly enough to get one started.
After downloading the Korg Nano package, unzip the file and place the unzipped folder directly into the ‘packages’ directory. For Mac users, the folder is Applications > Max 6.1 > packages. Or, you can read a short article by Cycling 74 on packages for installation.
What It Is
In short, packages provide global access. Autocompletion, media in global search paths, extras in the top Extras dropdown menu, option clicking helpfiles, it’s all there. What the Korg Nano package provides is a software listener for the 151 controls on the Korg nanoKontrol USB controller. The package is meant to be a plug ‘n play solution for this hardware device (and I use it for prototyping all the time).
The patchers folder is where you throw your abstractions and objects (not externals), including any additional bpatchers that you may have used to create your objects. Of course, if your package depends upon third-party objects, you can place them here (and within any named subfolder). For Korg Nano, there are two main objects, korgnano and korgnano.inputmenu. korgnano is built from several bpatchers, which one will see listed in a subfolder (“patchers > korg_nanoKontrol”).
The media folder allows one to place images, audio, and video. This folder becomes global (after restarting Max), so you can also use packages as a way to manage media instead of worrying about “filepath” when you move from computer to computer. Since Korg Nano is a software implementation of the USB hardware controller, I used image buttons that simulate the look and feel of the hardware controller. Placing images in the media folder ensures they will be found, regardless of what computer I am using.
The help folder is exactly what one would expect. Help files ending with the extension .maxhelp. While help files are useful (e.g. option-click an object to access its help file), Max packages allows one to provide some serious help to the help files. This helpful power boost comes by way of the docs folder.
The docs folder contains reference files that enable hover tooltips, documentation window text, uniform descriptions, and fancy descriptive break downs and object links from within the reference window. To understand what is happening in the help file screenshot above, let’s dig into the docs folder. Navigate to the “korgnano-0.0.1 > docs > refpages > korgnano > korgnano.inputmenu.maxref.xml” file. This xml file contains all the descriptions that get pulled for the help file. While this file contains confusing html/xml style tags, one need only look to two examples to see their power.
The first example comes from the first two xml tags <digest> and <description>. These two description tags show up in the Autocomplete menu, the documentation window, the reference window (outside any help file), and the help file’s title object (actually, a jsui object that uses an application Max script “helpdetails.js” to parse these xml tags and display them for clean documentation).
The second example of documentation power comes from the <seealsolist> tag near the bottom of the .xml file. One only needs to place additional object names here (e.g. “<seealso name=’korgnano’/>”) and links automatically appear in the reference documentation window, linking to your objects’ help files. This is handy here, as I want to link the korgnano object and the korgnano.inputmenu object together since these objects are symbiotic. The korgnano object grabs data from your Korg hardware controller and then sends the controller data direct to korgnano.inputmenu objects.
Docs, Help, Media, Patchers. That’s it. A Max package that enables software listening for the Korg nanoKontrol, neatly bundled for distribution. Clear documentation files to help anyone navigate the tools, even me! when I revisit my tool a few months down the line. However, I do not need to distribute to reap the benefits. Clippings, templates, patchers, or even externals that I use often in my own work have a place within a Max package, easily searchable and documented so I have a working practice that is efficient and scalable. For anyone working in Max, packages offer a clean way to keep your sh** together.
Korg Nano Max package
Packages also work with Max 7. While my example was built using Max 6.1, there is no reason why it shouldn’t work in Max 7. Email me if you have issues.
Speaking of issues… if you’re having trouble with autocomplete, try creating a message object in a Max window with the text “; max db.reset”. This will refresh Max’s preferences, but may take 60 seconds+ to reload. Here’s the original forum post where I found this fix.
Tired of software, longing for the touch and feel of circuits, I’ve been looking for something to satiate my sonic hunger. And, I wanted to get my hands dirty. So, I placed a small order of electronic parts with mouser.com. Additionally, ever since having discovered that the cigar store in Staunton, VA sells nice wooden cigar boxes between $3 and $5 (size and quality), I’ve been itching to put a nice piece of analog circuitry inside.
Thanks to Nic Collins (Handmade Electronic Music: The Art of Hardware Hacking p.161), I found a nice schematic on controlling pitch and volume with photo-resistors. (note: instead of throwing up the schematic as an image, I have posted a pic of my breadboard circuit based upon his schematic below. Regardless, I urge you to support Nic by buying his book. It’s really good).
After wiring the circuit up on a bread-board, I noticed how quiet the theremin sounded. To boost the signal, I needed an audio amplifier, so I turned to the good, old Radioshack project book, Timer Op Amp and Optoelectronic Circuits and Projects Vol. 1 (p.43). Forrest Mims is completely straight-forward on schematic, use, and example.
Taking the output of the photo-resistor theremin into the 386 seriously boosted the audio signal, even though I did not have any 220uF capacitors (as shown above). Later, I learned from talking with University of Virginia’s Tech Director, Travis Thatcher, that the capacitor on the output signal is to remove any DC offset that could damage the speaker. A 10uF cap would work fine, or the 220uF as shown. While no capacitor worked for me on this project, I did add a 220uF cap to my parts list for next time.
Above is the circuit. The top, 14 position IC circuit is a Hex Schmitt trigger, which is used as the oscillator. The 10k photo-resistor on positions 1 and 2 control pitch, while the other resistor controls volume (one could use a potentiometer instead of a photo-resistor for either control). The audio outs feed into the smaller, 8 position, 386 amplifier. Everything is driven on a 9V battery.
What is not shown in the breadboard schematic above are three simple, but useful additions. I added an on/off switch for power, a LED indicator light, and a mono audio jack output for sending the signal to an amplifier (e.g. guitar amp). Since this was my first project using a power switch, I scoured the internet on wiring and definitions. I learned a lot from this SparkFun article on switches.
While the breadboard took less than ten minutes, the soldering transfer took a few hours… yes, I am slow. “Measure twice, cut once”, thank you Grandpa Overholt. Methodical work can have its benefits, however (no re-soldering on this job!). After completing the circuit board, I set the board on stand-offs in the cigar box.
With the parts that I ordered, I found I had little clearance on my connectors. I had to remove the front piece of wood in the cigar box so my washers would tighten up on all the connectors (switch, LED, and audio jack). While soldering, I also found my heat sink to be a great tool, especially while working on the LED and photoresistors (I was concerned about damage due to heat transfer from both the soldering iron and the heat shrink gun).
I drilled small 1/16″ holes to stick the photo-resistors through, bent the leads, and used electrical tape on the back to help support. I also drilled holes above the speaker, although this box design utilizes the speaker as a monitor and not as the main audio output. I used a small piece of velcro to affix the mylar speaker to the cigar box.
In the end, I was pretty happy with the product and the sound. If I had to redo, which is certainly possible for me to make another, I would include a volume knob (10k variable resistor), as the audio amplifier is almost too good! My guitar amplifier is set at near 0 currently (0.0001?), and I can turn up the amp (to 1.1, not necessarily 11, but sounds like it), if I run my signal through a compressor (e.g. MXR M102 Dyna Comp).
I would additionally add a resistor on the LED, so it won’t burn out. My LED burnt out after two days, and I found a good article on Adafruit explaining why. All I needed was to add a simple 250ohm resistor on the negative lead. Both of these items (10k pot and 250ohm resistor) are included on my parts list, for anyone wanting to cook one up.
Photoresistor Theremin Parts (on mouser.com)
Lately I’ve been having fun with the spectral analysis tool inside Kyma. This post is to document a quick introduction to Kyma’s Analysis Tool. Specifically, I will document how basic smoothing of frequency and amplitude augments the sonic character of a slow playback via an analysis file.
After performing an initial analysis using Kyma’s Analysis Tool (Cmd-1), and in my case, I’m doing a 256 band analysis, I look to smooth out frequencies and amplitudes separately.
The Analysis Toolbar provides many options, but the main tool we are concerned with is the Filter function.
There are several filtering options within the Filter function.
The main filter function we are concerned with is smoothFrequency and smoothAmplitude. Notice, how with two separate filters, we will have to apply one filter at a time.
The process for this exercise is simple. Apply 10 frames smoothing to Frequency, then 100 frames. Afterward, apply 10 frames smoothing to Amplitude, then 100 frames. Of course, one may try different combinations. The goal is to smooth frequencies and amplitudes in anticipation of playing the file back at a very slow playback rate.
Ten frames for smoothing is not a lot of change; one can hear subtle flutters on the low and low-mid frequencies.
110 frames smoothing of frequency begins to sound like vari-speed delay in the system, like a clean version of wow and flutter from a tape deck. If you look closely at the lower frequencies, you can see larger sinusoids developing as a result of the smoothing, which results in some audible vari-speed sound. But we are not finished yet. Onto the smoothing of amplitudes.
Amplitudes help the sonic character a lot. I cannot explain it. The sound is good. If I had to ultimately choose between smoothing frequencies or smoothing out amplitudes, I would choose amplitudes, hands down.
Now, after these five steps, we’re ready to pitch our audio and slowdown playback. The next two audio examples demonstrate pitch shift down one octave, and the second example demos both the pitch shift with slowing playback by 10x.
I understand that in this blog post, I’ve failed to demonstrate why smoothing augments the sonic character. In order to juxtapose this last audio file played above, which is in part the end product of the smoothing process, I’ve made one last recording. Below is an audio file of an analysis, without smoothing, played back down an octave at 10x the length. Everything is the same to the audio above, except for no smoothing.
Because the audio is slowed down but the analysis has no smoothing, you’ll hear that frequencies and amplitudes develop at a faster rate and causes, to my ear, digitization noise. By smoothing out frequencies and amplitudes in advance of the slowed playback, we create frequencies and amplitudes that develop at the speed of our playback, thus decreasing the potential to hear unnatural spectral bands, or what I would call digitization noise.
Ref: Source material comes from my piece #Carbonfeed, a work that is driven by tweets in real time.
Tools help us carry out particular tasks and functions. Hammers drive in nails. Saws cut wood. In the digital realm, we also use tools. Faders control volume, buttons trigger sounds. However, in software, things are not always so clear cut. Faders don’t have to control volume, and buttons don’t have to trigger sounds. The examples of faders and buttons acknowledge the two types of fundamental control: continuous (faders) and discrete (button). Our digital tools are built upon these two paradigms of continuous and discrete control.
In Kyma, the Virtual Control Surface (VCS) lets us control sounds in real time. The VCS is a tool that displays virtual faders and buttons (controlled by using a computer mouse or app). Since I don’t own an iPad, I am unable to take advantage of the VCS Kyma Control iPad app. I desired a non-mouse control inside Kyma that would let me get away from mousing and clicking. Thus, I wanted to take advantage of the controller most available to me and other users. The discrete control of the Qwerty keyboard.
This blog post covers my foray into Kyma Tools (a largely untapped resource of Kyma) and the result: an open source qwerty keyboard controller built in and for Kyma. One is process and the other is product.
Why Kyma Tool?
But let’s start off with the why. I could have easily created a Max patch that accepts ‘key’ control and then port off my ASCII values as Open Sound Control (OSC) messages to Kyma. Actually, I did. See Figure 1.
Yet, this is not as simple as it sounds. Not only do I have to open Max/MSP in order to run this patch, but I have to get the IP address of the Paca(rana), copy the IP address here… each and every time I start the Paca(rana). Not very fast for performance setup.
I wanted to see if I could embed this type of discrete, keyboard control inside of Kyma itself, cutting out third party software and reducing setup time. Hence, my foray into the Kyma Tool (aka. state machine that can read and write EventValues)
Kyma Tool Process
The Kyma Tool is where one can write a patch to carry out multi-step processes (Spectral Analysis Tool), process batch files or a folder of files, create a controller (my keypad tool), or create a virtual interactive environment (think CataRT if you wrote this in Kyma). The Kyma Tool does use SmallTalk and offers a bit different coding experience, but the Tool environment is a pretty powerful editor. I knew that if I wanted to get access to the qwerty keyboard and create a controller, I would need to dive into the Kyma Tool. (For further reference to the Kyma Tool, please see the Kyma X Manual, pp. 309-333).
The first step of my Keypad Tool is to convert each character into ASCII. Since each value is a character, I convert the character into an ASCII integer using the Capytalk “asInteger”.
keyboard := LastCharacterTyped asInteger.
The Capytalk above stores the ASCII integer into the local variable keyboard. The local variable ‘keyboard’ writes/outputs its value to the HotValue !KeyBoard. Writing the control to a HotValue provides access. !KeyBoard, the ASCII integer of a user’s keyboard, is now accessible, in real time, by any Kyma Sound that references the variable !KeyBoard. So long as one uses the Keypad Tool, !KeyBoard can be used by any Kyma Sound at any time, anywhere, just like the Max patch above.
The next function I desired, beyond accessing the Qwerty keyboard values as a Kyma HotValue, was to specifically address the number pad 0-9 (in ASCII, 0-9 equal 48-57). For these ten keys, I wanted 0-9 keypad values to store as their actual numbers inside a different HotValue. Below is the Kyma Tool code.
(keyboard between: 48 and: 57)
ifTrue: [keypadNumber := keyboard-48]
ifFalse: [keypadNumber := -1].
Here’s the English version. If the ‘keyboard’ variable (this is our ASCII value) is between 48 and 57 (inclusive so would react to 0-9 on the keyboard), then store your value into variable ‘keypadNumber’. If not, store a -1. In Kyma, we usually write Capytalk true: () false: (). In Kyma Tool land, I had to learn that we need ifTrue:  ifFalse: . Subtle syntax, but one that I lost an hour over. You’ll see in the example files how we’ll utilize the Capytalk true: () false: () in a SoundToGlobalController.
The ‘keypadNumber’ variable also outputs its value to a HotValue, !KeyPad. !KeyPad outputs 0-9 when qwerty keys 0-9 are pressed. Otherwise, any other key value outputs -1.
Kyma Tool in Action
Ok. So how does one use this Kyma Tool? Similar to the Tools > Fake Keyboard or Tools > Spectral Analysis tool inside Kyma, all one needs to do is open the Tool (‘keypad.pci’) inside Kyma (File > Open) and start typing on the keyboard to output values. No external software or OSC setup necessary. Of course, however, you’ll need to download the tool.
The only note about Kyma Tools is that their window needs to be highlighted (in front) in order to work properly. This is not a new software concept, but one that users of Kyma Tools should be aware of.
Download the keypad.pci Kyma Tool and example files to help you get started.
Selecting a portion of an audio sample is something that we do often. Digital Audio Workstations (DAWs) like Logic and ProTools or even Sample Track Editors like Peak and Audacity allow users to select a portion of audio.
The process of selecting audio with a mouse for out-of-real-time control (and in the comfort of one’s studio) isn’t a bad paradigm. However, what about live performance contexts? What other paradigms exist, may be altered, or can be created to benefit live performance?
In conversations with Ted Coffey one such idea came up. With the Wacom tablet, one may alter the start and end selection times of an audio sample based upon the pen’s position in XY space. This idea, sample selection times in XY space, is entirely Ted’s and I can take no credit. Still, I was and am excited about his control idea and I really wanted to listen to a sound using the XY control paradigm. This blog post documents my implementation of sample selection times in XY space based upon Ted’s description.
In order to control sample selection times we need to control three things:
a. sample selection start
b. sample selection end
c. start/stop sample
Using the Wacom tablet, we map XY space onto the sample selection start and end times (Y-axis is selection start, X-axis is selection end) and use !PenDown to trigger the sample start/release.
So, what does this sound like? Here are two examples.
The first example uses to pen to scrub different locations of the tablet. Source material is the opening theme to Beverly Hills Cop.
The second example uses grid quantization for the Pen location. Dividing the sample start location and end location times by a beat factor (e.g. 32), we can quantize the length of the selection by a fraction of a beat. Match the playback of this fraction to the !BPM of a drumbeat, and voila! Instant gratification. Source material: Beverly Hills Cop theme + Bob James “Take Me To The Mardi Gras”
To sum up, using XY space to dynamically alter start/end selection times of a sample has strong performance possibilities. For those interested, I’ve shot a quick video of the controls inside Kyma and placed my source Kyma 7 files here.
Quick Kyma notes to no-one but myself:
a. use SampleWithTimeIndex.
b. for Beat quantization,
- Duration must be ‘audioFileNameOfDrum’ sampleFileDuration s.
- Rate must be !Rate * (!BPM / (‘audioFileNameOfDrum’ closestBPMTo: !BPM forBeats: 64))
- Start, End, etc. must use this syntax… ((!PenY * 64.0) rounded / 64.0)
c. for On-the-beat triggers, use Capytalk
((1 bpm: !BPM) hasChangedReset: 0) trackAndHold: !PenDown
This means that the value starts at 0, PenDown will trigger 1 when next beat occurs.
Over the last few months, I’ve been interested in data zooming, where a finite range of data (say 0-1) can be magnified and explored in greater detail. We are all familiar with the paradigm. In Microsoft Word or Photoshop, for example, you zoom the view (e.g. 125%) and in the same amount of screen real estate, you see a smaller region (of words or pixels) in greater detail.
Zooming is also true for any stream of numbers. In software we can map a fader to move between 0-1 and on a similar fader (or the same fader), map the range to 0.0-0.1 (1/10 of its original range).
While a simple concept, data zooming can be a powerful tool. Magnification embodies focus, detail, and exploration. If sound is data or controlled by data, then magnification enables us to literally ‘zoom in’ on audio. Data zooming, then, becomes a way to explore sound space.
Inspired by Palle Dahlstedt , I set out to rapid prototype a way to zoom in on a data stream for live performance. I chose the Wacom tablet since I use this often in live performance with Kyma. I was most fascinated with !PenX (0-1 range), which I often map to the TimeIndex of a sound (0@start of sound, 1@end of sound). Regardless of audio sample length, PenX can be set so 0 will always be the beginning of the sample and 1 will always be the end of the sample. (note: TimeIndex range expects -1 to 1, but PenX range can be easily shifted to fit)
The basic gist of data zooming is that we need two controllers to do the job: a continuous fader (e.g. !PenX) and a button to trigger the zoom (e.g. !PenButton2). The pen/fader equates to the values that we read and in our case, the values that we map onto the TimeIndex of an audio sample.
Data zoom works like this: whenever the zoom button is depressed, we take the current location of the fader and “zoom” in to the location. With zoom enacted, the fader moves at a smaller scale around this location point. The magnitude of zoom can be altered, but for the purposes of this example, I worked with a 10x zoom magnitude. Before jumping into Capytalk and Kyma, let’s walk through my initial prototype inside Max/MSP. The math is the same.
The range of initial values (!PenX) are between 0-1. When the zoom button is depressed, we need to save the current location of !PenX and use as our new zoom location (offset). In addition, we need to alter the range in which !PenX moves through data (scale). I’ve uploaded the Max prototype patch and Kyma file here.
In order to take into account the centering of the Pen at the current zoom level, I had to add an additional offset that shifts the offset to the actual point of the pen on the tablet. The Max prototype includes multiple zoom levels at powers of 10.
With Kyma, I used the same basic concept. When a button is pressed (!PenButton2), we zoom to the current value of X (sampleAndHold) and magnify the boundaries of !PenX from 0-1 to the zoom order (exponent of 10). Because 10^0 = 1, we can use a button’s press (binary 0 and 1) to create a simple on/off zoom in Kyma.
Here’s the Capytalk that achieves data zooming:
(!PenX / (10 ** !PenButton2)) + ((((!PenButton2) sampleAndHold: !PenX) – (((!PenButton2) sampleAndHold: !PenX) / (10 ** !PenButton2))) * !PenButton2)
First, !PenX is scaled down when !PenButton2 is depressed (power of 10). We then add back (offset) PenX’s location from when PenButton2 was pressed. In order to take account of the actual pen location on the tablet, we have to subtract PenX’s sampled location at the same order of the zoom. Lastly, we multiply this offset by !PenButton2 so that when the button becomes 0 (zoom off), the zoom offset no longer effects PenX’s initial, non-zoom state. Thus, with PenButton2 off, the Capytalk is just (!PenX / 1) + 0. Below is a short video sounding the process.
Download the Kyma and Max files.
 Palle Dahlstedt. “Dynamic Mapping Strategies for Expressive Synthesis Performance and Improvisation.” in Computer Music Modeling and Retrieval. Genesis of Meaning in Sound and Music. 5th International Symposium, CMMR 2008 Copenhagen, Denmark, May 19-23, 2008.