CVpal MIDI out mod

Howdy hackers!
Since most of my MIDI diy ideas are already realised by someone smarter than me I initially thought so about this one too. I search this forum but I could not find anything about it so I will start a new discussion instead.
So, my idea is to give CVpal a new mode: MIDI out.
Some thoughts:

  • The hardware is unmodified since the gate outputs already have a fitting resistor soldered so only a simple adapter cable is needed.
  • Most of the code seems to already be in place (midi message parsing etc.). Whats missing is to replace one of the midi channel switch statements in the midi handler.
  • The new implementation will just bitbang the midi messages to the gate output pin with correct speed. I guess the clock generation for the 32kbps midi signal might become a problem since it’s already running the v-usb stack with some clocking tricks and the hardware is limited. On the other hand I don’t know if midi is particularly sensitive to jitter.

Have anyone already done something similar?
Is there a simpler way of doing this? Like bypass the midi handler entirely. So far I have only glanced the code…

Ok. Just for the record:
I’ve researched the code a little further and found that it’s not an easy task to implement. As I understand the midi renderer passes data in a state-struct:

struct State {
uint16_t cv[kNumVoices];
bool gate[kNumVoices];
uint16_t dco_frequency;
};

The data in this is polled and passed to the ports in the main function.

It’s only possible to flip the gate bits once per event. It’s not possible to transmit serial data.

I guess you could extend the State struct to contain midi messages and transmit them from main function but thats doesn’t fit with the rest.

I think a.midi in mod would be much more interesting…
A USB to midi cable you can get for next to nothing.
But with a midi in mod it would be the simplest diy midi 2 CV converter.

Unfortunately there is no input ports available and midi in requires some extra hardware (opto coupler)

The CVPal is pretty simple. You’d probably be better off just designing a new PCB, with the optocoupler, 5-pin DIN, and a Euro power-supply circuit (you could use the 5V buss, for simplicity). I’m sure it wouldn’t be too hard.

Then, on the software side, it would just be a question of removing the USB stuff, and replacing it with serial communication code.

a|x

I say ‘just’- I wouldn’t know how to do any of that stuff myself :wink:

a|x

Can´t somebody use the extra area on the pcb, and maybe add a switch on the front panel to toggle between cv/midi using an adaptor on one of the sockets a-la beatstep?

I think the problem is there aren’t enough free input pins in the MCU.
Also, you’d need to find another way to power the module, unless you still used the USB, just for power.
All that being the case, it would be much easier just to design a different module from scratch, I’d have thought.

a|x

It was designed to be very simple, so the smallest MCU was used.

My idea was to replace the usb input for a midi input. You’d need a different way to power it of course. An 78L05 would probably do the job. The beauty of this thing is how simple and with very little components it’s done. The tricks are all in the firmware.
But for a midi in you would also need to hack the firmware. Designing a new PCB for it is very easy.
If somebody can could do the code i would be very happy to design the PCB :).

@6581punk exactly, so the options for hacking are limited.

I’m reminded a bit of the Poly-800 mod boards I bought a few years ago. They completely replaced the original MCU control chip, adding all kinds of extra options, including proper MIDI support, extra LFOs, expanded patch memory, and even integrated a couple of the more popular other P800 hardware mods, bringing them under MIDI control, too.

This is all great, but then the guy behind the project started talking about replacing the oscillators of the synth with a completely new digital oscillator. That’s when I started to think the whole thing had moved past the tipping-point into waste-of-time territory. If you’re going to replace the control and MIDI systems of a synth, then replace the oscillators, there’s only really the filter left, in terms of what defines the sound of the synth. Why not just take out the filter, and design a completely new synth around that? Makes much more sense than trying to cram all this into what is, at the end of the day, a budget synth from 30 years ago, with, with the best will in the world, a crap case, and a very limited user interface.

a|x

You’ll need to rework the faceplate, the code, and the board.

Why not design a very simple MIDI to CV interface from scratch?

Because most of the code is already there?

Then why don’t you design a board and panel, of the right size, with the right circuitry and the right MCU (no reason to use a chip without UART…), and then adapt the CVpal code to run on it?

Because I lack the knowledge to code that… Though I would love to learn it. I did try to learn more of it. I did learn to make simple adjustments in existing code and create some ideas from scratch on Arduino. But in my job as a musician I don’t get to code so much to get any better in it. And I also noticed the math I once learned seems to be completely erased.
I’m thinking to maybe do a course next year to boost some skills. I did try online courses but I think i need a more severe approach.
But I enjoy toying with the ideas :slight_smile: and I’m aware they may seem bad ideas considered more knowledge.

The thing is, the CVpal in itself is already a hack… So hacking a hack… is going to be hard!

@pichenettes when you say it’s a hack, do you mean in the sense it uses software-only USB?

a|x

Software USB, USB-powered, no output buffering/amplification.

It’s not very serious :slight_smile:

It does work very well, though, within those limitations.

a|x