mhetrick / hetrickcv Goto Github PK
View Code? Open in Web Editor NEWVCV Rack Modules by Michael Hetrick
License: Creative Commons Zero v1.0 Universal
VCV Rack Modules by Michael Hetrick
License: Creative Commons Zero v1.0 Universal
resolved
Hi,
During compiling your plugin (Windows platform) against 0.6.0dev, they're a lot of warnings concerning deprecated functions in your source files:
These functions are:
randomf()
clampf (replaced by clamp).
See 258
(5th message below "0.5 API" header, Andrew discuss about clampi & clampf deprecated)
I don't know about randomf() function, however, my code doesn't use it.
Cheers.
Dominique
Crash occurs whenever adding module to Rack. Sometimes it's immediate, sometime it takes a while.
Intel Mac 10.15.7 (Catalina)
Not sure if this helps?!
log.txt
Fantastic modules. Thanks so much.
Please can we have a Linux release?
As mentioned in the forum, just putting it here so it doesn't get lost in the jumble
Gated Run input would be fine. Also a reset input so they can be reset and started by i.e. Clocked.
Just to add another Rotator patch idea to the Manual:
Selecting from pre-defined notes (like using Bogaudio REFTONE or Submarine SS-212) with a stepped LFO can generate nice (semi-random) tunes.
By the way, could you please change the STAGES knob range from 0-7 to the more meaningful 1-8?
Also would you please consider adding a TRIGGER input to the Rotator module?
It could allow feeding any kind of LFO CV to the ROTATE input but let output reshuffle only at the rising edge of the trigger. It'd be a true melody maker... :)
Best regards, Andras
../../include/engine.hpp:33:8: note: candidate expects 1 argument, 4 provided
src/LogicInvert.cpp: In member function ‘virtual void LogicInvert::step()’:
src/LogicInvert.cpp:80:5: error: ‘lights’ was not declared in this scope
lights[OUT1_LIGHT].value = outs[0];
^~~~~~
src/LogicInvert.cpp:80:5: note: suggested alternative: ‘LightIds’
lights[OUT1_LIGHT].value = outs[0];
^~~~~~
LightIds
src/LogicInvert.cpp: In constructor ‘LogicInvertWidget::LogicInvertWidget()’:
src/LogicInvert.cpp:126:14: error: ‘createLight’ was not declared in this scope
addChild(createLight<SmallLight>(Vec(74, 68), module, LogicInvert::OUT1_LIGHT));
^~~~~~~~~~~
src/LogicInvert.cpp:126:37: error: ‘RedLight’ was not declared in this scope
addChild(createLight<SmallLight>(Vec(74, 68), module, LogicInvert::OUT1_LIGHT));
^~~~~~~~
src/LogicInvert.cpp:126:37: note: suggested alternative: ‘glLighti’
addChild(createLight<SmallLight>(Vec(74, 68), module, LogicInvert::OUT1_LIGHT));
^~~~~~~~
glLighti
src/LogicInvert.cpp:126:37: error: template argument 1 is invalid
src/LogicInvert.cpp:126:82: warning: right operand of comma operator has no effect [-Wunused-value]
createLight<SmallLight>(Vec(74, 68), module, LogicInvert::OUT1_LIGHT));
^~~~~~~~~~
src/LogicInvert.cpp:127:37: error: type/value mismatch at argument 1 in template parameter list for ‘template struct rack::SmallLight’
addChild(createLight<SmallLight>(Vec(74, 113), module, LogicInvert::OUT2_LIGHT));
^~~~~~~~
src/LogicInvert.cpp:127:37: note: expected a type, got ‘RedLight’
src/LogicInvert.cpp:127:83: warning: right operand of comma operator has no effect [-Wunused-value]
reateLight<SmallLight>(Vec(74, 113), module, LogicInvert::OUT2_LIGHT));
^~~~~~~~~~
src/LogicInvert.cpp:128:37: error: type/value mismatch at argument 1 in template parameter list for ‘template struct rack::SmallLight’
addChild(createLight<SmallLight>(Vec(74, 158), module, LogicInvert::OUT3_LIGHT));
^~~~~~~~
src/LogicInvert.cpp:128:37: note: expected a type, got ‘RedLight’
src/LogicInvert.cpp:128:83: warning: right operand of comma operator has no effect [-Wunused-value]
reateLight<SmallLight>(Vec(74, 158), module, LogicInvert::OUT3_LIGHT));
^~~~~~~~~~
src/LogicInvert.cpp:129:37: error: type/value mismatch at argument 1 in template parameter list for ‘template struct rack::SmallLight’
addChild(createLight<SmallLight>(Vec(74, 203), module, LogicInvert::OUT4_LIGHT));
^~~~~~~~
src/LogicInvert.cpp:129:37: note: expected a type, got ‘RedLight’
src/LogicInvert.cpp:129:83: warning: right operand of comma operator has no effect [-Wunused-value]
reateLight<SmallLight>(Vec(74, 203), module, LogicInvert::OUT4_LIGHT));
^~~~~~~~~~
src/LogicInvert.cpp:130:37: error: type/value mismatch at argument 1 in template parameter list for ‘template struct rack::SmallLight’
addChild(createLight<SmallLight>(Vec(74, 248), module, LogicInvert::OUT5_LIGHT));
^~~~~~~~
src/LogicInvert.cpp:130:37: note: expected a type, got ‘RedLight’
src/LogicInvert.cpp:130:83: warning: right operand of comma operator has no effect [-Wunused-value]
reateLight<SmallLight>(Vec(74, 248), module, LogicInvert::OUT5_LIGHT));
^~~~~~~~~~
src/LogicInvert.cpp:131:37: error: type/value mismatch at argument 1 in template parameter list for ‘template struct rack::SmallLight’
addChild(createLight<SmallLight>(Vec(74, 293), module, LogicInvert::OUT6_LIGHT));
^~~~~~~~
src/LogicInvert.cpp:131:37: note: expected a type, got ‘RedLight’
src/LogicInvert.cpp:131:83: warning: right operand of comma operator has no effect [-Wunused-value]
reateLight<SmallLight>(Vec(74, 293), module, LogicInvert::OUT6_LIGHT));
^~~~~~~~~~
make: *** [../../compile.mk:55: build/src/LogicInvert.cpp.o] Error 1
Hi!
Just wanted to knew if you were planning to port your es5encoder from reaktor into VCV?
Tried to do it yesterday by starting from your DtoA module and observing the patches on reaktor but obvioulsly i don't know what i'm doing as i'm don't know a thing in c++ (i had some results but can't manage to get outputs 7 and 8 working and got some short burst on every outputs).
Thanks.
Best regards.
Hey, I just noticed the third and fourth outputs seem to be replicating the first two. Changing the '+' to a '-' on line 79 (outs4[vectorIndex] = insA[vectorIndex] + insB[vectorIndex];
) fixes this.
Adding this plugin through the Plugin Manager did not work for some reason.
I'm using Rack v0.5 on Arch Linux.
I was able to start using your modules by compiling manually.
I'm requesting something analogous to msp's wrap~, which is like a floating point modulo operation. It sets a min and max, and when the signal goes below the min, it "portals" to the max and vice versa. Like digital clip or arithmetic fold.
There are many cases where you want to limit the range of an CV (e.g. to a range of octaves) but the only available options are to clip or shrink it. These options can make a dynamic signal (e.g. random walk) . XTRTN has a Modulo module that does this, but the parameterization (range/offset) is odd and only offset is a modulation target.
I am requesting it of you in particular because it fits with the phasor concept and your waveshaper (which I have to tell you, is incredibly useful for reshaping a CV source) and the general "digital native" aesthetic.
params: min, max
diff := max-min
subroutine update():
next := getInput()
while (next>max) { next = next - diff }
while (next<min) { next = next + diff }
setOutput(next)
Probably this pseudocode is too simple and will snag somewhere, but I think it gets the point across.
(You might make a fold~ as well, though it seems like the pseudocode for that is more complex - I guess you just count the number of times through the while loop...)
Hello sir! Thanks for these modules. I followed your tutorials and was playing around with the phasor modules (It's a great concept) but I started feeling like the drums were going out of sync with the main melody. Turns out there might be a bug.
Steps to reproduce:
/2
outputVCV 2.4.1
HetrickCV 2.4.0
Hi Michael,
I think something may be up with your makefiles. In the HetrickCV one there is an additional forward slash
RACK_DIR ?= ../Rack/
include $(RACK_DIR)/plugin.mk
which results in ../Rack//plugin.mk
but even after fixing that the compiler still can't find plugin.mk (and can't find it in Non Linear Circuits either)
Steve@mac nonlinearcircuits % make -j4
Makefile:6: ../Rack/plugin.mk: No such file or directory
make: *** No rule to make target `../Rack/plugin.mk'. Stop.
I'm building lots of other v2 plugins successfully and do have plugin.mk in my Rack folder
hi Michael!
I was using AS's rework of your Shaper and got confused by its behaviour. In case he bungled it somehow I figured to try yours before deciding to be confused.
Specifically what is the function of the Range switch? It does not seem to simply effect the magnitude of the output (shaped) wave, viz:
In the +5/-5 position, everything works like common sense would predict.
In the +10/-10 position the Shape knob does not produce "needles" when fully CCW, rather it reduces the amplitude of the output waveform to zero.
(The CV Amount attenuvertor control has only the effect of the Shape knob, that is it functions the same way depending on the Range selected.)
So I've decided to be confused and ask for your help/explanation. Thanks!
alto777
I spent a little time last year whacking polyphony into some of these modules for my own use (naively, and where I could make sense of how--disclaimer: I am not a programmer!) I think it's an especially useful addition to Flip Pan, Boolean, and 2-to-4 in particular (each my go-to modules for what they do!), and I would love to see this implemented in the standard release.
Exponent and Contrast can get a little out of hand with CPU consumption with multiple voices, although I was able to keep this much more manageable by swapping out the powf()
and sinf()
functions, respectively, with much faster approximations I found around the internet:
// faster powf() approximation cribbed from martin.ankerl.com/2007/10/04/optimized-pow-approximation-for-java-and-c-c/
double fastPow(double a, double b) {
if (a == 0) {
return 0;
}
else {
union {
double d;
int x[2];
} u = { a };
u.x[1] = (int)(b * (u.x[1] - 1072632447) + 1072632447);
u.x[0] = 0;
return u.d;
}
}
//fast sine approximation pinched from gist.github.com/geraldyeo/988116
//1.27323954 = 4/pi
//0.405284735 =-4/(pi^2)
float fastSin(float x) {
float fsin = 0;
if (x < -3.14159265) x += 6.28318531;
else if (x > 3.14159265) x -= 6.28318531;
if (x < 0) {
fsin = 1.27323954 * x + 0.405284735 * x * x;
if (fsin < 0) fsin = .225 * (fsin *-fsin - fsin) + fsin;
else fsin = .225 * (fsin * fsin - fsin) + fsin;
}
else {
fsin = 1.27323954 * x - 0.405284735 * x * x;
if (fsin < 0) fsin = .225 * (fsin *-fsin - fsin) + fsin;
else fsin = .225 * (fsin * fsin - fsin) + fsin;
}
return fsin;
}
I suspect simd would perform better than the crude for (int c = 0; c < channels; c++)
approach I used to poly-fy these; I also kinda wanted to keep the original, legit operation available via an "HQ" menu option or something, but both were a little beyond my ken. Like I said, I'm a tinkerer at best...
For giggles, I hacked in optional A-law and mu-law compansion to the ADC and DAC modules. It's kinda fun, especially for off-the-wall applications like, say, using these to generate gate sequences from LFOs in which case they can produce a funky accelerating/decelerating behavior, bouncing ball effects, etc.; or mixing & matching normal and companded modes as a crude form of waveshaping. The relevant code is:
int sgn(float v) {
return (v > 0) - (v < 0);
}
const float mu = 255.0;
const float A = 87.6;
// Compression (pre A2D)
if (compMode == 1) {
float absx = std::abs(input);
if (absx < (1 / A)) input = std::abs((A * absx) / (1 + log(A))) * sgn(input);
else input = std::abs((1 + log(A * absx)) / (1 + log(A))) * sgn(input);
}
else if (compMode == 2) {
input = std::abs((log(1 + mu * std::abs(input))) / (log(mu + 1))) * sgn(input);
}
// Expansion (post D2A)
if (compMode == 1) {
float absy = std::abs(mainOutput);
if (absy < (1/(1 + log(A)))) mainOutput = std::abs((absy * (1 + log(A))) / A) * sgn(mainOutput);
else mainOutput = std::abs(std::exp(absy * (1 + log(A)) - 1) / A) * sgn(mainOutput);
}
else if (compMode == 2) {
mainOutput = std::abs((1 / mu) * (powf(1 + mu, std::abs(mainOutput)) - 1)) * sgn(mainOutput);
}
I also found it really useful to expand the range of the Scale parameter on these to +/-2x since so much of what makes these modules special involves wrangling tiny signals and differing polarities.
By all means feel free to poke around my (admittedly rather messy) fork for particulars.
Don't know if it is possible, but just asking : is there any rack version (compiled or manual make) that allows to use your compiled versions, or is the only way for testing to build them from source inside a current rack dev (self-)built ? (this is probably not the right place to ask, but don't want to flood the FB page with too many messages ...
Hi Michael,
Do you need any help upgrading your plugin to Rack v0.6
, which is going to be released in the very near future? The API is changing quite a bit, but is stable at this point. The Rack Plugin Repair Team was created to help make the transition easier for plugin developers by providing a GitHub Pull Request with the API required upgrades for v0.6
.
Let us know and thanks for making this awesome plugin!
Hello,
Default path for RACK_DIR should be ../..
rather than ../RackSDK/
, since default Rack sources base directory is Rack
(created by git clone ...
) and not RackSDK
.
By using ../..
, any Rack sources base directory name will work.
Best regards. ;)
Ubuntu 16.04
The error was:
g++ -Wsuggest-override -std=c++11 -fpermissive -DSLUG=HetrickCV -fPIC -I../../include -I../../dep/include -DVERSION=0.6.0 -MMD -MP -g -O3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-parameter -DARCH_LIN -c -o build/src/RandomGates.cpp.o src/RandomGates.cpp
src/RandomGates.cpp:70:5: error: reference to 'TriggerGenerator' is ambiguous
TriggerGenerator trigger[8];
^
In file included from src/HetrickCV.hpp:5:0,
from src/RandomGates.cpp:1:
src/HetrickUtilities.hpp:8:8: note: candidates are: struct TriggerGenerator
struct TriggerGenerator
^
Hello! I know you're going to release a compiled version, but I spent some time trying to compile and install. Feel free to tell me to "be patient and wait", but maybe this is an easy fix? Here are my notes from the compilation, anything obviously wrong here that you can see? I'm on OSX Sierra
Git checkout VCVRack source (HetrickCV uses several libraries as dependencies)
Git checkout VCVrack submodules
Git checkout HetrickCV, put it in the VCVrack source plugins directory
Install GCC if you haven't already, I'm using the XCode command line tools
Brew install dependencies:
brew install jansson
brew install glew
brew install glfw
cd HetrickCV: make all
Here's where I'm having trouble. I copy plugin.dylib
and the res
directory to ~/Documents/Rack/plugins/hetrickcv
However, it doesn't show up in Rack. I've tried reloading Rack, I've hit "refresh plugins", nothing. I've downloaded and successfully installed other compiled plugins.
hetrickcv/src/GateJunction.cpp
Line 95 in 415c7c3
there's a reset();
missing here
OX X 10.11.6
Rack 0.5dev
Hi Michael
A (rare!) problem with the current Mac build.
Nik
MBP:plugins nik$ rm -rf hetrickcv && git clone https://github.com/mhetrick/hetrickcv.git && cd hetrickcv && make && cd ..
Cloning into 'hetrickcv'...
remote: Counting objects: 349, done.
remote: Compressing objects: 100% (242/242), done.
remote: Total 349 (delta 217), reused 238 (delta 106), pack-reused 0
Receiving objects: 100% (349/349), 5.20 MiB | 4.60 MiB/s, done.
Resolving deltas: 100% (217/217), done.
c++ -fPIC -I../../include -I../../dep/include -MMD -g -O3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-parameter -DARCH_MAC -mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++ -c -o build/src/ASR.cpp.o src/ASR.cpp
c++ -fPIC -I../../include -I../../dep/include -MMD -g -O3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-parameter -DARCH_MAC -mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++ -c -o build/src/AToD.cpp.o src/AToD.cpp
c++ -fPIC -I../../include -I../../dep/include -MMD -g -O3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-parameter -DARCH_MAC -mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++ -c -o build/src/Bitshift.cpp.o src/Bitshift.cpp
src/Bitshift.cpp:55:34: error: call to 'abs' is ambiguous
else shiftedInput = intInput << std::abs(finalShift);
^~~~~~~~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:664:1: note: candidate function
abs(float __lcpp_x) _NOEXCEPT {return fabsf(__lcpp_x);}
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:668:1: note: candidate function
abs(double __lcpp_x) _NOEXCEPT {return fabs(__lcpp_x);}
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cmath:672:1: note: candidate function
abs(long double __lcpp_x) _NOEXCEPT {return fabsl(__lcpp_x);}
^
1 error generated.
make: *** [build/src/Bitshift.cpp.o] Error 1
Hi,
Just heard about the new Phasor modules today and I'm excited to try them out.
I notice that loading Phasor -> Waveforms immediately crashes VCV Rack 2.3.0 (default x86 build) on my M2 Macbook Pro running macOS 13.4.1. None of the other Phasor modules do this.
Not sure if this is an issue with the module or with VCV Rack but I thought I'd report it here. Let me know if I can provide any more information.
Here is the relevant portion of log.txt
:
[6.911 info src/network.cpp:150 requestJson] Requesting JSON GET https://api.vcvrack.com/modules
[6.921 info src/app/Browser.cpp:200 createPreview] Creating module widget HetrickCV Waveshaper
[6.921 info src/window/Svg.cpp:28 loadFile] Loaded SVG /Users/zz/Documents/Rack2/plugins/HetrickCV/res/Waveshape.svg
[12.200 info src/app/Browser.cpp:88 chooseModel] Creating module HetrickCV Phasor to Waveforms
[12.201 info src/app/Browser.cpp:92 chooseModel] Creating module widget HetrickCV Phasor to Waveforms
[15.009 info src/patch.cpp:211 saveAutosave] Saving autosave /Users/zz/Documents/Rack2/autosave/patch.json
[15.014 info src/settings.cpp:491 save] Saving settings /Users/zz/Documents/Rack2/settings.json
[21.823 fatal adapters/standalone.cpp:49 fatalSignalHandler] Fatal signal 6. Stack trace:
25: Rack(fatalSignalHandler(int)+27)
24: libsystem_platform.dylib(_sigtramp+29)
23: ???(0x0+0)
22: libsystem_c.dylib(abort+123)
21: libsystem_malloc.dylib(malloc_vreport+888)
20: libsystem_malloc.dylib(malloc_zone_error+183)
19: libsystem_malloc.dylib(nanov2_guard_corruption_detected+34)
18: libsystem_malloc.dylib(nanov2_allocate_outlined+385)
17: libsystem_malloc.dylib(nanov2_malloc_zero_on_alloc+534)
16: libc++abi.dylib(operator new(unsigned long)+26)
15: libc++.1.dylib(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::__init_copy_ctor_external(char const*, unsigned long)+59)
14: libRack.dylib(rack::system::join(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)+879)
13: libRack.dylib(rack::asset::system(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>)+24)
12: libRack.dylib(rack::app::RailWidget::step()+249)
11: libRack.dylib(rack::widget::Widget::step()+185)
10: libRack.dylib(rack::widget::Widget::step()+185)
9: libRack.dylib(rack::widget::Widget::step()+185)
8: libRack.dylib(rack::widget::Widget::step()+185)
7: libRack.dylib(rack::ui::ScrollWidget::step()+19)
6: libRack.dylib(rack::app::RackScrollWidget::step()+843)
5: libRack.dylib(rack::widget::Widget::step()+185)
4: libRack.dylib(rack::app::Scene::step()+494)
3: libRack.dylib(rack::window::Window::step()+1573)
2: libRack.dylib(rack::window::Window::run()+40)
1: Rack(main+4543)
0: dyld(start+1903)
I notice that after the crash if I click "Reopen" and then tell VCV that I do NOT want to start over, then VCV will start with the Phasor -> Waveforms module loaded. But then a crash happens again when I try to connect the Saw output of the VCV Fundamental LFO to the Phasor In of Phasor -> Waveforms.
Thanks!
doesn't break building, but throws errors.
lines 102 and 110
for (int i = 0; i < 10; i++)
should be
for (int i = 0; i < 8; i++)
Hello, thanks for your wonderful collection. I just switch to them and practice your tutorials. Especially ratcheting is my favorite composition help.
Now i wonder how to select Start and stop for a sequencer, better phrase , inside a longer sequence,say 32step.
As far as i understood, i need a delayed phasor with a Start pulse. Because phasor must change to move the sequencer forward. Or directly trigger a step. Is this correct?
How could i create a phasor to select a Start step and stop step inside the longer sequence?
Useful for playing small parts in different order or repeating.
Regards
Karl
PS: ratcheting has nothing to do with my question. Only a short info for you.
And i know that i could divide a sequence with step knob and repeat knob. But i want to dynamically change this. E.g. during playing recombinate short fragments of melodies.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.