grame-cncm / inscore

INScore - augmented interactive music scores
https://grame-cncm.github.io/inscore/
47 stars 6 forks source link

Using javascript web module #12

Open 23trastos opened 4 years ago

23trastos commented 4 years ago

I just started a project mixing several tools available from GRAME. My idea is to build an browser-bassed online workshop/helper for the composition process of interactive pieces (also with Live audio DSP processing inside the Web-Audio, probably using Faust among other tools). At the moment I already have the core system, built in top of a ClojureScript web-repl in order to have a 'Lispy' interpreter for real-time manipulation of musical scores. I managed to bring inside my application a whole part of the GUIDO Online Editor code, and I am so glad it works flawlessly! (thanks to cljs built-in JavaScript InterOp. and thanks to your work... it's just incredible :D)

My plan now was to bring in also some score interactivity with INScore and now I am totally stucked, I managed to build from TypeScript (tsc) and compile the inscore.js from the javascript folder. I can see the main component in the tests and examples, which loads without any errors, however I can only draw basic shapes, no Text nor GMN code at all... it just doesn't process it. I am trying to solve it myself in order to see why does not connect properly to the module and the GuidoEngineAdapter() but I can't just figure out where is the problem. Any hints/help will be profoundly welcome.

Thanks in advance.

23trastos commented 4 years ago

Well, using my browser's console, I just noticed there is a small bug in the parser, when trying to not-escape the backslashes ('\') there is a 'for' construction which should be changed from: for (r = 0, w = 0; r < n; r++) { ... }' to: for (var r = 0, w = 0; r < n; r++) { ... }' and then, I follow my quest, now it seams the problem relates with the GUIDO Engine, so I might be a bit closer.. I will update anything over here and if successful I will submit a pull request ;)

dfober commented 4 years ago

Hi,

I'm currently working on a completely new implementation of INScore Javascript version and thanks to COVID-19 and to confinement, I have a lot of time to spend on it :-). This new version is based on wasm for the model and on javascript for the view. It's already more advanced than the one from the javascript folder. It should, therefore, be much easier to maintain since most of the changes in the system relate to the model. Let's keep in touch. I hope to have a first alpha version soon. I'll publish it on npm and I'm also thinking about doing an online inscoreEditor similar to the guidoeditor. If you're curious about the current state, it's available from the 'library' branch. Best

Dominique

Le dim. 12 avr. 2020 à 13:10, 23trastos notifications@github.com a écrit :

I just started a project mixing several tools available from GRAME. My idea is to build an browser-bassed online workshop/helper for the composition process of interactive pieces (also with Live audio DSP processing inside the Web-Audio, probably using Faust among other tools). At the moment I already have the core system, built in top of a ClojureScript web-repl in order to have a 'Lispy' interpreter for real-time manipulation of musical scores. I managed to bring inside my application a whole part of the GUIDO Online Editor code, and I am so glad it works flawlessly! (thanks to cljs built-in JavaScript InterOp. and thanks to your work... it's just incredible :D)

My plan now was to bring in also some score interactivity with INScore and now I am totally stucked, I managed to build from TypeScript (tsc) and compile the inscore.js from the javascript folder. I can see the main component in the tests and examples, which loads without any errors, however I can only draw basic shapes, no Text nor GMN code at all... it just doesn't process it. I am trying to solve it myself in order to see why does not connect properly to the module and the GuidoEngineAdapter() but I can't just figure out where is the problem. Any hints/help will be profoundly welcome.

Thanks in advance.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/grame-cncm/inscore/issues/12, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADJHQ5YVHCAF5GEK5Y75KTRMGOUDANCNFSM4MGL6MJA .

23trastos commented 4 years ago

Hi Dominique, That is very good news indeed! I was already feeling it was going to be difficult to use the actual javascript in the same fashion as the Guido Engine. The GuidoEngineAdapter initialization process in the inscore.js was failing for me, and as I was digging into the code I quickly saw it was quite different than the actual implementation of the GuidoENGINE wasm module, but unfortunately my knowledge of JavaScript and WebAssembly is not enough right now. I will be happy to check out the code from the library branch. Thanks for the reply and keep in touch.

Regards,

Llorenç

23trastos commented 4 years ago

Hi again Dominique,

I just wanted to thank you, I have just compiled the wasm from the library branch, I am trying it now and I am so surprised that is far more functional than I imagined. I can already integrate many of the stuff I was planning. As far as I can see, the only thing that doesn't work straight are the score mappings for tempo-syncronization of graphical elements with my GMN score. I will definitely be a happy 'alpha-tester' :-D

dfober commented 4 years ago

Great that you've been able to compile and run. I'm currently working on synchronisation issues. Not trivial! Be careful with the current source set, the interface might change (although the main one, the inscore API, is stable). But the object's layout is subject to change (In particular, I intend to homogenize the default size of the objects so that the rendering is the same with the native application). Thanks for alpha testing.

Le dim. 12 avr. 2020 à 18:31, 23trastos notifications@github.com a écrit :

Hi again Dominique,

I just wanted to thank you, I have just compiled the wasm from the library branch, I am trying it now and I am so surprised that is far more functional than I imagined. I can already integrate many of the stuff I was planning. As far as I can see, the only thing that doesn't work straight are the score mappings for tempo-syncronization of graphical elements with my GMN score. I will definitely be a happy 'alpha-tester' :-D

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/grame-cncm/inscore/issues/12#issuecomment-612642042, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADJHQ2XV6KFTEPFPTGOPOTRMHUHVANCNFSM4MGL6MJA .