Monday, November 30, 2009

'Harmoniser' with Tartini

A little patch I made today following on from the auto chip tune stuff from before. This time a 'harmoniser' type effect made with the same Tartini type resynthesising, using a live input. I've got 'harmoniser' in inverted commas because frankly it isn't very harmonic, but it's a start I suppose. Here's the code.

SynthDef("Harm", {|offSet1, offSet2, output, osc1, osc2, mix, pitch1, pitch2, fader|

var sound =;
var pitch =[0];
var amp =;
pitch =, pitch); // smooth
pitch = pitch.min(10000).max(10); // limit
pitch1 = pitch.cpsmidi.round + 40;
pitch2 = pitch.cpsmidi.round + 60;

pitch1 = pitch1.midicps;
pitch2 = pitch2.midicps;

osc1 =, amp * 2); // resynthesise
osc2 =, 0.2, amp * 2);
mix =[osc1, osc2]);
fader =, mix, -0.5);
output =, 0.3, 0.1, 0.9); // bit of reverb just to taste, output);



x = Synth("Harm");

Here Im using Tartini to determine the pitch of the input, then using fairly roundabout method converting it to two lots of midi notes, adding to it to increase the pitch then sending it to some oscillators and finally mixing it back with the original input. If you change the numbers that I've added to the pitches here,

pitch1 = pitch.cpsmidi.round + 40;
pitch2 = pitch.cpsmidi.round + 60;

you should be able to change the 'harmony'.

There may be a better method to shift the synthesised pitches, I'm not sure but this does seem to work.
It sort of sound okay with some guitar or vocal input, but really bad with anything more complex.

1 comment:

  1. Hé dude ca fait un moment que tu ne postes plus, j'éspère que le blog n'est pas mort... C'est pas comme ci ca courait les rues des blog sur supercollider.