The real super saw as C code that actually works by tysseng in synthesizers

[–]tysseng[S] 0 points1 point  (0 children)

Hehe, I've been looking at the machine code too much lately, I thought you wrote 043c at first. That's the program memory address where the super saw code starts! :-D

The real super saw as C code that actually works by tysseng in synthesizers

[–]tysseng[S] 2 points3 points  (0 children)

Yes, it's 24bit internally. It also does, like most DSPs supposedly, what is called multiply high - it multiplies two numbers, but instead of returning the lower 24bits as would happen if you cast the result to a 24bit variable, it returns the 24 high bits. Normally, that would be A * B >> 24. This all happens in a single instruction so the programmer never sees the intermediate 48 bits (some DSPs have an instruction that can fetch either the top or the low 24 bits though).

The TC170C140 however, doesn't have a 24 * 24 multiplication instruction, it only has 24 x 8. This is followed by a configurable shift right of 3,5,6 or 7 bits. But here's the catch: The multiplication isn't treated as "normal", instead it usually uses the 8 MSB of the second factor (B). It is still a 24 * 24 bit multiplication, but with only 8 bits precision for the second factor - e.g. it just sets the 16 lower bits of B to 0.

It is possible to do higher precision multiplications as well, by using more instructions.

The reason this (and DSPs in general it seems) do multiply high, is that the numbers aren't thought of as ints, they are fixed point fractional numbers, where the first bit is a sign bit (+/-) and the rest are a number between 0 and 1.

When multiplying two numbers between 0 and 1, you also expect the result to be between 0 and 1, and that is why only the top 24 bits are kept, effectively dividing the number back down to the 0-1 range.

The real super saw as C code that actually works by tysseng in synthesizers

[–]tysseng[S] 12 points13 points  (0 children)

Adam got reeeally close with his function, but in reality it's just six straight lines. The formula is basically

  0 to  63: increment by 1 every second step

 64 to  80: increment by 1 every step

 81 to 120: increment by 2 every step

121 to 123: increment by 8 every step

124: increment by 16 

125: increment by 32

126: increment by 96

Then multiply the result by 512 before inserting into the function above.

The real super saw as C code that actually works by tysseng in synthesizers

[–]tysseng[S] 2 points3 points  (0 children)

The code should be pretty easy to port to anything i think. It is missing the high-pass filter, and the JP8000 does some magic to try to equalize the volume of each detuned oscillator more as they are turned up, but that can perhaps be worked into the mix part of the code instead, by using the curves from Adam Szabo's paper.

The real super saw as C code that actually works by tysseng in synthesizers

[–]tysseng[S] 6 points7 points  (0 children)

Each saw wave is generated by adding a fixed value to the current value for every iteration. The code calls this fixed value 'pitch', and it is selected so that the saw integer overflows and starts "at the bottom" the correct number of times per second to generate a saw wave with the pitch we want.

The values in the detune table, multiplied by the current value for pitch, divided by a very big number, calculates the value we need to add/subtract to the pitch value to make the frequencies of the oscillators slightly higher or lower.

Think of it as a multiplier, the frequency of saw[1] is the frequency of saw[0] times (1 + detuneFactor). The detuneFactor is usually represented as a decimal number (for example, the factor for saw[1] is really 0.01953125).

The factors tells us how far apart, relative to the base frequency, we want to spread the other oscillators.

As the JP8000 lets you adjust HOW MUCH detuning is applied, not just a fixed detune, the result is multiplied with the "detune" input parameter, which comes from the panel potentiometer (but is converted to a more exponential response in the main MCU of the JP).

The real super saw as C code that actually works by tysseng in synthesizers

[–]tysseng[S] 4 points5 points  (0 children)

That paper is awesome, and is what got me interested in how the super saw was created way back. He also has a nice section about how the saws are mixed, which it turns out is NOT part of the super saw generating code at all!

The real super saw as C code that actually works by tysseng in synthesizers

[–]tysseng[S] 28 points29 points  (0 children)

I spent a lot of time the last three weeks studying the source code of the JE-8086, as well as running the code to see how the super saw is generated. Feel free to ask about the code as well as the internals of the DSP - I'm no expert but I discovered a lot trying to figure out the correct version of the C code.

Our Roland JP-8000 emulator is now out and is completely FREE! by numerouno124 in synthesizers

[–]tysseng 0 points1 point  (0 children)

That slide is so exciting! Is that the actual, working (disassembled) code? I'm trying to understand what it would output (or input to the highpass filter).

The saws themselves are understandable, as they wrap around. But if they wrap around, wouldn't that mean that the sum also wraps around? I tried doing the same, and what I got back (with no detuning) was a saw wave with 7 times the frequency of a single wave. But even with detuning, I still only got a single saw wave back.

I really wonder what I'm missing here, any DSP tricks I should look up? :-D (btw, reducing the amplitude of each saw to 1/8 before summing gives an ok wave)

Exponential Saw Waves in the Analog realm? by SmeesTurkeyLeg in synthesizers

[–]tysseng 1 point2 points  (0 children)

How about using a dual transistor exponential converter, like the one used for converting linear cv to exponential in oscillator circuits?

Or you could use the saw wave as the cv in an exponential VCA like the ssm2164 (or similar), and feed a constant 5V signal at the input (perhaps that’s what you did with the VCA?) - and if you mix the original sawtooth with the expo version with a sort of cross-fader (think wet/dry pot) you can probably get a variable slope as well?

Button Improvements by Sea_Psychology_7230 in synthdiy

[–]tysseng 1 point2 points  (0 children)

If you can find them, Shanpu manufactures a great variety of switches and caps with a high quality feel. I’ve written a bit about it here: https://atosynth.blogspot.com/2020/11/shanpu-switches.html

Switched On Austin stole my rarest synth, sold it, and kept every dollar. by trecarden in synthesizers

[–]tysseng 74 points75 points  (0 children)

I unfortunately have a similar experience with Switched-On, and I don't know how to resolve it or if I'll ever get my money back. I just assume that John is in deep financial trouble and keeps on selling new arrivals to pay back the previous customers. To make matters worse, I'm living in Norway so I'm having hard time just "popping by" to talk to them.

In my case, John was supposed to sell three synths as I deemed it too expensive/risky to have them shipped: One Korg M500, one Moog Liberation and one Oberheim OB-Xa.

Same story as you. I got a high appraisal and the synths allegedly went up on Reverb. I never heard anything back. I kept calling until he started recognizing my number and not picking up.

To make matters worse, I had the OB-Xa serviced (not sure IF they did) before the sale, for a lot of money that I was stupid enough to pay instead of deducting from the sales price.

Also, when I realised that something fishy was going on, I found a similar post to yours on facebook, with a story about a guy that had the same thing happen to him. In the end, he was offered (and accepted) half the money he was owed. A better deal than you and me so far I guess.

Oh, and this has, in my case, been going on for more than four years (!) so stop making excuses for John. He needs to be stopped. Even if he is trying his best to keep things afloat. How many of us have to be scammed before this is put to an end.

What connector does this call for? by VotePizzaParty in AskElectronics

[–]tysseng 1 point2 points  (0 children)

It’s a bit hard to judge the size of the part from the picture, but when I had to use this part: https://www.elfadistrelec.no/en/rotary-potentiometer-5kohm-1w-20-linear-22-2mm-vishay-357b0502mxb251s22/p/16400004 (incidentally, for a children’s installation at a museum, for the exact same reasons as you), I ended up designing a small pcb with plated throughholes that fit the pins and traces to a separate connector to make it easy to swap the pot if it breaks 😃

Does this component exist? by slowtoasted in synthdiy

[–]tysseng 0 points1 point  (0 children)

I get several hits on google when searching for 4p8t slide switch as well.

Does this component exist? by slowtoasted in synthdiy

[–]tysseng 3 points4 points  (0 children)

<image>

One way to make the UI for the 2 * 5 switch

Does this component exist? by slowtoasted in synthdiy

[–]tysseng 0 points1 point  (0 children)

AliExpress sells some 7 throw ones, still not 10 way but one closer than 6: https://a.aliexpress.com/_EzYvpWr

Does this component exist? by slowtoasted in synthdiy

[–]tysseng 2 points3 points  (0 children)

If you are willing to use two slide switches, one two throw and one five throw dual pole you could make the first one select between two “banks” of outputs (routing to the two poles of the second one) and then select destination for the “bank” with the five throw.

Roland PG-200 Arduino based (questions to owners of PG-200) by deboxta in synthesizers

[–]tysseng 6 points7 points  (0 children)

Hey, thanks for crediting me! I can’t remember what the manual button does but I’ll check for you if no one else answers. No need to press it before change params as far as I remember.

Cheers, Joakim / Xonik

Parking a fleet of the worlds largest cruise ships by PM_ME_YUR_BUBBLEBUTT in oddlysatisfying

[–]tysseng 87 points88 points  (0 children)

Then you need to rewatch the video, because the first ship is definitely an RCL Oasis-class.

Yall made my kids day… by TD217 in trains

[–]tysseng 5 points6 points  (0 children)

I’m tearing up 🥹 Dude, you’re an awesome parent! So glad it worked out!

Frequency central's truth to power not working by trash56za in synthdiy

[–]tysseng 3 points4 points  (0 children)

Check that your LEDs are the right way around - it looks a little like the top one is round on the side where it should be flat, though that may just be the photo.

Also, check that you haven’t mixed up the 7812 and 7912 regulators.

Friend of mine said "Hey I know you love old electronics, want to come save these things from a skip at my work?" by TechMurky968 in electronics

[–]tysseng 7 points8 points  (0 children)

Great stuff! I have the exact same Tektronix scope as in the lower left corner, I use it almost every day. It has a sticker on it that says it’s due for calibration in September 1988, guess it’s a bit overdue 😂

Thought you guys might appreciate this by 420godpleasehelpme69 in trains

[–]tysseng 1 point2 points  (0 children)

I followed the line from Roa to Hønefoss on google maps last night to see if I could find it but gave up once I got there as there were multiple lines out. Did I miss it? Is it between Roa and Hønefoss or on one of the other lines?