-
Notifications
You must be signed in to change notification settings - Fork 2
Description
I've built the library (libNFSmartPlayer.a) and the command line tool (NFSmartPlayerCLI) on MacOS 10.15.6, but I can't get the command line tool to play. I added some debug output, and I can see that it successfully converts the JSON and loads the score, but I either get an error or playback stops at 0 seconds, depending on which score I use. I wasn't able to find a definitive test score in the documentation, so it's possible that there could be something incorrect about how I'm constructing the JSON score. I'm including the scores that I've tried below.
I thought the noise plugin would work for a simple test score, and although the CLI tool accepts the score, it doesn't play anything and playback stops at zero:
{
"graph": {
"id": "graphId1",
"loadingPolicy": "allContentPlaythrough",
"nodes": [
{
"id": "noiseId1",
"kind": "com.nativeformat.plugin.noise.noise",
"config":
{
"when": 0,
"duration": 2000
},
"params": {}
}
],
"edges": [
],
"scripts": []
},
"version": "1.2.24"
}
...and this is the output from running the CLI with the above score (with some extra debug output added by me):
paulslocum@Pauls-MacBook-Pro cli % ./NFSmartPlayerCLI --input-file test8.json
Native Format Command Line Interface 7-f74da5b
Loading JSON
DECODING JSON
PARSED JSON: {"graph":{"edges":[],"id":"graphId1","loadingPolicy":"allContentPlaythrough","nodes":[{"config":{"duration":2000,"when":0},"id":"noiseId1","kind":"com.nativeformat.plugin.noise.noise","params":{}}],"scripts":[]},"version":"1.2.24"}
CREATING GRAPH FROM GRAPH IMPLEMENTATION
LOADING...
Initialised playback.
Time: 0
Final time: 0
Finished rendering...
I've also tried the score described in the NFGrapher Javascript documentation, but it doesn't work with "spotify:track:275KAjHjZOtnTVWZ2Kcr7k" as the 'file', and I've tried changing the 'file' to a local mp3 or an mp3 on my web server, but the CLI just says "Failed to play the JSON file." I also noticed that the file duration is set to 0 (not sure if this is a mistake or if the loop overrides this duration) but I tried changing the file duration to "10000" and I still get the same results.
{
"graph": {
"id": "07f96d1b-2d3f-46e8-bbc5-c424f30a19c3",
"loadingPolicy": "allContentPlaythrough",
"nodes": [
{
"id": "2eedb6a8-3230-4fc6-9343-f140d5b29af1",
"kind": "com.nativeformat.plugin.file.file",
"config": {
"file": "spotify:track:275KAjHjZOtnTVWZ2Kcr7k",
"when": 0,
"duration": 0,
"offset": 0
},
"params": {}
},
{
"id": "5f5ec094-3471-404f-9566-bcdce8f8df4c",
"kind": "com.nativeformat.plugin.time.loop",
"config": {
"when": 0,
"duration": 5600000000,
"loopCount": -1
},
"params": {}
},
{
"id": "7f08e466-650c-4960-ab02-dbecea03daab",
"kind": "com.nativeformat.plugin.waa.gain",
"config": {},
"params": {
"gain": [
{
"name": "setValueAtTime",
"args": {
"value": 0,
"startTime": 0
}
},
{
"name": "linearRampToValueAtTime",
"args": {
"value": 1,
"endTime": 3000000000
}
}
]
}
}
],
"edges": [
{
"id": "eb4cfcc1-4829-4200-b0c9-810075c865eb",
"source": "2eedb6a8-3230-4fc6-9343-f140d5b29af1",
"target": "5f5ec094-3471-404f-9566-bcdce8f8df4c"
},
{
"id": "abb01f3b-26de-4efa-9e79-b30e8a1bde44",
"source": "5f5ec094-3471-404f-9566-bcdce8f8df4c",
"target": "7f08e466-650c-4960-ab02-dbecea03daab"
}
],
"scripts": []
},
"version": "1.2.24"
}
Thanks in advance for any information you can provide.