From a9c6eab2195adc315cd85fc7a9e596577419f0ae Mon Sep 17 00:00:00 2001 From: albincorreya Date: Sun, 27 Aug 2017 12:24:14 +0200 Subject: [PATCH] edit doc --- jsonParser.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/jsonParser.js b/jsonParser.js index cca2974..a471a2d 100644 --- a/jsonParser.js +++ b/jsonParser.js @@ -47,17 +47,12 @@ outlets = 7; var path = ""; //global variable for storing the json file path +// global variables for sound array var multiIter = []; var d = []; // You have to inovke this function first when everytime you make some changes in the script or if you want to change sound class. -function setpath(class_name){ - path = "/Users/Correya/Documents/Github/dataset_loader_freesound/" + class_name + ".json"; // replace with the path where your json files are located - post("\n JSON filepath set to ->", path); -} - - function setPath(dir,class_name){ var out = dir + "data/" + class_name + ".json"; path = out; @@ -66,6 +61,8 @@ function setPath(dir,class_name){ multiIter = multiIterSounds(); } + +// function to parse current directory from max 'thispatcher' object output function parsePath(dir){ var fdir = dir.split(":").pop(); outlet(4,fdir); @@ -80,7 +77,7 @@ function setHeaders(){ } } - +//Import the josn file to a dictionary and return the subdictionary function returnSubDict(){ //Import the json file to a dict object and parse subdictionary for iterating over the sounds var main_dict = new Dict;