Mercurial > hg > piper-vamp-js
comparison quick-test.js @ 76:56709f8355cb
Use power spectrum rather than zero crossings, to exercise the input domain adapter, and make a process request in quick-test.cpp
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Tue, 06 Sep 2016 16:08:38 +0100 |
parents | 4c799e23eaef |
children | c250695a784f |
comparison
equal
deleted
inserted
replaced
75:4c799e23eaef | 76:56709f8355cb |
---|---|
50 | 50 |
51 comment("Querying plugin list..."); | 51 comment("Querying plugin list..."); |
52 var result = request('{"type": "list"}'); | 52 var result = request('{"type": "list"}'); |
53 | 53 |
54 comment("Loading zero crossings plugin..."); | 54 comment("Loading zero crossings plugin..."); |
55 result = request('{"type":"load","content": {"pluginKey":"vamp-example-plugins:zerocrossing","inputSampleRate":16,"adapterFlags":["AdaptAllSafe"]}}'); | 55 result = request('{"type":"load","content": {"pluginKey":"vamp-example-plugins:powerspectrum","inputSampleRate":16,"adapterFlags":["AdaptAllSafe"]}}'); |
56 | 56 |
57 comment("I'm now assuming that the load succeeded and the returned pluginHandle was 1. I haven't bothered to parse the JSON. If those assumptions are wrong, this obviously isn't going to work. Configuring the plugin..."); | 57 comment("I'm now assuming that the load succeeded and the returned pluginHandle was 1. I haven't bothered to parse the JSON. If those assumptions are wrong, this obviously isn't going to work. Configuring the plugin..."); |
58 result = request('{"type":"configure","content":{"pluginHandle":1,"configuration":{"blockSize": 8, "channelCount": 1, "stepSize": 8}}}'); | 58 result = request('{"type":"configure","content":{"pluginHandle":1,"configuration":{"blockSize": 8, "channelCount": 1, "stepSize": 8}}}'); |
59 | 59 |
60 comment("If I try to configure it again, it should fail because it's already configured... but this doesn't change anything, and subsequent processing should work fine. Just an example of a failure call. NB this only works if Emscripten has exception catching enabled -- it's off by default in opt builds, which would just end the script here. Wonder what the performance penalty is like."); | 60 comment("If I try to configure it again, it should fail because it's already configured... but this doesn't change anything, and subsequent processing should work fine. Just an example of a failure call. NB this only works if Emscripten has exception catching enabled -- it's off by default in opt builds, which would just end the script here. Wonder what the performance penalty is like."); |