Tiny audio synth implemented on TinyFPGA BX


#32

Also, thanks for the links that you sent through on the github project :).

I’m interested in the PMOD idea that you suggested too - I think I might also build a PMOD module for the MIDI input. My current bread-board setup is a little bit … fragile… especially when put up against adversaries like my cat :smirk_cat:


#33

Some boards such as the myStorm and icoBoard have multiple Pmod connections. The standard was developed by Digilent who make lots of different Pmods, and whose (non-icestorm) boards use them.

Single row Pmods can be plugged into a breadboard and used with the TinyFPGA. There are a few that I plan to try such as the Digilent microphone board. Double row Pmods or double-connector double-row Pmods (like the Digilent VGA Pmod) would need a PCB that you could plug the TinyFPGA into, and which would provide double-row Pmod connectors. I might make one of those. The Digilent VGA Pmod has 4-bits for each color.


#34

I did not have a Midi keyboard, so I bought Rock Band 3 one, as they seem to be by far the cheapest ones that yoiu can get with a Midi out Din connector.

They do seem to have some limited ability to send other midi messages - see http://www.fakebitpolytechnic.com/wp-content/uploads/2013/07/rb3keyboardmidimanualv2.pdf.


#35

I’ve actually just ordered a bunch of stuff from digilent - the VGA PMOD included… I guess the FPGA bug has really taken hold :-).


#36

I tried a version with with the waveform (triangle, sawtooth, pulse, noise) set by switches. It just about had enough PLBs. I ran it on my BlackIce board as that has some built-in switches, but it should work on the TinyFPGA with switches or using breadboard wires a bit like mini patch cables to set pins 16-19 to GND or 3.3v.

It does vary the instrument in interesting ways, but noise is a bit overwhelming, and pulse combined with anything else makes the volume very low.


#37

I now have a midi3 example, which is midi2 plus a rotary encoder for setting the pulse width. I can get a few more different sounds out of it:

Again I tested it on BlackIce with a homemade rotary encoder Pmod, but it should work on the TinyFPGA with the rotary encoder module connected by breadboard wire.

I have ordered some more rotary encoders, so I might make a panel with some switches and rotary encoders on it, in the style of a MiniMoog.


#38

An audio synth board with a TinyFPGA BX socket would be very cool. :sunglasses:


#39

I have now added a midi4 example which has a second rotary dial for sustain. I had to cut the voices down to 6 to fit this in. I pulled your latest changes and incorporated them into midi3 and midi4.


#40

Awesome!!

What rotary controls are you using lawrie? I’d love to get some and have a play too.

I started mapping out the rotary controls on my MIDI keyboard today too - it turns out they’re mapped as B0 0E -> B0 15 messages, so I can now start building something to use them too… Today was a bit of a write-off with other things going on (hot-rodding the coffee machine amongst other things), but I’m hoping to get back into it tomorrow. :slight_smile:


#41

These are the ones I use:

You can also press them as a switch but you need to solder an extra wire to them for that.


#42

I managed to get my keyboard to send messages to TinySynth from the rotary controls and modulation wheels, and use those to control the sound output.

The rotary controllers across the top, in order, control

  • A/D/S/R for the envelope generator
  • waveform select (triangle, saw, square, noise)
  • square wave duty cycle, and
  • filter select (low, high, band, notch).

The modulation wheels on the left control the filter frequency and Q. The filter’s still a bit flakey (I have a mental block when it comes to fixed-point math), but it works well enough for a demo …

You can’t see it in the video, because my arm blocks it, but I’m tweaking the left modulation wheel (filter frequency) at the end.

I’m not a musician, so, yes, I know my keyboard skills are lacking. I’ve been intending to learn to play better, but I keep getting distracted making stuff like this :slight_smile:

D.


#43

That sound is awesome, I love seeing your tiny synth project grow!

What values would you recommend for the audio filter capacitors and resistor? I’m going to be putting together computer project board kits soon and I want to make sure it will work with your tiny synth.


#44

The circuit I’m using at the moment is:

             330 ohm          10uF
  DOUT   ---./\/\/\.---o------| |-------> "Analog" output
                       |
                      ---
                      ---  0.1uF
                       |
                       |
                      --- GND
                       -                 

