Node for Max - freesound
Hi everybody!
I have a problem getting the freesound-search patch (part of the Node for Max package) running.
I installed the requested fork of the NPM package and did everything written in the readme (creating a .env with API key ) , though getting the
following error message, when trying to install npm and then start it:
In the node.script monitor:
"Process could not be startet due to following error:
Cannot find module 'freesound' at Function.Module_resolveFilename (module.js:547:15)
at Object.Mode._Load (module.js:474:25) ... "
(-> any way to print/copy the node.script debug monitor stuff ??)
So does freesound module refer to the requested freesound.js file from https://github.com/Girlfriends/freesound.js ?
I put it into the freesound example folder ; maybe I need to put it somewhere else ?
And in the max console appears this:
print: NPM install started
node.script: NPM exited with non-zero code "1" at C:/Program Files/Cycling '74/Max 8/resources/packages/Node For Max/examples/freesound
print: NPM install error
node.script: {
"code" : "MODULE_NOT_FOUND"
}
node.script: Could not load the dotenv module. Please be sure to send the message 'script npm install' to the node.script object to download node modules
node.script: No value for key FREESOUND_CLIENT_KEY in .env file. Please make sure to create a file called .env with a Freesound API Client key.
node.script: No value for key FREESOUND_CLIENT_SECRET in .env file. Please make sure to create a file called .env with a Freesound API Client Secret.
node.script: Unable to launch process
}
Thanks for any help !
Hey Rica.
I'm surprised to see that the examples have found its way to this location (C:/Program Files/Cycling '74/Max 8/resources/packages/Node For Max/examples/freesound)
You are in fact right, the freesound and other modules cannot not be found/loaded and therefore the script won't start or run as desired. A script npm install would fix this but due to the location on disk it fails as this required administrative privileges.
I'm curious, how did you download these examples? The Node For Max package contains a patcher to help you with this. Search for "n4m.launcher" in the new Sidebar search and open that patcher. There should be a button labeled "More Examples" that opens another patcher, which allows you to download the examples automatically. They should be placed in your Max 8 Library folder (instead of placing them in the package itself) and the npm instructions etc should "just work" as now you won't encounter Permission Issues due to the location on disk.
I hope this makes sense? Let me know if u have further questions.
Thanks
Florian
Ahoi Florian !
Thanks a lot for your help!
I downloaded the files directly from github and initially put them in my Max 8 Package folder.
I shifted the freesound folder to C:/Program Files/Cycling '74/Max 8/resources/packages/Node For Max/examples/ to see, wether it would work then. It did not.
Update:
I deleted and reinstalled everything and now it works !
I had to install git !
"but due to the location on disk it fails as this required administrative privileges."
--> Actually it now works from every path, wether the freesound file is in documents/Max 8/Library or documents/Max 8/Packes or C:/Program Files/Cycling '74/Max 8/resources/packages/Node For Max/examples/
Yeah ! Cool ! Thanks !
Rica
I don't have anything constructive to add except that I'm excited it worked.
hello! i am 4 years late to the party but i am trying to download sounds using node.js and the freesound api.
but the example patch "freesound-search" doesnt seem to work.
nothing happen if i enter a keyword.
I followed all the steps and entered my keys.
thanks.