Tiny audio synth implemented on TinyFPGA BX


#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.