dach
phpBB Member
|
 |
« on: December 15, 2005, 04:09:44 PM » |
|
First off I don't have a modular synth, or have any plans to build one (yet). However, I have been discussing a little in private with mikael and colin in regards to a MIDI-to-CV generator, and I'll now describe whats been going on. For a CV generator, I planned to use a four channel 12bit DAC chip. There are several kinds, but Im currently finding it impossible to find a supplier for the cheapest and best one. Ill let you know what happens. I am planning on building an entire MIDI-to-CV machine, but since you all have soldering irons and some skills, I can do various circuit boards, parts, or just write the microchip code if you want. Im pretty busy right now so it'll be late January before I can do much with this idea. Hope some of this is useful to you 
|
|
|
|
|
Logged
|
|
|
|
expanoncolin
Administrator
phpBB Member
|
 |
« Reply #1 on: December 15, 2005, 06:21:42 PM » |
|
Topic split-hopefully this will have enough interest to be it's own topic. I know I'm interested, just tell me what to solder... it would be best if I could do it sometime in January, but if not, that's OK.
-Colin
|
|
|
|
|
Logged
|
|
|
|
bugbrand
phpBB Member
|
 |
« Reply #2 on: December 16, 2005, 03:17:18 AM » |
|
Now this IS something that could be very interesting for sure.!. Personally I don't use Microcontrollers regularly enough, so I always have to re-learn most of the language when I need them for something.. Urgh. This is one area where so far I've been happier to buy something ready made than to try to DIY.. Well, for starters, there's a MIDI to CV convertor on Music From OuterSpace that doesn't use Microcontrollers: http://www.musicfromouterspace.com/anal ... idi2cv.htmWhat sort of Micros are you thinking of then? Hmm 12bit - that'd be pretty accurate, right? From what I've read recently, I think, mostly MIDI to CVs are just 8bit - would 12bit be an improvement? Actually, MIDI is an 8 bit system, right? So there'd be no gain from trying to raise the resolution, or am I wrong? Yeah, this is of interest.!.
|
|
|
|
|
Logged
|
|
|
|
dach
phpBB Member
|
 |
« Reply #3 on: December 16, 2005, 08:27:38 AM » |
|
Now this IS something that could be very interesting for sure.!. Personally I don't use Microcontrollers regularly enough, so I always have to re-learn most of the language when I need them for something.. Urgh. This is one area where so far I've been happier to buy something ready made than to try to DIY.. Well, for starters, there's a MIDI to CV convertor on Music From OuterSpace that doesn't use Microcontrollers: http://www.musicfromouterspace.com/anal ... idi2cv.htmWhat sort of Micros are you thinking of then? Hmm 12bit - that'd be pretty accurate, right? From what I've read recently, I think, mostly MIDI to CVs are just 8bit - would 12bit be an improvement? Actually, MIDI is an 8 bit system, right? So there'd be no gain from trying to raise the resolution, or am I wrong? Yeah, this is of interest.!. I use PIC chips. Once upon a time I was a professional PS2 programmer, and so I'm trying to keep my skills together  Some of it might be ass cos Im only talking off the top of my head here, and Im not sure how a CV really gets used in a synth context. If I have made some mistakes, please let me know! I am especially curious about how the CV range is mapped to pitch. The 1v/oct system seems to be the most popular, is that what you guys are making? Finally, I was considering this as a USB device, but a PC joystick port or proper MIDI in,out and thru is no problem either. The microcontroller handles the USB descriptors, decodes the MIDI messages, holds a lookup table, and tells the DAC what voltages to output. The desired chip was cheap and had 4 channels, so you get 4 CV outs. It'd probably be possible to toggle legs of the PIC chip on and off, giving you trigger/gates aswell. Physically constructing this is rather simple, but programming the microcontroller requires extra hardware and programming skills, as well as diving into the USB protocol. I would like to write the code, burn the microchip (and perhaps place the DAC on a small board) and let you guys finish off the connections to the rest of your systems. There is of course pre made stuff you could buy, but as these guys are my direct competitors, Ill say I am unimpressed with their resolution, and I can customize the various features for you guys if you want! Their list of features is a source of inspiration though. Ill also develop the thing cheaper than them, and in a more colourful box, with blinking LEDs. Blue ones. Go on, you know you want it! 
|
|
|
|
|
Logged
|
|
|
|
expanoncolin
Administrator
phpBB Member
|
 |
« Reply #4 on: December 16, 2005, 01:16:33 PM » |
|
Hey Dach,
The 1v/octave solution, yes, is the most popular... that means that CV controls the note, not the frequency-it IS exponential.
Many MIDI-CV generators also contain circuitry to decode the trigger and gate controls of a note, as well as the clock signal. The clock is really what I'm curious about because if you have a MIDI sampler, you could decode the clock and sync your sequencers and LFOs to it.
20mv accuracy at 4.10115 gives you +/-.5%... but at a lower voltage that gets worse...
If I had my synth made yet, I would try to give you some approximate CV values for certain notes... but alas. I guess it would be easier to figure out given the "first" pitch available on a 1v/octave scale. I can't find a table on the web, but I can ask in the synth-diy group...
-Colin
|
|
|
|
|
Logged
|
|
|
|
bugbrand
phpBB Member
|
 |
