Thanks Martin and Alberto,

Just to confirm, Albert's suggestion to add left and right channels works
in Unity and enables separate channel levels to be addressed within Unity's
audio subsystem (i.e. left = hslider("[0]left",0,0,1,0.1); right =
hslider("[0]right",0,0,1,0.1); process = my_violin_ui <: _ * left ,_ *
right;).

In this case that's running without any dummy AudioClip asset (from
Martin's suggestion) being loaded in to the appropriate AudioSource. I'll
do some testing with the dummy AudioClip concept and pass on results here.

Also, the multi-channel example you suggested Martin looks great, I'll give
that a shot when I start spatializing further than stereo.

The secondary question I had in my last post was in reference to Alberto's
suggestion that compiling the Faust plugin _without_ UI elements would
potentially run better/faster/more-stably.... when I did compile the
violinModel without UI Unity threw errors when I tried to call
setParameter, showing "Error JSON Parser" within the generated
FaustUtilities_ script, when checking to see if FaustUI's check on a JSON
file existed:

   if (!FaustUI.fJSONParser(ref fJSON, out fUI)) { // Parses the JSON file
      UnityEngine.Debug.LogError("Error JSON Parser");
}

So my question is are UI elements _required_ when exporting for Unity? Or
did I (most likely) code my simple violin example poorly? (see below for
example I built)

----------------------------------

TEST SCRIPT (ATTEMPTING TO REMOVE UI ELEMENTS):

import("stdfaust.lib");
my_violin= pm.violinModel(stringLength,bowPress,bowVel,bowPos)*outGain
with{
      stringLength = 0;
      bowVel = 0;
      bowPress = 0;
      bowPos = 0;
      outGain = 0;
};
left = 0;
right = 0;
process =  my_violin  <: _ * left ,_ * right;

-----------------------------------

As I work through these basics, I'll have a bunch of material that could
likely be rolled into a set of tutorials. My students this semester are
already overloaded with Unity, Unreal, Pure Data, WWise and more, so I'm
not generating new Faust tutorials/assignments for them, but I'm working on
a Faust/Unity project right now that is the basis for these explorations,
and should put me in good stead to help out with Unity + Faust tutorials.

Thanks!

Rob
_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to