Jump to content

CV Quantizer?


sneakthief
 Share

Recommended Posts

I'd still love to see some kind of CV-Input quantizer feature!

I remember TK mentioned that he was experimenting with some code a while back in the MIDIbox CV discussion thread. And we now have all those great scales developed for the MBSeq *hint-hint*

Too bad MIDIbox CV isn't in C, otherwise I'd take a crack at it myself.

Link to comment
Share on other sites

So far I remember, AC has developed a C based version to his Speakjet project. If the function is generic enough, it could also be built into the "analog toolbox" (which is written in C as well! :))

Best Regards, Thorsten.

Link to comment
Share on other sites

re. analog toolbox - hmmmm... but then i'd have to recreate all of my favourite MIDIbox CV features. hehe.

i looked at AC's speakjet code and the most interesting part was the harmonizer.

stryd_one - if you're willing to help, maybe we can steal the force-to-scale ASM code from the MBSeq :)

then the only thing we would need to do is read 0-10V from an analog input and convert it to the nearest midi note. the 1V/Oct standard is quite simple: 1/12 V per semitone or 1/1200 V per cent.

Question

Can the analog in accept 10V or do i need to scale it down? In any case, I imagine that it would be wise to implement some kind of opamp buffer.

Link to comment
Share on other sites

maybe we can steal the force-to-scale ASM code from the MBSeq :)

then the only thing we would need to do is read 0-10V from an analog input and convert it to the nearest midi note. the 1V/Oct standard is quite simple: 1/12 V per semitone or 1/1200 V per cent.

I'll leave the analog bits to you and then help nick the scale engine :)

Link to comment
Share on other sites

re. 0-10v to 0-5v: this one comes from the great folks at the electro-music synth-diy forum: http://electro-music.com/forum/viewtopic.php?p=117386

the legendary Thomas Henry was kind enough to drop in and give his suggestions! :)

Use a voltage divider made from two resistors:

signal in --- 2k resistor ---+--- 2k resistor --- ground
                             |
                        signal out

Link to comment
Share on other sites

The divider takes care of the voltage levels, as explained above, but there's more to think about.

You should also consider the output impedance. According to the Electronotes standard, the output Z of most synth circuits should be 1K. This is easy to arrange here. Besides computing the divider voltages mentioned above, arrange for the parallel resistance of the two resistors to be equal to the desired Z.

For this case, we want 0 to +10V to go to 0 to +5V, with a output Z of 1K (common for Electronotes circuits). Choosing both resistors to be 2K gives the required voltage reduction (10V max to 5V max), and in parallel they are 1K, a good impedance to drive other modules without worrying about shorted outputs.

My rule of thumb has always been: design a circuit to (a) be elegant, and (b) not burn up or cause other modules to burn up, no matter how stupid the operator may be.

Thomas Henry

Link to comment
Share on other sites

  • 3 months later...

OK, I'd like to move ahead with this.

Option 1:

Modify the AC Sensorizer to have CV Outputs using an AOUT module

(see my post here: http://www.midibox.org/forum/index.php?topic=8401.msg70779#msg70779 )

Option 2:

Modify the Analog Toolbox by adding the scale quantizer code from the AC Sensorizer project.

Any thoughts on this? As I mentioned in the other thread, there's an increasing demand for CV quantizers what with the resurgence of modular synth manufacturers!

Link to comment
Share on other sites

Hi,

I already answered in the ACSensorizer topic:

http://www.midibox.org/forum/index.php?topic=8401.msg70835#msg70835

in short: there isn't enough space left :-\

But I also proposed:

Option 3:

Connect the Analog Toolbox to the ACSensorizer

Maybe I could do something about quantisation of incoming events (the harmonizer works too for incoming notes which get forwarded harmonized); there may be some remaining free bytes to squeeze that in...

:)

Cheers,

Michael

Link to comment
Share on other sites

As I mentioned in the AC Sensorizer thread, I'm going to proceed with trying to integrate the scaler into the Analog Toolbox.

Quantization is an interesting idea that I hadn't thought of! At least one of the inputs would then need to be used as a gate.

Also, it occured to me that this would also make a great CV-Midi converter - that would pretty much be a freebie as part of the scaler code.

Will muddle on with this....

Link to comment
Share on other sites

about my solution for quantizing:

I am not using any buffers, the approach is quite simple

(which does not mean I discovered this possibility quickly ::))

I disabled the AIN-Notification and assigned a countdown-number to each pin, for example 95 ticks for a full note for pin 1. The counters are decremented each clock cycle. When the countdown reaches zero, the AIN-pin is read (and the processing occurs).

Best,

Michael

Link to comment
Share on other sites

I disabled the AIN-Notification and assigned a countdown-number to each pin, for example 95 ticks for a full note for pin 1. The counters are decremented each clock cycle. When the countdown reaches zero, the AIN-pin is read (and the processing occurs).

