electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Lunettas - circuits inspired by Stanley Lunetta
Pattern Generator
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [4 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
synaesthesia



Joined: May 27, 2014
Posts: 291
Location: Germany
Audio files: 85

PostPosted: Mon Aug 31, 2015 1:01 pm    Post subject: Pattern Generator
Subject description: for melodic sequences with variations
Reply with quote  Mark this post and the followings unread

In another thread PHOBoS commented that it would be nice to have a bit more variations in the short melody sequences that the Opus circuits typically generate. I agree to that, but haven't found a good circuit for that so far. Simple shift register patterns repeat to fast. Counter patterns are too regular. Random patterns do not sound melodic. A circuit that generates brief repeating sequences that change from time to time time would be interesting...

I think I finally found something that is useful and can improved on further. The basic idea is that of a shift register with feedback. That gives you a basic sequence as long as the number of flip-flops. To that I add switchable additional inverters between the flip-flops. The inverters are activated by analog switches from a 4053. XOR gates could do the same job. Depending on the number of inverters being even or odd, the sequence length then is either the number of flip-flops or twice as long. The interesting twist is that the pattern output XYZ that can be taken from the tap points depends on both, the input pattern ABC and the current content of the shift register at the moment when the input pattern ABC changes.

Instead of a 4015 and inverters, I have used a 74HC175 quad D-type flip-flop wired as a shift register in this circuit. This gives me the inverted outputs for free and makes the circuit easier to understand. The 4053 is used to select whether the non-inverted or inverted output of each flip-flop is clocked into the next one. To advance from one output pattern to the next, the HC175 is clocked with the STEP signal. To change the pattern, the input ABC is changed. I have used a simple counter in the recording for that. However, it is important that the clock of the counter that drives the ABC inputs is not derived from the STEP clock. I used a second oscillator to drive it. It might be possible to drive it with the step clock divided by a prime divider, or at least a divider that is not a power of two.

To demonstrate the melodies that are generated from the 3-bit XYZ binary pattern output, I have used my current controlled oscillator circuit. You could use a resistor network driving a 4046 or a VCO circuit as well. The recording starts with a slow step speed. After 1:30 I increase the velocity, and then near the end I increase it once again.

There is one flaw in the current circuit. Depending on the bit pattern in the shift register and the active inverters, there is chance that the resulting output pattern XYZ does not change any more while ABC is stable. Once the input pattern XYZ changes, the output pattern will start to change again. I gave this circuit the suffix V1 because I want to experiment a bit more with it, for example with longer shift registers. Please share if you find any improvements.


PatternGeneratorV1.PNG
 Description:
 Filesize:  32.56 KB
 Viewed:  713 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

PatternGeneratorV1.PNG



PatternGeneratorV1.mp3
 Description:

Download
 Filename:  PatternGeneratorV1.mp3
 Filesize:  2.02 MB
 Downloaded:  1088 Time(s)


Last edited by synaesthesia on Sun Dec 06, 2015 2:46 am; edited 1 time in total
Back to top
View user's profile Send private message
commathe



Joined: Jul 26, 2013
Posts: 153
Location: Beijing
Audio files: 5

PostPosted: Fri Sep 04, 2015 12:11 am    Post subject: Reply with quote  Mark this post and the followings unread

Really, really, really enjoying this one! I love the sudden skips and faster runs that come out of nowhere. Awesome!
Back to top
View user's profile Send private message
synaesthesia



Joined: May 27, 2014
Posts: 291
Location: Germany
Audio files: 85

PostPosted: Sun Dec 06, 2015 2:52 am    Post subject: Reply with quote  Mark this post and the followings unread

Here is pattern generator V2. This time I had the generation of a control voltage for a VCO in mind. So rather than using a resistor network with exponential values, I used the same values but made them switchable. The number of possible tones in a melody pattern equals the number of closed switches plus one. The pull-up resistor is necessary to lift the voltage to a higher level that is needed for the VCO.

I have used two 4015 shift registers with four different feedback modes. A 4052 analog switch is used to select which feedback mode is active. The first mode configures the two 4-bit shift registers as one 8-bit shift register with direct feedback. The second mode configures them as two separate 4-bit shift registers with inverted feedback, giving them a period length of 8 clocks as well. In the third mode they are configured as an 8-bit shift register with inverted feedback which results in a period length of 16 clock cycles. Finally, the fourth mode results in two separate 3-bit and 4-bit shift register, both with inverted feedback and periods of 6 and 8 clocks cycles, which repeats after at most 24 clock cycles. Most of the time a configuration change also introduces a variation in the melody. This is because the bit pattern stored in the registers changes differently in each configuration.

I could have used switches to select the mode, but because there were two inverters left, I have built touch switches. These touch switches work pretty reliable, but need a very small current flowing when touched. Works fine if you moisten your fingers a bit, but if that doesn't work for you, just replace the touch contacts by a simple momentary switch. Leave the inverter circuit in place however, because it gives you a nice toggle action. By the way, this touch switch works with any CMOS inverter, even those without a Schmitt-Trigger input, like the 4049 or 4069. When closed permanently for more than a second the output oscillates slowly.

The simple VCO (I rather call it a current controlled oscillator) has been improved quite a bit by adding a resistor to the feedback path. This widens the short low pulses and limits the discharge current. In addition to that, a capacitor was added to filter the output and make it sound much nicer. Last but not least, the frequency range of the VCO is determined by RV2.

For the recording the two inputs A and B were wired to a slow counter, so that the circuit cycles through all four configurations. The tempo is at a rather high setting to demonstrate as many patterns as possible. I have left the switches for the resistor network alone during the recording. The switches for two of the outputs for each shift register (Q0 and Q2 for both) are closed. RV2 is at the middle position.


Pattern Generator V2.PNG
 Description:
 Filesize:  37.05 KB
 Viewed:  610 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

Pattern Generator V2.PNG



PatternGeneratorV2.mp3
 Description:

Download
 Filename:  PatternGeneratorV2.mp3
 Filesize:  1.47 MB
 Downloaded:  779 Time(s)

Back to top
View user's profile Send private message
synaesthesia



Joined: May 27, 2014
Posts: 291
Location: Germany
Audio files: 85

PostPosted: Sun Dec 13, 2015 6:05 am    Post subject: Reply with quote  Mark this post and the followings unread

And this is pattern generator V3. Very similar to V2, but with a few nice improvements. First, the tap points for the resistor network changed. Both Q3s are omitted. Q0 and Q2 of the second shift register have two resistors now, so that these bits can be wired with two resistors resulting in a higher note.

This time a 4053 analog switch is used to select which feedback mode is active. The first three modes configure one 4-bit shift register with inverted feedback and a copy shifted into the second. The fourth mode configures both together as one 8-bit shift register with inverted feedback. Again, a configuration change typically also introduces a variation in the melody.

I kept the touch switches in the circuit unchanged. The resistor in the current controlled oscillator was increased to 10K. Together with the cap this creates almost a saw wave at the output. The last addition is an additional cap added to the oscillator through the third analog switch in the 4053 and controlled by the tempo clock. When connected this makes the melody double tonic. A value of 22nf or 33nf works best here. It determines the interval between the two notes.

For the recording I kept the tempo low at the beginning with both pots at middle position. The DIP switches at the resistor network remain unchanged (A0, A4, A6 and A7 are closed). The jumper is initially open. At 1:23 I closed the jumper to enable the double tones, and keep that closed until a few seconds before the end. During the recording the two touch switches were used to change the mode and the melody with it. I tried to do that each time a pattern repeated twice.


PatternGeneratorV3.PNG
 Description:
 Filesize:  62.41 KB
 Viewed:  551 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

PatternGeneratorV3.PNG



PatternGeneratorV3.mp3
 Description:

Download
 Filename:  PatternGeneratorV3.mp3
 Filesize:  2.88 MB
 Downloaded:  817 Time(s)

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: mosc
Page 1 of 1 [4 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Lunettas - circuits inspired by Stanley Lunetta
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use