Coder Social home page Coder Social logo

korfuri / whattherack Goto Github PK

View Code? Open in Web Editor NEW
37.0 5.0 2.0 503 KB

WhatTheRack randomizes your VCV Rack so you make new discoveries

License: Do What The F*ck You Want To Public License

Makefile 4.81% C++ 95.19%
vcvrack vcv-rack-modules vcv-rack-plugins

whattherack's Introduction

What The Rack

WhatTheRack is a plugin for VCV Rack. It contains three modules:

  • WhatTheRack, a rack randomizer
  • WhatTheMod, a module randomizer
  • WhatTheJack, a wire randomizer

WhatTheRack, a rack randomizer

The eponymous module has a single button. When you press the button, WhatTheRack will spawn 19 random modules plus an audio interface and a scope. If the option to "Randomize Parameters" is enabled in the context menu, the parameters of the spawned modules will be randomized.

The modules will include at least 2 VCOs, 2 LFOs, 2 VCAs, 1 sequencer, 1 clock, 3 effect modules, 2 filters, 2 envelopes, 1 mixer and 3 miscellaneous modules. This works by scanning for your installed plugins, and going through the registered module models' tags.

This is designed to get you started with a Rack that should always be able to make some music. It may not be intuitive how, but discovering new modules is part of the fun, and it can inspire you to create completely new patches you wouldn't have experienced otherwise.

How to use

Easiest way to get started:

  • Clear your patch (Ctrl+N)
  • Add WhatTheRack
  • Hit the ? button
  • Try to make music with what just appeared!
  • Want more modules? Click the ? button again. Or don't, and enjoy the challenge of working with what you got.

WhatTheMod, a module randomizer

This module is similar to WhatTheRack, but it will spawn a single module of a type of your choice (VCO, LFO, VCA, Sequencer, Clock, Effect, Filter, Envelope generator, Mixer or Misc). Like WhatTheRack, enabling the "Randomize Parameters" option in the context menu will randomize the parameters of the spawned module.

This is designed to help you get out of your routine - need a clock? Why not use one you've never tried! Need a VCO and not sure which one? Let fortune decide. I find it's more enjoyable if I actually commit to using the modules it gives me instead of rolling again when I don't immediately like what I got, but rerolling is always an option.

WhatTheJack, a wire randomizer

WhatTheJack has a single button. When you press the button, a new wire will be created at random. Any output from any module may be used, and any free input from any module may also be used. If no input is available, no wire is created.

This module is a work in progress. It tends to be a bit too random to really stimulare creativity - patching cables completely at random doesn't generally give you a very useful modulation or audio path. Ideas on how to make this more fun to use are welcome, please file Github issues or contact me directly!

Is this serious?

Kinda. It started as a joke: VCV Rack is missing an essential part of modular synthesis, that is, puzzling over someone else's rack. Why the hell do you have 5 sample and holds and a single VCO? What were you doing to set that sequencer to 13/32 time signature? How do you even use this to make more than white noise? What The Rack recreates this wonderful experience.

But as I developed it, it actually made me realize a few things about how I use VCV Rack. I have a ton of installed modules I never used, because I downloaded the plugin for a single module and ignored everything else. I tend to always use certain chains of modules (this clock, these sequencers, these oscillators, this filter, etc.) and ignore the rest. Using the module gave me some new and fun challenges: what can I do with these modules and only these modules? How can I use this random selection of stuff to make good-sounding beats? This brought me back to my first experience of modular synthesis, where I had no idea what was going on, and it was great.

How you use it is up to you. I'm not 100% sure it can't crash your Rack - the APIs don't really encourage doing this. But Andrew Belt allowed this plugin on the plugin store, so it can't be all that bad. Have fun.

Contributing

