// -------------------------------------
/* a) 117 full sphere matrix design - mains
*/
// full sphere azimuth and elevation ~mainAz = [ 58, 302, 180, // floor
// -------------------------------------
/* a) 117 full sphere matrix design - mains
*/
// full sphere azimuth and elevation ~mainAz = [ 58, 302, 180, // floor
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* Refactor of mtmccrea/ATK code style options.scd:
https://gist.github.com/mtmccrea/6e301b452b3a81455ba06bfe89dc03ae
Refactored to bring into single style format blocks.
****** means currently recommended in ATK Style Guide: https://github.com/ambisonictoolkit/atk-sc3/wiki/ATK-Code-Style-Guidelines
/* Working reference for ATK coding style: Receiver-verbose v2
General Hierarchy:
*/
// ~~~~~~~~~~~~~~~~~~~~
/* Working reference for ATK coding style: Receiver-sparse v2
General Hierarchy:
*/
// HoaFocus { | |
// *ar {arg in, angle, theta = 0, phi = 0, radius = AtkHoa.refRadius, beamShape = 'energy', order = AtkHoa.defaultOrder; | |
// var beam, radiusEncode, out, nullAmp; | |
// nullAmp = angle.linlin(0, 0.5pi, 1, 0).squared; | |
// radiusEncode = HoaNFCtrl.ar(in, radius, AtkHoa.refRadius); | |
// beam = HoaBeam.ar(radiusEncode, theta, phi, radius, beamShape, order); | |
// out = beam + ((in - beam) * nullAmp); | |
// ^out | |
// } | |
// } |
/* This code is adapted from the examples found in the help file: Introducing the Ambisonic Toolkit
Workshop materials for: Compositional techniques for Ambisonics
10:00 am - 12:30 pm (Primera Parte) 2:30 - 5:00 pm (Segunda Parte) Escuela Superior de Música, Centro Nacional de las Artes Viernes 25 de octubre de 2019
~size = 512; ~joRfftsize = (~size/2 + 1).asInteger; // SignalBox quark
~real = Signal.newClear(~size); // some harmonics ~real.sineFill2([[8], [13, 0.5], [21, 0.25], [55, 0.125, 0.5pi]]);
~imag = Signal.newClear(~size); ~cosTable = Signal.fftCosTable(~size); ~rcosTable = Signal.rfftCosTable(~joRfftsize);
/* Compare sclang inbuilt fft with SignalBox rfft - refactor of tests by @spluta
What we're seeing is that sclang's complex fft is by far the fastest.
Relatedly, if a real fft (+freqs only) is desired, the quickest approach is to discard -freqs, and then use rfftToFft to create a mirrored spectrum for resynthesis via ifft.
It would be worth investigating refactoring the algorithms found in SignalBox, keeping in mind preserving the current interface(s).
/* Zoom H3-VR source recordings - convert to FOA & rotate
Requires use of HoaVST: https://gitlab.com/dxarts/projects/hoavst.quark
These recordings were made with the device facing away from the performer.
NOTE: we're going to FOA as the reference radius for FOA is inf */
// NRT example | |
( | |
~score = CtkScore.new; | |
/* | |
http://www.matthiaskronlachner.com/?p=1910 | |
*/ | |
// must set automateParams to true for NRT | |
~vst = HoaVST.new('mcfx_gain_delay4', numVSTs: 1, vstChannels: 4, automateParams: true); | |
// ~vst = HoaVST.new('mcfx_gain_delay8', numVSTs: 1, vstChannels: 8, automateParams: true); |