Skip to content

Commit

Permalink
edit doc
Browse files Browse the repository at this point in the history
  • Loading branch information
albincorreya committed Aug 27, 2017
1 parent 59a9dbb commit a9c6eab
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions jsonParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit a9c6eab

Please sign in to comment.