简体   繁体   English

Java Jsyn设置输入,处理并获取过滤器的输出

[英]Java Jsyn set input, process and get output of filter

I am writing a VST-Plugin with the JVSTWrapper. 我正在用JVSTWrapper编写VST插件。 I need a filter, but I don't want to write it by myself, so I decided to use the Lowpassfilter from Jsyn. 我需要一个过滤器,但是我不想自己写它,所以我决定使用Jsyn的Lowpassfilter。 But I don't want to do everything with Jsyn, just the filter. 但是我不想使用Jsyn进行所有操作,而只是使用过滤器。 My question is: Is there a way to write native float[] audio data into the input of the filter, call a function which processes the data through, and get the output again as float[] audio data? 我的问题是:是否有一种方法可以将本机float []音频数据写入过滤器的输入中,调用通过该数据进行处理的函数,然后再次以float []音频数据的形式获取输出?

JSyn was designed to work as a flowgraph where data flows through input and output ports. JSyn旨在用作流程图,其中数据流经输入和输出端口。 I haven't tried this but you might get something like this to work. 我没有尝试过,但是您可能会得到类似的效果。

double[] inputs = filter.input.getValues();
// TODO: write data to inputs array
filter.generate(0, inputs.length());

double[] outputs = output.getValues();
// TODO: read result from the outputs array

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM