grame-cncm / faust

Functional programming language for signal processing and sound synthesis
http://faust.grame.fr
Other
2.51k stars 318 forks source link

Reaper Ardour vst OSC #356

Open dblanchemain opened 4 years ago

dblanchemain commented 4 years ago

After a discussion with Stéphane Letz I allow myself to contact you. I recompile the flanger.dsp example to vst with the -osc and -gui option. faust2lv2 -osc -gui flanger.dsp and faust2faustvst -osc -gui flanger.dsp When I put it as a plugin in Reaper (Linux) or Ardour5 I have nothing. I can control it by the Ardor or Repear osc commands but not by the 5510 port. If I make the following command in a terminal: ss -tuanp

I do not have port 5510 or assimilated. By cons the Lv2 plugin for Ardor works very well. I do not understand well.

agraef commented 4 years ago

@dblanchemain The OSC-related code in faust-vst is exactly the same as in faust-lv2, but in both cases it requires the custom Qt GUI. IIRC, it may also require the Qt GUI to actually be open in order for this to work. Which kind of GUI do you get when you edit the VST plugin in Ardour or Reaper? Do you actually get the Qt GUI, or the generic Ardour/Reaper plugin GUI?

Yes, the OSC support in those architectures is a bit klunky, I'm afraid. :( Is there any reason that you can't use MIDI CC to control the plugins? This should just work, even without the Qt GUIs.

dblanchemain commented 4 years ago

Yes! Just because, I do not know how to do it !!! :)

dblanchemain commented 4 years ago

I also need to read data from the plugin: dbmeter for example. With MIDI CC I do not know.

agraef commented 4 years ago

MIDI input is easy; in Ardour you just configure a generic MIDI control surface and pipe your controller into Ardour's "MIDI control in" port and then set up the CC assignments using MIDI learn (http://manual.ardour.org/using-control-surfaces/generic-midi/midi-learn/).

MIDI output is a bummer, though, since neither faust-lv2 nor faust-vst support MIDI CC output for passive Faust controls yet.

So your best option seems to be with OSC using faust-lv2 on Ardour for the time being.

If you're into Pd, another option would be to run your Faust dsps inside Pd (using pd-faust), where both OSC and MIDI CC support (both input and output) is much easier. You can then hook up Pd to Ardour or whatever DAW you want to use.

dblanchemain commented 4 years ago

For Linux and its DAW, the problem does not arise because I can bypass it by a standalone application (faust2api with jack), but for windows I have to use a vst for Reaper. http://blanchemain.info/Documents/Programmation/index.php?page=spaceMeter64 I can not compile my api under windows: faust2api -jack dbmeter.dsp I have jack under windows.

crossCompiling with MXE

x86_64-w64-mingw32.static-g++ -std=c++11 -O3 DspFaust.cpp DspFaust.h spaceMeter64.cpp -o spaceMeter64.exe -L/home/dominique/MXE/mxe/usr/x86_64-w64-mingw32.static/lib -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lpthread DspFaust.cpp: In function 'long unsigned int keyOn(void, int, int)': DspFaust.cpp:9759:147: error: cast from 'MapUI' to 'long unsigned int' loses precision [-fpermissive] nsigned long)reinterpret_cast<FaustPolyEngine>(dsp)->keyOn(pitch, velocity); } ^ DspFaust.cpp: In member function 'long unsigned int DspFaust::keyOn(int, int)': DspFaust.cpp:21769:58: error: cast from 'MapUI' to 'long unsigned int' loses precision [-fpermissive] return (unsigned long)fPolyEngine->keyOn(pitch, velocity); ^ DspFaust.cpp: In member function 'long unsigned int DspFaust::newVoice()': DspFaust.cpp:21779:46: error: cast from 'MapUI*' to 'long unsigned int' loses precision [-fpermissive] return (unsigned long)fPolyEngine->newVoice();

agraef commented 4 years ago

long is 32 bit on Windows, even on 64 bit Windows, so you'll have to use unsigned long long to properly cast a pointer value there. Or better yet, make that a portable type like uintptr_t.

sletz commented 4 years ago

Yes using uintptr_t is much better, I'll do that ASAP.

dblanchemain commented 4 years ago

Thank you.

dblanchemain commented 4 years ago

For my plugin LV2 I use a particular graphical interface (2D and 3D), is it possible to launch the opening of this interface when launching the opening GUI qt lv2? I watched the .cpp generated by faust2lv2 but I do not see where it would be possible to make a call to an external application.

agraef commented 4 years ago

I'm not sure what you're getting at, but faust2lv2 only offers the option to use the included Qt GUI or not. If you want to use a different GUI toolkit or your own kind of Qt GUI then you'll have to add it yourself.

dblanchemain commented 4 years ago

In QWidget * LV2QtGUI :: open ()

I added this line:

system (const_cast <char *> ( "~ / bin / spaceMeter.sh"));

}

just before

return widget;
}

This allows me to launch the pseudo 3D GUI of spaceMeter64 écrite en SFML You can see a screenshot here: http://blanchemain.info/Documents/Programmation/index.php?page=spaceMeter64

thank you for your patience