teragonaudio / MrsWatson

A command-line VST plugin host
http://teragonaudio.com/MrsWatson.html
Other
486 stars 101 forks source link

Add support for Vital presets? #304

Open geometrid opened 3 years ago

geometrid commented 3 years ago

I recently learned about Vital and I'm working on a project where we're hoping to use mrswatson to process MIDI files through Vital plugins loaded with certain Vital presets. The following seems to work out of the box, applying a Vital.vst plugin with no preset:

> ./mrswatson64 -m /path/to/testPattern_type0.mid -o /path/to/test_vital.wav -p /Library/Audio/Plug-Ins/VST/Vital.vst
- 00000000 000002 MrsWatson version 0.9.8 initialized, build 20150122
- 00000000 000002 Plugin '/Library/Audio/Plug-Ins/VST/Vital.vst' is of type VST2.x
- 00000000 000002 Opening VST2.x plugin '/Library/Audio/Plug-Ins/VST/Vital.vst'
- 00000000 000135 Starting processing input source
- 00000000 000135 Setting tempo to 81
UNSUPPORTED FEATURE: Current time in SMPTE format
  This feature is not yet supported. Please help us out and submit a patch! :)
  Project website: https://github.com/teragonaudio/mrswatson
  Support email: support@teragonaudio.com
UNSUPPORTED FEATURE: Sample frames until next clock
  This feature is not yet supported. Please help us out and submit a patch! :)
  Project website: https://github.com/teragonaudio/mrswatson
  Support email: support@teragonaudio.com
...
- 05511168 001612 Total processing time 1sec, approximate breakdown:
- 05511168 001612   MrsWatson Initialization: 134ms (8.4%)
- 05511168 001612   MrsWatson Input Source: 4ms (0.3%)
- 05511168 001612   MrsWatson Output Source: 46ms (2.9%)
- 05511168 001612   Vital.vst Audio Processing: 1sec (88.2%)
- 05511168 001612   Vital.vst MIDI Processing: 0ms (0.0%)
- 05511168 001612 Read 2003 MIDI events from /path/to/testPattern_type0.mid
- 05511168 001612 Wrote 5511168 frames to /path/to/test_vital.wav
- 05511168 001612 Shutting down
- 05511168 001612 Closing plugin 'Vital.vst'
- 05511168 001627 Goodbye!

This produces a test_vital.wav file as output and it sounds roughly how I might expect it to sound.

However, applying Vital's (app-specific?) presets via something like the following fails:

> ./mrswatson64 --m /path/to/testPattern_type0.mid -o /path/to/test_vital_preset.wav -p /Library/Audio/Plug-Ins/VST/Vital.vst,~/Music/Vital/Afro/Presets/Banana\ Wob.vital
- 00000000 000002 MrsWatson version 0.9.8 initialized, build 20150122
D 00000000 000006 Host platform is Mac OS X (Mac OS XVersion 10.16 (Build 20D91))
D 00000000 000006 Application is 32-bit
D 00000000 000006 Launched with options: --midi-file /path/to/testPattern_type0.mid -o /path/to/test_out_vital_preset.wav -p "/Library/Audio/Plug-Ins/VST/Vital.vst,~/Music/Vital/Afro/Presets/Banana Wob.vital" --verbose
- 00000000 000006 Opening preset '~/Music/Vital/Afro/Presets/Banana Wob.vital' for plugin
ERROR: Preset '~/Music/Vital/Afro/Presets/Banana Wob.vital' does not match any
supported type
...

This completes successfully (with shell error code 0) and it produces a test_vital_preset.wav file, but it sounds exactly like the wav produced without the preset, so-- between this, and the ERROR: Preset '~/Music/Vital/Afro/Presets/Banana Wob.vital' does not match any supported type message-- it seems as though Vital presets aren't supported.

I might be able to submit a new feature / patch via a PR but I could use some help or guidance. Could I use the following lines/files to use FXP presets as a model for writing code to support Vital presets?

Thanks in advance! Love MrsWatson so far-- thank you!! 👍

nikreiman commented 3 years ago

Hi @geometrid -- I appreciate that you are interested in making a PR for this feature, unfortunately I don't have the time to work on this project anymore and have been meaning for archive it. That said, your suggested approach is probably reasonable, and I would suggest that you fork the project and make your changes there. Please reach out to me at info@teragonaudio.com if you have any other questions.