Tathagata

Posted by admin on February 19, 2010
Writing / No Comments

The base-chords and note progression that forms Tathagata is something that must have been going through Fredrik Thordendal’s head for some time.  This progression is something that has emerged at least 3 times in both Meshuggah and Fredrik’s solo work, and can be heard as the basis of Tathagata (Sol Niger Within, 1997; Sol Niger Within version 3.33, 1999), the close [3:50] of Sublevels (Destroy Erase Improve, 1995) and the outro [9:06] of Fredrik’s Secrets of the Unknown demo.

Tathagata is a beautiful track that seems to will the listener into innately feeling or predicting the next series of notes.  I was wondering why I felt this way about the track, until I sat down and started to score out the notes.  What emerged was a pattern, or a recursive, self-pitch-clipping algorithm.  (While it is a progression that continues to spiral upward, it has octave subtraction protection to stop it going on infinitely upward).  This is a very cool progression that, while it isn’t an auditory illusion, for some reason makes me think of a Shepard-Risset glissando, Risset’s rhythmic accelerando auditory illusion, or Autechre’s Fold4,Wrap5 (LP5, 1998).

At first, I thought the track progressed in measures of 5, with the notes being played on the 1, 2 and 3. Sarah argues that each measure is divided into 16ths with stresses on 1, 4 and 7, which I now think is actually correct.

In lay terms, the track can be represented as such:

The pattern progresses in a count of 16.

The ‘root’ note starts at MIDI pitch 56, and adds 5 semitones after each loop.  If ‘root’ exceeds 62 (or the initial ‘root’ value + 6), then subtract 12.

‘root’ plays a chord (root, root + 7, root + 12 [they are transposed down an octave in the code below]) on the 1 that rings out over the course of the measure.

‘note[1-3]‘ is the melodic progression of the plucked parts.  They play on positions 1, 4, and 7 respectively of the measure.

note[1] = root + 2

note[2] = root + 3

note[3] = root + 11

One possible implementation of Tathagata for JS in Max

// Simple representation of pitches and key modulation in Fredrik Thordendal's Tathagata.
// Tathagata.js by Alex Mesker / alex@x37v.com / www.x37v.com
// Save as Tathagata.js and put it in your Max search path.
outlets = 2;
setoutletassist(0, "Melodic progression (MIDI pitch)");
setoutletassist(1, "Root chord note/s (MIDI pitch)");
var root = 56;
var cutoff = root + 6;
function msg_int(i) {
if (i==1) {
outlet(1, root-12);
outlet(1, root-5);
outlet(1, root);
outlet(0, root+14);
} else if (i==4) {
outlet(0, root+15);
} else if (i==7) {
outlet(0, root+23);
root += 5;
if (root > cutoff) {
root -= 12;
}
}
}

Save the above JavaScript as Tathagata.js and put it in your Max search path.

A Max patch that uses it can be downloaded here:


----------begin_max5_patcher----------
1034.3oc0YtzbaBCDG+r8mBMb1MC5EO5jKc54dqSuzloCATrIEPd.4ooMS9t
WP.wOBTDBaYxgPRDfz+8m1c0hzyKWXcO+IVgE3ifuCVr34kKVHappgEM++Bq
zfmBSBJjOlUJqnHXMyZU88DrmDx1QXZaaayYErLQfHlm8ybVnnt+gT3M1q.X
mpq1MW.207RY6RiyRXB4nfZ6o.Q3l3r0G0KxWkhj8E5F5J.z639guSz1QvlV
iijhje+ie.ha04C7LQVPJSdqOkGGjzdm5dP7msr5A0x509u5kJh+q7FvRQT0
5KKWVcYkhHLjmlVxm2fvuvR3Qwg+H6a73vWIbRbFKjuKSbDX5FwXBsBKHj2v
LF1OiadeHVNgQIRTS5Ex1c.Y3vP9BRxOugmGoBGUkHXa3ADg3Odh3YDfjw9c
4f8Fdb6s.h0HCzv1R+GBQ9Kbsik8XhzvtZDoEWMAc2EmH4fhsLVTmPwdXnXK
CPpSnMRn3bsS+zCQJ9ODANX9XnsqjH3AHRGQF6W33hFZz6BWtiMx.gHSaIHL
7Z6CzKL7GML7mHL1Ojyr.hDdPz8AYqsF8pmRh.kIGbrGeJBjN4MkJ8rRkco2
yx0z3cqyFLjwi5v3oZtnwpKAC51yX65Ji..0LwQStRG33yUhbLSYD5M26O04
dx6l4djl4ImxbO7ZVBYZvuXYbAqracAXWpcm..2O.7jqPPbq+zBn63cOf5rR
wCkowkNH0+gA7PlLoP1SGUtuKPUEl5OZZXDQgd5FMActlQSsFNTunHJjpscS
ul1cAKAXO1Tmv5O9D5Q1u+QiKbfpaAUqN2kZVjDG0yJqnAc2QT4FO3ViCeuw
f.xPKfdzGdmxipMSyYidS1DQlyD0p9nZKrwMVq5iPyo5iNhAkDHNcWpr+bza
KDlPci1y+5Fka8HKGXCff8q8bDhnC55Tu8t9dCfHRGo8m.hZ+4bu0bB950IL
8hhH0AQdsWU+qq8GXqGOiEBxD4bvAGLx3RE19oBZryqyiMPnap7XA3qAhMAq
CDA27XgdS+HjrzGOMJMVqi+Ykg1+svDVf1UGfP6SfNt8f6hsmzxmQdzKmbHi
Rynp8igTAeWdX6HztWXf8VRDqPDmIO1qCdnpiz6fGZSbTDK6v5eSii1xKCua
DQOA4ppoSFtt0T0ZRFTSUkFLnlLKl7UPQtFUQJ4KY34MaEoDzbt2pHoS72tz
ZRoHNiqH3.JhXTE4n.ileJxryZTETjiYWLoJZCMfjnFURDURSZ1L2PkRc6Xd
MAUQSlK2MRk4tpCRvjbRkBAfTyqInJZxfycpjbBYVebUpp7j42KtjTIU.ZFp
IrYC6NY35gSlMrCoRp.DY9UAN1rbBqRkSXytDL1U0xBPyLM4OAMU9Our7ez3
5PsB
-----------end_max5_patcher-----------

