BlackNoiseModular / VCV

Other
6 stars 1 forks source link

COSMOS Dev Thread #1

Closed hemmer closed 1 week ago

hemmer commented 3 months ago

Core/DSP

UI

hemmer commented 3 months ago

Ignoring gate/trigger outputs to start with, I'd like to better understand the XOR gate. In particular I think it has a "special case" behaviour at X or Y = 0. Here I have sin into X and DC into Y. Positive Y DC inverts and clips, negative Y just clips. Naively I had thought that as Y goes to 0 (from positive side or negative side), the clipping window gets narrower and narrower until XOR output is 0 (when say Y = 0). But in fact, Y = 0 (end of the video) is a special case that lets the original wavform through as far as I know.

https://github.com/BlackNoiseModular/VCV/assets/915048/780f21f2-9f6a-4a47-8e4f-38ae41899c8e

The way this manifests (at least in the manual) is that Y = 0 lets X through unchanged (see cyan bits). But if this is the case then why don't you get spikes (of the pure X signal) as Y (purple) passes through zero in example 3)?

image

For the record, this is how I've implemented it to start with in VCV but just checking that this is the expected behvaiour? image

BlackNoiseModular commented 3 months ago

Indeed, that's an error in the manual that we hadn't noticed. The illustration should not be labeled with "gates" because it depicts bipolar signals. The "TZ Clipper" and "Inv Tz Clipper" sections require at least one of the two inputs (X or Y) to be bipolar to function. However, this does not affect the gate and trig outputs of those sections. So, if you send gate signals to both X and Y inputs, the "TZ Clipper" output will behave like the "INV MIN" output, and the gate output will behave like an XOR operation.

hemmer commented 3 months ago

Indeed, that's an error in the manual that we hadn't noticed. The illustration should not be labeled with "gates" because it depicts bipolar signals. The "TZ Clipper" and "Inv Tz Clipper" sections require at least one of the two inputs (X or Y) to be bipolar to function. However, this does not affect the gate and trig outputs of those sections. So, if you send gate signals to both X and Y inputs, the "TZ Clipper" output will behave like the "INV MIN" output, and the gate output will behave like an XOR operation.

Great thanks for the clarification, and with that understanding I now get the same behaviour at "TZ Clipper" output as "INV MIN" output. However, sending the same gate pattern in (where say gate high is 10V), then I the green trace (oscillating from -10 to 0V), which is what I expect.

image

However this never exceeds 0V and so never triggers a gate (at least according to my literal interpretation of the manual)?

image

BlackNoiseModular commented 3 months ago

To have the gate output behave like an XOR even with unipolar signals (e.g. gates) the Gate/Trigger section of the TZ Clipper and Inv-TZ Clipper is a bit different from the other sections. Instead of sending the TZ Clipper output to a comparator that generates all the gates/triggers, the X and Y inputs are sent into a logical XOR. This allows to generate gates even with unipolar signals. The XOR output is then sent into the comparator, which creates the gates and triggers for the TZ/Inv-TZ clipper sections.

hemmer commented 3 months ago

@BlackNoiseModular - you might have already seen, but I have build-on-push set up here https://github.com/BlackNoiseModular/VCV/releases. If you add to the plugins folder your user folder in Rack you should be able to try it out as we go. I'm on M1 mac so use the BlackNoiseModular-2.0.0-mac-arm64.vcvplugin file (this gets auto-extracted on startup).

Still plenty to do for all modules, but it'd be good if you can take a look at the logic outputs and their gate equivelents of COSMOS, and tell me if that is what you expect? Lower hemisphere outputs are literal inverses of top hemisphere, and all gate outs should follow the truth table on pg 15 of the manual. Triggers should coincide with rising edge of all matching gate outputs.

image

Once you're happy with functional behaviour, I can implement oversampling etc. :)

hemmer commented 3 months ago

Screenshot 2024-07-15 at 07 45 01

I took a photo to show the behavior of the "analog XOR" output and the "logic XOR" output. The green sine wave goes into the X input, and the blue DC voltage goes into the Y input. At the "analog XOR" output, the DC signal clips the sine wave (in red), but the "logic XOR" (in yellow) output works in a "bipolar" manner

I have to admit I'm a bit confused by this example you shared though? Sine to X, negative DC to Y, I get the clipped sine (red) as you do, but based on the manual pg 10 I would expect gate high (yellow) whenever red trace is greater than 0 (as below)? Instead it reminds me of the window comparator patch. (traces slightly offset for clarity)

image

BlackNoiseModular commented 3 months ago

Screenshot 2024-07-15 at 07 45 01

I took a photo to show the behavior of the "analog XOR" output and the "logic XOR" output. The green sine wave goes into the X input, and the blue DC voltage goes into the Y input. At the "analog XOR" output, the DC signal clips the sine wave (in red), but the "logic XOR" (in yellow) output works in a "bipolar" manner

I have to admit I'm a bit confused by this example you shared though? Sine to X, negative DC to Y, I get the clipped sine (red) as you do, but based on the manual pg 10 I would expect gate high (yellow) whenever red trace is greater than 0 (as below)? Instead it reminds me of the window comparator patch. (traces slightly offset for clarity)

image

I think the confusion arises because you're interpreting the gate output (yellow) as a comparator that switches high or low based on a threshold, whereas it should be seen as an XOR output, highlighting the difference between the two signals. In the example, the gate is LOW only when the sine wave equal the voltage as the negative DC. The width of this LOW state is influenced by the margin induced by the comparator's threshold.

BlackNoiseModular commented 3 months ago

@BlackNoiseModular - you might have already seen, but I have build-on-push set up here https://github.com/BlackNoiseModular/VCV/releases. If you add to the plugins folder your user folder in Rack you should be able to try it out as we go. I'm on M1 mac so use the BlackNoiseModular-2.0.0-mac-arm64.vcvplugin file (this gets auto-extracted on startup).