« Reply #5 on: December 19, 2005, 02:53:07 PM » |
|
YoYo - been meaning to get back to this for a couple of days....
Well, Doepfer have a LOAD of experience in electronic music devices - interesting to see that the MCV4's resolution is a quarter of a semitone..
Well, ok, CV for pitching -> the most common method is indeed V/Oct (Volts per Octave) - an increase of the CV voltage by 1 volt doubles the frequency. There's no definitive voltage for, say, A3 because the synth user sets the base frequency and then modulates it with control voltages.
I can't quite get your way of increasing the resolution - unless you use some extreme MIDI control (?sysex?) data - and I gifure that using non-standard MIDI controls would perhaps limit the useability compared with using ControlChanges.?.
Yeah, I've wanted to use more PICs in my works, but figuring out which to use and trying to get better at coding has kind of put me off - it would, indeed, be very good to figure out how to allow for a USB interface.. &, yeah, I'm very much aware of the general circuit-space-saving and extra control from using micros rather than a bunch of logic chips...
Hmmm, I'll carry on thinking...
|
|
|
|
|
Logged
|
|
|
|
dach
phpBB Member
|
 |
« Reply #6 on: December 19, 2005, 07:18:25 PM » |
|
Well, Doepfer have a LOAD of experience in electronic music devices - interesting to see that the MCV4's resolution is a quarter of a semitone..
I didn't really mean to diss on Doepfer, they've put together more products than I've yet imagined. What they might be doing with the resolution there is a filtered PWM digital to analog design. You produce pulse width modulated waves by toggling the microcontroller leg on and off (many have inbuilt functions for this), and then low pass filtering this PWM wave. The duty cycle determines the overall output analog voltage after filtering. I tried a few tests with this, producing a 10kHz PWM wave with variable duty cycle. After some filtering, it can go from 0 to +5v in around 4ms, and much faster if you tolerate some 'flutter' in the signal, the output had a little 10kHz oscillation of a few millivolts. You can directly trade off the response time to the size of this oscillation. Take a look at the schematic and model. Real results were quite similiar but I havn't photographed it yet. Using a 20mHz clock its possible to produce several PWM waves, and still have cpu left over for other processing (like the incoming midi). This is definitely a technique worth looking into as it doesnt require a special (expensive) DAC, as long as you don't mind the inaccuracies involved. It's also sort of non-linear; a lookup table could help correcting that but I didn't experiment in that direction. I can't quite get your way of increasing the resolution - unless you use some extreme MIDI control (?sysex?) data - and I gifure that using non-standard MIDI controls would perhaps limit the useability compared with using ControlChanges.?.
You use two controllers, one for the 'course' and one for the 'fine'. How you produce these is up to you, but there are applications that'll offer it. Yeah, I've wanted to use more PICs in my works, but figuring out which to use and trying to get better at coding has kind of put me off - it would, indeed, be very good to figure out how to allow for a USB interface.. I've been using the PIC16F87x series, and the pic16f676 for smaller projects. I pic these (haha) as they have lots of analog-digital converters, and are a good compromise between price and availability here. Microchip have some excellent product finders which help you go through the different features. Price, the number of IO and the type of analog-digital converters are probably the more useful features in our contexts. I'd be more than happy to share my experience with these things as well as some chat over code if you want. Send me a PM or post wherever. Myke Predko's book 'Programming and customizing picmicro microcontrollers' is absolutely fantastic. The USB interface will be useful for a gazillion projects, so I'll be doing a full write up and post tutorials and code when I have it figured out. Expect that sometime in January. I'm going to Ireland tomorrow for the holidays and will be away from all things electronic.
|
|
|
|
|
Logged
|
|
|
|
bugbrand
phpBB Member
|
 |
« Reply #7 on: December 20, 2005, 03:58:47 AM » |
|
Yeah, 16F877s are what I've used for the few projects I've done over the last couple of years (they were probably overkill for a MIDI footswitch box, but it worked out fine). Interesting idea about Coarse and Fine tune using different CCs - for that it may be worth reducing the coarse pitch range so that it's only semitones -> quarter tones plus fine tune. Actually, what am I saying - that's how it is already, but without the MIDI controlable FIne tune - that's just a simple voltage offset I'm guessing they're using a pretty straightforward Micro and DAC to generate the CVs rather than PWMs. Many similar applications I've seen have used R2R networks to generate decent resolution CV outputs from digital chips (though the resistors need to be decent quality to minimise errors.) Then you have a little bit of lo-pass filtering to somewhat smooth the output. I'm not 100% sure about that, but think that's roughly the way...  ...
|
|
|
|
|
Logged
|
|
|
|
Ed_Word
phpBB Junior Member
|
 |
