Giter Club home page Giter Club logo

Comments (6)

walmik avatar walmik commented on July 17, 2024 1

Hi @case303 Thank you for creating this issue. I m aware of this issue as myself and @JanZaion have also been going over it for some days now.

tldr;

  • If all you care about is making music, then use an older version of scribbleformax - this is available on my maxforlive page https://maxforlive.com/profile/user/walmik
  • If you re keen on developing something on top of the Riff device (or want to augment it) I d recommend using the latest version of scribbleformax and the Riff.amxd in it (the approach in this removes the need for webpack and files from dist/ (with dist/api.js and dist/riff.js being the source files themselves - The "Chord" device is currently broken in the latest but available from my maxforlive page)

Just a bit of an explanation on what s going on:

We have recently moved to using maxApi. This allows us some freedom in terms of using ES6 syntax, the dict object and node modules in general but it cannot write clips. For that we continue to use the max JS object (which is an older version of ES5) but has access to the LOM (Live Object Model) needed for writing clips. While there is still some uncertainty around what should be the way forward, we can use a combination of both where one part of the script can use maxApi and then "hand over" control to the script executed by the JS object (which is what Riff.amxd is currently doing).

The maxApi node module is just a dummy module for synctactic sugar. There isnt any module that actually gets downloaded hence it cannot be part of the webpack transpilation config. The current src/api.js will soon be removed and some folder structure might be changed if we remove the transpilation step completely because src and dist wont make any sense as all the JS will be just source that max can execute without transpilation. Lastly a couple of methods from dist/api.js and dist/riff.js will make it the main Scribbletune library so that there is overall less code to be written within the scribbleformax repo (this repo).

Hope that makes sense! Please dont hesitate to ask any further questions and let me know how it goes with getting scribbleformax works locally for you!

from scribbleformax.

case303 avatar case303 commented on July 17, 2024 1

Thanks @walmik for the explanation. I did notice, and had success experimenting directly in /dist.
Interesting to learn what's going on. I've been following your challenges with ES5, and was excited to learn how scribbleformax was writing its clips. I'll keep my eyes peeled and have a deeper dive into the Riff to see how you guys are taking advantage of both worlds.

from scribbleformax.

JanZaion avatar JanZaion commented on July 17, 2024 1

Hi @walmik and @case303 ,

unfortunetely when using node.script object, you cant simply freeze the device as you would with "vanilla" M4L patch. Here is the link I think you're asking for. There are some downsides to this however, I went over them in the last comment in this PR.

In summary, there are 2 ways to produce the final device:

  1. Bundle it with Max (a different thing than M4L, its superconfusing actually, see the link above)
  2. Making the end user (a music producer) download a folder with some stuff instead of just the .amxd file and providing installation instruction. The folder would contain package.json and the .amxd device withing this folder would have a button that would be clicked during a first time use in order to execute npm script install cmd and do as instructed by the package.json. This might be a PR of its own actually. I think that a non-technical user should be able to follow these instructions, since it doesen't require node and npm installed (it's using those in Max). But this option will never be as sleek and simple as option 1.

My 2 cents, hope it helps!

from scribbleformax.

walmik avatar walmik commented on July 17, 2024 1

@JanZaion Thank you for the detailed response! I ll go over the link you shared. I think we must provide a clean way for producers to drop in the device and start using right away. I ll try the bundling approach you recommended.

from scribbleformax.

walmik avatar walmik commented on July 17, 2024 1

@case303 I m re-opening this issue as it continues to exist in terms of what you ve pointed out in the description. Will close it once we resolve it.

from scribbleformax.

walmik avatar walmik commented on July 17, 2024

@JanZaion I tried freezing the device to test it s use on another machine. But unfortunately there it didnt work and when I opened it up for editing, I could see the error message that node.script has not been started.

I remember you had mentioned something around publishing the device such that node.script is started and npm install also happens automatically. Could you please remind me what that was or point me to a link? I want to be able to publish the new version to maxforlive such that folks can use the updated version of Riff with our new approach using maxApi!

from scribbleformax.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.