Tags: , ,

OSynC-lite v0.3.1 for Windows

Posted by admin on June 12, 2009
Writing / No Comments

An experimental version of OSynC has been built for Windows.  This release fixes a bug in 0.3

http://x37v.com/x37v/osync/

Let me know if it works or not.

alex at x37v dot com

Version 0.4 will be out shortly, which improves message order – 0.3.1 is a bugfix for Windows.

OSynC-lite Update to v0.3

Posted by admin on May 26, 2009
Writing / No Comments

OSynC-lite.vst has been updated to send some extra info from your host sequencer (ramping from 0. to 1. over the course of each bar) and also now gates output when the host is stopped (information would be sent if the playhead was moved while stopped).

Version 0.3 is available here:

http://www.x37v.com/x37v/osync/

Tags: , , , ,

Pitched Synthesis with Noise Driven Feedback Delay Lines

Posted by admin on March 02, 2009
Writing / No Comments

The other day I was listening to Autechre’s Quaristice and thinking about my first perceptions of the album.  I remember thinking “This album has a very physical-modeling feel to it”.   I had forgotten about this, and recently I was playing around with Karplus-Strong string-modelling synthesis, after reading about the methodology behind it.

The opening of Autechre’s 90101-5l-l has these gorgeous rich resonating tones, which I accidentally seemed to be able to replicate with a Karplus-Strong model.  It sounds like they are capturing an incoming audio stream and then thrusting a noise-grain into a Karplus-Strong algorithm. (There’s more going on in there, but this seems to be the basis.)

 

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Autechre – 90101-5l-l (Quaristsice)

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

X37V - Example of Noise-Grain Feedback using Karplus Strong Plucked String Synthesis Methods

 

In simple terms, Karplus-Strong tones are generated by taking a burst of noise, and creating a feedback loop that repeatedly lowpass-filters the noise and scales the volume back slightly.

The combination of each of these factors plays a part in the resulting tone:

  • The brighter the burst of noise, the brighter the attack and note.
  • The loop time determines the pitch (shorter = higher, longer = lower)
  • The amount of filtering determines the length and life of the note.

Kind of like concatenative synthesis with a recursive function applied to each grain.

So, for fun I was trying to make a synth that would generate tones using this noise-based feedback model using Max.

In order to generate a specific tones, I was basing my pitches on the relationship:

F0 = FS / Z-L

That is, the fundamental frequency (F0) is determined by the sample rate (FS) divided by the length of the delay line in samples (Z-L).  Put simply, the number of times the delay line is read through per second is its frequency in Hz.

My first versions suffered from a very strange thing where the pitch accuracy was shockingly bad.  I was getting weird results where tones were getting more out of tune the higher they went.

The first problem is that I was using a [delay~] delay line with integer sample-length delays.  Who would have thought that something that was ’sample accurate’ could be a bad thing?

I realised later that it was bad because the generated tones were inversely proportional to the sample rate and that the values were being truncated to integer lengths.  When the length of the delay was long, the pitch was moderately accurate.  However, as the sample length got shorter, the pitch went way out.

The reason why this is bad is quite interesting.  Consider that we are working at a sampling rate of 44100 Hz.

What tone will be generated if we use a delay line consisting of 5 samples?

