freddyz / computerscare-vcv-modules

Modules for VCV Rack
BSD 3-Clause "New" or "Revised" License
41 stars 9 forks source link

Laundry Soup always polyphonic #28

Closed espenstoro closed 4 years ago

espenstoro commented 4 years ago

Hi. Just updated to 1.1.1, and now all outputs are 16x polyphonic by default. That makes things awkward with lots of unnecessary merge and split modules, not to mention the increased CPU usage. Any chance of not having that? Can't imagine why an output needs to be poly with the exact same sequence.

Thank

E

freddyz commented 4 years ago

This was an intentional decision on my part, I didn't see the CPU usage go up too much. There are a few reasons this is useful: 1?: this will output a 16-channel random gate. Each channel is unique. # : this is a stand-in for the polyphonic channel number. Channel 1 will output 1, channel 2: 2, etc. Simple formulas are allowed too eg: #*2 for an output of 2, 4, 6, ..., or 2^# which produces the powers of 2: 2, 4, 8, <16>, .... I agree that it's pretty useless for a "regular" formula like 211 or something. I did this because it simplifies the logic somewhat.

A couple questions: Are you seeing a spike in CPU usage compared to the previous monophonic version? In what situations do you need to use merge and split modules now with Laundry Soup?

Thanks for the feedback! I'm thinking I agree with you that this shouldn't output polyphonic if it doesn't need to but I'll have to think of a solution to handle both cases.

espenstoro commented 4 years ago

Hmm... what about a MK2 of the module? Might be an idea if the new intended use is significantly different. Seems like it is. CPU has at least doubled. It's the small things that matter in huge patches, if you just wanna use it as before. And with so many poly modules, I'll have to keep merging/summing signals to avoid them turning into 16 modules. Seems like most envelopes are like that now, cycling through the channels and doing weird things.

I don't know. Had to downgrade to 1.0.3 for now just to be able to work on music. Not meaning to be overly critical, but sometimes things get stressful. :)

freddyz commented 4 years ago

Okay here is what I'm thinking for the new version: -Add a right-click option that lets the user choose on how many channels of polyphony are desired. Default selection will be "auto" which will set the output channels to 16 if the "#" symbol is present in the formula, otherwise it will be set to 1. I believe this will make your old patches work as before.

I'm sorry to hear I messed up your workflow - I didn't think through how this would impact "downstream" modules.

espenstoro commented 4 years ago

Even better. :) No worries, it's all good now. Right click and select channels is pretty consistent with other poly modules, sounds good.

freddyz commented 4 years ago

@espenstoro if you are able to build my plugin from source you can test out the changes I've made to Laundry Soup. It is on the master branch of this repository. Beware: I'm still trying to fix a bug which occasionally causes Rack to crash on load or when duplicating Laundry Soup.

Thanks again for the suggestion, I think this change makes the module much better!

espenstoro commented 4 years ago

Built and slightly tested. Oh man, individual settings for every channel is awesome! Thanks for implementing that. Haven't run into crashes yet, but I'll be careful.

espenstoro commented 4 years ago

Not sure if this is a good place to mention it, but there's a bug on startup in existing patches: Outputs will only play the undivided clock signal. One way to fix it is either to copy/paste the formula, or just hit space/backspace in the text field, then it'll play what you entered.

freddyz commented 4 years ago

Thanks for letting me know. Could you upload a patch file where this problem happens? I had to make a change to the JSON serialization of the module when v1 came out, and I'm wondering if the problem is related to this.

espenstoro commented 4 years ago

Soup.zip

As simple as possible. It happens consistently. I'm on Windows, Rack 1.1.6, plugin version 1.1.1

freddyz commented 4 years ago

@espenstoro in the soup.vcv patch you sent, the Clocked module is not in "run" mode. When I click the "run" button, and save the patch, Laundry Soup works properly when re-loading the patch.

espenstoro commented 4 years ago

I always have run off by default. Loading a full track already playing gets horribly glitchy sometimes. Loading patch and clicking run just makes the clock signal play. It didn't do that before.

freddyz commented 4 years ago

I'm not understanding. Could you explain, (maybe in the context of the soup.vcv patch that you sent) what the current behavior is and what the previous version behavior was?

espenstoro commented 4 years ago

It's just that I didn't have to remove and re-add the formula after restarting a patch before. Whether the clock is running or not never mattered, it would always apply it to the incoming signal. Don't know how to explain more than that, really.

freddyz commented 4 years ago

Okay I understand and can reproduce the problem on my end. Thanks!

espenstoro commented 4 years ago

Oh man, reading that back seemed angry in text form. Not my intention. :) It'll be helpful for patch sharing, otherwise you might have no idea how it's supposed to sound.

freddyz commented 4 years ago

No worries - my "anger in text" detector did not go off!

Petervos2018 commented 4 years ago

Default selection will be "auto" which will set the output channels to 16 if the "#" symbol is present in the formula, otherwise it will be set to 1.

A bit late to the party, but as long as the above is part of the "solution" I like it.

DominoMarama commented 4 years ago

Just in case you haven't had chance to look into it yet, I've attached a fix for espenstoro's issue on startup.

loadFix.diff.txt

freddyz commented 4 years ago

Just in case you haven't had chance to look into it yet, I've attached a fix for espenstoro's issue on startup.

loadFix.diff.txt

Thanks - there are a few other problems which are somewhat related to this, so the fix will be a bit more involved. I hope to get it complete and submitted to the plugin manager this weekend

freddyz commented 4 years ago

@espenstoro I believe I have fixed the "formula not loading properly when loading patch" problem with my latest commit. If you get a chance, could you check to see if it's working properly for you?

espenstoro commented 4 years ago

Tested, and works. Thanks. :)

freddyz commented 4 years ago

Computerscare Modules 1.2.0 which includes this fix should now be available in the plugin manager. Thanks again for pointing this out and for your feedback @espenstoro!