offroad

Getting "organized"...

Recommended Posts

Hi,

 

I've been working on a transistor organ emulation for Retrocade.

There's still a long way to go, but it's now at the point where you can jam around with it. It needs a lowpass filter (/guitar amp). That's intended, it models a "reed" type drawbar as that's the starting point for tone generation in the real-world organ.

 

The bitstream is attached, should be "plug-and-play" (any MIDI channel will do).

It's fully polyphonic, but headroom is currently set to 3 bits only (~8 simultaneous keys).

 

There are 96 tone generators derived from 12 oscillators with 8 divider stages and individual wave generators. The generators initially output sawtooth waves that are then input to 5th order polynomials (Horner scheme), one segment for each halfwave.

 

Here is one octave out of 8.

post-36723-0-21723600-1390166530_thumb.p

 

And all this fits into 1/8 of the Spartan 6 SLX 9!

post-36723-0-59785600-1390166529.png

 

The "trick" is that all number crunching is pipelined over a single 18x18 multiplier that runs at true 96 MMUL/s. It even has quite large idle periods left, and 32-bit access is muxed 2*16 over one port of the DP-Ram with the other one unused.

The three large blocks are 96 kHz samples. The small bursts in-between are the 12 oscillator stages, which drive 2*4 dividers with 6 polynomial coefficients each.

"Zoom in" goes quite a long way still...

 

post-36723-0-97354900-1390166530_thumb.p

 

As a disclaimer, this is an engineering prototype, not a finished musical instrument. Did I mention the lowpass filter? The key click is genuine "physical modeling", regardless of whether I want it or not :)

 

Attached

  • Bitstream for Papilio Pro and Retrocade (v0.0001)
  • Source in case someone wants to play with it (import flatImpl.v and ip/clockTripler.v, the Xilinx tools can't cope with my (ab)use of `include. )
  • This mainly "notes to self":
    • Do not copy to project folder
    • "make" (cygwin) simulates with iverilog / gtkwave
    • "make flatimpl" rebuilds
    • Remove the location constraints from the .ucf file to use the whole FPGA floor for place-and-route
    • LUTs / logic is the bottleneck for size, and the brain-dead (but functional) MIDI implementation uses quite a few of those... better: ring shift register

archive.zip

Share this post


Link to post
Share on other sites

Woah! This looks awesome! I'm out of the office for the three day holiday weekend, but once I get back I'm going to fire this up and give it a try.

 

Jack.

Share this post


Link to post
Share on other sites

well, the code is a total train-wreck. An unfortunate victim of some mad-scientist coding experiments...

Attached a cleaner rewrite of the synth "engine". Waveforms look OK, but I haven't synthesized it yet. More on this later.

rewrite.zip

Share this post


Link to post
Share on other sites

Ok, I fired this puppy up and hacked around on the keyboard with it, sounds cool! Especially when you pay chords on it, you can hear that organ quality. :)

 

Is it possible to record a video? I'd like to post this project to the blog and showcase.

 

Jack.

Share this post


Link to post
Share on other sites

Well, maybe not ready yet for demoing. Might take it to the rehearsal room one day when it's fully functional and run it through the leslie cabinet.

 

I went to a hardware store today, I've got this idea to build actual drawbar controllers for a little over €10 (80 mm potis are €1 each, and three feet of 1/2 inch square wood)...

Share this post


Link to post
Share on other sites

yee-haw.

 

Especially considering that I have done absolutely nothing to tune the sound yet (just followed the schematic, so to say), this puppy starts to be real fun.

Still has some quirks (well, so has the original, at least this one stays in tune) but we're getting there.

 

 

 

in the attachments, the source (PlanAhead / ISE14.7) and a bit stream for Papilio Pro + Retrocade:

Plug in MIDI and sliders to ADC channels 1..4, the ones closest to the SD card.

Controls are

- 16 '' drawbar

- 8 '' drawbar

- 4 '' drawbar

- "mixture" (3 overtones)

chances are good it'll make some noise even without anything connected to the DACs. Jumpers to +5V are one solution.

 

So far it runs ~100M multiplications per second and uses roughly 1/8 of the FPGA resources.

Attached also a short audio demo, straight into Cubase, no further processing.

SK61_0v01.pa.zip

impl.bit

1969CaliforniaCheeseAccident.mp3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now