Freq to V/Oct

Request a new device/modular module, and hope that some enterprising developer grants your wish!

Moderators: valis, garyb

User avatar
Spindrift
Posts: 100
Joined: Mon May 18, 2020 1:04 am

Freq to V/Oct

Post by Spindrift »

To make modular understand frequency from external systems and vice versa.
It is possible for scope to communicate pitch with external systems using Silent Way since one can map the data as needed through a configuration file. However using Bitwigs HW CV Instrument is not possible, and SilentWay cannot automatically tune either since the control scheme doesn't follow any known standard. IMO it is the main obstacle from integrating scope modular in a seamless way with pretty much any external system.

Would it be possible to make 'Freq to V/Oct' and 'V/Oct to Freq' modules which applies the same mapping as Silent Way does so one can interface directly between scope modules and sequencer/eurorack?
As a programmer, but somewhat ignorant about how the SDK works and DSP in general, it would seems like a fairly trivial thing to solve using regular programming. However using DSP atoms only is another matter. But if it is possible it would be a fantastic addition to scope!
User avatar
Peter Drake
Posts: 214
Joined: Thu Nov 08, 2018 12:27 pm
Location: Outer Milky Way

Re: Freq to V/Oct

Post by Peter Drake »

Great question. Talk to Mehdi at SpaceF. I have related needs and can contribute ideas, testing, and money in this direction.
dawman
Posts: 14368
Joined: Sun Jul 24, 2005 4:00 pm
Location: PROJECT WINDOW

Re: Freq to V/Oct

Post by dawman »

That’s a dream I’d love to see too.
I quit using SilentWay because it only worked internally and nobody was really building modules or devices to take advantage of that.

There’s so many converters now with DC Coupled outputs or modifications to existing units.
A Mutec Clock and a Black Lion modded ADA8200 is an impressive combo.

A16U is also very worthy still.
User avatar
Spindrift
Posts: 100
Joined: Mon May 18, 2020 1:04 am

Re: Freq to V/Oct

Post by Spindrift »

I'd also chip in if I can in any way if it seems doable.

@dawman Are you using one of those solutions? I was pondering it, but I figured ideally you don't only want DC-coupling but modular level signals as well. Otherwise you need to have an interface to interface with the interface to pad/boost signals, so Expert Sleepers ES3+ES6 seemed well worth the money.
acidrecords
Posts: 11
Joined: Tue Sep 27, 2005 4:00 pm

Re: Freq to V/Oct

Post by acidrecords »

UP! +1
User avatar
Spielraum
Posts: 696
Joined: Fri Apr 18, 2014 1:11 pm
Location: Raumschiff Erde

Post by Spielraum »

.
Last edited by Spielraum on Mon Dec 13, 2021 12:22 pm, edited 2 times in total.
|̲̅̅●̲̅̅|̲̅̅=̲̅̅|̲̅̅●̲̅̅] Lange Welle ~ Mittelwelle ~ Kurze Welle ~ Ultra Kurze Welle
Scope Sandbox soundcloud ~ youtube ~ bc modular-guide° ~ modules-SR
User avatar
Spindrift
Posts: 100
Joined: Mon May 18, 2020 1:04 am

Re: Freq to V/Oct

Post by Spindrift »

Sure, it would be nice with CD-coupled outputs on Xite, but you still have the same problem of communicating pitch between rack and scope since scope doesn't use V/Oct but some other format. And in the end it will be an ES-3/ES-6 but with XTDM instead of ADAT connection.

So we would still need those converter modules!
jksuperstar
Posts: 1638
Joined: Mon Nov 15, 2010 12:57 pm

Re: Freq to V/Oct

Post by jksuperstar »

If anyone can get the modules and spec for using the XITE expansion port, I'll design an FPGA it can talk to, and translate out to DACs.
User avatar
spacef
Posts: 3234
Joined: Sun Jun 17, 2001 4:00 pm
Contact:

Re: Freq to V/Oct

