Closed tinpark closed 4 years ago
Can you possibly post the DSP source and generated UNITY files ? Thanks.
Hello, thank you very much for replying. Here is the DSP code as downloaded from the online IDE: dspFromFaustOnlineCompiler.zip
Here is the compiled version of the DSP code compiled from the online IDE for windows 64, ready to import into Unity via the import package compiledWin64.zip
Here is a compiled version made on my Mojave 10.14.6 using Faust 2.20.2 again ready to be imported into unity via import package: FaustPlugin_osci.unitypackage.zip, made with faust2unity -osx osci.dsp
.
Alternatively, if you wish to manually add the scripts and .bundle to the assets directory, here are the sources unpacked. Made with faust2unity -osx -unpacked -source osci.dsp
When you have them installed and drop these onto game objects, the FaustPlugin script throws an objection and the GUI that should expose the parameters fails to show up. JSON parsing could be the zone of contention, but I'm not sure.
I hope that's enough information and not overwhelming. Many thanks for your time. Martin~
The error message refers for FaustUtilities_fluteSound
but I don't see any FaustUtilities_fluteSound
naming in your files (which refer to osci
AFAICS). Can you send me the correct code , or the error message tou would get with osci
? Thanks.
Are you able to test a possible fix (https://github.com/grame-cncm/faust/commit/5dfedf8baeef6998ac45849b9069c89b67a191d6) on master-dev branch ?
Clone the GitHub repo, then in the faust folder do:
make && sudo make install
then faust2unity your_dsp_file.dsp
and try the result.
Hi, thanks, I cloned the latest branch and built it. I'm still not getting things to work right in unity sadly. Here's the errors I get with the same GUI issue.
FormatException: Input string was not in a correct format. System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Number.ParseInt32 (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Int32.Parse (System.String s, System.IFormatProvider provider) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Convert.ToInt32 (System.String value) (at <567df3e0919241ba98db88bec4c6696f>:0) FaustUtilities_osci.FaustUI.fJSONParser (System.String& fJSON, FaustUtilities_osci.FaustUI& faustUI) (at Assets/Scripts/FaustUtilities_osci.cs:381) FaustUtilities_osci.FaustPlugin_Editor.OnEnable () (at Assets/Scripts/FaustUtilities_osci.cs:29)
NullReferenceException: Object reference not set to an instance of an object FaustUtilities_osci.FaustPlugin_Editor.OnInspectorGUI () (at Assets/Scripts/FaustUtilities_osci.cs:53) UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:501) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
Just in case I've not built things correctly, here's the version that shows up: FAUST Version 2.22.0.
Many thanks for your time.
Good morning and for reference, just tried with the englishBell model from the IDE, I have the same problem. I export to Unity source. Then on my Mac machine, running the faust2unity script, the plugin builds, but doesn't sit right when imported into unity.
FormatException: Input string was not in a correct format. System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Number.ParseInt32 (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Int32.Parse (System.String s, System.IFormatProvider provider) (at <567df3e0919241ba98db88bec4c6696f>:0) System.Convert.ToInt32 (System.String value) (at <567df3e0919241ba98db88bec4c6696f>:0) FaustUtilities_englishBell.FaustUI.fJSONParser (System.String& fJSON, FaustUtilities_englishBell.FaustUI& faustUI) (at Assets/Scripts/FaustUtilities_englishBell.cs:381) FaustUtilities_englishBell.FaustPlugin_Editor.OnEnable () (at Assets/Scripts/FaustUtilities_englishBell.cs:29)
NullReferenceException: Object reference not set to an instance of an object FaustUtilities_englishBell.FaustPlugin_Editor.OnInspectorGUI () (at Assets/Scripts/FaustUtilities_englishBell.cs:53) UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:501) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
Unity package as built by my machine and dsp code below:
FaustPlugin_englishBell_sources.zip
Thanks again!
Can you explain step by step how do you get this error message ? Thanks.
The C# files parse a JSON string created for the DSP. As some point when changed the JSON format a bit (like "numerical" values correctly defined in JSON, and not as "string" anymore..) and the parser currently fails with the errors you get. So I need to be able to reproduce the error in the first place.
Sure, and thanks for reply and for being patient:
Finally, here's a link to the unity session that does all of the above, uploading to dropbox now, 38mb: LINK Best wishes Martin~
AFAICS fixed in https://github.com/grame-cncm/faust/commit/a3d5e8e94c8088ddbfae1b00f72266078c7e7310, working OK with some DSP here. Can you test also and report ? Thanks.
YESSSS! Amazing thanks a lot, this now works! I'm delighted about this, as will the students be. Really appreciate you digging into the problem and persisting to find the solution! Will test on Windows soon as I can. Best Martin~
Coding is 50% of my work, fixing bugs created in the first 50% are the second 50% of my work ((-; Waiting for feedback on Windows before closing the issue.
Hi there, firstly, Faust is an amazing development, thank you. When compiling with version 2.14.4 on my Mojave installation, I get working unity stuff in android, ios, osx -- all perfect. However, when I build with version 2.20, OSX reports that the build was successful but it doesn't work inside Unity. Your online compiler will successfully build a package for windows too, but when inserted into Unity, errors appears on windows that are the same in OSX. Is anyone working on the faust2unity stuff at the moment? Would be great to fix this issue. Here are the errors that appear; it's the GUI stuff that doesn't show up. I had hoped that this was just an OSX issue but it occours on windows 64bit compiles too: Thanks in advance of any repairs you're able to make to faust2unity... as I'd like to move beyond 2.14 to be able to use the 2.20 stuff such as route etc.. Best Martin~
NullReferenceException: Object reference not set to an instance of an object FaustUtilities_fluteSound.FaustPlugin_Editor.OnInspectorGUI () (at Assets/Scripts/FaustUtilities_fluteSound.cs:53) UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:501) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)