« Reply #8 on: December 31, 2005, 12:00:42 PM » |
|
Im very interested in this, what would the price range of just the programed chip be?
|
|
|
|
|
Logged
|
|
|
|
Simonetta
phpBB Junior Member
|
 |
« Reply #9 on: January 01, 2006, 10:23:45 AM » |
|
12 bit DAC chips are expensive, complicated, and difficult to find and design around. They require precision PCB layouts to get accuracy. They need stable temperture-compensated voltage references. Newer, more available ones are often not available in DIP packages.
I suggest using older cheaper 8-bit DACs. Especially ones that have multiple DACs in a single package. Then increase their accuracy by pairing them and adding each pair's outputs together with an op-amp. For example have one DAC that has a coarse range of 0 to 4 volts and the other having a fine range of 0 to 1 volt. You now have a virtual 16-bit DAC. There has to be two writes from the processor for each note, but those happen much faster than human perception,. There is no sense of 'note sliding' as the frequency adjusts.
Most multiple channel 8bit DACs have multiple voltage references for the channels or two or three voltage reference inputs for clusters of channels.
You'll also need a look-up table to get the exact voltages for the MIDI note number that give the correctly tuned frequency. These can be stored in the EEPROM of the microcontroller.
I suggest the Atmel AVRs, especially the Tiny 45 that is currently available at DigiKey. They are easy to write for, they flash-program through the PC parallel port, they have 256 bytes of EEPROM (127 MIDI note on values with one each for the high and low resolution DACs), they are available in 8-pin DAC format, and cost only about $2.50 US each. 8-pins seems small but will give a MIDI input pin and three pins for a serial (SPI or I2C) connection to the DAC chip(s). There's also a pin or two left over for accessing the ADC on the AVR. A dual-pot joystick could add pitch bend and another modulation to the MIDI input. Somewhere on this site is a program that I wrote for the SN94281 synthesizer chip in AVR assembler. It has lots of code for writing useful AVR constructions like DAC interfaces, look-up tables, and other common musical microcontroller things.
Try getting samples from Maxim of multiple 8-bit DACs. Most DACs require a high voltage of about +15 volts. A simple 555 timer and a couple of diodes can be used to make a voltage doubler that will raise a +9v battery to this range. Goggle for '555 voltage doubler'.
Good luck. Post any good working code here for the rest of us.
|
|
|
|
|
Logged
|
Beauty is the most subtle form of intelligence.
|
|
|
expanoncolin
Administrator
phpBB Member
|
 |
« Reply #10 on: January 01, 2006, 03:05:11 PM » |
|
Somewhere on this site is a program that I wrote for the SN94281 synthesizer chip in AVR assembler. It has lots of code for writing useful AVR constructions like DAC interfaces, look-up tables, and other common musical microcontroller things.
Try getting samples from Maxim of multiple 8-bit DACs. Most DACs require a high voltage of about +15 volts. A simple 555 timer and a couple of diodes can be used to make a voltage doubler that will raise a +9v battery to this range. Goggle for '555 voltage doubler'.
I believe that's in the articles/tutorials section... or in the DIY archives in the synths section. The problem with the 9v doubler is that the 555 is sort of unstable and does not have a huge current output... you can give it a try though, it does work. I drew up a schem here (though this is for +/-9v)  -Colin
|
|
|
|
|
Logged
|
|
|
|
dach
phpBB Member
|
 |
« Reply #11 on: January 02, 2006, 08:00:55 AM » |
|
12 bit DAC chips are expensive, complicated, and difficult to find and design around. They require precision PCB layouts to get accuracy. They need stable temperture-compensated voltage references. Newer, more available ones are often not available in DIP packages.
Tell me about it  My primary interest is the USB coding, if you guys can get a MIDI to CV project at the same time, then that's even better.
|
|
|
|
|
Logged
|
|
|
|
dach
phpBB Member
|
 |
« Reply #12 on: January 02, 2006, 08:06:04 AM » |
|
Im very interested in this, what would the price range of just the programed chip be? Up to about $10 I guess. What features would you like to see?
|
|
|
|
|
Logged
|
|
|
|
Ed_Word
phpBB Junior Member
|
 |
« Reply #13 on: January 04, 2006, 09:42:24 PM » |
|
Im very interested in this, what would the price range of just the programed chip be? Up to about $10 I guess. What features would you like to see? a basic 1v/oct cv , a velocity cv and a gate/trigger. If I think of anything else I will speak up
|
|
|
|
|
Logged
|
|
|
|
expanoncolin
Administrator
phpBB Member
|
 |
« Reply #14 on: January 04, 2006, 11:07:35 PM » |
|
For me the absolute most important thing is more of a MIDI to analog clock generator... IE 64 cycles per quarter note, down to maybe 1 cycle per 4 quarter notes via simple dividers... That way you can sync samplers/drum machines to your LFO's/sample/holds.
-Colin
|
|
|
|
|
Logged
|
|
|
|
|