Post by spacef »

https://www.ferrofish.com/product/pulse16-dx-cv/
hard to beat the price/number of i/o found in expert sleepers converters though...
plug-ins for scope
SpaceF website
SC website
dawman
Posts: 14368
Joined: Sun Jul 24, 2005 4:00 pm
Location: PROJECT WINDOW

Re: Freq to V/Oct

Post by dawman »

jksuperstar wrote: Mon Jan 18, 2021 10:05 pm If anyone can get the modules and spec for using the XITE expansion port, I'll design an FPGA it can talk to, and translate out to DACs.
Awesome to hear.
My Organ module is FPGA based. Xilinx IIRC.
So many tweaks for the wooden Leslie cabinet, horn freq, crossover, tube overdrive, etc.
My war fatigues before I hear every option.

Bring it on.
dawman
Posts: 14368
Joined: Sun Jul 24, 2005 4:00 pm
Location: PROJECT WINDOW

Re: Freq to V/Oct

Post by dawman »

spacef wrote: Wed Jan 20, 2021 3:10 am https://www.ferrofish.com/product/pulse16-dx-cv/
hard to beat the price/number of i/o found in expert sleepers converters though...

Pulse is definitely on my radar.

I’ll get tired of gigging someday and bury myself in a synth man cave full of select hardware modules..
User avatar
Spindrift
Posts: 100
Joined: Mon May 18, 2020 1:04 am

Re: Freq to V/Oct

Post by Spindrift »

Still bumping in to this issue all the time, and they way I work with my current setup nowadays I have ended up using Scope much less because of it.

If I want to include Scope oscillators in a patch I have to start the with a Silent Way Voice Controller, and can only use scope oscillators in that patch (or make cumbersome workarounds with multiple tracks and sidechained signals).
If I start with a Bitwig Hardware CV device instead I'm free to use any of the oscillators in The Grid and in my Eurorack.

Since it is so easy to create patches with the system otherwise, pretty much every sound I use is from modular, and just use synths for the occasional polyphonic pad. And path of least resistance is to start with Hardware CV device and then I can mix and match modules between my systems freely...apart from the oscillators in scope which then tends to be unused, which of course means I use less of the other modules as well, which is really a shame because I do really like the sound I can get out of them...but not enough to take the extra effort to include them except in exceptional cases.

