LMMS / lmms

Cross-platform music production software
https://lmms.io
GNU General Public License v2.0
8.2k stars 1.01k forks source link

Distinguish between VSTi and VST-FX #2003

Open tresf opened 9 years ago

tresf commented 9 years ago

This is a placeholder to distinguish the difference between a VST Instrument and a VST Effects programatically.

This distinction will have the following benefits:

Since this has been discussed already, I'll quote the more educated on the topic...

@grejppi wrote: The VST specification does not provide any means to distinguish between instruments and effects. Not sure if gig and sf2 belong in the same category as LADSPA and VST which are executable binaries. GIG and SF2 are sample banks; plain ol' data so to say. You wouldn't move the existing samples/ folder to plugins/audiofileprocessor/, would you?


@curlymorphic responded:

The VST specification does not provide any means to distinguish between instruments and effects.

This can be deduced from the input / outputs.

curlymorphic commented 9 years ago

I already have this working in a bare bone way, but stopped to progress on 1.2 issues

What I already have, Is the scanning of the vsts, with inputs and outputs.

What still needs to be done.

This can be deduced from the input / outputs.

I feel I should elaborate on this statement. The code at present currently asks the vst how many audio inputs and outputs it has, We can use the following logic

audio outputs == 0 Lmms currently does not support this configuration. audio outputs > 0 and inputs == 0 Instrument audio outputs > 0 and inputs > 0 Effect.

tresf commented 9 years ago

@curlymorphic I assume your "inputs" scenarios also cover the case of something like a vocoder plugin where both note audio as well as voice audio are fed in? "Talkbox" is an example I can think of off of the top of my head...

http://mda.smartelectronix.com/

curlymorphic commented 9 years ago

where both note audio as well as voice audio are fed in?

does lmms support that configuration?

tresf commented 9 years ago

does lmms support that [vocoder] configuration?

Clunky, but yes. https://www.mail-archive.com/lmms-devel@lists.sourceforge.net/msg03650.html

The short of it...

The way to use it is not-too-complicated (but, yes, it is a tweak as LMMS is not designed for that kind of things):

  1. create a track with (let say) an audio file of your voice a. put its pan to full left b. assign it to a FX channel
  2. create a track with instruments a. put its pan to full right b. assign it to the same FX channel
  3. add "Vocoder for LMMS" plugin to this FX channel

    -> play. I planed to submit a HOW-TO for this plugin for the users' wiki but still not get the time to do it.

Regards, Y.

@Sti2nd @Umcaruje do we have this in our wiki yet?

curlymorphic commented 9 years ago

@tresf "Talkbox" uses sidechaining, A Technique Of passing audio from the mixer back into a plugin.

This single plugin excepts Audio and midi

https://www.mail-archive.com/lmms-devel@lists.sourceforge.net/msg03650.html There is no plugin in this example that takes both note and audio data.

One of the reasons this is not possible in LMMS in it's current configuration. Is we process all the instruments, then the mixer tacks, This means we can't feed a mixer track back to an instrument, because it had not been processed yet. Changing this would be a big change to the audio engine, and outside the scope of this issue.

I will take a look when I have a bit more time, I dont have my copy of the vst2.4sdk to hand and steinberg no longer allow its distribution. I do still have mine on a external drive "somewhere".

tresf commented 9 years ago

@curlymorphic It's likely two audio streams currently. Just sanity checking that it fits your design proposal (from what I'm reading it does, just throwing it out there).

curlymorphic commented 9 years ago

@tresf

To be honest the logic above would not cover the case of instruments with sidechaining ie "TalkBox" , It would require checking for midi input as well.

A case I had not considered, so good catch, better realised now that the 1.3 testing phase :)

Umcaruje commented 9 years ago

@curlymorphic Tip: Nabble is a much nicer way of going through the dev-list archive ;)


@tresf

@Sti2nd @Umcaruje do we have this in our wiki yet?

