Implementing a Decay Curve Generator into Microprocessor

In the previous article, I considered how to calculate a decay curve without using a lookup table. I tried implementing it to a microprocessor (atmega168). But I hit a few obstacles. First I planned to keep envelope value as a Q10.6 fixed point number (meaning 10 integer bits and 6 fractional bits), so that I can conveniently use a 16-bit integer. But I found it does not give enough resolution of the data. I needed to extend it to 32-bit (Q10.22). Integer part is enough with 10 bit because it's the resolution of the PWM output. Then I wrote a program like following (shortened from the actual program). It looks…

Calculating a Decaying Exponential Curve Recursively by using Fixed Point Multiplication

I've been working on implementing Envelope Generator into microprocessors. Output of an Envelope Generator consists of rising and falling exponential curve. I'm currently doing table lookup to generate those curves. https://github.com/naokiiwakami/vceg This is a quick and straightforward approach, and you don't have to be worried much about data resolution. But the program is a little complicated, and memory consuming. I don't really like this approach. I don't really like the approach, so I started to think about alternative approaches. Mathematically, a exponentially decaying curve can be calculated recursively by following formula: V(i+1) = V(i) * k where 0 <= k < 1 This is very simple. You can program this…

Where should I connect the USB Connector Shield, or should I not?

I'm about to start wiring USB socket to experiment MIDI USB. But first, I wonder where I should connect the connector shield to. Should I connect the case to GND or should I do otherwise? I found a good thread in Electrical Engineering Stack Exchange. tl;dr: Never connect to GND. Leave it unconnected or connect to the shield of the rig. I should take the former in my current project. Although it's long, this thread is pretty interesting so is worth reading.

DC-DC Booster Design using MC34063

DR-110 that I am modifying currently takes 6V power supply from 4 AA batteries or 9V from an AC adapter. But since I'm thinking of connecting to USB, it's convenient if we can draw power from it. From the device circuit diagram, I found the device requires at least 6V supply although USB supply power is 5V. It's a good opportunity to learn how to use DC-DC booster since more project that uses USB will come. I live near Jameco. It's the best to use one they carry. It's even better if the package is DIP since I often use breadboards. I checked their catalog and found a switching regulator…

DR-110 Driving Pulses

The schematic of DR-110 is: For this circuit, each percussion element seems to sound when you put a negative pulse of width 1 ms. I've put oscilloscope to observe the pulses come as expected. Here are the pulses to the bass drum and output: Blue: Input pulse, Red: Output Blue: Input pulse, Red: Output The pulse width looks to be around 1.3 ms. These are the pulses to the snare drum and output: Blue: Input pulse: Red: Output Blue: Input pulse, Red: Output For the hand clap, I only took pulses: Blue: CP I, Red: CP II This is a simulated output of the bass drum circuit: The output would…

Started Modifying DR-110

It's been a while since I stopped building things. But it's a new year, I'll try restarting it. For not making things for long, I cannot do anything aggressive yet. I would start with picking up an old DR-110 from my toy box to modify it. This device is half-dead. Upper half of the display is not functioning. Membrane switches are not working well, too. The case is nice looking, so it may be fun to keep it and make it work. But it's an old device and what can be done is pretty limited compared to contemporary feature rich devices. I would go simply with replacing the control by…