From memory I think I chose the values to give a -3dB point of about 5kHz… but that said, my background is software, so I’d take anything I say here with a healthy dose of salt … :rofl:

D.


#45

My Nintendo Rock Band 3 keyboard does not have all the rotary controllers that your Roland keyboard has, but it does have a touch panel that acts like a rotary controller. The touch panel has two functions depending on whether you press the button next to it. It can either send an xC0 controller 1 (modulation wheel) message or a xE0 pitch bend message. There are also up and down buttons for setting the program (xC0 - patch change) and it can send system stop, start and continue messages. The keyboard can also send drum note on and note off messages on channel 10 - the bass notes can be switched to playing drums.

I only got clicks when I tried your midi_voice_control example as sustain was zero and I couldn’t change it.:sob: So I gave sustain an initial value. That would probably be sensible for several of the controlled variables.

The modulation wheel which sets the frequency for your filter had no effect as the filter was off and I could not set the filter type.

I implemented the xE0 pitch bend message and mapped it on to one of the controlled variables, and I experimented with other things to make the touch pad do something useful.

I am not sure what is going to work best for my keyboard. It is probably a combination of midi messages and some knobs and switches directly connected to the FPGA.

Which Roland keyboard do you have?


#46

Your code here only allow one of the 4 waveforms to be used at a time, whereas my switches allowed more than one of them to be set, and that allowed extra sounds. Are they designed to be used in combination?


#47

It’s great that you’ve managed to get it working and sorry it’s been a bit of a hassle for this one. An instrument with very fast attack/decay, and zero volume sustain will, as you’ve discovered pretty much sound like a click. :flushed:

The default values are a great idea. I’ll add some in. Even on my keyboard I need to tweak the controls to get the keyboard to “re-send” the values after a FPGA power-on, so it’s been a bit of a hassle for me too.


#48

The different sounds can be used in combination - the SID chip allowed it, so so did I… (the outputs are "AND"ed together).

I just couldn’t think of a nice clean way to map the multiple enable signals to a single rotary dial, and I haven’t figured out how to get any of the toggle buttons on my keyboard to send useful data over MIDI that I could use :slight_smile:


#49

Here is a prototype for one:

I am waiting for more switches and dials that I have ordered to arrive, so I can finish the control panel.


#50

Hey everyone,

I was researching the Novation Peak synthesiser. It has three “digital NCOs (Numerically Controlled Oscillators)” generated by three FPGAs.

I was interested in what an FPGA is and how it works, after some internet searching, I found this forum and this post.

I’m a software developer by day, and hardware hacker, synth player in my spare time. So obviously now I waiting for my order of a TinyFPGA board!

I really love the tiny synth you’ve built @gundy, and the TinyFPGA platform @lukevalenty. I am excited to build my first FPGA based synth.

I have built one small diy kit synth so far, so my brain is running around with ideas on how and what to build the tiny-synth into.

I will be back once my TinyFPGA arrives I’m sure with so many questions, however there is one I have now I wondered if someone could help with.

On the audio output you have an RC Filter. What is this needed for? The reason I ask is I plan to output the audio through one of my synth filters, but I wondered is the RC Filter you’re using needed to bring the output down to audio levels or to protect the FPGA circuit? I wasn’t quite sure from reading the forum post and documentation.


#51

Hi, glad that you feel inspired by the project. The TinyFPGA was a great way to experiment with this sort of thing on a hardware level. I’ve had a lot of fun with it.

To attempt to answer your question, the main reasons for the RC filter are to:

  • get rid of all of the high frequency noise (the first R/C low-pass that the signal goes through), and to
  • bring the “mid-point” of the signal down to zero-volts (the DC blocking capacitor on the output).

The reason there’s so much HF noise on the output is because the pulse-density-modulated output could, worst case, be switching at up to about 8MHz I believe (for a zero-volt or 50% signal).

Depending on how the input is coupled on your equipment, you might not need the filters, but from a safety point of view I think they’re a good idea. Saves your downstream equipment from unnecessarily high slew-rates, and certainly sending DC biased signals into audio equipment doesn’t seem like a good idea.

D.