Java Synthesizer, Part 22, Arping

Just some observations regarding arpeggiating. On its surface, the idea of arpeggiating a note, or series of notes, is very straightforward. Essentially, it’s like automating someone standing at a keyboard and pressing keys (i.e. – like a sequencer). But, as I dig deeper through it, and spend more time implementing the ideas arising from the arp module, the more complex things become.

The simplest form is just one key turning on and off. Stand in front of the keyboard. Press one key. Let go. Press it again for the same amount of time. Let go for the same amount of time. Repeat. This is a gate arpeggiator. One approach is to take an LFO (low frequency oscillator) running a squarewave and connect it to the gate-in pin of the envelope generator (ADSR) or gate-in for an audio oscillator. The note out will depend on which key you press, and the rate and duty cycle (ratio of time on to total cycle time) will be based on the LFO rate and ratio settings.

(Imagine there’s a VCA between osc2 and osc1.)

The next type of arpeggiator switches between two notes to create a trill effect (usually two notes close together and switching between 10 to 50 times a second). An approach for this circuit is to connect the LFO outputting a squarewave to the input of a VCA (voltage-controlled amplifier). Because the LFO output only goes between -1.0 and +1.0, we need the VCA to create a signal that oscillates between our two desired frequency numbers. Set the VCA offset to 2.0, and amplitude to 100, to get a value of 100 ((-1.0 + 2.0) * 100) and 300 ((+1.0 + 2.0) * 100). Connect the output of the VCA to the setFreq pin of an audio oscillator and you get your trill between 100hz and 300hz. Rate and duty cycle still depend on the LFO frequency and ratio, while the upper and lower notes are a function of the VCA amplitude and offset settings.

Things get a little more tricky when dealing with patterns. Stand at the keyboard and press four adjacent keys in a rising sequence, and then loop them. This would be a “0 1 2 3” pattern. Start with a different key and do the same loop and it’s still “0 1 2 3”. Play the adjacent keys in a falling sequence for a “0 -1 -2 -3” pattern, etc. The easiest approach is to take a dedicated arp module and connect it to the keyboard hardware, adding the arp pattern value to the keyboard NoteOn number. So, if you press MIDI note number 50, the rising pattern would give you “50 51 52 53” in a loop, while the actual frequencies played by the audio oscillator would come from an array of piano frequencies (for example). However, there are now at least three more operating modes available from an arp module.

Mode 1: Switch between notes with no break between them. This would be like pressing one key of a monophonic (one note at a time) keyboard, then pressing the next without letting go of the first. Press the third without releasing the second, etc. As far as the envelope generator (ADSR) is concerned there was only one keypress, which started the attack phase, and no unpress, so no start of the ADSR release phase, until you actually let go of the last key.

Mode 2: Switch between notes with breaks. Press one key, let go. Press the next key in the pattern and let go. Etc. The envelope generator would trigger with each key, applying the attack, decay, sustain and release phases to each note. This is probably what most people think of when talking about arpeggiating. You press the key once, and as you hold it, the arpeggiator walks through the pattern, applying the envelope to each new note out.

Mode 3: Kind of like a cross between 1 and 2. There’s a break between notes, but the ADSR isn’t triggered each time. That is, the envelope starts when you press the key, and ends only when you let go. The notes sequence through the pattern as raw oscillator output as long as you hold the key down, with the dead space between notes based on the arp on/off ratio setting.

The rates of modes 1-3, and duty cycles of modes 2 and 3, are determined by an internal LFO within the arp module. Selection of the pattern to play is done through the arp module itself. The frequencies out are a combination of the keyboard key being pressed, and the step values specified in the pattern (i.e. – 0, 1, 2, 3 or 0, -4, 2, 6).

Why go into all this detail?

Each synth circuit provides slightly different audio experiences, and can be used in combination with the others.

A gate oscillator driving the ADSR provides a solid, stable pulse regardless of the waveforms being applied to the ADSR input.

An LFO driving another oscillator lets you select any two frequencies that you want. Contrast this with the arp module in mode 1 running a “0 1” pattern, which only lets you pick the fixed frequencies used by a piano keyboard.

Youtube Video

Arp module mode 1 makes for a nice, smooth trill, while mode 3 is very harsh and abrupt. Mode 2 is unlike any of the other setups because it treats each note in the pattern as a separate keypress for gating the ADSR (but similar to the gate oscillator if you’re just running a “0 0” pattern).

Combining circuits would let you have a trill effect and a “0 2 4 -6” pattern running to the input of the ADSR, which is being gated by a completely separate LFO.  Mind you, all this arpeggiation  is possible with just some oscillators, the VCA, the arp module and the ADSR. Throw in everything else, including the bender, the oneShot, filtering, pan, echo, mixers and splitters in any combination you like, and you can really start having fun.

Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: