virtual-playing-orchestra-ardour-template icon indicating copy to clipboard operation
virtual-playing-orchestra-ardour-template copied to clipboard

Template does not load SFZ files

Open jens-r opened this issue 4 years ago • 14 comments

When using this template, I have to manually select "SFZ file" for all the instruments.

Steps to reproduce:

  1. Follow the steps in readme.md.
  2. Create a new Ardour session from Virtual Playing Orchestra template.
  3. Open the sfizz GUI from any track.
  4. The "SFZ file" is empty.

I can't find any errors in the TTL files. If I create a new test template that uses sfizz and VPO, it works as expected.

System information: CentOS 8.1 Ardour 5.12 sfizz 0.2.0

jens-r avatar Feb 09 '20 14:02 jens-r

Same problem in Ubuntu 18.04.

This is my test setup:

sudo apt-get -y install ardour libxcb-cursor0

wget -P $HOME/Downloads https://download.opensuse.org/repositories/home:/sfztools:/sfizz/xUbuntu_18.04/amd64/sfizz_0.3.2-0_amd64.deb
sudo dpkg -i $HOME/Downloads/sfizz_0.3.2-0_amd64.deb

wget -P $HOME/Downloads https://archive.org/download/VirtualPlayingOrchestra31WaveFiles/Virtual-Playing-Orchestra3-1-wave-files.zip
wget -P $HOME/Downloads http://virtualplaying.com/vp-downloads/Virtual-Playing-Orchestra3-2-1-performance-scripts.zip
sudo unzip $HOME/Downloads/Virtual-Playing-Orchestra3-1-wave-files.zip -d /opt/
sudo unzip -o $HOME/Downloads/Virtual-Playing-Orchestra3-2-1-performance-scripts.zip -d /opt/

wget -P $HOME/Downloads https://github.com/michaelwillis/virtual-playing-orchestra-ardour-template/releases/download/2.0.0-RC2/virtual-playing-orchestra-template-2.0.0-RC2.zip
mkdir -p $HOME/.config/ardour5/templates/
unzip $HOME/Downloads/virtual-playing-orchestra-template-2.0.0-RC2.zip -d $HOME/.config/ardour5/templates/

jens-r avatar Apr 17 '20 17:04 jens-r

Hi @jens-r, I am a little out of touch with this repo, but I'm wondering if a comment in a previous issue here may be useful to you, in case you haven't seen it already

johnjacobkenny avatar Apr 18 '20 05:04 johnjacobkenny

This https://www.youtube.com/watch?v=xvowEZqgflw may also be useful

johnjacobkenny avatar Apr 18 '20 07:04 johnjacobkenny

@johnjacobkenny Unfortunately, it does not solve my problem (I have to select the SFZ files manually).

Does this template work for you? I think my latest test was very generic, so it should not work for anyone.

