Cardinal icon indicating copy to clipboard operation
Cardinal copied to clipboard

Add Computerscare modules

Open kawa-sanmyaku opened this issue 1 year ago • 16 comments

It compiles and works in Linux. This is a result of roughly following guides, receiving advice, and trial and error. Thank you all. Dark panels pending, though.

Please let me know if I did something wrong, I'm new to this.

kawa-sanmyaku avatar Feb 17 '24 06:02 kawa-sanmyaku

Hmm, you didn't add the Computerscare project as a submodule, instead you copied over the entire source tree.

This is not the way to add Rack modules!

[Edit: perhaps this was by accident, as you did also modify the .gitmodules file. You shouldn't have added the entire directory with code to the request.]

I'm not sure if it was necessary to extern all of the modules either.

dromer avatar Feb 17 '24 08:02 dromer

~It was an accident as I used git submodule add etc. to add the submodule but didn't check what files were necessary after it was done cloning. I'll sort this out when I get back home, sorry!~

This happened because I added the submodule directory by force to the commit instead of pushing to a fork of the submodule

kawa-sanmyaku avatar Feb 17 '24 14:02 kawa-sanmyaku

I didn't know you have to cd into plugins/submodule and git add files manually, commit, then go back to the project root and add>commit>push again. The first time I tried to add plugins/submodule it didn't stage the modified files so I force-staged the entire directory, hence the mess. My apologies, I hope I did everything correctly now.

kawa-sanmyaku avatar Feb 18 '24 03:02 kawa-sanmyaku

I didn't know you have to cd into plugins/submodule and git add files manually

That shouldn't be necessary. You do have to add the submodule folder to your main commit, but not any of its contents.

I'll check out this branch today. We should probably squash the commits so we don't get the full add+remove in the history :)

[edit: ah no, you force pushed so history is clean. great!]

dromer avatar Feb 18 '24 07:02 dromer

Ok, they all seemed to build just fine:

Now we just need to come up with the best way to create the dark panels.

dromer avatar Feb 18 '24 07:02 dromer

A few things still to do:

  • at least the Quantizer name needs to be added to the custom names, as detected by the LTO CI step. this CI step needs to pass before merging
  • the makefile is using CF_CUSTOM variable name as copy&paste leftover, should use a more appropriate name here
  • readme and docs/license parts need to mention the new modules

falkTX avatar Feb 18 '24 12:02 falkTX

Did I do it right? Hopefully all that remains to do is the dark panels, I'll look into it later today

kawa-sanmyaku avatar Feb 18 '24 18:02 kawa-sanmyaku

yes, that is perfect.

lets see if the automated CI tests now pass without issues.

falkTX avatar Feb 18 '24 19:02 falkTX

Sorry, I don't know what's wrong this time. WASM fails to build locally too.

kawa-sanmyaku avatar Feb 21 '24 03:02 kawa-sanmyaku

wasm fails on:

wasm-ld: error: duplicate symbol: main

likely one of the files included on the makefile is a test one meant for unit-testing or other stuff not usable in a plugin version. whatever one contains the "main" entry point call we need to remove that file from the build using the filter-out method on top of the wildcard, as done for a few others plugins.

the debug zip file failing might be due to finally getting out of disk space on GH side.. either that or there is a recursive symlink that makes the zipping explode in size

falkTX avatar Feb 21 '24 06:02 falkTX

Just an update mark dode test using modified dep.cpp image image It works, colors need some tweaking, the rest of the modules will follow, then commit

kawa-sanmyaku avatar Feb 25 '24 23:02 kawa-sanmyaku

Hmm, this custom digital-7.ttf font license is somewhat problematic.

Maybe we can convince Computerscare to use the Segment7Standard.ttf font which is used by many other modules for their 7 segment displays.

dromer avatar Mar 06 '24 09:03 dromer

If we get no response, would it be ok to just quietly change the font? The rest of the code can follow upstream...

Also, some text labels are drawn by Computerscare.hpp for the rest of the modules, but I can't find a way to properly invert their colors for dark mode (similar issue to a previous issue with ComputerscareBlank, where the panel's background wouldn't change for dark or light mode unless the patch was reloaded). The only solution I can think of that doesn't involve re-writing whole blocks of code and potentially breaking the rest of the modules is to just draw shapes of contrasting colors under the labels... the panels will look SUPER UGLY but in this case that's more of a plus.

Another, more nuclear option I've been thinking of is to fork Computerscare, change the artwork, and call it PCBoo... the compromise would be potentially losing compatibility with VCV Rack for any patch that contains the modules

kawa-sanmyaku avatar Mar 09 '24 18:03 kawa-sanmyaku

typically what we do is a soft fork, by forking but submitting our changes upstream with anything that breaks original VCV Rack usage under a cardinal specific macro.

that way we can keep the light/dark mode things on the module code for cardinal, while the original behaviour remains for VCV Rack.

PS: we have merged CVfunk recently, so now there are conflicts regarding your PR. but since this involves a soft fork I think I can take it from here.

falkTX avatar Mar 09 '24 19:03 falkTX

fork is created in https://github.com/CardinalModules/computerscare-vcv-modules

we can have the cardinal specific code under USING_CARDINAL_NOT_RACK C++ macro, with settings::preferDarkPanels as the way to dynamically check if using light or dark mode.

falkTX avatar Mar 09 '24 19:03 falkTX

a janky fix for a janky set of modules, I'll see if I can get in touch with Adam about changing the font upstream but in the meantime I've already done that with this branch, if there's no problem (edit: will also revise some colors)

EDIT2: :(

EDIT3: The font will be changed upstream on next release ^^

EDIT4: Quick note, the font has already been changed upstream, for now no more changes will be made to this PR

kawa-sanmyaku avatar Mar 11 '24 02:03 kawa-sanmyaku

Sorry for taking long on this, life gets in the way of fun stuff sometimes. Merging now, will do a small tweak just to get the folystickfigure panel looking brighter in white theme mode, everything else is fine! Thanks!

falkTX avatar Apr 04 '24 08:04 falkTX

btw I pushed your changes to https://github.com/CardinalModules/computerscare-vcv-modules we should use that org for module forks, if you still have more to do just ping me and I add you to the team

falkTX avatar Apr 04 '24 08:04 falkTX