Skip to content

Instantly share code, notes, and snippets.

@eirikblekesaune
Last active November 9, 2018 20:13
Show Gist options
  • Save eirikblekesaune/36ab2092d6372fb0eca4a55e5b4b80da to your computer and use it in GitHub Desktop.
Save eirikblekesaune/36ab2092d6372fb0eca4a55e5b4b80da to your computer and use it in GitHub Desktop.
This is code plays sound files using the different decoders that were set up for Studio 3 at Notam

###Requirements This setup has been made for Mac using macOS 10.13.5. Untested on other versions of macOS. It assumes that you are installing SuperCollider and packages from scratch.

###Setup and install

  1. Download this folder: https://www.dropbox.com/sh/gbidyq2gxd3j2mq/AABeopzZvTJ6eZZsRyqhN9yta?dl=0
  2. Install the version of SuperCollider found in this folder:
    • Unzip SuperCollider3_10beta2.zip
  3. Install the RME MADI face driver for macOS:
  4. After the computer has restarted open the SuperCollider app.
  5. Download SuperCollider libraries by running this piece of code:
(
fork{
	var cond = Condition.new;
	var atkQuarkURL = "https://github.com/ambisonictoolkit/atk-sc3.git";
	var atkQuarkPath = Quarks.folder ++ "/atk-sc3";

	//Download atk Quarks
	if(File.exists(atkQuarkPath).not, {
		"git clone -b sandbox/hoa '%' '%'".format(
			atkQuarkURL,
			atkQuarkPath
		).systemCmd;
		Quark.fromLocalPath(atkQuarkPath).install;
	});
	Quarks.install("https://github.com/ambisonictoolkit/PointView.git");
	Quarks.install("https://github.com/ambisonictoolkit/SphericalDesign.git");

	//Download SC3Plugins
	{
		var pluginsPath = Platform.userExtensionDir +/+ "SC3plugins";
		var zipPath = pluginsPath ++ ".zip";
		if(File.exists(pluginsPath).not, {
			"Downloading SC3Plugins".postln;
			"curl -s https://github.com/supercollider/sc3-plugins/releases/download/Version-3.10.0-beta1/sc3-plugins-3.10.0-beta1-macOS.zip --output '%'".format(zipPath).systemCmd;
			"Unpacking SC3Plugins".postln;
			"unzip '%' -d '%'".format(
				zipPath,
				PathName(zipPath).pathOnly
			).systemCmd;
			"rm -rf '%'".format(zipPath).systemCmd;
		}, {
			"SC3Plugins alreadu downloaded".postln;
		});
	}.value;
	thisProcess.recompile;
}
)
  1. Run this code to download atk kernels, matrices and examples sounds. This may take a while to finish.
