Sample Library Research project


#1

Hello,
I have been tasked to create an audio plugin for a research project through the university. I have a few preliminary goals for the project but I seem to be too much of a novice at JUCE and plugin development to accomplish my goals. Using the auto-generated PluginEditor and PluginProcessor I hope to be able to do the following 3 thing by using child components:

  1. Use the plugin to access the sample library in my DAW (Cubase). [This could also be achieved by creating a directory which can open a sample library from Finder (Mac) and display it inside the plugin’s interface. But I think it would be better to access the sample library already used in Cubase rather than develop a component to do the same thing in my plugin]

  2. Swap out a recording/sample in the workspace with a new sample found in the Cubase sample library. [the user matkatmusic referred me to this function to do so processBlock(AudioBuffer,MidiBuffer)] this function would be similar to drum sample replacement software.

  3. Include a Python model (because the algorithm is based on this model it would be difficult to convert the model to C++) as the backend of the plugin (processes the audio input).

Any advice on any of these topics would be appreciated. Also any advice on plugin development would be helpful too, I have some experience in C++ programming but am relatively new to JUCE.


#2
  1. and 2) are not part of standard plugin functionality. It will depend on the host application whether those kinds of things are possible at all and JUCE does not directly have any support for those kinds of things. (You can only do pretty standard audio effect and instrument plugins with JUCE. Matkatmusic has unfortunately probably misunderstood what you have been asking and the advice about processBlock() does not apply to your use case if you actually want to swap audio on the host’s timeline.)

As for 3), embedding Python is a quite complicated task and JUCE does not have any helper classes for that. You might want to look for some existing Python embedding C++ library. (For example Boost has a Python support library.)


#3

Thank you for the information but now I am sort of curious about 2 things:

  1. Wouldn’t a virtual instrument need a sample library? If these samples are not found in the DAW’s sample library where would they be found?

  2. How do drum sample replacement plugins (like Steven Slate Drums) work?

I am simply curious because I believe that if there was a way to understand implementing these 2 softwares using JUCE it can possibly help me come up with alternative approaches to my project.


#4
  1. The instrument plugin will have its own way to manage that in some manner. (While installing the plugin, the samples go into some predetermined directory, or the plugin will later ask the user to locate the samples etc…)
  2. Standard plugin formats can implement that by playing different audio in real time than what is coming into the plugin, but they can’t actually permanently “swap” the audio on the host’s time line. (Likewise the plugins can’t easily do anything like preanalysis of the audio on the host’s time line.)

#5

Thank you for the information. Do you also happen to know any open source examples that implement these things so that I can have some code to reference?


#6

you should have continued your original thread, not started a new one. doing the latter clutters the forum.


#7

sorry I will note that and try to be more cautious in the future