«Re: An FM Matrix Synth with 1to1 feedback -- nanokontrol NNdef version» by miguel-negrao

on 22 Jun'14 14:20 in fmcode forksynthmatrix

FM Matrix Synth, now with 1to1 feedback!

Version for nanocontrol: 3x3 matrix

indexes - 9 faders freqs, first 3 knobs amps, second group of 3 knobs

Needs NNDef from FPLib and Modality https://github.com/miguel-negrao/FPLib https://github.com/ModalityTeam/Modality-toolkit

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
///////////////////////////////////////////
// a basic FM Matrix Synth, now with 1to1 feedback.
(

NNdef(\fmMatrix, {
	var numOscs = 3;
	var k = MIDIMKtl('nnkn0').elements;

	var freqs = k[\kn][0][..2].collect{ |e| e.enIn.enKr.linlin(0,1,20,5000) };
	var amps = k[\kn][0][3..5].collect{ |e| e.enIn.enKr };
	var modIndex = k[\sl][0].collect{ |e| e.enIn.enKr.linlin(0,1,0.0,4.0) }.clump(numOscs);

	var feedbacks = LocalIn.ar(numOscs);

	var oscs = [freqs, modIndex].flopWith{ |freq, mods|
		SinOsc.ar(
			freq
			+ [feedbacks, mods].flopWith{ |feedback, modi|
				freq * modi * feedback
			}.sum
		)
	};

	LocalOut.ar(oscs);
	Splay.ar(oscs * amps);
})
)

NdefMixer(s)
raw 694 chars (focus & ctrl+a+c to copy)
reception
comments