Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Kurzweil V.A.S.T. inspired) FUN Equations. #868

Closed
Kwurqx opened this issue May 7, 2019 · 9 comments
Closed

(Kurzweil V.A.S.T. inspired) FUN Equations. #868

Kwurqx opened this issue May 7, 2019 · 9 comments
Labels
Feature Request New feature request Modulation Modulation related issues

Comments

@Kwurqx
Copy link

Kwurqx commented May 7, 2019

This is a feature request

(Kurzweil V.A.S.T. inspired) FUN Equations.

Describe the solution you'd like

Text below cited from:
http://users.skynet.be/aemit/kurz/funintro.html

What are FUNs?
FUNs are basically mathematical functions performed on one or two inputs (controllers, ENVs, LFOs etc) The output of these functions can be assigned to VAST paramaters just like any other controller.

Two things you must know:

All FUNs output values in the range -1 to +1. Controller inputs are converted to this range so while Modwheel goes from 0 to 127, as an input to a FUN it is converted to 0 to +1. Pitchwheel gives values -1 to +1.
Which brings us to the second vital bit of info. Controllers can be unipolar, i.e. only have positive values (like Modwheel) or bipolar, i.e. have positive and negative values (like Pitchwheel, some LFOs, ENVs).
It is important you understand these terms.

Some of the FUNs are very simple, others can be quite mystifying. These tutorials aim to shed some light on the FUNs. Those new to the K2000/2500/vx need not be intimidated. You can follow the text and play the programs as you go.

FUNs allow you to do a lot that you cannot do with simple controllers. They are in my opinion the most unique feature of the VAST system. The manual has a good section on FUNs. You should at least read the introduction to that chapter. As we go through the FUNs you should read the manual entries for them.

I am no expert on this stuff. I wrote this series of tutorials as a means of learning more about the FUNs myself. There will be many applications of FUNs which I have not touched on here, but I hope this gets you started.

And some "examples" (the names are just specific example KRZ programs, not relevant in this context)

FUNTUTE1 : simple additions and division
a+b, a-b, a/2+b, (a+b)/2, a/4 + b/2, (a+2b)/3, b/(1-a)
FUNTUTE2 : adds depth control to Src1, exponential controllers
ab, -ab, a*10^b
FUNTUTE3 : controlled chaos and stepped controllers
Sample B On A, Sample B On ~A, Quantize B To A
FUNTUTE4 : limiting output ranges
|a+b|, |a-b|, min(a,b), max(a,b)
FUNTUTE5 : simple switches
a AND b, a OR b, Track b While a, Track b While ~a
FUNTUTE6 : vary response times
lowpass (f=a,b), hipass (f=a,b)
FUNTUTE7 : Extra LFOs and how to modify their shapes
ramp(various types), sin(a+b), cos(a+b), tri(a+b), warp1(a,b) warp2(a,b), warp3(a,b)
FUNTUTE8 : a simple way to limit and weight control output
diode (a-b), diode (a-b +.5), diode (a-b +.25)
FUNTUTE9 : feedback equations which give unusual results
a(b-y), a(y+b), ay + b, (a+1)y +b, y +a(y+b), a |y| +b
FUNTUTE10 : making a curved response, fixing discontinuous signals, making discontinuous signals
(a+b)^2, warp4(a,b), warp8(a,b)

Describe alternatives you've considered
There aren't really any alternatives...except for using Kurzweil V.A.S.T. engine based synths.

Additional context
These mathematical calculations and/or complex or logical functions open up a world of modulation and intermodulation options. I don't know of (m)any synths that offer this. Apart from Kurzweil V.A.S.T engine based synths...

@bit-101010
Copy link

So in general FUNs are ways to combine modulations beyond addition.

A couple immediate thoughts: Arturia's Pigments has a pretty slick implementation of something similar (the "combinate" section)

Multiplying a macro control by a mod source could be a way to solve issue #857, as this would allow an automateable modulation depth.

Seems like an interesting concept, and a good implementation of this could tackle some other issues and really expand the power of Surge.

@Kwurqx
Copy link
Author

Kwurqx commented May 7, 2019 via email

@baconpaul
Copy link
Collaborator

So I like this class of idea a lot. Here's a natural way you could do it in surge too.

Right now the modulation architecture is you take (n) modulation sources and apply them to a target with each having a weight w_i. So val = val0 + sum( w_i * val(m_i) ) type thing. You can actually see the code that does this around like 380 of SurgeVoice.cpp

   vector<ModulationRouting>::iterator iter;
   iter = scene->modulation_voice.begin();
   while (iter != scene->modulation_voice.end())
   {
      int src_id = iter->source_id;
      int dst_id = iter->destination_id;
      float depth = iter->depth;
      if (modsources[src_id])
         localcopy[dst_id].f += depth * modsources[src_id]->output;
      iter++;
   }

Clear.

So here's one thing we could do which is not full arbitrary routing but which could solve a lot of problems. On a per-slider basis introduce a "formula". So that is when you RMB on a slider you have an "edit formula" display which shows you something like

[non-editable]
num_mods = 2
base = 0.723
m[0] = lfo_2
m[1] = key track
w[0] = 0.03
w[1] = 0.7
[editable]
output = base + m[0] * w[0] + m[1] * w[1]

Cool. Now we make it so you can edit that editable section. So you just pop up the editor and do

output = base + base * base * m[0] * m[1]

or whatever you want.

Make a little micro-language for modulation processing. It would have + - * / but would also have (probably) pow2 log2 exp log

This isn't a full arbitrary modulation architecture and it doesn't let you rewire the block diagram. For that probably use the surge-rack modules in vcvrack once I have them (a) done and (b) polyphonic. But it seems like an idea like this is something we could do in surge 1.6.1.

Thoughts?

@Kwurqx
Copy link
Author

Kwurqx commented May 8, 2019 via email

@Kwurqx
Copy link
Author

Kwurqx commented May 8, 2019 via email

@gminorcoles
Copy link

VAST-like architecture in open source would change the balance of power in synthesis that would be amazing. We should start like an institute

@baconpaul baconpaul added the Feature Request New feature request label Jun 19, 2019
@baconpaul baconpaul added this to the 1.7 or later milestone Jun 19, 2019
@baconpaul baconpaul modified the milestones: 1.7 or later, Currently Unscheduled Oct 4, 2019
@mkruselj mkruselj added the Modulation Modulation related issues label Feb 5, 2020
@mkruselj mkruselj mentioned this issue Jun 6, 2020
11 tasks
@mkruselj
Copy link
Collaborator

mkruselj commented Jun 18, 2020

Like really, implementing the formula LFO mode will totally nail this feature request, and then some! We can go quite beyond VAST FUNs because we would have up to 5 arguments to play with instead of 3 (FUNs have source A, source B, and constant).

So, closing this issue as a slightly more formulated (sic!) version of it is #2048. It will really make a bunch of things similar to Kurzweil's FUNs possible.

@mkruselj mkruselj removed this from the Currently Unscheduled milestone Oct 27, 2020
@matkatmusic
Copy link

Hi there. I still have the source code to VisualFUN if anyone wants to see the FUNs code, as well as all of the other Modulation Source code. I was searching for 'Cunka VisualFUN" and this github issue popped up.

@baconpaul
Copy link
Collaborator

Is that code open source compatible licensed? If so I would very much like to see it yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature request Modulation Modulation related issues
Projects
None yet
Development

No branches or pull requests

6 participants