Showing posts with label voice card. Show all posts
Showing posts with label voice card. Show all posts

Monday, October 13, 2025

Testing new cards

I'm testing the new cards that arrived this summer - in particular the digital voice card controller

Errors found

VCO: 

- Square wave is probably inverted, just like on the previous version of the waveshaper

- When properly tuned for 1V/oct, the lowest frequency is > 8.1758 which means the VCO cannot be both calibrated to 1V/Oct using trimmers AND reach all MIDI notes. A fix is to add a 1.5MOhm resistor from the summing point (or before the secondary 1V/Oct input jumper) to -12V.

To do

- Tune VCO

- Trim WS 

To test

- VCO frequency vs waveshaper and square wave generator, is the phase inverted?

- Lowest possible frequency for VCO, looks like trimming down won't go as low as DCOs?

- Recon-filter and wave output from digital board, including switching on the analog board

- Control pins on the digital board, though since midi works we know we can control everything. 

What works

- Distortion! :-D 

- Noise

- VCO waves in general

- WS wave mixing is now perfect 

- Midi input on digital card

- DCO tuning

- CV DAC control with 5V and 50MHz signal (3v3 also works but only at 40MHz)

- Rear soldered header on the Teensy 4.0 

- I2C port expanders 

- Winbond W25Q128 flash chip integration from Teensy. Not tested with DCO but uses same circuit. Was tested with W25Q128_test.ino (adapted from https://github.com/msnbrest/W25Q128)

- PCB output /recon filter on digital board. However, output is 0-2V, e.g. not bipolar and not a big enough range.

Monday, July 29, 2024

New PCBs from JLCPCB - Voice card ++

All new cards. Top left: Bus mixer, VCO and Juno filter. Top right: Moog and Jupiter filter. Center left: Voice mainboard. Center right: 2X waveshaper, FX module and bus mixer angled connector. Bottom: CV board
 
Everything mounted together. Looks a bit Frankenstein-ish but it fits!

Even the Juno filter, sandwiched between the voice card and the Moog/JP6 filter fits. I wonder how hot it will get though.

A true beauty!


Assembling voice card and other boards

The day after we left for our summer vacation, the voice card and associated cards arrived from JLCPCB.

I won't test the cards for a while but I DID try mounting everything. It fits beautifully. I had to adjust the spacer/standoffs a bit, here are my new measurements:

Red = expected spacer heights
Blue = actual spacer heights

My conclusion is thus:

Left most (waveshaper) spacer: 11mm + 2 x 0.3mm washer
Left bus mixer spacer: 28mm + 3 x 0.5mm washer (or 29 + 0.5, but I ordered 28mm and it works fine)
Right bus mixer spacer: Not needed, but IF needed, combine a 15mm with 3 x 0.5mm washer (or 16mm + 0.5mm washer) on top.
Top filter spacer: 4mm + 0.5mm washer
Bottom filter spacer: 5mm + 0.3mm washer


Output module - thoughts on architecture

 It's summer time again, and a few days away from home really gets my creativity going!

This time I've started looking at the output module for the synth. I have several goals for the output:

  • Design should support 16 voices
  • Stereo, with per-voice panning
  • Individual outputs per voice
  • Multiple (2 or more) stereo FX pipelines
  • Voice chaining through the voice's ext input, with summing of multiple voices to each input and return to same voice

I also want the following to make a future vocoder feature possible

  • Each voice's SVF can be used as a carrier modulation channel
  • Selectable vocoder carrier: Voice 1 Juno LPF, Sum of multiple voices, external input, noise (for voiced/unvoiced)
  • Voiced/unvoiced selector that effects return to voice


Outputs

We can use two 16 x 16 crosspoint switches (left and right) to select one of 16 outputs for each of the 16 voices. This will support both individual outs and grouping of multiple voices into a single output group. For example channel 1 to 4 can be output 1, 5 to 16 as output 2 etc. We would also need a similar setup to send the effect outputs to the right output groups. PS: Unless we have the same number of FX pipelines as we have voices, it won't be possible to have per-voice effects at the output.

Thought: Do we need per-voice group output amps or will it be enough to use the amps on each voice card?

Effect pipelines

I've designed each voice card with two FX outputs. I intended this to be one output per FX pipeline, but I'm reconsidering using them as left and right outputs instead. I COULD have just tapped the main L/R voicecard outputs, but this will let us pan the FX and main outputs separately - not sure if it is anything worth doing but since the outputs and VCAs are already there it might be a cool feature. 

As a start, each pipeline should consist of a chorus module and a DSP based multieffects module. These will be chained, with the chorus feeding into the DSP. Both chorus and DSP should be possible to disable/bypass. As a side note, the juno chorus always mixes its output with the dry output. In my pipeline the dry signal is completely separate, so  if we include the original signal in the chorus output, the base signal will be twice as high as all other delayed signals. If we REMOVE the original, we need to consider what should happen when chaining, will the original be included in the DSP input??

Either chorus is always added to the input before the fx dsp (but with mute possibility), which adds the original dry signal to the mix - or the chorus replaces the dry signal before the FX, but that means we have to re-add the dry signal later. Not sure it really matters but lets test. Also, the input to FX DSP at the bottom is missing.

At the moment I have two options for the DSP. The Spin Semiconductor FV-1 or the Daisy seed. The FV-1 has a lot of ready-made effects and may be compatible with cards from Tiptop audio. It is however harder to control as it doesn't have any digital inputs and is limited to three analog CVs. It is also limited to a fixed set of effects (8?) but that can be worked around.

The Daisy is a more modern platform with a much higher-performing DSP and DACs. I think it can be digitally controlled as well as controlled using CVs. 

It would be a good idea to see if a future proof FX pipeline bus can be made - using a fixed number of CVs and I2C/SPI bus inputs. 

Vocoding

Now, this is something I promised myself not to work too much on, but it would be stupid not to include support for it, so here goes.

Each voice card has a state variable filter that can be used to create separate bands from the synth/carrier signal by feeding it into the external audio input of each voice. We can then (obviously) use an external synth as the carrier.

A vocoder switches between a carrier signal (normally a harmonics rich synth sound) and a noise source to make voiced/unvoiced sounds, so we need to be able to select between these. By adding an input selector mux to the external input signal, this can select between external input and noise.

It would be cool to be able to use the synth engine of the XM8 itself for the synth part. I previously considered using voice 1's LPF output as the synth/carrier for all bands. This would let us use the SVF of voice 1 for vocoding as well, giving us up to 16 bands.

I've since reconsidered this, perhaps it would be cool to be able to sum multiple of the voices to get a more harmonic-rich signal? By summing multiple voices and sending them to the external input of every other voice card, we can get a compromise between the number of voice cards used as vocoder bands and voice cards used for generating the carrier. For example, voice 1 to 3 can generate the carrier, and the remaining 13 channels can be vocoder bands.

We do get an issue though, as we need to change the center frequencies of each vocoder band when we reduce the number of bands. This means that instead of having fixed filter frequencies in the vocoder analyzis module, we need voltage controlled ones. These can use a subset of the JP6 SVF, requiring two LM13700 per band.

The first and last bands (LPF and HPF respectively) may stay the same but their CVs must be routed to different voices (at least one of them - we can let the top band always map to the last voice card).

External input select vs voiced/unvoiced

Given the following four channel mux selection truth table:

A B = SRC

---------

0 0 = external input

0 1 = Voice card 1 juno LPF

1 0 = Voice 1 return channel

1 1 = Vocoder noise source.


If we OR the selector signals A and B from the MCU with the V/U signal from the vocoder analyzis module, the V/U will override the MCU, turning on the noise whenever needed.


Return routing

We should make it possible to return the signal from any voicecard to itself or any other voice card. It should also be possible to sum and route multiple voices to the same target. All this can be achieved with a 16 x 16 crosspoint switch. The switching point should be at the summing point of an op amp at each output. This will, however, mean that an input may be routed to ONE output at a time. We can still route multiple inputs to the same output though. Also, we may have to add a resistor to ground at the summing point, to be used when no inputs are connected to that channel?



It must then be possible to select between (global) external in and the per-voicecard return as inputs to the voice card's external input.

Some uses of this would be:

  • Overdrive/feedback - by returning the signal to the same voice card (in phase!) we can make up for the lack of feedback-based overdrive in the filter module. This is how the minimoog does it. It may still lock up filtes though, so it must be properly tested.
  • Phasing - we can sum a set of voices and then chain the output through the rest of the voices' SVF filters, which each one having a different notch frequency set. NB: 
  • Vocoding - return routing lets us sum multiple voices to use as the carrier signal. This requires a special case for the first voice where the routing output is sent to the external input selector to be used as external input for all the other voices


A suggested output block schema


EDIT:

As the ETI vocoder has 14 bands, a simplification would be to allow two of the 16 XM8 voices to generate the carrier, and use the 14 others for vocoding. By doing this, and not allowing a varying number of vocoder bands, we greatly simplify the analysis module - it can have fixed frequency filters and fixed output routing. Two voices for carrier will still mean 6 oscillators which should be plenty for making a complex signal.

We could then also leave out the LPF input to the ext in mux, making the voiced/unvoiced switching much simpler (no need for or-gates). 
 
We should even tap the carrier signal before the return mux to make the routing logic simpler. We need a way to disable output of the two carrier voices from the output. Since the Voice out signal is pre-output VCAs we can tap this and just turn down the voice output VCAs.

Thursday, April 14, 2022

Voice card circuits

Now this is an interesting one. I have mostly completed the voice card layout - it is untested and will surely have a lot of adjustments before I route it and send it to production, but this is what I will base my breadboard testing on going forward. 

PS: There are a lot of comments here and nothing is guaranteed to work! 

Some quick facts:

  • 60 CVs
  • 50 digital control signals
  • 9 trim CVs or alternatively additional trim pots
  • 16-22 SPDT switches
  • 21-31 SPST switches

I have yet to see if I can have both OTA and ladder filters. We'll see.

Anyway, here is the complete voice card - but without the controller and CV generation. When doing the real PCB I suspect the controller/CVs and DCOs will be placed on a separate board just as with the prototype controller, it works very well and keeps most fast moving digital signals away from the analog circuitry.














Thursday, January 20, 2022

Voice card build and testing

I should really start off by screaming as loud as I can: "It's aliiiiiive!". This monday I hooked up a DCO, the waveshaper, a waveshape mixer, the Juno filter and an output VCA, all controlled by the voice controller and its internal modulation matrix. For the first time, I'm able to play my synthesizer using an external midi controller. It feels amazing! To think it took 7 years to get this far...

Anyway, it is not without bugs, but that's why I'm doing it this way in the first place, to test everything and how it works together.

There are a lot of things that work great right from the start. The waveshaper does its job perfectly, giving triangle, bi-directional saw, pulse with PWM and two sub oscillators with selectable square/saw output. 

The waveshape mixer CV generator I designed earlier works perfectly, as does the pulse wave amplitude control. 

The filter filters, though the range may be a bit lacking. It resonates beautifully too. I have yet to calibrate it and test it fully after moving from +/-15v to +/-12V. 

Finally, the output amp and envelope works great, though I had to fix a few rather hard to find bugs in my code.

Now, for each module, here are some things that must be fixed or improved.

Waveshaper

The sine wave amplitude is +/-4V while all the others are 5V. This can be fixed in the voice mixer by changing the input resistor or I can fix it on a new revision of the waveshaper.

The saw and triangle waves have noticeable ringing (noticeable on the scope, not necessarily audible). Adding caps in the feedback of the output will remove most of this. The rest goes away in the filter but I am not sure if it affects anything else. 

Pulse width: I don't think the pulse width is quite narrow enough.

When calibrating the symmetry of the sine wave, I can't seem to get a perfect setting that also gives a centered triangle wave. It is not a big issue though, but it means that the triangle is slightly "lower" than the other waveforms, perhaps by 0.5V or so. It is not audible, but it may affect how the circuit clips when mixing multiple oscillators. I'm going to leave it as it is for the time being.

The square wave sub oscillators are not centred. This is because the reference voltage used in centring is derived from -15V, and when changing this to -12V the reference is wrong. Again not audible but nice to fix.

The triangle and sine waves have a very visible notch at the end of the phase, more about that in the DCO paragraph.

Waveshape mixer

As I wrote in my last post, the AS3364 has a sort of dead band in both ends of the CV. Since all waveshape mixer CVs are generated from one input, it means that there is no way to compensate for this without changing the CV generator. In practice, the dead band means that one waveform fades out completely before the next one has reached its maximum. This is especially apparent in the saw to pulse cross fade, where the wave has become a square before the square has reached its top. It is not particularly pronounced so I don't think I'll do anything about it.

DCO

These are not properly wired up yet, so some of these things may go away - right now they run with the wrong calibration circuit and only produce a 0-5V wave when they should give us 0-10V (at least that's what the waveshaper expects). To compensate for this, I'm running the wave through a non-inverting op amp amplifier with 2x gain.

There are a few shortcomings/bugs in the DCO. First of all, some ringing is introduced along the way. I've added a cap to the feedback of the non inverting amp, a 15pF in parallel with the 56k resistor I'm currently using.

It looks like discharging the DCO cap goes too slowly. Either that, or we are limited by the slew rate of the op amps. In any case, this means that the drop from top to bottom of the saw wave is not instantaneous. When generating the triangle wave we invert half of the saw wave to get the "missing" portion of the triangle - but since the falling edge is not perfectly vertical, we get a notch at the end of the triangle phase. I can't say I hear it, but  at 8kHz it is very visible on the scope.
DCO discharge is not vertical enough, leaving a notch in the saw wave.

Adding a 5p cap across the DCO output op amp takes away much of the ringing at the start of each cycle




15p cap takes away even more of the ringing. Saw output from the waveshaper at the bottom, some new ringing has been reintroduced.

Clicking on envelope retriggers: When we play a new note without releasing the previous one, we get a bit of clicking. So far I've been able to identify two probable causes - output amplitude and centring after the filter, and glitches in the DCO.

The DCO glitches manifest themselves as discontinuities in the triangle wave, it suddenly and abruptly changes value. The reasons are:
  • When changing from a high to a lower pitch: It looks like the period timer is not reset. Instead, the period is reset when the original frequency would have been reset. This means the amplitude is too low and the start/end matching of the triangle fails.
Saw does not reach its maximum as it is reset at the "old" frequency
  • When changing from a low to a higher pitch: now the timer lasts too long, meaning the cap is charged more than it should. It reaches its max and flats out, both distorting the saw/tri and introducing a spike with too high amplitude. That would definitely sound like a click. 





The last of these is to be expected. The DCO is supposed to check the amplitude against a known voltage, but without calibration this won't work. The other one on the other hand, is stranger. I need to check the code.

I also got a more serious error while testing the very limits of the DCO. When playing OCT+4 on the MPK-25, switching between e and g makes the DCO drop to a much lower frequency for a single cycle before recovering. It happens consistently. No idea what makes it happen.




Finally, the range of the DCO is currently too narrow. It maxes out at around 8.5kHz but should reach at least the double or ideally above 20kHz. Replacing the integrator cap and regenerating the timer code will probably solve this.

Filter

As with the DCO, the filter cutoff range needs looking into. I have not tried calibrating the filter at all, so it may not be a real problem though, but it looks like the filter is not open enough with CV at 5v.

There is also something going on when changing the wave frequency. Obviously, when the wave frequency reaches the cutoff point, higher frequencies will be attenuated more, so with the filter at a fixed cutoff, switching between two notes will make the amplitude jump up and down. This may be part of the click-sound I'm hearing. Also, the filter has some form of DC filtering, so the balance/centring of the wave changes with waveform/content. This is particularly visible with narrow pulse waves and resonance. Again, a bit of calibration may improve this but I also need to see what other synths do. Also, introducing keyboard tracking means that relative amplitude should not change as much between the notes.

Some kind of noise at the start of the envelope (not visible in the CV). This was before I hooked up a probe to the filter output so I don't know where it originated from



Weird glitch in output, again, no idea what this was, especially since it is not at the start of the envelope.

Quick retriggering that changes frequency leads to amplitude changes after filter

Output from filter is not centred. Had a lot of resonance and wave was not symmetric around the X axis.



Envelopes

These are software, and mostly finished. I still need to hook them up to the GUI to make it easier to test them, but for now they are controlled through 7bit midi. As they have a very large range - 1ms to 30s, I have to use some kind of linear-to-exponential mapping, or we would not get any resolution at the lower parts of the range. 

I feel that the mapping I use now still does not have right response to it. Fortunately, I have a script to generate mappings with so it's only a question of tweaking this.

GUI

The GUI should - in theory - output everything needed to control the synth over midi already. But since I want to PLAY the synth using my Akai controller, I'm using up the only available midi port on the voice controller card. I need to find a way to merge the midi output from the GUI with the controller. I THINK that MidiPipe may do the trick.