44100 / 5 = 8820Hz

What about a delay line of 4 samples?

44100 / 4 = 11025Hz

This is a big problem.  As the frequency that we are trying to generate gets higher, the less range we have in discrete tones.

At first, this appeared to be a sample rate issue.  If we increase the sample rate we should be able to get finer tone control.  However, doubling it means that we can get only one new pitch between the two we got at 44100.

88200 / 9 = 9800Hz

This is still not that good.  My solution was to make an abstraction and try some ridiculous upsampling with [poly~].  With this, understandably came a hit to my CPU.  The solution was still not all that good, as only one single new pitch could be attained between the previously possible tones each time the sampling was doubled.

 

This had been puzzling me for about a week until I decided to drop [delay~] for [tapin~].  Amazingly,  [tapin~] allows fractional sample length delays, as it does subsample interpolation when given a signal as its delay time.

 

The following is an example of the nature of the low-pass roll-off effect.  The clip starts with a fairly moderate low-pass filter (centred around 1500Hz) that is slowly opened up until it is barely filtering the delay line.  As the filter starts dramatically, the note is quickly damped, and demonstrates a transition from: 

Damped String > Koto > Plucked Bass > Slap Bass > Harpsichord > Non-Realistic Model of a Resonating String.

 

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Examples of Simple Plucked String Synthesis with a Relatively Bright Pink Noise Excitation.

A simple version of the patch can be downloaded here: Karplus-Strong example

Tags: , , ,

Nine Inch Nails at Hordern Pavilion – 24 Feb 2009

Posted by admin on February 26, 2009
Other / No Comments

img_0571img_0575img_0576img_0577img_0588img_0590img_0591img_0592img_0594img_0596img_0597img_0603

Playing ‘Pong’ with the GameTrak

Posted by admin on December 23, 2008
Writing / No Comments


Tags: , , , , ,

OSynC – Synchronising applications with a VST Plugin

Posted by admin on November 02, 2008
Writing / No Comments

OSynC-lite is a simple VST 2.4 plugin that transmits basic host transport information (from a VST compatible sequencer application) to another application on the same machine, as OSC messages.

The OSynC-lite plugin obtains ReWire-like transport information from your ‘host’ sequencer and creates useful messages, for use in OSC compatible applications.

This information currently includes:

  • /play (returns a 0 or 1 depending on whether the host is playing)
  • /barcount (returns total barcount)
  • /bar (returns a mod 4 bar count, useful for quickly determining position in phrases)
  • /beat (returns the current beat of the bar)
  • /fraction (returns either incrementing 16ths or 32nds depending on settings in the OSynC Plugin, ie. 0-15, or 0-31)
  • /msticks (returns a float millisecond length between fraction increments)

Why is this plugin useful?   This plugin was originally intended for personal use. I had a need to send sync info from one application (Cubase) to another (Max) but not necessarily steal/route the audio from one application (Max) into the other (Cubase). 

Continue reading…

Tags: , , , ,

Pong in Processing

Posted by admin on October 10, 2008
Writing / No Comments

Left player uses ‘q’ and ‘a’ for up and down.  Right player uses ‘]’ and ‘’’ for up and down.

The game currently goes on indefinitely.   

 

http://x37v.com/x37v/post/2008/10/


Tags: , ,

Mad Catz Gametrak Mod for Max/MSP

Posted by admin on August 17, 2008
Writing / No Comments

So it seems that the Gametrak controller that is designed for use with the PS2 doesn’t want to work with Max

A number of people have tried removing the board inside the unit, replacing it with a Bitwacker or Arduino, but after looking at the board in the Gametrak, I found that there is an interesting ‘feature’ built into the existing boards.

This easter egg is probably designed so that one unit can be manufactured to be used across a variety of hardware platforms, from PS2 to PC to Xbox.

Here’s what I did to get it working:

Open the case by removing the screws marked (I pierced the ‘feet’ with the screwdriver so that I didn’t have to re-stick them later).

 

Remove the board by unscrewing the screws marked.

 

Flip it over to reveal the underside.

 

Rotate the entire Gametrak, so that the board is oriented like this.

 

This is the cool bit.  Notice the PC label above?
(There’s also an Xbox label to the right).

 

I shorted this connection with a knife while it was plugged in to Max, and a burst of numbers came out of the ‘hi’ object.  To make this connection permanent*, I put a bit of solder to make a bridge between the two contact points, and now it outputs 12-bit integers on six discrete axes (left hand x, y & z; and right hand x, y, z).  The foot switch works too.

Simple Max 5 interface for the Gametrak (Download)

Note: the first gen Gametrak from In2Games doesn’t seem to have this ‘feature’.

* There’s a tiny layer of lacquer on these contact points that I scratched with a knife so the solder would take to the metal.

Tags: , , ,