Digital logic and state machine in sunvox

Post Reply
Posts: 5
Joined: Sat Oct 10, 2015 8:41 am

Digital logic and state machine in sunvox

Post by DigitalSoundwave » Thu Oct 27, 2016 1:31 pm

I am not sure that someone discovered this before.

While I am messing around with Sunvox, I set a generator waveform to produce a constant high amplitude for envelope.
And I realized that I can send a high/low signal from a generator and define the output by a distortion setting the bit depth in 2 bits,
so logic programming in Sunvox is possible.

One day, I have an idea what is making a memory in Sunvox, finding that the Feedback module able to store the signal by feeding the signal back to a amplifier module. If I set one of the feedback volume to 0, the stored signal will be gone. That is similar behavior to a logic circuit called R-S latch. No sooner I create a flip-flop with 2 set of latches with a few more logic gates.

My explanation isn't that clear as I am not a native English speaker, so I upload the following files.

Sunvox Logic - logic gate: All different logic gates module that created in Sunvox. [There isn't a nand gate since it is not necessary]
Sunvox Logic - Full adder: It is just for showing how those logic gates operated in Sunvox.
Sunvox Logic - Decoder: A logic circuit that turn binary number into a specific output.
Sunvox Logic - 4 voice Polyphonic ADSR Synth: I know the synth is not perfect, but the decoder able to make a true ADSR polyphonic envelope synth.
Sunvox Logic - D Flip Flop: This is not the normal D flip flop as I made a Feedback in one of the input. The on/off state is controlled by a clock pulse.
Sunvox Logic - Flip Flop Sequence Song: This is just a test for the flip flop module.
Sunvox Logic - PPK song in finite state machine: This is what I created while I am board. There isn't any notes on the pattern. To play it, send a signal the red reset module to reset the state machine to play the first note and press any but 1 note on the multisynth.
The melody is from the first 6 bar in the breakdown part of the song PPK - Resurrection (Space Club Mix).

If some of the module found useful for your project, please tell me to upload those module on the Sunvox module.
Sunvox Logic.rar
(18.71 KiB) Downloaded 137 times
DigitalSoundwave: 10/10/2015 - 28/11/2017
Terminated Reason: Making Stupid stuff, pretend to become smart.

Posts: 198
Joined: Mon Jun 02, 2014 7:56 am

Re: Digital logic and state machine in sunvox

Post by iaon » Thu Oct 27, 2016 7:31 pm

I've tried some of this as can be seen here. It's fun to combine logical stuff with randomness to get some controlled chaos going. The new Pitch2Ctl, Velocity2Ctl and the OUT offset controller in the MultiCtl definitely open up some more possibilities in this regard. I'll be inspecting these for inspiration.

Post Reply