<commit_before>console.log(webAudioAmbisonic);

// Setup audio context and variables
var AudioContext = window.AudioContext // Default
    || window.webkitAudioContext; // Safari and old versions of Chrome
var context = new AudioContext; // Create and Initialize the Audio Context

var maxOrder = 3;
var orderOut = 3;
var soundBuffer, sound;

// test HOA encoder (panner)
var hoa_encoder = new webAudioAmbisonic.HOA_encoder(context, maxOrder);
console.log(hoa_encoder);
hoa_encoder.azi = 90;
hoa_encoder.elev = 45;
hoa_encoder.updateGains();

// test HOA order limiter
var hoa_limiter = new webAudioAmbisonic.HOA_orderLimiter(context, maxOrder, orderOut);
console.log(hoa_limiter);
for (var i = 0; i < maxOrder; i++) hoa_limiter.updateOrder(i);

// test binaural HOA decoder
var hoa_decoder = new webAudioAmbisonic.HOA_binDecoder(context, maxOrder);
console.log(hoa_decoder);
var hoa_assignFiltersOnLoad = function(buffer) { hoa_decoder.updateFilters(buffer); }
var irUrl = "IRs/IRC_1008_R_HRIR.wav";
var hoa_loader_filters = new webAudioAmbisonic.HOAloader(context, maxOrder, irUrl, hoa_assignFiltersOnLoad);
hoa_loader_filters.load();
hoa_decoder.resetFilters();

// test HOA rotator
var hoa_rotator = new webAudioAmbisonic.HOA_rotator(context, maxOrder);
console.log(hoa_rotator);
hoa_rotator.init();
hoa_rotator.yaw = 10;
hoa_rotator.pitch = 50;
hoa_rotator.roll = -30;
hoa_rotator.updateRotMtx();

// test HOA virtual mic
var hoa_vmic = new webAudioAmbisonic.HOA_vmic(context, maxOrder);
console.log(hoa_vmic);
patternList = ['cardioid', 'supercardioid', 'hypercardioid', 'max_rE'];
patternList.forEach(function(pattern) {
    hoa_vmic.vmicPattern = pattern;
    hoa_vmic.updatePattern();
});

// test HOA converters
var hoa_converter_bf2acn = new webAudioAmbisonic.hoa_converters.HOA_bf2acn(context);
console.log(hoa_converter_bf2acn);
var hoa_converter_acn2bf = new webAudioAmbisonic.hoa_converters.HOA_acn2bf(context);
console.log(hoa_converter_acn2bf);
var hoa_converter_fuma2acn = new webAudioAmbisonic.hoa_converters.HOA_fuma2acn(context, maxOrder);<commit_msg>fixed old asset link in examples/test.js<commit_after>console.log(webAudioAmbisonic);

// Setup audio context and variables
var AudioContext = window.AudioContext // Default
    || window.webkitAudioContext; // Safari and old versions of Chrome
var context = new AudioContext; // Create and Initialize the Audio Context

var maxOrder = 3;
var orderOut = 3;
var soundBuffer, sound;

// test HOA encoder (panner)
var hoa_encoder = new webAudioAmbisonic.HOA_encoder(context, maxOrder);
console.log(hoa_encoder);
hoa_encoder.azi = 90;
hoa_encoder.elev = 45;
hoa_encoder.updateGains();

// test HOA order limiter
var hoa_limiter = new webAudioAmbisonic.HOA_orderLimiter(context, maxOrder, orderOut);
console.log(hoa_limiter);
for (var i = 0; i < maxOrder; i++) hoa_limiter.updateOrder(i);

// test binaural HOA decoder
var hoa_decoder = new webAudioAmbisonic.HOA_binDecoder(context, maxOrder);
console.log(hoa_decoder);
var hoa_assignFiltersOnLoad = function(buffer) { hoa_decoder.updateFilters(buffer); }
var irUrl = "IRs/IRC_1008_R_HRIR_virtual.wav";
var hoa_loader_filters = new webAudioAmbisonic.HOAloader(context, maxOrder, irUrl, hoa_assignFiltersOnLoad);
hoa_loader_filters.load();
hoa_decoder.resetFilters();

// test HOA rotator
var hoa_rotator = new webAudioAmbisonic.HOA_rotator(context, maxOrder);
console.log(hoa_rotator);
hoa_rotator.init();
hoa_rotator.yaw = 10;
hoa_rotator.pitch = 50;
hoa_rotator.roll = -30;
hoa_rotator.updateRotMtx();

// test HOA virtual mic
var hoa_vmic = new webAudioAmbisonic.HOA_vmic(context, maxOrder);
console.log(hoa_vmic);
patternList = ['cardioid', 'supercardioid', 'hypercardioid', 'max_rE'];
patternList.forEach(function(pattern) {
    hoa_vmic.vmicPattern = pattern;
    hoa_vmic.updatePattern();
});

// test HOA converters
var hoa_converter_bf2acn = new webAudioAmbisonic.hoa_converters.HOA_bf2acn(context);
console.log(hoa_converter_bf2acn);
var hoa_converter_acn2bf = new webAudioAmbisonic.hoa_converters.HOA_acn2bf(context);
console.log(hoa_converter_acn2bf);
var hoa_converter_fuma2acn = new webAudioAmbisonic.hoa_converters.HOA_fuma2acn(context, maxOrder);
{'fraction_non_alphanumeric': 0.10672409667384541, 'fraction_numerical': 0.011964584828906437, 'mean_word_length': 6.6838235294117645, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6389205', 'n_tokens_mistral': 1594, 'n_tokens_neox': 1535, 'n_words': 304}