Comments (6)
Looks like the BPM voltage is this:
Voltage | BPM |
---|---|
-2 | 30 |
-1 | 60 |
0 | 120 |
1 | 240 |
~1.322 | 300 |
So ... for x
from -2 to 1 Volts:
y = 2^(x + 2) * 30
BPM -->y/30 = 2^(x + 2)
-->log2(y/30) = x + 2
-->x = log2(y/30) - 2
This checks out:
lfe> (- (math:log2 (/ 300 30)) 2)
1.3219280948873622
from undermidi.
Using 4 MIDI CC inputs to generate BPM voltages (the more, the smoother it is between higher BPMs) ...
cc val (0,1,2,3) | volts | bpm |
---|---|---|
0,0,0,0 | -2 | 30 |
127,0,0,0 | -1.177 | 53 |
127,127,0,0 | -0.344 | 95 |
127,127,127,0 | 0.489 | 168 |
127,127,127,127 | 1.321 | 30 |
Screenshot of used modules:
In the above, the offset modules are set to the following:
- offset: -2V
- scale: 0.3315
- order of operations: scale then offset
and then for the umix module:
- input gain: -12 db
- hard output clipping
from undermidi.
Looks like I found a better solution:
the exponent module configured with:
- shape: -5
- shape depth: 1
- input voltage range: 10
offset module:
- offset: -2
- scale: 0.33655
This setup gives the following spread:
cc val | bpm |
---|---|
0 | 30 |
32 | 97 |
64 | 157 |
92 | 228 |
128 | 300 |
The differences between those:
lfe> (- 97 30)
67
lfe> (- 157 97)
60
lfe> (- 228 157)
71
lfe> (- 300 228)
72
That's as close as I could get to linear 😉
This experiment was accomplished with the following setup:
from undermidi.
The one downside of that last approach was that, as the 300 BPM mark is approached, resolution is lost and things get pretty jumpy. In fact, long before the 300 BPM mark.
Good new/bad news:
- VCV Rack now supports 14-bit MIDI
- This is a cumbersome approach and it's too smooth as the BPM count grows higher ...
It requires a couple of right-click changes to the MIDI CC - CV module:
(uncheck "Smooth" and check "14-bit ...")
With that change, the following was able to generate a perfectly smooth, continuous BPM ramp, from 30 to 300, no BPMs left behind:
lfe> (list-comp ((<- x (lists:seq 0 127)) (<- y (lists:seq 0 127 5)))
(um:bank-select x y 0) (timer:sleep 250))
I suspect what I'll end up doing is generating a list of BPM/bank select tuples ...
from undermidi.
That's basically an LFO ramp: raw input (once the bank select calls are received by VCV Rack) is from 0 to 10V. VCV Rack crashes if I don't put a sleep between calls, but I was able to bring it down to a 100 millisecond wait instead of 250. With the 5-step jumps in y
, this is incrementing 0.003 Volts every 100 ms, so that works out to about 5.5 minutes to do the whole ramp.
from undermidi.
Not quite there, but close:
lfe> (set msbs-lsbs (list-comp ((<- msb (lists:seq 0 127)) (<- lsb (lists:seq 0 127 5))) (list msb lsb)))
lfe> (set select-voltages (list-comp ((<- y (lists:seq 30 300))) (* 3.010299956639812 (math:log2 (/ y 30)))))
lfe> (set ordered (lists:foldl (lambda (x acc)
(lists:append acc `(#(,(+ 0.003 (element 1 (lists:last acc))) ,x))))
'(#(0 (0 0)))
msbs-lsbs))
lfe> (set indexed (maps:from_list ordered))
lfe> (set keys (maps:keys indexed))
lfe> (defun closest (x) (lutil-math:get-closest (lists:nth x select-voltages) keys))
lfe> (set select-msbs-lsbs (list-comp ((<- i (lists:seq 1 (length select-voltages))))
(mref indexed (closest i))))
lfe> (list-comp ((<- msb-lsb select-msbs-lsbs)) (um:bank-select msb-lsb 0) (timer:sleep 500))
(defun bpm (bpm)
(um:bank-select (lists:nth (- bpm 29) select-msbs-lsbs) 0))
from undermidi.
Related Issues (20)
- beatracker: Create an API for dynamically adding children to the supervision tree
- beatracker: Provide the ability to start and stop music playback
- beatracker: Provide the ability to start and pause playback of individual music phrases
- beatracker: Create an API for dynamically adding musical phrases
- beatracker: Provide a mechanism for listing all beatracker phrases
- beatracker: Provide a means of removing phrases from beatracker
- beatracker: Provide the ability for users to export beatracker sessions as MIDI files
- Allow users to easily provide custom scales
- Example command no longer works HOT 1
- Document minimal setup for Mac users HOT 1
- Document minimal setup for Linux users HOT 1
- Add macros/aliases for Korg KRONOS banks
- `make build` error HOT 2
- Add VCV modular synth support HOT 3
- Create new gen_servers in support of external MIDI clocks HOT 2
- Support external clock-based orchestration
- Add support for exporting external clock beats/tracks data
- Move template->pitches functionality to undertheory HOT 1
- Update project to use new dep: erlcmd-server HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from undermidi.