Still plenty to do for all modules, but it'd be good if you can take a look at the logic outputs and their gate equivelents of COSMOS, and tell me if that is what you expect? Lower hemisphere outputs are literal inverses of top hemisphere, and all gate outs should follow the truth table on pg 15 of the manual. Triggers should coincide with rising edge of all matching gate outputs.

image

Once you're happy with functional behaviour, I can implement oversampling etc. :)

I tried installing it on Win11 but it doesn't work; however, it works on my old Intel Mac. My old Mac is dying, but I'll use it to tests the modules.

hemmer commented 3 months ago

@BlackNoiseModular - you might have already seen, but I have build-on-push set up here https://github.com/BlackNoiseModular/VCV/releases. If you add to the plugins folder your user folder in Rack you should be able to try it out as we go. I'm on M1 mac so use the BlackNoiseModular-2.0.0-mac-arm64.vcvplugin file (this gets auto-extracted on startup). Still plenty to do for all modules, but it'd be good if you can take a look at the logic outputs and their gate equivelents of COSMOS, and tell me if that is what you expect? Lower hemisphere outputs are literal inverses of top hemisphere, and all gate outs should follow the truth table on pg 15 of the manual. Triggers should coincide with rising edge of all matching gate outputs. image Once you're happy with functional behaviour, I can implement oversampling etc. :)

I tried installing it on Win11 but it doesn't work; however, it works on my old Intel Mac. My old Mac is dying, but I'll use it to tests the modules.

I just checked on my VM and it works. If you find user folder (Help -> Open User folder) and put it in the plugins dir then it should extract on open. If not could you share the log.txt in the Rack2 user folder and I can diagnose?

Screenshot 2024-07-15 085412 Screenshot 2024-07-15 085547

BlackNoiseModular commented 3 months ago

I started testing the modules, and I noticed that for the Slew/LFO module, the curve knob is inverted.

hemmer commented 3 months ago

Screenshot 2024-07-15 at 07 45 01

I took a photo to show the behavior of the "analog XOR" output and the "logic XOR" output. The green sine wave goes into the X input, and the blue DC voltage goes into the Y input. At the "analog XOR" output, the DC signal clips the sine wave (in red), but the "logic XOR" (in yellow) output works in a "bipolar" manner

I have to admit I'm a bit confused by this example you shared though? Sine to X, negative DC to Y, I get the clipped sine (red) as you do, but based on the manual pg 10 I would expect gate high (yellow) whenever red trace is greater than 0 (as below)? Instead it reminds me of the window comparator patch. (traces slightly offset for clarity) image

I think the confusion arises because you're interpreting the gate output (yellow) as a comparator that switches high or low based on a threshold, whereas it should be seen as an XOR output, highlighting the difference between the two signals. In the example, the gate is LOW only when the sine wave equal the voltage as the negative DC. The width of this LOW state is influenced by the margin induced by the comparator's threshold.

Ah OK i will try to proceed on that understanding, will take a look tonight. Sorry it's probably a bit fustrating for you conveying behaviour over text. If it looks like it's too hard to work in this model, we can loan/ship the unit and I can probe with oscilloscope instead.

BlackNoiseModular commented 3 months ago

@BlackNoiseModular - you might have already seen, but I have build-on-push set up here https://github.com/BlackNoiseModular/VCV/releases. If you add to the plugins folder your user folder in Rack you should be able to try it out as we go. I'm on M1 mac so use the BlackNoiseModular-2.0.0-mac-arm64.vcvplugin file (this gets auto-extracted on startup). Still plenty to do for all modules, but it'd be good if you can take a look at the logic outputs and their gate equivelents of COSMOS, and tell me if that is what you expect? Lower hemisphere outputs are literal inverses of top hemisphere, and all gate outs should follow the truth table on pg 15 of the manual. Triggers should coincide with rising edge of all matching gate outputs. image Once you're happy with functional behaviour, I can implement oversampling etc. :)

I tried installing it on Win11 but it doesn't work; however, it works on my old Intel Mac. My old Mac is dying, but I'll use it to tests the modules.

I just checked on my VM and it works. If you find user folder (Help -> Open User folder) and put it in the plugins dir then it should extract on open. If not could you share the log.txt in the Rack2 user folder and I can diagnose?

Screenshot 2024-07-15 085412 Screenshot 2024-07-15 085547

I tried as you instructed, opening the file from VCV instead of directly from the folder, and now it works! ;)

BlackNoiseModular commented 3 months ago

No problem, I can send you the hardware modules. I think that will answer your questions more quickly and clearly than my explanations, haha. And if you don't want to keep them, you can return them once the modules are available on VCV. If that works for you, just give me an address, and I'll take care of the rest ;)

hemmer commented 3 months ago

Hardware version has arrived, and up and running testing / comparing 🎉

image

hemmer commented 3 months ago

Notes (just for my benefit):

image

image

hemmer commented 3 months ago

First pass at oversampling for various outputs, example is full rectifier. Lots of aliasing (especially with gates) at high frequencies, which is strongly mitigated with oversampling.

image

hemmer commented 3 months ago

Touch pad now outputs voltage (configurable from menu) that is proportional from how close to the centre of the pad you are.

hemmer commented 2 months ago

@BlackNoiseModular - I'm probably now reaching the point with COSMOS where it's worth you taking a look to see if you are happy. Still TODO are update to production graphics, and maybe tweaks/experimentation with the pressure pads. Same for GOMA II.

As for SlewLFO I'm still working on it, so if you want to wait until all ready for reivew then that's fine (note I have a couple of questions there, again no rush).