(
fork{
	//Download atk sound examples
	{
		var pid, stream;
		var atkSoundsURL = "https://github.com/ambisonictoolkit/atk-sounds.git";
		var atkSoundsPath = (Atk.userSupportDir +/+ "sounds");

		//Assume that if the sounds folder exists the sound have been downloaded
		if(File.exists(atkSoundsPath).not, {
			Atk.createUserSupportDir;
			"Downloading atk sound files from: %.".format().postln;
			"This may take some minutes to complete".postln;
			pid = "git clone -b HOA % %".format(
				atkSoundsURL,
				atkSoundsPath.shellQuote).unixCmd;

			stream = Pseq(['-', '/', '|', '\\'], inf).asStream;
			while({pid.pidRunning}, {
				"Downloaded % of atk sound files: %\r".format(
					"du -chs %".format(
						(Atk.userSupportDir +/+ "sounds").shellQuote
					).unixCmdGetStdOut.split(Char.tab).first,
					stream.next
				).post;
				2.wait;
			});
			"Downloading sound examples complete".postln;
		}, {
			"atk sounds already downloaded".postln;
		});
	}.value;

	//Download atk kernels
	{
		var pid, stream;
		var atkKernelsURL = "https://github.com/ambisonictoolkit/atk-kernels/releases/download/v1.2.1/kernels.zip";
		var atkKernelsPath = (Atk.userSupportDir +/+ "kernels");
		var zipPath = atkKernelsPath ++ ".zip";
		//Assume that if the sounds folder exists the sound have been downloaded
		if(File.exists(atkKernelsPath).not, {
			"Downloading atk kernel files from: %.".format(atkKernelsURL).postln;
			"This may take some minutes to complete".postln;
			pid = "curl -s % --output '%'".format(
				atkKernelsURL,
				zipPath).unixCmd;

			stream = Pseq(['-', '/', '|', '\\'], inf).asStream;
			while({pid.pidRunning}, {
				"Downloaded % of atk kernels: %\r".format(
					"du -chs %".format(
						zipPath.shellQuote
					).unixCmdGetStdOut.split(Char.tab).first,
					stream.next
				).post;
				2.wait;
			});

			"Unpacking atk kernels".postln;
			"unzip '%' -d '%'".format(
				zipPath,
				PathName(zipPath).pathOnly
			).systemCmd;
			"rm -rf '%'".format(zipPath).systemCmd;
			if(File.exists(Atk.userSupportDir +/+ "__MACOSX"), {
				"rm -rf '%'".format(Atk.userSupportDir +/+ "__MACOSX").systemCmd;
			});
			"Download kernels complete".postln;
		}, {
			"atk kernels already downloaded".postln;
		});
	}.value;

	//Download atk matrices
	{
		var pid, stream;
		var atkMatricesURL = "https://github.com/ambisonictoolkit/atk-matrices/releases/download/v1.0.0/matrices.zip";
		var atkMatricesPath = (Atk.userSupportDir +/+ "matrices");
		var zipPath = atkMatricesPath ++ ".zip";
		//Assume that if the sounds folder exists the sound have been downloaded
		if(File.exists(atkMatricesPath).not, {
			"Downloading atk kernel files from: %.".format(atkMatricesURL).postln;
			"This may take some minutes to complete".postln;
			pid = "curl -s % --output '%'".format(
				atkMatricesURL,
				zipPath).unixCmd;

			stream = Pseq(['-', '/', '|', '\\'], inf).asStream;
			while({pid.pidRunning}, {
				"Downloaded % of atk matrices: %\r".format(
					"du -chs %".format(
						zipPath.shellQuote
					).unixCmdGetStdOut.split(Char.tab).first,
					stream.next
				).post;
				2.wait;
			});
			"Download complete".postln;
			"Unpacking atk matrices".postln;
			"unzip '%' -d '%'".format(
				zipPath,
				PathName(zipPath).pathOnly
			).systemCmd;
			"rm -rf '%'".format(zipPath).systemCmd;
			if(File.exists(Atk.userSupportDir +/+ "__MACOSX"), {
				"rm -rf '%'".format(Atk.userSupportDir +/+ "__MACOSX").systemCmd;
			});
			"Download matrices complete".postln;
		}, {
			"atk matrices already downloaded".postln;
		});
	}.value;
};
)
(
var studio3Matrix;
var studio3Directions;
var studio3Matrix_3rd_order;
studio3Directions = [
[ -0.0, 0.0 ],
[ -0.5235987755983, 0.0 ],
[ -1.0471975511966, 0.0 ],
[ -1.5707963267949, 0.0 ],
[ -2.0943951023932, 0.0 ],
[ -2.6179938779915, 0.0 ],
[ -3.1415926535898, 0.0 ],
[ 2.6179938779915, 0.0 ],
[ 2.0943951023932, 0.0 ],
[ 1.5707963267949, 0.0 ],
[ 1.0471975511966, 0.0 ],
[ 0.5235987755983, 0.0 ],
[ -0.39269908169872, 0.59864793343406 ],
[ -1.1780972450962, 0.60737457969403 ],
[ -1.9634954084936, 0.60737457969403 ],
[ -2.7488935718911, 0.60562925044203 ],
[ 2.7488935718911, 0.60737457969403 ],
[ 1.9634954084936, 0.59690260418206 ],
[ 1.1780972450962, 0.59515727493007 ],
[ 0.39269908169872, 0.60213859193804 ],
[ -0.78539816339745, 1.0978120995044 ],
[ -2.3561944901923, 1.1065387457644 ],
[ 2.3561944901923, 1.1362093430483 ],
[ 0.78539816339745, 1.1117747335204 ]
];
studio3Matrix = Matrix.with([
[ 0.067094447002056, 0.081854175075706, -0.00017359219355412, -0.041535807150562 ],
[ 0.067094447002056, 0.070919612592867, -0.041092356790828, -0.041698612459493 ],
[ 0.067094447002056, 0.040964689578301, -0.071025229323868, -0.041778978649258 ],
[ 0.067094447002056, 1.5803463097016e-05, -0.081951720770303, -0.041755371664211 ],
[ 0.067094447002056, -0.040954824787222, -0.070944086570954, -0.041634116976931 ],
[ 0.067094447002056, -0.070969148419587, -0.040951813420115, -0.041447704682953 ],
[ 0.067094447002056, -0.081984853655339, -1.1306687726462e-05, -0.041246083805907 ],
[ 0.067094447002056, -0.0710502911725, 0.040907457909547, -0.041083278496976 ],
[ 0.067094447002056, -0.041095368157934, 0.070840330442587, -0.041002912307211 ],
[ 0.067094447002056, -0.00014648204273065, 0.081766821889022, -0.041026519292258 ],
[ 0.067094447002056, 0.040824146207588, 0.070759187689674, -0.041147773979538 ],
[ 0.067094447002056, 0.070838469839953, 0.040766914538835, -0.041334186273516 ],
[ 0.039283710065919, 0.062466245902082, -0.025735075332719, 0.048453653682192 ],
[ 0.039283710065919, 0.025721288256183, -0.061919474224145, 0.048978315078181 ],
[ 0.039283710065919, -0.025763520545382, -0.061868477594688, 0.049069357799322 ],
[ 0.039283710065919, -0.062279892031169, -0.025485544585829, 0.049171803189367 ],
[ 0.039283710065919, -0.062255834669025, 0.025993014963267, 0.049524721437457 ],
[ 0.039283710065919, -0.026071775562477, 0.062781057182778, 0.048879115263389 ],
[ 0.039283710065919, 0.025815771358981, 0.062803232816163, 0.04866291941354 ],
[ 0.039283710065919, 0.062265329530871, 0.025961362747967, 0.048932858773817 ],
[ 0.039283710065919, 0.026285003183925, -0.026070138622411, 0.076735756253651 ],
[ 0.039283710065919, -0.026040660913274, -0.025566205259328, 0.077170765604974 ],
[ 0.039283710065919, -0.02454440840617, 0.024725627691327, 0.078505372165365 ],
[ 0.039283710065919, 0.025509984295517, 0.025947679888225, 0.07751053528402 ]
]);
studio3Matrix_3rd_order = Matrix.with([
[ 0.054971573966752, 5.6566331564794e-06, -0.033537234775544, 0.047190708528421, 2.6520721399991e-05, 5.961585129006e-05, -0.015482848200798, -0.00012510298670534, 0.053338512431951, 8.6766461883559e-05, -0.00019852499927616, -2.2743827071462e-05, 0.0084257063314479, -0.037469423094392, -0.00029582986973397, 0.055164008277414 ],
[ 0.055021496162351, -0.022237086454005, -0.0337325772895, 0.040025984763569, -0.044742714444393, 0.00023132524307877, -0.015386406511695, -0.00034914389819227, 0.026661239059621, -0.056625997316435, -0.00011748800690679, 0.022086819916719, 0.0079434126411788, -0.034306631981577, -0.0004548098810682, -0.00082145421666051 ],
[ 0.054997214816871, -0.040060775638552, -0.033576669090461, 0.022138508615838, -0.044766009331682, 0.00016161941411493, -0.015323899572143, -0.00031569258475764, -0.026652959756697, -0.00084067147410194, -0.00032873238094997, 0.034321951066353, 0.0073574217753344, -0.022069062711821, -0.00052058330659609, -0.056585300991077 ],
[ 0.054923011275792, -0.047095273888234, -0.033174448233181, -5.005025640146e-05, -2.0069053178083e-05, -7.979580663765e-05, -0.015357834321693, -5.8200359836108e-05, -0.053289885200685, 0.055180617626313, -0.00024260581487464, 0.037371409135897, 0.0072929657625208, -9.5618891687452e-05, -0.00054933648743561, -2.6313300945062e-05 ],
[ 0.054873089080193, -0.040010712086095, -0.033114479968297, -0.02223227244963, 0.044749166112615, -0.00025150519842641, -0.015454276010796, 0.00016584055165081, -0.026612611828356, -0.00089515030858167, 0.00023974195252013, 0.03431437667961, 0.0077843561287368, 0.022039333625348, -0.00039094527982221, 0.056533564976232 ],
[ 0.054897370425673, -0.022299686754852, -0.033349670165231, -0.040093184310801, 0.044772460999904, -0.00018179936946257, -0.015516782950348, 0.00013238923821621, 0.026701586987962, -0.056728025192068, 0.00045601667938936, 0.022002830050491, 0.0082317089728557, 0.034464608991257, -1.4040202552528e-05, 0.00077981909724866 ],
[ 0.054971573966752, -0.0001528338209358, -0.033336209303893, -0.047208981903123, 2.6520721399995e-05, 5.9615851290055e-05, -0.015482848200798, -0.00012510298670532, 0.053338512431951, -3.5472168022632e-05, 0.00022633992229748, -0.00016064415595572, 0.0084981158721455, 0.037537464032949, 0.00033796758111709, -0.055181370953401 ],
[ 0.055021496162351, 0.022089909266226, -0.033140866789937, -0.040044258138271, -0.044742714444393, 0.00023132524307882, -0.015386406511695, -0.00034914389819227, 0.026661239059621, 0.056677291610296, 0.00014530292992806, -0.022270207899746, 0.0089804095624146, 0.034374672920134, 0.00049694759245133, 0.0008040915406735 ],
[ 0.054997214816871, 0.039913598450772, -0.033296774988976, -0.02215678199054, -0.044766009331682, 0.00016161941411494, -0.015323899572143, -0.00031569258475768, -0.026652959756697, 0.00089196576796283, 0.00035654730397124, -0.03450533904938, 0.009566400428259, 0.022137103650378, 0.00056272101797926, 0.05656793831509 ],
[ 0.054923011275792, 0.046948096700455, -0.033698995846256, 3.1776881699446e-05, -2.0069053178065e-05, -7.9795806637691e-05, -0.015357834321693, -5.8200359836112e-05, -0.053289885200685, -0.055129323332452, 0.00027042073789596, -0.037554797118924, 0.0096308564410727, 0.00016365983024436, 0.0005914741988188, 8.9506249580322e-06 ],
[ 0.054873089080193, 0.039863534898316, -0.03375896411114, 0.022213999074928, 0.044749166112615, -0.00025150519842641, -0.015454276010796, 0.00016584055165085, -0.026612611828356, 0.00094644460244267, -0.00021192702949876, -0.034497764662637, 0.0091394660748566, -0.021971292686791, 0.00043308299120539, -0.056550927652219 ],
[ 0.054897370425673, 0.022152509567073, -0.033523773914207, 0.040074910936099, 0.044772460999904, -0.00018179936946252, -0.015516782950348, 0.00013238923821622, 0.026701586987962, 0.056779319485929, -0.000428201756368, -0.022186218033518, 0.0086921132307378, -0.0343965680527, 5.6177913935666e-05, -0.00079718177323566 ],
[ 0.027601159765586, -0.014405900429267, 0.026737693551432, 0.036350479888216, -0.024638897039822, -0.019254494880828, -0.00030371475022415, 0.046624871018924, 0.025676524795647, -0.028475048223451, -0.036458416389271, -0.0062451680900293, -0.03404168800077, 0.019208940080374, 0.044977684745552, 0.013318286871475 ],
[ 0.027504056931087, -0.036416526471231, 0.027033383267987, 0.014246845858637, -0.024382251100845, -0.046982322919415, 0.00026740915234915, 0.019482020216207, -0.025489897432635, 0.013566077045825, -0.036804692238425, -0.019495284364821, -0.033514430985928, 0.0064841695865334, -0.044632774677283, -0.028193006717292 ],
[ 0.027516253570942, -0.036710336440208, 0.02684078185891, -0.014479023176442, 0.024701091733792, -0.047081427061515, 3.9905628971181e-05, -0.019261950834703, -0.02544368700326, 0.013337297178588, 0.037181412650426, -0.019900068918303, -0.033752486772897, -0.0070406696035988, -0.044759042234046, 0.02819289106219 ],
[ 0.027749943907704, -0.01461250985295, 0.026654799396386, -0.036648976550898, 0.024521478654286, -0.01927600114135, -0.00012569966950275, -0.046907187280953, 0.025510059023406, -0.02824575663563, 0.036720535723885, -0.0069131821518764, -0.034516527276009, -0.019990278296491, 0.044885176491038, -0.013312155347882 ],
[ 0.02805051688065, 0.015102811038109, 0.027455839054684, -0.037170506024374, -0.02499259045342, 0.019993529425053, 0.00032986119384517, -0.047361638176595, 0.025476021053991, 0.028447563163024, -0.038065718775255, 0.008184427747758, -0.03495907796694, -0.02150629841467, 0.044718342148608, -0.013404690833223 ],
[ 0.028091033238634, 0.037179121995954, 0.027252150435302, -0.01522609713551, -0.025348471235656, 0.04707799645509, -0.0002779961694227, -0.019684844948366, -0.025713414462932, -0.013205363151044, -0.037682060652106, 0.021216980250868, -0.035369518686429, -0.0078005524932967, -0.045050424749356, 0.028749061398483 ],
[ 0.027935244774091, 0.03669851934133, 0.0267618419757, 0.014659616831956, 0.024906276995263, 0.046653846066219, -0.00035236758355244, 0.019253916389348, -0.025775681684329, -0.013512690904751, 0.03685914235685, 0.020296576640249, -0.035215125624455, 0.0066224417827974, -0.044910024012479, -0.028726069255762 ],
[ 0.027768979759285, 0.014590733683065, 0.027018027880783, 0.03670061074261, 0.024950771636651, 0.019376435222902, 0.00016260970606046, 0.04689301739589, 0.025625574973451, 0.028472127908266, 0.037342720880884, 0.0070506339050315, -0.034304776138788, 0.0205703291055, 0.044839803627864, 0.013439329199475 ],
[ 0.029331733119726, -0.016059317597243, 0.045760499515378, 0.016312775840448, -0.010525661846277, -0.030870673431449, 0.045123432882056, 0.031346014297969, -0.00010116634815695, -0.0017721224537371, -0.024283345757691, -0.039751185866318, 0.042272109152797, 0.039515832842905, 0.00055906459313253, -0.0017920284525621 ],
[ 0.02945937409107, -0.015857606454093, 0.045589769304351, -0.015532671053549, 0.010241404739892, -0.030362350229088, 0.045522150729574, -0.03051480214653, -5.3789119963684e-05, -0.0016603289554721, 0.024022535953062, -0.039578903683158, 0.042771363132947, -0.037972115774119, 0.00015081363408099, 0.0018834948441158 ],
[ 0.029919968189453, 0.015540553495723, 0.047385988753871, -0.015116878956977, -0.0095414424258859, 0.029982084940694, 0.048133388173877, -0.029388807915523, 1.1138482334378e-05, 0.0012740493038813, -0.023168988800262, 0.038041371364449, 0.046209966781893, -0.038058564537531, -0.00071507087668866, 0.0012997126743172 ],
[ 0.029704224316509, 0.015833520817486, 0.046749889481838, 0.016013463984095, 0.01006958033269, 0.030864457285772, 0.046525115840913, 0.030619212063582, -1.3445665145935e-05, 0.001466429961335, 0.024169985509773, 0.038194131064313, 0.042877259163021, 0.039558520090255, -0.00031637495872077, -0.0013506493874132 ]
]);
~decoders = Dictionary[
'3d' -> FoaDecoderMatrix.newFromMatrix(studio3Matrix, studio3Directions),
'2d' -> FoaDecoderMatrix.newPanto(12, \point, k:'single'),
'3d_3rd_order' -> HoaMatrixDecoder.newFromMatrix(studio3Matrix_3rd_order, studio3Directions, 3);
];
~sourceBuf = nil;
~playSoundFile = {arg path, decoderKey = '3d';
fork {
var cond = Condition.new;
var soundFile = SoundFile.openRead(path);
~setDecoder.value(decoderKey.asSymbol);
Ndef(\bsource).free(0.0);
0.5.wait;
if(~sourceBuf.notNil, {
~sourceBuf.free({
cond.test = true;
cond.signal;
});
cond.wait;
});
~sourceBuf = Buffer.cueSoundFile(s, path.asString.postln,
numChannels: soundFile.numChannels,
completionMessage: {arg cueBuf;
"Loaded buffer".postln;
}
);
2.0.wait;
Ndef(\bsource, {
var sig;
"Tha buffer: %".format(~sourceBuf).postln;
// sig = DiskIn.ar(soundFile.numChannels, ~sourceBuf.postln, loop:1);
sig = VDiskIn.ar(
soundFile.numChannels,
~sourceBuf.postln,
soundFile.sampleRate / SampleRate.ir,
loop:1);
sig;
}).mold(soundFile.numChannels);
2.0.wait;
Ndef(\decoder) <<> Ndef(\bsource);
};
}.inEnvir;
~setDecoder = {arg decoder, sourceKey = \bsource;
switch(decoder,
'2d', {
"Running 2D".postln;
Ndef(\decoder, {
var distance = \distance.kr(1.5);//average studio 3 Notam
var outsig, insig;
insig = \in.ar(0 ! 4);
outsig = FoaNFC.ar(insig, distance);
outsig = FoaDecode.ar(outsig, ~decoders['2d']);
outsig.reverse;
});
Ndef(\decoder).playN(Array.series(12));
},
'3d', {
"Running 3D".postln;
Ndef(\decoder, {
var distance = \distance.kr(1.5);//average studio 3 Notam
var outsig, insig;
insig = \in.ar(0 ! 4);
outsig = FoaNFC.ar(insig, distance);
outsig = FoaDecode.ar(outsig, ~decoders['3d']);
outsig;
});
Ndef(\decoder).playN(Array.series(24));
},
'3d_3rd_order', {
"Running 3D in 3.order".postln;
Ndef(\decoder, {
var encRadius = \distance.kr(1.5);//average studio 3 Notam
var decRadius = encRadius;
var outsig, insig;
insig = \in.ar(0 ! 16);
// outsig = HoaNFCtrl.ar(insig, encRadius, decRadius, 3);
outsig = HoaNFDist.ar(insig, 3);
outsig = HoaDecodeMatrix.ar(outsig, ~decoders['3d_3rd_order']);
outsig;
});
Ndef(\decoder).playN(Array.series(24));
}
);
};
fork{
s.options.numOutputBusChannels_(24);
s.options.memSize_((2 ** 16).asInteger);
s.options.numWireBufs_(512);
s.boot;
s.waitForBoot({
var decoderMenu, filenameMenu;
var folders;
var filepaths = Dictionary[];
folders = (
PathName(Atk.userSoundsDir +/+ "b-format").entries ++
PathName(Atk.userSoundsDir +/+ "HOA3").entries
);
folders.do({arg p;
filepaths.put(
p.fileName,
p
);
});
Window("ATK Notam ATK Test", Rect(0, 0, 250, 500)).layout_(VLayout(
Button().states_([["Open file"]])
.action_({
Dialog.openPanel({arg ...args;
"opening: %".format(args).postln;
~playSoundFile.value(
args.first,
decoderMenu.items[decoderMenu.value]
);
})
}.inEnvir),
HLayout(
StaticText().string_("Sound file"),
filenameMenu = PopUpMenu()
.items_(
folders.collect(_.fileName)
)
),
HLayout(
StaticText().string_("Decoder"),
decoderMenu = PopUpMenu()
.items_(['3d', '2d', '3d_3rd_order'])
),
Button().states_([["PLAY"], ["STOP"]])
.action_({arg butt;
var sfPath = filepaths[
filenameMenu.items[filenameMenu.value]
];
if(butt.value.booleanValue, {
"% - %".format(
sfPath,
decoderMenu.items[decoderMenu.value]
).postln;
~playSoundFile.value(
sfPath.fullPath,
decoderMenu.items[decoderMenu.value]
)
}, {
Ndef(\bsource).free;
});
});
)).front;
})
}
)
~playSoundFile.value(Atk.userSoundsDir ++ "/b-format/Anderson-Nearfield.wav", '3d');
~playSoundFile.value(Atk.userSoundsDir ++ "/b-format/Anderson-Pacific_Slope.wav", '3d');
~playSoundFile.value(Atk.userSoundsDir ++ "/b-format/Courville-Dialogue.wav", '3d');
~playSoundFile.value(Atk.userSoundsDir ++ "/b-format/Hodges-Purcell.wav", '3d');
~playSoundFile.value(Atk.userSoundsDir ++ "/b-format/Howle-Calling_Tunes.wav", '3d');
~playSoundFile.value(Atk.userSoundsDir ++ "/b-format/Leonard-Chinook.wav", '3d');
~playSoundFile.value(Atk.userSoundsDir ++ "/b-format/Leonard-Fireworks.wav", '3d');
~playSoundFile.value(Atk.userSoundsDir ++ "/b-format/Leonard-Orfeo_Trio.wav", '3d');
~playSoundFile.value(Atk.userSoundsDir ++ "/b-format/Pampin-On_Space.wav", '3d');
~playSoundFile.value(Atk.userSoundsDir ++ "/Notam/T85_48k_441k.wav", '3d');
~playSoundFile.value(Atk.userSoundsDir ++ "/Notam/T86_48k_441k.wav", '3d');
~playSoundFile.value(Atk.userSoundsDir ++ "/HOA3/Harpex_Anderson-Nearfield.wav", '3d_3rd_order');
~playSoundFile.value(Atk.userSoundsDir ++ "/HOA3/Harpex_Anderson-Pacific_Slope.wav", '3d_3rd_order');
~playSoundFile.value(Atk.userSoundsDir ++ "/HOA3/Harpex_Courville-Dialogue.wav", '3d_3rd_order');
~playSoundFile.value(Atk.userSoundsDir ++ "/HOA3/Harpex_Hodges-Purcell.wav", '3d_3rd_order');
~playSoundFile.value(Atk.userSoundsDir ++ "/HOA3/Harpex_Howle-Calling_Tunes.wav", '3d_3rd_order');
~playSoundFile.value(Atk.userSoundsDir ++ "/HOA3/Harpex_Leonard-Chinook.wav", '3d_3rd_order');
~playSoundFile.value(Atk.userSoundsDir ++ "/HOA3/Harpex_Leonard-Fireworks.wav", '3d_3rd_order');
~playSoundFile.value(Atk.userSoundsDir ++ "/HOA3/Harpex_Leonard-Orfeo_Trio.wav", '3d_3rd_order');
~playSoundFile.value(Atk.userSoundsDir ++ "/HOA3/Harpex_Pampin-On_Space.wav", '3d_3rd_order');
~playSoundFile.value(Atk.userSoundsDir ++ "/HOA3/Harpex_Pampin-On_Space.wav", '3d_3rd_order');
File.exists(Atk.userSoundsDir ++ "/HOA3/Harpex_Anderson-Nearfield.wav")
Ndef(\decoder).vol_(0)
Ndef(\decoder).vol_(12.dbamp)
Ndef(\decoder).vol_(18.dbamp)
(//Ndef(\bsource)[10] = nil;
Ndef(\bsource)[10] = \filter -> {|in|
var sig;
sig = FoaRotate.ar(in, LFDNoise3.kr(0.5, -2pi, 2pi));
sig = FoaTumble.ar(sig, LFDNoise3.kr(0.5, -2pi, 2pi));
sig = FoaTilt.ar(sig, LFDNoise3.kr(0.5, -2pi, 2pi));
sig;
};
)
(
Ndef(\bsource)[11] = \filter -> {|in|
var sig;
sig = FoaPushX.ar(in, pi/2 * LFTri.kr(0.05).range(0.0, 1.0).poll);
// sig = FoaPushY.ar(sig, pi/2 * LFTri.kr(0.05).range(0.0, 1.0));
// sig = FoaPushZ.ar(sig, pi/2 * LFTri.kr(0.05).range(0.0, 1.0));
sig;
};
)
(//Ndef(\bsource)[11] = nil
Ndef(\bsource)[11] = \filter -> {|in|
var sig;
sig = FoaPushX.ar(in, pi/2 * LFDNoise3.kr(0.2).range(0.0, 1.0));
sig = FoaPushY.ar(sig, pi/2 * LFDNoise3.kr(0.2).range(0.0, 1.0));
sig = FoaPushZ.ar(sig, pi/2 * LFDNoise3.kr(0.2).range(0.0, 1.0));
sig;
};
)
(//Ndef(\bsource)[12] = nil
Ndef(\bsource)[12] = \filter -> {|in|
var sig;
sig = FoaFocusX.ar(in, LFDNoise3.kr(0.2).range(-pi/2, pi/2));
sig = FoaFocusY.ar(sig, LFDNoise3.kr(0.2).range(-pi/2, pi/2));
sig = FoaFocusZ.ar(sig, LFDNoise3.kr(0.2).range(-pi/2, pi/2));
sig;
};
)
(//Ndef(\bsource)[13] = nil
Ndef(\bsource)[13] = \filter -> {|in|
var sig;
sig = FoaPressX.ar(in, LFDNoise3.kr(0.2).range(-pi/2, pi/2));
sig = FoaPressY.ar(sig, LFDNoise3.kr(0.2).range(-pi/2, pi/2));
sig = FoaPressZ.ar(sig, LFDNoise3.kr(0.2).range(-pi/2, pi/2));
sig;
};
)
(//Ndef(\bsource)[14] = nil
Ndef(\bsource)[14] = \filter -> {|in|
var sig;
sig = FoaZoomX.ar(in, LFDNoise3.kr(0.2).range(-pi/2, pi/2));
sig = FoaZoomY.ar(sig, LFDNoise3.kr(0.2).range(-pi/2, pi/2));
sig = FoaZoomZ.ar(sig, LFDNoise3.kr(0.2).range(-pi/2, pi/2));
sig;
};
)
(//Ndef(\bsource)[15] = nil
Ndef(\bsource)[15] = \filter -> {|in|
var sig;
sig = FoaDominateX.ar(in, LFDNoise3.kr(0.2).range(-pi/2, pi/2));
sig = FoaDominateY.ar(sig, LFDNoise3.kr(0.2).range(-pi/2, pi/2));
sig = FoaDominateZ.ar(sig, LFDNoise3.kr(0.2).range(-pi/2, pi/2));
sig;
};
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment