[2303] Modeling the Stringz-n-Thingz Synth

Date: September 14th, 2017 | Comments : [2] | Categories: DIY.

I bought the Native Instruments Kontakt sampler a while back (when it was on sale) as I wanted to use it as a multi-functional instrument. However, I soon discovered that it is also really good for creating your own sampled instruments, quickly and easily.

In fact, all you have to do is drop a sample into Kontakt’s rack and it instantly becomes a midi-controlled sampler, all created from a single sound. It is so cool.

Fast forward… so I decided to create some virtual instruments of my own by using samples that I recorded to build up new models, and I have had a lot of success with it.

I decided I wanted to make a digital model of the ancient Paia Stringz-n-Things synth, and since it is well documented, it seemed like an easy project to tackle. However, occasionally a project takes on a life of its own.

The string sections are based on pulse waves with duty cycles of 12.5% and 25% for the cellos and violins. Add the ADSR and some chorusing and you’re done.

The first problem is that I could not find a tone generator to make the waves that I needed… plenty of them could make square waves (50% duty cycle) but manipulating the duty cycle was not available. Well… I did find one generator that claimed to do it but the wave was nasty looking. I wanted super-clean pulses waves just like in the original. (Don’t write and tell me that there are sound generators that can do this as it is too late now!)

So I did what any old coder does, I wrote a program to create the waves in raw data. Not too hard, right? First you have to determine how many samples you need for a given note. I selected A3, as it is a nice round number, 220 Hz. Then you calculate how many samples are taken on each cycle of the wave at the rate of 44100 samples per second. The answer is then your count of how many numbers need to be generated. (The answer is 200 but that’s a cent or two off, which is no problem and can be fixed in Kontakt.)

Next you decide how big the numbers have to be, i.e. the volume range. For example, 8-bit is 0 to 255 (unsigned), and 16-bit is 0 to 65535 (unsigned). But I want a 24-bit signed number and there is no 24-bit integer in the programming language. No problem… just generate it one byte at a time and use 3 bytes for the 24-bit word.

The max 24-bit number is really large but all of the range is not necessary so a -12 db tone is perfect. What value is that? A 12 db loss is about 25% of the max so you scale the numbers down by that factor. But, when generating bytes directly the negative integers are represented by what? Geez, I vaguely remember that, but not exactly sure how to do the conversion, so time to dig out the old reference manuals. It all comes back to me and I quickly calculate the negative peak value… using Windows Calc. Don’t ask.

Now, with the values calculated of the positive and negative peaks, it is a simple chore to write a program to save raw data (200 24-bit numbers per cycle) to make the pulse wave of the proper duty cycle. The only problem is that I cannot remember how to make a file of bytes, so back to the programming manual. Duh, it was just what I thought.

I quickly write the program… but my ancient compiler will not run in Windows 10. Fudge! Dosbox to the rescue… and another 30 minutes involved while I refresh my memory on how Dosbox works. Anyway, after a couple of aborted runs because of programming typos, the file compiles into an executable.

I run the Pulse program, and miracle of miracles, it writes a file of bytes exactly the right size to the hard drive. Win win!

Only thing left to do is start up Audacity, import the raw data, and save as a wave file. Audacity chokes on the data. Not sure what is happening but I lose another 30 minutes messing with it.

Finally I switch to Wavosaur and it imports the raw data perfectly. Only, the waveform on the screen does not look like a pulse with 25% duty cycle. It looks like tiny blips. WTF?

I import the 12.5% duty cycle wave and it looks much the same. On a hunch, I import the wave again but change one setting and a beautiful pulse wave appears. Nice!

It even plays and sounds like it should. What was the fix? The program lets you import the data in Little Endian or Big Endian format. I was positive that I wrote the bytes to the file in Little Endian format, but Wavosaur says different. No one cares at this point as it is now working.

I save the result as a wav file and it plays in Winamp, so all is good. I make quick work of converting the 25% and 50% pulse data into wav.

I decide next that I want a 33% duty cycle wave, only because I can, and with a quick mod to the program, a new file is created and imported into Wavosaur.

As long as I have this working so well, I’m going to mod the program to create perfect sawtooth wave data and convert that into a wav too. Might come in handy.

Anyway, what seemed simple ended up taking hours to get working, but in the end, I am very happy with the results!


2 Responses to “Modeling the Stringz-n-Thingz Synth”

[779445] admin Says: 2:29 am, September 15th, 2017

The chorusing in the Stringz-n-Thingz is not the average BBD chorus box. There are two SAD-1024 delay chips used, each with their two sections in series for longer delay time.

The SAD1024s are driven by separate 4013 driver chips but each is modulated by a pair of 566 oscillator chips. One set of 566 chips are the LFOs and have all components the same except for one resistor that ensures that the LFOs run at slightly different rates, since they are controlled by a dual section pot.

It is a cool design and the complete schematic is available on http://www.paia.com

[779493] admin Says: 2:55 pm, September 17th, 2017

I finished assembling the samples into an instrument in Kontakt. This project was a success, but also a big failure.

It was a success in that I was able to duplicate the sound of the ancient synth, and in the process, I learned a lot about making instruments from samples in Kontakt.

It was a flop in that the Stringz-n-Thingz is one of the most cheesey sounding 1970s string machines. It sounds much like a cheap organ sent through a chorus box, and when I listened to some demos on Youtube, the original sound was very similar to my sampler instrument.

Fortunately, there are some features in Kontakt that can be added to the model which make it much more useful, though still with a retro string ensemble sound.

Fun project, and I will use it as the base instrument when I start learning the Kontakt scripting language.

Thanks for reading!

Best regards, Jack


AMZ Home Page

Guitar FX PCBs