Xox

A synthesized drum kit, carefully designed to simulate a Roland TR-808 drum machine, with an attached sequencer for quick beat construction. The first
argument to the constructor allows you to easily define beats using the following syntax:

  • x : kick drum hit
  • o : snare drum hit
  • * : close hihat
  • – : open hihat
  • . : rest

XOX objects are basically hybrid sequencers / unit generators; this means that you can call most unit generator methods,
( such as drums.fx.add() ) as well as some sequencer methods ( such as xox.stop() and xox.start() ). By default, the constructor
assumes that you want each note in your sequence to have a duration equal to one divided by the number of notes you specify. For example, if you
specify a four-note sequence the XOX sequencer will assume you want each note to be a quarter note in duration. You can also specify a duration
explicitly as a second parameter to the constructor.

Unlike the Drums object, each sound in the XOX object is a synthesis unit generator. The parameters for each ugen are different. Basically the XOX
consists of a Bus object that the individual synthesizers are attached to, and a sequencer to control them.

Example:

a = XOX( 'xoxo' ) // each note is a quarter note in duration  
a.fx.add( Delay( 1/64) )  
a.snare.snappy = 1.5  

b = XOX( '***-', 1/8 ) // each note is an eighth note
b.hat.fx.add( Distortion() )  
b.kick.decay = 1  

b.seq.note = 'xoxx**-o'

Properties

  • amp : Float. default range { 0, 1 }. default value: 1.
  • pan: Float. Default range { -1, 1 }. Default value: 0. The position in the stereo spectrum of the Synth output.
  • kick: Ugen. The kick drum unit generator.
  • snare: Ugen. The snare drum unit generator.
  • hat: Ugen. The hihat unit generator.
  • seq: Sequencer. The built-in Seq object.

Methods

  • note( Float:frequency, Float:amp(optional) ) : This method tells the drum kit to play a single note.
  • play( Array:frequencies, Array:durations ) : This method accepts arrays of frequencies and durations as arguments to create and start a sequencer targeting the oscillator.
  • stop() : This method stops the sequencer that is built into the oscillator if it has been started.
  • kill() : Disconnect the Drums from whatever bus it is connected to.