I welcome Issues and Pull Requests to this repository if you have suggestions for improvement. Note that I generally won't change a module significantly after it's been released (i.e. after I've tagged a version in the repo), so if your idea involves changing the semantics of an existing module, please chat me up first.

This plugin is released under the WTF Public License.

whattherack's People

Contributors

alefnull avatar falktx avatar korfuri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

whattherack's Issues

V2 please! (fixes here make it build but crash).

It would be nice to have a Rack v2 branch of this. It currently doesn't build for several reasons (on Windows):

ALSO, IT CRASHES RACK 2 AS SOON AS YOU TRY TO ADD MODULES/WIRES SO YOU CAN IGNORE EVERYTHING AFTER THIS.

TLDR:
Basically, this builds with Rack v2 and the current version doesn't. It would be great if you just made a new branch.

  1. In WhatTheRackModule.cpp, WhatTheJack.cpp, and CallbackButton.hpp it should be #include "window/Window.hpp" instead of #include "window.hpp".

src/WhatTheJack.cpp:33:36: error: 'INPUT' is not a member of 'rack::app::PortWidget'
   33 |         if (p->type == PortWidget::INPUT) {
      |                                    ^~~~~
src/WhatTheJack.cpp: In member function 'void WhatTheJack::spawnWire()':
src/WhatTheJack.cpp:61:8: error: 'struct rack::app::CableWidget' has no member named 'setOutput'; did you mean 'getOutputPos'?
   61 |     w->setOutput(outputs[oidx]);
      |        ^~~~~~~~~
      |        getOutputPos
src/WhatTheJack.cpp:62:8: error: 'struct rack::app::CableWidget' has no member named 'setInput'; did you mean 'getInputPos'?
   62 |     w->setInput(inputs[iidx]);
      |        ^~~~~~~~
      |        getInputPos
make: *** [C:\msys64\home\Nolan\Rack-SDK/compile.mk:70: build/src/WhatTheJack.cpp.o] Error 1

Changing

w->setOutput(outputs[oidx]);
    w->setInput(inputs[iidx]);

to

w->outputPort = outputs[oidx];
w->inputPort = inputs[iidx];

seemed to fix this.

src/WhatTheJack.cpp:33:36: error: 'INPUT' is not a member of 'rack::app::PortWidget'
   33 |         if (p->type == PortWidget::INPUT) {
      |                                    ^~~~~

which can be solved by changing PortWidget::INPUT to engine::Port::INPUT.

src/WhatTheRackModule.cpp:61:25: error: 'struct rack::plugin::Model' has no member named 'tags'; did you mean 'tagIds'?
   61 |         for (int t : m->tags) {
      |                         ^~~~
      |                         tagIds
src/WhatTheRackModule.cpp:71:25: error: 'struct rack::plugin::Model' has no member named 'tags'; did you mean 'tagIds'?
   71 |         for (int t : m->tags) {
      |                         ^~~~
      |                         tagIds

which can be fixed by doing what it suggests (changing tags to tagIds

src/WhatTheRackModule.cpp:15:57: error: no matching function for call to 'rack::plugin::Model::createModuleWidget()'
   15 |   ModuleWidget *moduleWidget = model->createModuleWidget();
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from C:\msys64\home\Nolan\Rack-SDK/include/helpers.hpp:2,
                 from C:\msys64\home\Nolan\Rack-SDK/include/rack.hpp:21,
                 from src/WhatTheRack.hpp:1,
                 from src/WhatTheRackModule.cpp:1:
C:\msys64\home\Nolan\Rack-SDK/include/plugin/Model.hpp:67:36: note: candidate: 'virtual rack::app::ModuleWidget* rack::plugin::Model::createModuleWidget(rack::engine::Module*)'
   67 |         virtual app::ModuleWidget* createModuleWidget(engine::Module* m) {
      |                                    ^~~~~~~~~~~~~~~~~~
C:\msys64\home\Nolan\Rack-SDK/include/plugin/Model.hpp:67:36: note:   candidate expects 1 argument, 0 provided

This can be fixed by changing model->createModuleWidget() to model->createModuleWidget(NULL)

Also, the version number needs to be changed to 2.x.x

That was more problems than I expected... I had to keep editing everything.

[Feature] Idea to make WhatTheJack more useable

My idea to make WhatTheJack more usable would be to add two things.

  1. A grammar of the jack/submod types (It may already have this) and assigning types to all of the jacks in any mod. The more properties you can have in the grammar about the submods' functions, the more useful.
  1. A script or whatever to compile the wiring patterns from uploaded patches* into an xml or whatever. (* To the extent you can get that data. Using the grammar, they could be from any system, not only VCV.)

  2. A script that uses any number of ML algorithms on the data to create a predictive model of wiring patterns. (I looked up ones for autocomplete and they looked in the neighborhood. It takes all the Ins and Outs in any given rack and generates a weight table of probability.)

Then for whatever modules are on the rack, the jack placement would be weighted according to the likelihood a connection of A type jacks into a connection of B type as used in actual patches. Then you could have a knob where 0 is precisely the most likely, and 1 is what you have now (completely randomized), so you could get the level of randomness you want. If there's not enough data, then I think you'll want to generalize the grammar more; so it could make a model where roughly submods of type-A generally more often jack into submods of type-B, and add that to the weighting.

ask for feature: a way to add a single completely random module

Hi,
first of all, thanks for the WTR modules! I really enjoy the power of randomness and your modules help harnessing it. There is one feature that I think they are missing: the possibility to add just one module without having to choose a category.
Using WhatTheRack creates too many modules for my poor, old computer, while WhatTheMod forces you to choose a category. I think that the best way would be adding a "?" button to WhatTheMod, picking from the whole module set.

Thanks!

Thanks for this plugin !

Just a comment to say "Thank you!" for these excellent modules. You're right, they bring back the fun factor like when I first started using Rack. And yes, I tend to use a well-defined workflow, so every now & then it's a good idea to get out of that flow. Your modules make it easy to do that, I find them very provocative for the creative mind.

Best regards,

Dave Phillips

Randomness not so random.

I love the idea of loosing some control while choosing your modules ... however I don't want to fill my rack with bunches of modules each time so I'm mostly interested in the "What The Mod" module.

Unfortunately after testing for just a very short period I found out that it is not random at all.

The following steps will show exactly what I mean:

  • Start new instance of VCV Rack
  • Add "What The Mod"
  • Click 5 times on "VCO"
  • Note the modules you get and in what order.
  • Reset your rack and relaunch VCV Rack
  • Add "What The Mod"
  • Click 5 times on "VCO"
  • Notice exactly the same modules in the same order.

It seems that the lists are randomized the same way each time instead of being seeded with a more random seed like the current time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.