No, we currently don't have that on the wiki. It could be added to the Working with LADSPA effects page.

curlymorphic commented 9 years ago

Tip: Nabble is a much nicer way of going through the dev-list archive ;)

:+1:

musikBear commented 9 years ago

No, we currently don't have that on the wiki. It could be added to the Working with LADSPA effects page.

ehrmm.. there used to be a tutorial in wiki, i tried it, and the resulting sound is absolutely horrible! I do believe that it was diiz who wrote this panning stuff in that article, but it is not there. Used to be 3 longer separate articles in the end of links on the first page. Not there anymore ?! I can add this panning stuff to the suggested section, but @tresf - Have you been able to get anything else than muffled garbage, with this setup -Then perhaps its a linux ok, but a windows no-go (where the article went... no idea :|
Here is the result https://soundcloud.com/musikbear/vocoderrecord first orr. then vocoder

softrabbit commented 9 years ago

audio outputs == 0 Lmms currently does not support this configuration. audio outputs > 0 and inputs == 0 Instrument audio outputs > 0 and inputs > 0 Effect.

The LADSPA plugin code in LMMS says 0 < audio outputs < 3 and inputs == outputs for effects, IIRC. And that's really all the audio routing options available in the effect channels. Support for 1->2 or 2->1 plugins could be easy to add, but is there a big need for that?

curlymorphic commented 9 years ago

The LADSPA plugin code in LMMS says 0 < audio outputs < 3 and inputs == outputs for effects,

@softrabbit nice investigation

If we already have logic, then I feel we need to remain consistent.

tresf commented 9 years ago

@musikBear the vocoder works. Sorry to link my own track here, but sometimes the the proof is in the pudding, so to speak...

https://m.soundcloud.com/tres-finocchiaro/aint-nobody-vocoder-trial

musikBear commented 9 years ago

@tresf ! nice, but -Thats onLinux! Right? Guess this should be on its own ticket -so: #2005

tresf commented 9 years ago

No, that track was composed on Windows 7 x64 running the 1.0.x branch.

curlymorphic commented 9 years ago

There may be different results here, because those instructions say Vocoder for LMMS and I believe "tresf uses talkbox, per the soundcloud title.

tresf commented 9 years ago

@curlymorphic, They're very closely related per #356. In short, I used the talkbox plugin first, then pinged the dev team to get vocoder working too, and Toby did via 0e8d47c

curlymorphic commented 9 years ago

Sorry I thought they were 2 separate effects, nice tune btw :+1:

tresf commented 9 years ago

Sorry I thought they were 2 separate effects, nice tune btw :+1:

You are right, they are separate effects. musikBear seemed to state that the approach always generates "muffled garbage", but his post reads a bit confusing to me as I don't find it clear exactly what he's trying to do (hence the need for a dedicated bug report and exact steps to reproduce, via #2005).

My point is, fundamentally, the vocoder-type FX plugins work... or at least they did in 1.0 branch. :)

Spekular commented 4 years ago

Closing and consolidating into #5433

zonkmachine commented 6 months ago

Some code from the DISTRHO/DPF project on how to know if a VST2 plugin is a synth or effect:

tresf commented 6 months ago

Some code from the DISTRHO/DPF project on how to know if a VST2 plugin is a synth or effect:

Nice! ISC License, so we're GPL2+, GPL3+ safe (as well as others).

zonkmachine commented 6 months ago

Here's a better link to the original project. https://github.com/Xaymar/vst2sdk

This is a completely "clean room" untainted reverse engineered "SDK" for the VST 2.x interface. It was reverse engineered from binaries where no license restricting the reverse engineering was attached, or where the legal system explicitly allowed reverse engineering for the purpose of interoperability.

zonkmachine commented 6 months ago

I guess this means submoduling vst2sdk and use it as a drop in for aeffectx.h

I'm reopening this issue.