Author |
Message |
JuliusB
Joined: Jan 25, 2020 Posts: 2 Location: Berlin
|
Posted: Sat Jan 25, 2020 2:54 pm Post subject:
Samplerate and Bitdepht of CV Generators |
|
|
Hi,
im pretty new to digital stuff and electronics in general,
but i want to do some basic eurorack modules for cvgeneration, like envelope generator, lfos, sequencers, with microcontrollers, arduino or teensy.
So my question, is there a general Rule of thumb, how much samplerate i should aim for, and what resolution the dacs should have?
thx |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24081 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Sat Jan 25, 2020 3:12 pm Post subject:
|
|
|
JuliusB
Depends a bit on what you are going to control .. how it will end up in the mix, how fast the signals are changing ...
Some ideas ...what I've noticed on my softsynth .. when I set the control rate to 44100 / 32 = 1378 samples/second the steps in the control signals can get very audible .. unless the patch gets complex or the control changes are small .. and then it will be not be noticed as much (being masked by the generated audio).
When I run the control rate at 48000 / 4 = 12 ks/s I don't usually notice the steps anymore - but my ears are not so young anymore
Clavia G2 uses 96000 / 4 = 22 ks/s IIRC - which can still have artifacts when you use those control signals directly as audio )i.e. fast changing control signals). _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
JuliusB
Joined: Jan 25, 2020 Posts: 2 Location: Berlin
|
Posted: Sun Jan 26, 2020 5:25 am Post subject:
|
|
|
Ok i See thank you
I got some nanos and mcp4725 breakouts laying around I might just try with that a bit, and see how it sounds |
|
Back to top
|
|
|
ixtern
Joined: Jun 25, 2018 Posts: 145 Location: Poland
|
Posted: Mon Jan 27, 2020 1:09 am Post subject:
|
|
|
For pitch control voltage 12-bit resolution is minimum. More is better.
For envelopes controlling volume or filter frequency even 10 bits may do.
Notice that cheap 12-bit DACs like MCP4725, 4821/22, 4921/22 have high nonlinearity resulting in substantial errors and using them for pitch control voltage requires so called "calibration table". If you want example - look at MI CVpal source code which is open source. |
|
Back to top
|
|
|
cslammy
Joined: Apr 27, 2018 Posts: 206 Location: USA
Audio files: 1
|
Posted: Wed Jul 01, 2020 1:47 pm Post subject:
|
|
|
JuliusB wrote: | Ok i See thank you
I got some nanos and mcp4725 breakouts laying around I might just try with that a bit, and see how it sounds |
I use 4725s and nanos a lot for general CV applications.
A trick I use that I wish I had known earlier: set 2 digital pins to digitalWrite() and set one low and one high. Now use that to power the V+ and GND for the 4725. Use the other 2 adjacent pins to send data to the 4725. Now your nano has a decent "built in" D/A. _________________ Visit my AUDIODIWHY blog and website |
|
Back to top
|
|
|
Electric Druid
Joined: Mar 13, 2012 Posts: 44 Location: UK
|
Posted: Wed Jul 22, 2020 2:29 pm Post subject:
|
|
|
cslammy wrote: | JuliusB wrote: | Ok i See thank you
I got some nanos and mcp4725 breakouts laying around I might just try with that a bit, and see how it sounds |
I use 4725s and nanos a lot for general CV applications.
A trick I use that I wish I had known earlier: set 2 digital pins to digitalWrite() and set one low and one high. Now use that to power the V+ and GND for the 4725. Use the other 2 adjacent pins to send data to the 4725. Now your nano has a decent "built in" D/A. |
But why power the DAC from two Arduino pins? You've got a supply available, why not use it?
Tom _________________ Electric Druid Synth and Pedal DIY website |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Wed Jul 22, 2020 2:58 pm Post subject:
|
|
|
I don't understand powering a DAC from an MPU data pin either. For one thing, the data pin could be noisy. And another pin for ground - more noise.
A regulated voltage from the PSU and the real ground is a much better idea and won't induce "I wonder if my power scheme is causing this weirdness?" thinking.
JMO _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
cslammy
Joined: Apr 27, 2018 Posts: 206 Location: USA
Audio files: 1
|
Posted: Wed Jul 22, 2020 4:37 pm Post subject:
|
|
|
Electric Druid wrote: |
But why power the DAC from two Arduino pins? You've got a supply available, why not use it?
|
Sorry, I wasn't clear (at all). This only makes sense when using a breakout board.
most 4725 breakout boards I've seen are laid out to easily do this... eg
https://www.adafruit.com/product/935
For this I think you would lay the board out so SDA is 27, DCL is 28, Vin is 22 and GND is 19 on a nano--the pins should line up.
If it doesn't make sense for your project don't do it, put the 4725 on a breakboard or perf or strip or whatever and wire it the usual way, but for me, when experimenting at the bench/screwing around with parts it's nice to have a 12 bit DAC right there i can use right away. I also think (?) breakout board makers had this in mind when laying out their boards? _________________ Visit my AUDIODIWHY blog and website Last edited by cslammy on Thu Jul 23, 2020 8:27 am; edited 9 times in total |
|
Back to top
|
|
|
cslammy
Joined: Apr 27, 2018 Posts: 206 Location: USA
Audio files: 1
|
Posted: Wed Jul 22, 2020 4:45 pm Post subject:
|
|
|
JovianPyx wrote: | I don't understand powering a DAC from an MPU data pin either. For one thing, the data pin could be noisy. And another pin for ground -
JMO |
I have not yet had severe issues with noise when using the breakout-on-your- nano scheme, but of course it depends on your application. My applicaitons, like most of my life, are usually not that demanding. _________________ Visit my AUDIODIWHY blog and website |
|
Back to top
|
|
|
|