Heheh I see you are counting from 0 when typing english and not code. This is how you know you are spending a lot of time coding ;)

You are thinking about quantising the timing of the values, but sneak is talking about quantising values to a certain range (IE, note-to-scale)

Terminology mix-up there for sure ;)

Link to comment
Share on other sites

AC - if you look at the pictures of the modules that I posted in your AC Sensorizer thread, you'll see that they're all called "Quantizers", which means they take incoming voltages and force them to a note scale using the 1V/Oct standard :)

Is that still too hard to adapt to the AC Sensorizer, or should I continue with ripping the juicy bits from the AC Sensorizer and insert them into the Analog Toolbox?

:)

Link to comment
Share on other sites

I see...

Well, the main issues (me having no AOUT hardware) still remain; so unless you don't release a stand-alone harmonizer, I don't have no problems with some decent code-ripping (I love being credited, arrrr ;D)

I think it would make more sense to integrate the harmonizer to the Analog Toolbox: the sensorizer software is tied to the AIN-sensors, beginning with the bankstick patches and ending with the menu-control based on selected AIN-pin-numbers... it would require some efford to strip the unnecessary things and only god knows if it would still work afterwards... it's surely easier to add the two ACHarmonizer sourcefiles to a new or an existing project (maybe you also need the ACToolbox and ACMidiDefines, but that should be all). The files are well prepared with accessors to be used without having to change a lot ;)

Moreover, I was not very pleased with the situation of the SpeakJet project, which was branched very shortly after I released the first beta sources - anyway, I understand the reasons and the momentary solution is one I can live with. But if I'm honest, I am not keen on repeating this with the ACSensorizer.

Gimme a shout if you need more infos :)

Best,

Michael

Link to comment
Share on other sites

is this a common expression when it comes to harmonizing (adapting notes to a musical scale)? Whenever I read the term quantizing in menues of music programs, it always meant shifting the notes to the right place in time...  :-[

Well quantising just means that you are making a value fit within a predefined set of values ...so the way you and I and most people think of quantising is on the time scale, rather than quantising on the pitch scale.

Only people who work with CV really say 'quantising' to mean 'harmonising'. It is technically correct, but I think that because traditional sequencers only quantise on a time scale (not pitch) then we don't think of it that way.

Link to comment
Share on other sites

AC - first and foremost, since you have reservations then I don't want to use your code.

I'm not interested in "forking" your code or in making anything commercial - my main goal is to uphold rules and values of the MIDIbox community.

I'm just going to use the scale tables that stryd_one entered by hand and figure out something on my own.

Cheers,

michel

Link to comment
Share on other sites

Michel,

I think you did not read my posting right:

I have reserverations in forking the Sensorizer, yes, but I even offered you help implementing the Harmonizer-Classes into the Analog Toolbox (which I think is the easiest way to go)

it's surely easier to add the two ACHarmonizer sourcefiles to a new or an existing project (maybe you also need the ACToolbox and ACMidiDefines' date=' but that should be all). The files are well prepared with accessors to be used without having to change a lot

(...)

Gimme a shout if you need more infos[/quote']

I must admit, I'm a bit puzzled ???

Regards,

Michael

ps: I read it all over again, but I can't find no sentence from me indicating, you were planning to "make something commercial"

Link to comment
Share on other sites

so unless you don't release a stand-alone harmonizer, I don't have no problems with some decent code-ripping (I love being credited, arrrr ;D)

Ah, now it's my turn to misunderstand - I interpreted "release a stand-alone harmonizer" as meaning either commercial and/or my concept of a CV Quantizer. Sorry!

But if I'm honest, I am not keen on repeating this with the ACSensorizer.

OK I've re-read this and it makes sense to me now. My initial (incorrect) impression is that you were hesitant to let me re-use some of your code (eg. you didn't want to fork it, the code was too hard to rip, etc.)

I'm glad that we're "on the same page" now :)

Link to comment
Share on other sites

cool :)

I really believe it's a lot less work to integrate the Harmonizer Classes into the Toolbox than to integrate the Toolbox into the Sensorizer. This was not meant as a "pseudo-argument".


// globals
extern unsigned char base;
extern unsigned char scale;

// functions
extern void ACHarmonizer_Init(void);

extern void ACHarmonizer_SetBase(unsigned char value); // sets new base note, 0..127
extern void ACHarmonizer_SetScale(unsigned char value); // 0..SCALE_MAX:scale# or >SCALE_MAX:next
extern void ACHarmonizer_ToggleScale(unsigned char direction); // 0:down, 1:up
extern void ACHarmonizer_Random(void); // set new random base & scale

extern unsigned char ACHarmonize(unsigned char value); // 0..127 in, returns harmonized value
[/code]

It's all there, you just need to implement the HUI stuff in main.c (or the relevant HUI-/Menu-Files, don't know the Analog Toolbox)

I'm glad, too, we sorted this out :)

Cheers,

Michael

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...