Yep! Just send it a linear, unipolar ramp. This will go through the values sequentially. You can change the encoder mode to go through other counting types.
For this, I would recommend a secondary Accumulator module, which is essentially how the Erfurt functions in the Leibniz system. If you imagine the linear, ascending ramp from the previous step, Reset sets the ramp to 0.0f, while each gate received at the Clock input would increment the ramp by 1.0/255.0f;
Additionally, with the Erfurt, its input bus can change the increment amount. This, to me in my usage, ends up being maybe too complicated of a workflow since it pretty much ties up a Lipsk module if you want it to count by anything other than 1.
I think this should work perfectly:
Just set Step to 5.0/255.0 (the easy to remember 0.01960784313 ). If you want it to reset when the binary counter is full, set Trsh (Threshold) to 5.0 so that it pulses the Trig output when the HetrickCV ADC input is “full”. Then, plug the Trig output back into the ACC Reset input.
I’d been thinking that BASICally could be used for quantizing, so your suggestion spurred me to investigate it. Here’s what I have so far; while the UI leaves much to be desired, it is really flexible.
' IN1 is the input value.
' OUT1 is the quantized value.
' OUT2 is IN1 - OUT1.
' OUT3 is the absolute value of OUT2.
' NB: There is a very short (sub-millisecond) delay between when
' IN1 gets a new value and when OUT1/2/3 are updated.
' Which notes are selected is determined in the notes[] line below.
' Be sure to update notes_len with the number of entries in notes[]!
WHEN start()
' notes[] should only have values from 0 to 1.
' That's the c4-b4 octave.
notes[0] = { c4, c#4, d4, d#4, e4, f4, f#4, g4, g#4, a4, a#4, b4 }
' You MUST SET THIS to the length of notes[]!
notes_len = 12
' Setup lookup table.
' We sort notes[] first. Sort notes[] using Insertion Sort.
for i = 1 to notes_len - 1
x = notes[i]
j = i - 1
IF notes[j] > x THEN ' Makes already sorted array bit faster.
' A WHILE loop for a language that doesn't have one.
FOR while = 0 TO 1 STEP 0
IF j < 0 OR notes[j] <= x THEN
EXIT FOR
END IF
notes[j + 1] = notes[j]
j = j - 1
NEXT
notes[j + 1] = x
END IF
NEXT
' Now create an array of range end points.
' One wrinkle is that the input value will always be 0 <= x < 1.
end_range = 0
range_start = (notes[notes_len - 1] - 1 + notes[0]) / 2
if range_start < 0 THEN ' Need to add this to the end.
end_range = range_start + 1
end_value = notes[0] + 1
END IF
range[0] = 0
FOR i = 1 TO notes_len - 1
range[i] = (notes[i - 1] + notes[i]) / 2
value[i - 1] = notes[i - 1]
NEXT
range[notes_len] = (notes[0] + 1 + notes[notes_len - 1]) / 2
value[notes_len - 1] = notes[notes_len - 1]
IF end_range THEN
range[notes_len + 1] = 1
value[notes_len] = end_value
range_len = notes_len + 1
ELSE
range_len = notes_len
END IF
prev_in = -111 ' A value IN1 will likely not be on start.
END WHEN
ALSO
IF prev_in != IN1 THEN ' Must recompute.
' Need to preserve IN1, since might change while in FOR loop.
new_in = IN1
octave = floor(abs(new_in))
part = mod(abs(new_in), 1)
FOR k = 0 TO notes_len
if range[k] <= part AND range[k+1] > part THEN
' Found it!
prev_in = new_in
if new_in == 0 THEN
OUT1 = value[k] + octave
ELSE
OUT1 = (value[k] + octave) * sign(new_in)
END IF
OUT2 = new_in - OUT1
OUT3 = abs(OUT2)
EXIT FOR
END IF
NEXT
END IF
END ALSO
Note several somewhat unusual features:
You don’t need to use actual well-tempered notes. You could tweak the values as you wish, for example, let’s do a minor chord, but make that minor 3rd a little sharp.
notes[0] = { c4, eb4 + 0.03, g4}
You are not limited to a mere 12 notes. Agree with Harry Partch that there could be 43 notes per octave? Go for it!
They don’t have to be notes at all. You can just pick values for numbers you like. Quantize the inputs to things besides V/Oct.
notes[0] = { 0.1, 0.333, 0.7, 0.987}
And of course, it has the distance-from-input outputs that you suggested.
This has gotten me thinking about quantization a lot, so I expect that at some point there will be a couple presets in BASICally as a result of this suggestion. So thanks for that!
Comparing my results to those of other quantizers in VCV made me see that there are several ways to quantize; this one just moves to the numerically nearest available value.
I ran a little test couple of days ago, it seemed fine! One problem was that there’s no scaling to the output, so I had to use three Bogaudio scale modules to rise it up to usable numbers…I think it would be cool to have knobs on Basically for that reason. Of course, you can just connect some kind of sequencer ofr offset to the inputs or you can just write it into the code, but it would be a bit more convenient to have it on the panel, I think…
Another thing! I remember I had this idea about Euclidean quantizer. It acts like an euclidean sequencer, but it quantizes the voltage instead of, you know, producing the triggers or gates. I think Basically should be fine with this… But I don’t have time to think about it for now. SO I’ll push it to you if you feel interested in this experiment, haha.
Edit: took a look, but nothing really stood out. There is one of the Frozen Wasteland units that intrigued me though, Filling Station. Never seen that before and maybe that could be adapted to do what I’m thinking of.
I don’t want to be that guy that turns every post into some kind of self promotion, but anyway, I think that my Frozen Wasteland - Probably Note (Math Nerds) which lets you you use a lot of techniques including Euclidean Rhythms to generate scales might pique your interest
because the screenshot of the module didn’t load for me. Either way even though it may do some of what I want the description seems pretty opaque, will have to play with it to get an understanding of what it does.
I really appreciate self-promotion. And I think a lot of other users appreciate it too, cause who else than you guys knows everything about their modules. The only situation when it’s a bit… questionable (to me) is when the collection isn’t free. But otherwise I don’t think that self-promotion is a bad thing at all.
I think the only person here who would create an onlyfans account is me, haha. I really need money. Sadly I don’t think my content would be popular there…
I have no problem with self promotion per se, I just don’t like it when folks turn every thread into an excuse to inject themselves into the conversation
First one is pretty easy. It has 10 inputs and maybe three outputs, maybe more - your call really. So the first output is a number of wires connected into the input sockets – in volts (therefore there are 10 inputs), the second one is a number of “active” wires, i.e. wires that are not 0 (again, 1v = 1 “active” wire), and the third one outputs in volts the number of wires that are “moving” (the voltage is moving, of course), maybe there should be a “time window” selector. Like something that moved within 1 second till now… Yeah, so there could be more outputs, of course, like maybe average of anything connected to this module, where the denominator might be whatever you choose it to be: average of connected wires, average of “active” wires (that would be bumpy, but interesting. imagine when LFO goes to 0 and suddenly 10+0,1+0,1 becomes just 10 instead of 3,4) and so on. Maybe it is better to make it 4 outputs with program selectors for each of them… idk
I would really like a cracked VCO with all the modulation possibilities known to mankind in one module: phase modulation, AM, RM, both types of FM, PWM, both types of Sync, different digital and radio modulation/demodulation/coding/decoding thingies (there’re lots of them) and so on. I know most of them wouldn’t work well, but maybe some of them are an actual goldmine in terms of sound design when paired together with another obscure one! We don’t know, cause nobody actually tried it, I think…
Anyway, two ideas. One is sane, the other one is… not. Choose your fighter
Yeah, right! Before that I was actually thinking about different FM rules and propose this to someone. Like say every time the wave goes up it’s linear fm and when it goes down it’s exponential. But then I realized that there are like dozens of things that are still unexplored for different reasons (overlooked or maybe it’s just impossible in VCV. Or way harder than everything else)