Strudel 102: Synthesis, making unique sounds
Notes
- You can play notes with the
note()function. - This function can take numbers or letters. You can pass in any number but the human hearable frequencies are going to be 0 - 127. For letters, you can pass in any letter from a - g.
- To change what instrument the note is using, you can pass in any sound from the sound bank by chaining a
.sound()function, e.g.sound("piano")
Try it: Can you find melodies that are actual words? Hint: ☕ 😉. You can also try decimal numbers.
Spoiler
Playing flats or sharps (black keys)
- You can play flats by adding
bto the note e.g (eb cb ab bb) - You can play sharps by adding
#to the note e.g (e# c# a# b#)
Changing octaves:
- To play notes with letters in different octaves, you just add a number after the letter e.g (e3 e#4 b2 c1)
Try it: Play some flat, sharp or regular notes in different octaves.
Spoiler
Switching between sounds and stacking multiple sounds
- Just like you can switch between sounds with drums, you can do that to synths, you can also stack souds by separating them with a comma.
Try it: Play multiple sounds from the same pattern.
Spoiler
Controlling note times and playing longer / shorter sequences
- Divide sequences with
/to slow them down. - Multiply sequences with
*to speed them down. - Use the
@symbol to elongate a note.
Try it: Divide or multiply a sequence by 4.
Spoiler
The same symbols that work on drum sequence work here too, here’s a refresher:
- ~ (rest/silence)
- * (repeat, e.g.
hh*4) - < > (make each element take a full cycle, e.g.
"<bd sd>"). - [ ] (Group into the same cycle, e.g.
["bd sd"]).
Musical Scales
- What are scales? Just a different set of notes that go well together, strudel will take care of grouping those up for you
- The scale function will turn numbers into notes in the scale (zero indexed) or quantizes notes to a scale.
- This makes it so any note you play will be in scale, and you can move up and down octaves just like before.
- You can put in any scale you want into strudel, just make sure to use
:’s instead of spaces if the scale is multiple words (See below).
Some scales that you can use (This is not all of them):
- C:major
- A2:minor
- D:dorian
- G:mixolydian
- A2:minor:pentatonic
- F:major:pentatonic
Try it: Try switching out the scales on your pattern.
Spoiler
Chords
- You can play chords by passing the chord you want to the
chord()function, and voicing them with thevoicing()function - This can be combined with
n()to play it like a scale. - Try playing something like
chord("<C Am F G>").voicing()
Try it: Play a chord
Spoiler
Noise functions and waveforms
The purest sounds known to man
Strudel has a bunch of waveforms that you can use, but the main ones are:
- sawtooth
- square
- triangle
- sine
They work just like the sounds from above, e.g ‘piano’. Use them in the .sound() function
Try it: Check out the different sounds these waveforms make.
Spoiler
Strudel also has noise functions, these can also be used like the other sounds
Here are some of the noise functions that we can use:
- white
- pink
- brown
Try it: White noise is commonly used to create hi-hat sounds.
Spoiler
Controlling waveform harshness
partials refers to the magnitude of each harmonic relative to the fundamental frequency. They can thus be used to spectrally filter these waveforms and tame some of their harshness:
note("c2 <eb2 <g2 g1>>".fast(2))
.sound("sawtooth")
.partials([1, 1, "<1 0>", "<1 0>", "<1 0>", "<1 0>", "<1 0>"])
partials allow us to control the waveform and shape it in any way we want to create new sounds, it takes an array of numbers and it will apply it to the waveform.
Note that the first value in the partials array controls the magnitude of the fundamental harmonic.
Try it: Manipulate the partials above with some decimal numbers and see how the sounds changes.
Spoiler
Each harmonic has two defining properties: its magnitude (how loud it is) and its phase, which determines where in its cycle that sine wave starts when the waveform is built. We can control the phase of a waveform by using the phases() function, this gives our sound a more interesting depth.
Try it: Try adding .superimpose(x => x.phases([0.5, 0.5, 0.5])) to the above.
Spoiler
Vibrato
Applies a vibrato to the frequency of the oscillator.
- Makes eery or funny noises.
- Can be applied using the
vib()function. - The depth of vibrato can be modified by tacking on a
:<number>after your vibrator. e.g <1 0.5 2>:12 will be modified by 12. - You can also use the
vibmod()function to accomplish the same effect as above but vibrato needs to be set first.
Try it: Apply an array of different vibratos like <1 2 3 4 5 6>, you can also use decimals.
Spoiler
Blending sounds together, sidechaning and orbits
You can make some sounds stand out more than the others by using a technique known as ‘side-chaining’. In strudel this is called ducking, I think they named it that because you simply duck the sound under the other sound.
To duck a sound, the sound you want to affect (duckee) must use the orbit() function which takes a number that needs to match the duckorbit() of the sound that is affecting it (ducker).
duckee: s("sawtooth").delay(.7).orbit(2)
ducker: s("bd!4").duckorbit(2).duckattack("<0.5>").duckdepth(1)
In this example, we are ducking a continous sawtooth with a 4 on the floor. Notice how the duckee is listening on orbit(2) and the ducker is manipulating with duckorbit(2). You can also manipulate multiple orbits by the same ducker by using a :, it would look like this duckorbit("2:3").
Try it: Try ducking multiple sounds from the same source.
Spoiler
Sometimes, you want to apply less ducki-ness to a sound than another sound but use the same pattern to control it, you can achieve that by using the duckonset() function which controls how much ducking is applied to a sound. It controls the time required for the ducked signal(s) to reach their lowest volume. Can be used to prevent clicking or for creative rhythmic effects.
We can apply this to multiple orbits with the ’:’ mininotation, e.g. duckonset("0:0.03"). Note: this requires first applying the effect to multiple orbits with e.g. duckorbit("2:3").
Try it: Try ducking a noise to rhythmically create a bass drum sound.
Spoiler
Putting it together
- Make a synth lead by using varying note speeds and effects on a
supersawsound. - Combine your lead with some drums, checkout the drums workshop for a refresher.
- Create a bass line by playing a something on a lower octave hint: 1’s and 2’s work best for this.
- Manipulate pure
whitenoise into a hi-hat sound. - Duck one of your sounds with another sound.
- Ask the person next to you for 8 random numbers and use them in some way.
Sharing
- To share the music you just created, just copy the strudel link. Make sure you hit update for the latest version.
- Share your strudel code here: Submissions