I got this answer from las on IRC (#ardour): sfizz is under developmetn, maybe it has changed

jens-r avatar Apr 18 '20 08:04 jens-r

Its been a while since I used this. I can try with the latest if I get time. Will share any info I get.

johnjacobkenny avatar Apr 19 '20 07:04 johnjacobkenny

I've raised a bugreport for Ardour at https://tracker.ardour.org/view.php?id=8057 for this, as I think it's a bug in how Ardour implements templates.

As a workaround, I seem to be having success by editing the template (before first use!) and changing Michael's template directory to mine. If you've already used the template it will have borked up the state settings, so delete it and re-install the template, then edit the file.

So on my system, my templates are in /home/agittins/.config/ardour6/templates, so I open up /home/agittins/.config/ardour6/templates/Virtual Playing Orchestra/Virtual Playing Orchestra.template and change every occurrence of:

/Users/michaelwillis/Library/Preferences/Ardour5/templates/Virtual Playing Orchestra to /home/agittins/.config/ardour6/templates/Virtual Playing Orchestra

Seems to be working. Since the template needs to have VPO installed in a specific path anyway (ie, there are "manual" installation steps required), would it be helpful to create a script that automagically munges the filepath? It could also do a quick file check to ensure that it finds VPO in /opt as well. Just as a workaround until Ardour implements a fix...

agittins avatar Apr 25 '20 15:04 agittins

@agittins wow, thanks for sharing these! :star_struck:

johnjacobkenny avatar May 02 '20 02:05 johnjacobkenny

No worries!

Which reminds me, I completely forgot to describe here what's actually going on!

While the issue is indeed caused by the way Ardour stores paths in its templates, it's not really a bug in Ardour, but rather a change required in how people share Ardour templates, and a lacking feature in how Ardour manages template archives.

When you export templates from Ardour (Window, Templates), it replaces the paths in the presets with "$TEMPLATEDIR". When Ardour imports templates, it does the reverse, replacing $TEMPLATEDIR with the local user's template directory. This works really well, if you use that as a means for moving templates around.

What doesn't work is just copying the templates manually from one place to another.

So for distributing templates to end-users, the "right"(?) way to do it is to package them as a template archive (this is simply an xz-compressed tar archive, named something.ardour-template-archive), and users should install them through "Window", "Templates", "Import". I've tested this and it works well, paths get fixed automatically and it doesn't clobber existing templates unless they have the same name. This also means that we could package templates with a version number in them (so users can try out multiple versions) or users can freely rename templates themselves if they want to keep their known-good option before committing to a new version.

For the development side of things, it's only slightly more complicated. I've raised a feature request for ardour to include a button to export a single template (since currently only "Export All" is available), but until then one can either:

  • choose "Export All", unpack the resulting archive, remove the unwanted preset directories, and re-archive it (with tar -cvJf name.ardour-template-archive templates/template-name) OR
  • copy the template, replace all occurances of the local template path in the xml session file with $TEMPLATEDIR, and archive it as above. This is one of the things that the script attached above is able to do.

Right now what would be great is if someone can put an archive version of the template into the releases area in github so users can easily download it, and update the readme accordingly.

agittins avatar May 02 '20 08:05 agittins

(note: the above Virtual Playing Orchestra.ardour-template-archive file should be renamed to Virtual Playing Orchestra.tar.xz to be imported into Ardour 5).

agittins avatar May 05 '20 20:05 agittins

I've packaged a temporary release on my fork that includes templates for Ardour5 and 6 on my fork, people can try that in the meantime until Michael has a chance to merge them over to here.

https://github.com/agittins/virtual-playing-orchestra-ardour-template/releases

agittins avatar May 05 '20 20:05 agittins

Yes this is working for me! Thanks a lot :smile:

Do you have any thoughts on how the performance scripts change the tone/quality of the instrument? My midi keyboard has only a pitch bend, so is there any way to take advantage of any modulation through software?

johnjacobkenny avatar May 06 '20 07:05 johnjacobkenny

Yes, the PERF versions of the sfz instruments typically map their dynamics to the modulation wheel, which is midi controller cc#1. This is especially audible for the brass presets, as you can play a note starting soft, then with the modwheel change it to forte, which blends in the loud samples so that you get a smooth transition.

Since you're an organist, do you have an expression pedal? Expression will usually be cc#7 (main volume) or cc#11 (expression). If you have one, you could remap it to cc#1 using your keyboard's config (if it supports it) or by using software on your PC. I think qmidiroute will do it, or amidimap if ubuntu has packages for it.

Another way is to install the x42 plugins (they're great) and use the "MIDI CC Map" plugin - you set the input controller number to map, and set what it should output as. I'm sure there will be a way to do it with your pitch-bend as well, but as it's not a normal CC (continuous controller) I'm not sure what tool you'd have to use to do it (I think amidimap supports it).

You could also do things like run touchosc on a phone or tablet, and then run touchosctomidi on your pc, lots of possibilities. Basically, find something that does what you want physically, then find a way to turn whatever signal it makes into a midi controller signal.

agittins avatar May 06 '20 08:05 agittins

Oh wait... in Ardour on a midi track you can also simply enable the modulation automation lane which will at least let you play with it manually. image

agittins avatar May 06 '20 09:05 agittins

Yes, the PERF versions of the sfz instruments typically map their dynamics to the modulation wheel, which is midi controller cc#1. This is especially audible for the brass presets, as you can play a note starting soft, then with the modwheel change it to forte, which blends in the loud samples so that you get a smooth transition.

Since you're an organist, do you have an expression pedal? Expression will usually be cc#7 (main volume) or cc#11 (expression). If you have one, you could remap it to cc#1 using your keyboard's config (if it supports it) or by using software on your PC. I think qmidiroute will do it, or amidimap if ubuntu has packages for it.

Another way is to install the x42 plugins (they're great) and use the "MIDI CC Map" plugin - you set the input controller number to map, and set what it should output as. I'm sure there will be a way to do it with your pitch-bend as well, but as it's not a normal CC (continuous controller) I'm not sure what tool you'd have to use to do it (I think amidimap supports it).

You could also do things like run touchosc on a phone or tablet, and then run touchosctomidi on your pc, lots of possibilities. Basically, find something that does what you want physically, then find a way to turn whatever signal it makes into a midi controller signal.

I haven't got myself an expression pedal, but its something I was looking forward to buying one! Any recommendations on that? I will try the x42 plugins, and touchosc when I get time to.

I think we might be on a bug finding spree :no_mouth: I am not able to access the Controllers sub menus on Ardour when sfizz is configured for that track. On a new empty midi track I am able to see the menu as in your screenshot. :see_no_evil:

johnjacobkenny avatar May 06 '20 10:05 johnjacobkenny

I opened v2.0.0 on Ardour 8 with @agittins instructions and it works :) Also (lollipop) velocity and mod-wheel automation lanes work well for articulation and dynamics. image

Thanks a lot!

aliciapaz avatar Jun 17 '24 04:06 aliciapaz