Closed JanZaion closed 3 years ago
I think this looks great @JanZaion (thank you so much for already getting this started!)
I like the idea for publishing a NPM module for this (we can come up with a slightly smaller / more memorable name for it).
For your question of shud riff or chord be included, i think it shouldnt be included. Also these 2 devices should be re-implemented with whatever you re putting together. Basically they should be built from the script you re working on in this PR.
One small suggestion i had was for this line here where i was thinking we should bring in all the properties unconditionally (Scribbletune should know how to ignore props that it doesnt recognize)
Basically it can do something like
const parameters = await maxApi.getDict("parameters");
const clip = scribble.clip(parameters);
This way other properties can come in too if the device passes them. And maybe we can rename constructChords
to constructClip
instead. Hope this makes sense!
@walmik all great points, I will address them sometimes in the following days
So heres my take on your points @walmik:
we can come up with a slightly smaller / more memorable name for it
Absolutely, as the saying goes, there are only 2 hard things in programming :) Im thinking make-scribble4max
For your question of shud riff or chord be included, i think it shouldnt be included
Agreed, including referential devices is the "Max" way of doing things after all.
One small suggestion i had was for this line here i was thinking we should bring in all the properties unconditionally
Well, that would kinda defeat the whole point of what Im trying to do here. However, this point made me realise why my initial commit was so confusing. I want to encourage developers to write their own compositional logic before passing the parameters to Live. Riff is a great example of this, more on that later. My solution is the following, but there is probably still room for improvement.
maybe we can rename constructChords to constructClip
Of course
Also these 2 devices should be re-implemented with whatever you re putting together.
Actually I know Riff pretty well, because I have used it to learn how to work with Scribble4max. I also sometimes use it to, well riff :) So I took the liberty of rewriting Riff as you have suggested. Since I know the device, it only took me about an hour or so.
Couple of points:
I hope that my rewrite of Riff will shed some light on my original intentions :)
Well Im glad you like it @walmik :) Scribbletune is rightly a very popular repo, but Scribble4max deserves way more love. Too bad the "production" stage of the final amxd is not super smooth.
Thank you @JanZaion and apologies for the delay in merging this!
Hey @walmik Im glad you liked the fork. Im still planning to extend the template so that there are all the Scribbletune parameters present like we have discussed earlier here in this conversation. It should be much smaller PR anyway.
Hello @JanZaion I was trying out few of the newly introduced things by you so that I could push the update riff device to maxforlive.com and encountered some issues.
When I drag and drop the Riff.amxd on one of the MIDI channels in Live, I get this message in Max:
node.script: newriff.js: No such file or directory
Once I rename this file in the webpack config and make sure that newriff is indeed used, I get the issue,
Module not found: Error: Can't resolve 'max-api' in '/Users/wdeshpande/Github/scribbleformax/src'
If I install this module, I get the error in the node.script debug module that suggests I shouldnt npm install "max-api" and back to step 2 :/
I m sure I m missing something, could you please guide? Many thanks!
Hello @walmik, apologies for the inconvenience. I was afraid something like this might happen, since its pretty hard for me to set up "clean" environment for testing.
Do your File Preferences point correctly to the directory where newriff.js resides? If you have it set up correctly, I will look into it further
I think I got it @JanZaion :) Basically the newriff.js doesnt need to go through webpack at all. It can be directly used as is. I was trying to send newriff.js from src/ to dist/ via webpack via tanspilation :P
I think I ll spruce up some documentation and create a new package to publish to maxforlive.com. Thank you once again for introducing max-api to scribbleformax!
Yeah, I think you got it @walmik :)
I think I ll spruce up some documentation
Feel free to let me know if you need any help with that.
create a new package to publish to maxforlive.com.
Well... Im not sure we have addressed the problem of production (or freezing or however its called correctly) properly.
When I was addressing this point earlier, you wrote
we can assume they are running node locally and we can provide another script that exports the module for distribution
I dont fully understand what did you mean by that. Did you mean writing a script for Webpack? Because Im almost certain you need to own the full Max license to freeze anything properly with Max's node script object, with or without transpilation. And yeah, there are more Max licences, its a bit confusing. If you own Ableton Live Suite, then you own Max for Live. Max for Live is not the full licence.
The upgrade to the full license costs $200 I think. So if you dont have one yourself and dont want to upgrade, let me know, I can produce Riff with my license.
...yeah, I know, the finish line is always just a few more steps away :)
Hello @walmik, so I wrote the script.
Please do not feel pressured to review this PR any time sooner, than your life priorities permit, I am in no hurry with this :)
My intention here is to make the installation process similar to
npx create-react-app
, the command beinggenerate-scribble4max-device device-name
. All that the script does is that it copies all the contents of the 'https://github.com/JanZaion/scribbleformax' repo and then it installs all the packages. What will be the final link for downloads and what would be the contents to download (I mean do you want to include Chord and Riff?) is of course your decision.I have tested it on my Windows machine with the
npm link
method, so I hope it works.If you find this method suitable, it should be published as an npm package, so it works just like
npx create-react-app
.I hope this makes sense, do not hesitate to ask me for clarification.