synaesthesia
Joined: May 27, 2014 Posts: 291 Location: Germany
Audio files: 85
|
Posted: Sat Nov 22, 2014 3:42 pm Post subject:
Walking Bass Subject description: another ChipTune circuit |
|
|
Another ChipTune circuit! This circuit generates something similar to a walking bass line. It cycles through four base tones accompanied by a constantly changing melody. Pitch and tempo of that tune can be varied by pots.
The circuit uses a shift register clocked at an audio frequency that is fed back through an XOR gate. The shift register output that is fed back is selected by a 4052 analog switch. A low frequency signal toggles one input of the XOR, determining whether the feedback is inverted or not. The output signal is taken from one of the shift register outputs multiplexed by a 4051. The shorter the shift register becomes this way, the higher the output frequency that is generated. The controls for both multiplexers are varied by feeding them from a low frequency counter.
You can permute the outputs Q1 to Q5 from the counter to generate different melody lines. However, I recommend to leave Q0 connected to the XOR. If you swap the controls for A and B of the 4052, you get a 1234 pattern of the four base tones instead of the 1324 pattern that the schematic uses.
To be honest, I am still trying to figure out how exactly the variation of the melody is created. I let it run for more than 5 minutes and haven't noticed a repetition of the pattern. If you look at the recording in a waveform editor like Audacity, you will notice that the melodies accompanying the base pattern are similar, but not identical. Sometimes brief gaps occur. Not sure yet why that happens, but overall the rhythm is not interrupted by that.
Description: |
|
Filesize: |
49.06 KB |
Viewed: |
459 Time(s) |
This image has been reduced to fit the page. Click on it to enlarge. |
|
Description: |
|
Download |
Filename: |
WalkingBass.mp3 |
Filesize: |
1.25 MB |
Downloaded: |
929 Time(s) |
|
|
synaesthesia
Joined: May 27, 2014 Posts: 291 Location: Germany
Audio files: 85
|
Posted: Sun Nov 23, 2014 3:46 am Post subject:
|
|
|
Ok, here is how it works. The low frequency input to the XOR gate in the feedback path determines whether the shift register is in inverting or non-inverting mode. Because the mode is permanently toggled by the tempo counter, the circuit will alternate between one of the four base frequency tones and a melody tone. When the shift register is in inverting mode, it acts as a Johnson counter divider. The tap selected by the 4052 determines the length of the shift register and thus the resulting base frequency. In the current schematic those four frequencies will have a ration of 8:7:6:5. By using other taps you can select other base frequency ratios. When going into the non-inverting mode, the shift register stops working as a Johnson counter divider. The current bits in the shift register are just rotated and their pattern determines the actual waveform generated for the melody tone. That is what makes the melody appear random: the melody tone depends on the bit pattern present in the shift register at the very moment the circuit goes into non-inverting feedback mode.
I made a few changes to the original circuit. First of all, the 4053 is not needed at all. Any output of the shift register produces the same result. So I dropped that. Then I doubled the value for C2 to improve the range for the tempo oscillator. Of course, if you use a 4040, you can also just move all taps to the next higher output. Finally, I was able to get rid of the gaps. They occur when the content of the shift register up to the tap point happens to be all 0 or all 1 bits in the moment when the feedback switches from inverting to non-inverting mode. By running the output through a second XOR together with the audio frequency, there will never be silence. However, the result doesn't sound as good as before. So another output from the shift register is mixed to that using a resistor network. The result actually sounds nicer and has no gaps.
I have used a 4040 here because I prefer 8 notes to be played before the next base tone is selected. If you want only 4 tones, you can use half of a 4520 instead. Send the low frequency directly to the XOR and use Q2 and Q3 to control the 4052 then. The circuit as-is needs 5 chips. If you use a 4060 for the tempo counter and two XORs for the pitch oscillator, you can drop the two 40106 gates and the whole circuit can be built using only 4 chips.
Description: |
|
Filesize: |
44.9 KB |
Viewed: |
422 Time(s) |
This image has been reduced to fit the page. Click on it to enlarge. |
|
Description: |
|
Download |
Filename: |
WalkingBass2.mp3 |
Filesize: |
1.5 MB |
Downloaded: |
844 Time(s) |
|
|