Those familiar with the SDK, how difficult do you think it would be to create a module to do the conversion?
Tried to read up on the SDK but haven't been able to get an idea how doable it is, and while I would be willing to spend what the SDK costs for a solution, I'm not wanting to spend both money and a lot of time diving in to the SDK right now in the hopes of maybe being able to solve the problem:(
jksuperstar
Posts: 1638
Joined: Mon Nov 15, 2010 12:57 pm

Re: Freq to V/Oct

Post by jksuperstar »

My FPGA/DAC offer still stands if anyone can figure out how to send signals through that connector.
User avatar
Spindrift
Posts: 100
Joined: Mon May 18, 2020 1:04 am

Re: Freq to V/Oct

Post by Spindrift »

Just to be clear that what I'm asking in this topic has nothing to do with outputs. I use Expert Sleepers to send CV to my Eurorack modules. That is working great and no converter modules needed (unless I would like to generate pitch CV from Scope of course).

The problem is that DAWs cannot directly send pitch CV to Scope over internal ASIO connections. Getting CV outs directly on the Xite would be cool, but is a completely different topic.
User avatar
spacef
Posts: 3234
Joined: Sun Jun 17, 2001 4:00 pm
Contact:

Re: Freq to V/Oct

Post by spacef »

I don't understand the question, but may be your problem is because because Audio is not CV and ASIO is not 100% CV compatible. It has some advantages though, because those "CV recorded as audio" they can be muted, cut & pasted etc. However, they will not behave 100% like CV.

But I can record KrOn as audio tracks or samples, and play it back in DAW or in Kontakt (and get much less functionalities than with KrOn lol, mainly because Kontakt does not have bipolar amp modulations, which makes it difficult to use CV samples). Thats' why I abandonned my "Kontakt KrOn" for the moment, and went back to Scope KrOn which is much much more easy to work with, much more powerful in many aspects... not even speaking of the number of outputs of Kontakt vs Scope).

But in my case, I can send Pich CV from DAW (audio tracks) or Kontakt, through ASIO, to control Scope synths. No problem at all. You just need to record audio tracks of your CV and play them back at +0dB gain.

For the rest of your question, I don"t know. In my opinion, It's better not to battle with software, if they can't do something easily, you need to find another way. I can't help because i don't get what you want to do especially if it has nothing to do with scope.
plug-ins for scope
SpaceF website
SC website
User avatar
Spindrift
Posts: 100
Joined: Mon May 18, 2020 1:04 am

Re: Freq to V/Oct

Post by Spindrift »

I really appreciate your input on this, but cannot understand why the issue is not really obvious for anyone using CV to control Scope.

The values used by scope isn't at all corresponding to a linear 1V/oct (or 0.8V/oct or whatever value). This is what for example my Eurorack expects and what Bitwig oscillators expect.
Both Ableton and Bitwig has built in voice controllers that can send pitch, but they can either be set to tilt the response manually, or will send a rising CV to the osc and listen to the pitch, and adjust the curve accordingly.
It is impossible AFAIK to use those voice controllers to send pitch to Scope.

Silent Way can map according to a txt file to map any cv value to any actual value, so with the right mapping it can send pitch CV to Scope.

You say you send pitch from audio tracks? Question is how you generate the pitch? If it is generated in Scope of course you can record and send it back. But if I want to enter notes in DAW or use Grid to generate pitch CV it is a no-go right now without a lot of added complexity.

I also avoid battling with software and focusing on what it cannot do, and use it's strengths instead. But it really saddens me that my Xite is used so much less because there is no way in scope to accept a linear CV signal as pitch.
User avatar
spacef
Posts: 3234
Joined: Sun Jun 17, 2001 4:00 pm
Contact:

Re: Freq to V/Oct

Post by spacef »

I don't think CV Pitch is editable in a DAW Audio track. That's because CV is mainly "intensity" ie volume, and does not contain any frequency information. It is only volumes. (it is the receiving device that transform this intensity signal into something else).

All you can do is what you can do with levels: play the level of your "audio CV reccorded tracks" and that's about all you can achieve through an audio/asio track. It will not cover the full CV range and the modification may lead to unexpected results (like if your level is at - inf, you could still hear the CV pass through, or be cut suddenly when you jjust wanted to pitch down).

Xite is about DSP for real time signals: whereas an windows software will use the ram. XIte can use windows RAM, but it will make it slightly slower due to "out and back in" signal flow.
A converter is probably possible, but will be slower than a native one (latency). Also, it is very difficult to make because of all the measurements and values to find and copy/paste.
Personnally, I consider devices like KrOn to be what it should be with Scope and the best because it is "native dsp" and does not use windows ram (does not communicate with windows).

It took me several weeks/month to make the right tuning to control Pitch through scope signals. And I had to re-do it as some values were wrong with otther oscillators. So someone who does not know the sdk at all, It will take a long time because all you ghave to do before getting to the CV engine itself. A Long time, or you will abandon the project because you will not do music anymore but will build devices.
plug-ins for scope
SpaceF website
SC website
User avatar
Spindrift
Posts: 100
Joined: Mon May 18, 2020 1:04 am

Re: Freq to V/Oct

Post by Spindrift »

In other modular systems, pitch CV is certainly a thing.
0V = C0, 1V = C1 ... 10v = C10

Inside Bitwig it works just like that, although of course it is dBFS instead of volts.

In hardware modular 1V/Oct is not precise, and depends on gain of converters and the range varies between modules. But an increase in voltage means an increase in pitch, and it is easy to adjust the curve and root pitch to get good tracking and can be done automatically like mentioned.

Scope also correlates dBFS to different frequencies, but it is not simply so that higher dBFS values results in higher pitch, hence one needs a mapping like Silent Way Voice Controller can do, specifying a value for each or the 128 notes available to match to the corresponding amplitude value.

As I understand from your reply this is not really doable in the SDK without interfacing with C++ code that runs on Windows instead of the DSP?

Seems like such a trivial problem to solve with regular programming, but I understand it's a completely different thing using DSP.

Earlier you mentioned that it would be doable, but maybe I had not managed to describe the issue that well then:
"or may be get the sdk, it's really not difficult to make a table with your tuning and send it to adat so you could make your own "freq" converter as you were asking"
https://www.forums.scopeusers.com/viewt ... 46#p346546
User avatar
spacef
Posts: 3234
Joined: Sun Jun 17, 2001 4:00 pm
Contact:

Re: Freq to V/Oct

Post by spacef »

you can be sure that whatever function there is in any software, it is precalibrated and all different values reside in a table of a sort or another (ie, updatable by user or not).

It means that someone went to make all measurements and then copied the values in the software, manually (As far as I know, there is no easy math function to convert CV into digital audio values, at least not math that could be easily achieved by scope. According to my own measurements, the curve of CV pitch is not linear, at least not when converted into digital values. But I may be wrong as all software may not work the same, and scope math is limited - and also because Amping is already a multiplication of something, whereas CV looks like absolute values. In more comon terms, the value zero on one or the other format cannot be zero on the other (0 picth (the minimum pitch achiveable in CV synths) is not 0dB. 0dB simply means 'multiply by 1. and zero in scope generally mean -145 dB (ort whatever is -inf dB in Scope) .

So if zero has to be another value, you cannot multiply or divide it (result would always be zero), and you can only add or substract from 0 to transform into another value. But this addition or substraction will work only for that particular value. The rest of the pitch will not obey the same function, so it has to be done manually for each note. Here is a CV math thread, just to show you how complicated it can be, and how people who seem to know their trade are also lost in calculations: https://forum.arduino.cc/t/convert-volt ... b/203137/6

You can create such tables in SDK Without the need to go to C++ or any other window dev tool, but this is the kind of fucntion that communicates with windows. You would use modules of the sdk such as the combo box, or a network of conditional modules (if...). I've used that in the past to convert midi notes to preset numbers, it works, but has latency so as it was for a step sequencer, it was difficult to use because you need to trigger the notes a bit before, so the preset changes in the right time, but at the same time, the audio generated by this note had to be muted, otherwise it would trigger audio too early compared to the preset change. The only solution was to put those note-triggers on a unsused part of the keyboard, which kind of kills the interest of being able trigger various presets depending on the note that is played (it would allow top have a different pattern on each note of your sequence = lots of variations) But the idea is abandonned, it is only inside LBH VIII for scope pci but I did not re-use it in newer devices, for all the above reasons.

It is what are called "asynch" modules in scope (asynchronous = starts on dsp, goes to do stuff in windows, then go back to scope. ANd one it is back to scope, it is not "synchronous" anymore, it has latency.
asynch = communicates with windows before going back to scope.

sync = runs exclusively on DSP, needs only one cycle of dsp to achieve all the functions = everything stays on DSP, and is in sync with the other DSP signals. A device like KrOn is completely syncronous and does not use async modules to generate sound. The only asynch moduls is for user to select the notes, but the note/CV value itself resides somewhere else ! a complicated and delicate circuitry.... :-)
Last edited by spacef on Thu Sep 09, 2021 12:55 pm, edited 1 time in total.
plug-ins for scope
SpaceF website
SC website
User avatar
Spindrift
Posts: 100
Joined: Mon May 18, 2020 1:04 am

Re: Freq to V/Oct

Post by Spindrift »

Again, my understanding of DSP is not at expert level, but I have dabbled in it and can read code.
But I would say that typcially oscillators will do is just accept a frequency value as input.

First example of a C++ oscillator that shows up on google:
https://github.com/rcliftonharvey/rchoscillators

In helpers/skeleton.h there is a function to set the frequency:

Code: Select all

    /** Sets the oscillator center frequency in Hertz. */
    void setFrequency (const double& Hz)
    {
        // Only update and recalculate if new Hz value is different
        if (Hz != frequency)
        {
            // Import new center frequency
            frequency = Hz;
            
            // If the center frequency is changed while SR was already set
            if (samplerate > 0.0)
            {
                // Recalculate the per-sample phase modifier
                fractionFrequency = frequency / samplerate;
            }
            
            // Revert to reset state
            reset();
        }
    }
And in for example oscillators/templates/sine.h:

Code: Select all

        phase += M_2PI * fractionFrequency;
        phase += ((phase >= M_2PI) * -M_2PI) + ((phase < 0.0) * M_2PI);
        // Calculate sine value for current phase step and scale to desired volume. 
        state = std::sin(phase) * amplitude;
That is pretty much all there is to it, and it is certainly not necessary to use any tables for control values. Pitch is no different than amplitude in this regard, at least in a basic case like this.
I cannot see any advantage of using tables for neither, but probably I am missing something since I don't understand why Scope choose this odd control scheme.

For reference here is the Silent Way mapping that works with Scope:

Code: Select all

Silent Way Calibration Data
version: 1
0 0.00036621 
1 0.00039673 
2 0.00041199 
3 0.00044250 
4 0.00047302 
5 0.00048828 
6 0.00051880 
7 0.00054932 
8 0.00059509 
9 0.00062561 
10 0.00065613 
11 0.00070190 
12 0.00074768 
13 0.00077820 
14 0.00083923 
15 0.00088501 
16 0.00093079 
17 0.00099182 
18 0.00105286 
19 0.00111389 
20 0.00117493 
21 0.00125122 
22 0.00132751 
23 0.00140381 
24 0.00148010 
25 0.00157166 
26 0.00166321 
27 0.00177002 
28 0.00186157 
29 0.00198364 
30 0.00209045 
31 0.00222778 
32 0.00234985 
33 0.00248718 
34 0.00263977 
35 0.00279236 
36 0.00296021 
37 0.00314331 
38 0.00332642 
39 0.00352478 
40 0.00373840 
41 0.00395203 
42 0.00419617 
43 0.00444031 
44 0.00471497 
45 0.00498962 
46 0.00527954 
47 0.00559998 
48 0.00593567 
49 0.00628662 
50 0.00665283 
51 0.00704956 
52 0.00747681 
53 0.00791931 
54 0.00839233 
55 0.00889587 
56 0.00941467 
57 0.00997925 
58 0.01057434
59 0.01119995
60 0.01187134
61 0.01257324
62 0.01332092
63 0.01411438
64 0.01495361
65 0.01583862
66 0.01678467
67 0.01777649
68 0.01882935
69 0.01995850
70 0.02114868
71 0.02239990
72 0.02372742
73 0.02514648
74 0.02664185
75 0.02821350
76 0.02989197
77 0.03167725
78 0.03355408
79 0.03555298
80 0.03767395
81 0.03990173
82 0.04228210
83 0.04479980
84 0.04745483
85 0.05027771
86 0.05326843
87 0.05644226
88 0.05979919
89 0.06335449
90 0.06712341
91 0.07110596
92 0.07533264
93 0.07981873
94 0.08456421
95 0.08959961
96 0.09492493
97 0.10057068
98 0.10655212
99 0.11288452
100 0.11959839
101 0.12670898
102 0.13423157
103 0.14222717
104 0.15068054
105 0.15963745
106 0.16912842
107 0.17918396
108 0.18983459
109 0.20112610
110 0.21308899
111 0.22575378
112 0.23918152
113 0.25340271
114 0.26847839
115 0.28443909
116 0.30136108
117 0.31927490
118 0.33825684
119 0.35836792
120 0.37968445
121 0.40226746
122 0.42617798
123 0.45152283
124 0.47837830
125 0.50682068
126 0.53695679
127 0.56887817

According to silent way:
The first two lines are an identifying header and a version number. The remaining lines are simple pairs of numbers: the first number is a MIDI note number, and the second is the output CV value that corresponds to that note.
If I take my Generate 3 analog eurorack oscillator and tune it with SW I get this (of course changing a bit depending on what pitch oscillator is set to):

Code: Select all

Silent Way Calibration Data
version: 1
0 -0.32009429
1 -0.31184876
2 -0.30360326
3 -0.29535773
4 -0.28711224
5 -0.27886671
6 -0.27062121
7 -0.26237568
8 -0.25413018
9 -0.24588151
10 -0.23762968
11 -0.22937785
12 -0.22112602
13 -0.21287419
14 -0.20462236
15 -0.19637053
16 -0.18811870
17 -0.17986688
18 -0.17161505
19 -0.16336322
20 -0.15511139
21 -0.14685956
22 -0.13860773
23 -0.13035589
24 -0.12210261
25 -0.11384664
26 -0.10559067
27 -0.09733471
28 -0.08907873
29 -0.08082277
30 -0.07256679
31 -0.06431082
32 -0.05605485
33 -0.04779888
34 -0.03954291
35 -0.03128694
36 -0.02303097
37 -0.01477500
38 -0.00651903
39 0.00173806
40 0.00999934
41 0.01826062
42 0.02652190
43 0.03478318
44 0.04304447
45 0.05130575
46 0.05956703
47 0.06782831
48 0.07608960
49 0.08435088
50 0.09261216
51 0.10087345
52 0.10913473
53 0.11739601
54 0.12565717
55 0.13391691
56 0.14217666
57 0.15043642
58 0.15869616
59 0.16695590
60 0.17521565
61 0.18347540
62 0.19173515
63 0.19999489
64 0.20825464
65 0.21651439
66 0.22477414
67 0.23303388
68 0.24129362
69 0.24955338
70 0.25780487
71 0.26605591
72 0.27430695
73 0.28255796
74 0.29080901
75 0.29906005
76 0.30731109
77 0.31556210
78 0.32381314
79 0.33206418
80 0.34031519
81 0.34856623
82 0.35681728
83 0.36506832
84 0.37331933
85 0.38154343
86 0.38976064
87 0.39797786
88 0.40619507
89 0.41441229
90 0.42262948
91 0.43084669
92 0.43906391
93 0.44728112
94 0.45549834
95 0.46371555
96 0.47193274
97 0.48014995
98 0.48836717
99 0.49658439
100 0.50474554
101 0.51286680
102 0.52098805
103 0.52910930
104 0.53723061
105 0.54535186
106 0.55347311
107 0.56159437
108 0.56971562
109 0.57783693
110 0.58595818
111 0.59407943
112 0.60220069
113 0.61032194
114 0.61844325
115 0.62676257
116 0.63591200
117 0.64506143
118 0.65421087
119 0.66336024
120 0.67250967
121 0.68165910
122 0.69080853
123 0.69995797
124 0.70910740
125 0.71825683
126 0.72740626
127 0.73655564
As you can see it is a range starting negative, and for each note same value is added.
And the mapping curve displayed in Voice Controller looks like this:
Image

I can do the same, routing the SW Voice controller via scope and back to an oscillator in Bitwig, and the result will look basically the same. Linear going from negative to positive.

If I try to calibrate automatically with a Scope osc it fails and can only map notes 101 to 127, and the curve looks like this:
Image

Clearly the narrow range that is working has an exponential response instead of linear, but seems also something strange happens if you give it negative values which throws of all attempts at automatic tuning by SilentWay, Bitwig or Ableton. They should all be able to handle the non linear response I think.
Post Reply