Additive Synthesis Voice on Daisy Patch

Hello everybody,

inspired by the XAOC Odessa, I created an additive synthesis voice for your daisy patch that you can download from here: https://github.com/stablum/AdditiveVoice

It still has no preset, and the polyphony still needs to be implemented (via midi) but it’s already making interesting sounds :slight_smile:

Let me know what do you think about it :slight_smile:

cheers,
-Francesco

3 Likes

hey sorry my noob question, I’m coming from the Max programming perspektive, so I have still no glue about programming in C++ and co.

I was on your github and downloaded the files and can’t find a bin only cpp and a make file, so I guess I need to compile it on my own or? Still not pretty sure how that works. I tried to work through the documentation from electro smith, but still don’t get it really.

But yeah my question is, is it possible that you give us the bin file to boot the patch or is that not possible?

greetings frank

Hi,
I just uploaded the binary firmware as well over here: https://github.com/stablum/AdditiveVoice/blob/master/build/additive_voice.bin

Looking forward to hear if it works :slight_smile:
best,
-Francesco

2 Likes

Hey Francesco,

so I checked it out and I think it is really really cool. I never owened the odessa and can’t compare them, but seems pretty cool.

I tried to produce a semi chordisch sequence. Put some quantized cv into the v/oct and then some unquantized cv (only for fast testing) into cv 2 and 3 input. was hard to tune but sometimes i got harmonized chords out of it. Next I will test it with several quantized cv’s, but I guess stretch and constant is not v/oct tracked or? But yeah what I wanned to say is, it is cool because it seems with a bit of tweaking and fine tuning and mayby an attenuator you can create harmonized chords.

I also like the waveforms, but a few I couldn’t tell apart. As well as the filters/algorythms seem pretty cool! Would be cool though if you could write in the readme (for the waveforms as well) which setting means what. LP HP BP are clear. I guess N is Notch Filter? But what is EX. Couldn,t make it out, but it is not only filtering but change the amplitude aswell?!

At the end, I know it is a prototyp, but only wanned to say, it bugs a bit. Sometimes it freezes, the sound continues but the interface is frozen and can’t change anything. Seems to happen when the cpu is outmaxed?! And it happens of course if you change the number of amp filter partials higher then the original partials (hope that sentence makes sense). Maybe you could implement, that this parameter can’t get higher then the original partials.

And another bug is, that when I wanna change the initial number of partials sometimes the encoder doesn’t change the number. You twist and twist the encoder but only after a few turns the number get’s changed. Kinda glitchy you now. If simetimes the encoder gets read and sometimes not. kinda on random bases.

and at the end I wanna say, that this is no critic of course. I’m amased how cool it sounds and finally a patch that uses the oled screen to add more parameters. Only wanned to point out where you could spent some extra work. Haha easy to say for a person who has no idea about programming :slight_smile:

besides that, thanks for you’re hard work. Is a fun patch to tweak with and comes definitly on colection and watchlist for future updates :smiley:

And sorry for my bad english. If I was not understandable I could as well do a video for you I can send, maybe that would be easier. haha

greetings frank

1 Like

Hi Frank,

thank you so much for the feedback, that is so important for figuring out the direction in which I should steer this voice. I’m glad you like it :slight_smile:

Chords: I think it might be a bit difficult to do generic chords just with the partials, but it should be possible to do a major chord by setting stretch to 1.0 (perfect harmonic series) and selecting the partials with indexes 3,4 and 5 that are, respectively (and approximately) a major fifth, the fundamental and a major third ( https://en.wikipedia.org/wiki/Harmonic_series_(music) ) . You might be able to remove the first two with a very steep High-Pass “filter” (which is actually an amplitude scheme for the partials), a very steep slope (that I should probably rename as “mildness”, set at just 1) and the CTRL 4 set at about 40%, and using only 5 partials in total. For actual chords that make fully use of additive synthesis, and I mean each one with his independent set of partials, we have to wait until I implemented the MIDI feature :slight_smile:

Amplitude schemes, or “filters”: these are actually really not frequency filters, because what they do is giving a different amplitude to each partial, and this can be evident while using a frequency-rich waveform for the partials, such as a square wave. N is indeed a notch filter. The slope of LP, HP, BP and N is linear: just a straight line making a triangle with width set with the Slp parameter (that I really should rename to “mildness”) of amplitudes from 100% of the cutoff point to 0% of cutoff+Slp. This is if it’s LP. With HP it’s the opposite, a triangle that goes from 0% to 100%, while with BP it’s from 100% to 0% at the cutoff point and then back with another triangle to 100%. Now the total size of the notch is Slp, but it should probably changed to Slp*2. I think I need to make some graphics in the doc to illustrate the functioning.

EX is weird, and it was my first experiment with amplitude schemes, basically if the “cutoff” is all on the left, then it’s 1/i where i is the partial index (I thought it was exponential decay but it’s not, so I should rename it with RE of reciprocal). When the cutoff knob is all on the right then the order of the amplitudes is reversed. Every position in the middle is a weighted average of the two situations.

For the bugs, yes, I still need to figure out how to make it glitch less. I suspect there might be some problem with very low frequences, as well when you select a lot of partials (more than 38 usually is not very good for sine waves, while triangles and squares can arrive up to 80 and beyond). I left to the user the freedom of getting to risky settings, and the exclamation point that is visible in these situations should serve as a warning :slight_smile:

The functioning of the encoder is still quite a mistery for me, I didn’t really understand where the internal flag that it has changed is set and how and it seems to get wrongly cleared while the daisy is under heavy load. Eventually I will figure this out :slight_smile:

I’m really happy that you like the sound :slight_smile: , thank you so much for the feedback, that is extremely valuable :slight_smile:

cheers,
-Francesco

1 Like

By the way, I’m open for suggestions for new features as well :smiley:

I’m planning to add, besides MIDI support:

  • a “comb filter” amplitude scheme of subsequent notch filters
  • a “comb filter” amplitude scheme in which the slope is actually different for every partial
  • internal modulation of the frequencies: an LFO could push odd partials to the right and even partials to the left.

other ideas? :slight_smile:

2 Likes

I realized that I didn’t respond to your question

stretch and constant is not v/oct tracked or?

They currently aren’t. I see that constant actually has an interpretation as pitch, being a frequency… constant. But Stretch doesn’t seem to me to have a “pitch” interpretation, as it’s a coefficient multiplier to the fundamental frequency. Or maybe I misunderstood your question?

cheers,
-Francesco

If your patch is creating heavy load, audio doesn’t leave enough time to finish controls processing. This likely prevents encoder from correctly functioning, because some of GPIO events that it use will be missed. It can be solved if libDaisy would call its controls processing from a timer configured with higher interrupt priority than audio. Or if it would use interrupts (EXTI) to detect all encoder changes, but that would require more complicated debouncing code.

For now your best bet is probably to reduce CPU load, i.e. by using LUT to precompute this as a wavetable. And there would be an update to enable full 480Mhz for Daisy’s MCU eventually, which would be a free +20% performance upgrade. I’ve been using those clocks without problems so far, but not with libDaisy.

Thank you very much for your very thorough reply @antisvin !
I think that interrupts for the encoder changes would be great to have, as it is a control that is altered only once in a while.
LUT wavetable might be a good idea, but I fear that there are just too many modulatable parameters (right now, 4) for this to be feasible, as well as artifacts caused by the limited size of the rendered wave (thinking about the boundaries) and caused by my current inexperience with sampling dsp methods, such as pitch shifting. So, I guess that for now I will stick to 38 sinewaves :slight_smile:
Anyways, your suggestion was very interesting and I might make use of it for future ideas! :slight_smile:

cheers,
-Francesco

Hi, I just released a new version (0.74) with some fixes and a few new features.

Here are the changes:

  • Changed naming of some parameters and settings
  • Human-readable abbreviations of the wave shapes instead of numbers
  • New “normal” comb filter amplitude scheme C1: various notches that can be shifted with the knob and CV input
  • New “different” comb filter amplitude scheme C2: similar to C1 but the frequency of the notches gets increases as the partial index get higher
  • Added a graphical visualization of the amplitude of the first 30 partials by using ASCII tricks

Enjoy! :slight_smile: https://github.com/stablum/AdditiveVoice/blob/master/build/additive_voice_0.74.bin

1 Like

Hello everybody,

after the suggestion from @LottiKarotti16 , I implemented a 1V/Octave tracking for the “stretch” parameter, so C0 is a multiplier of 0, C1 => 1, C2=> 2, C3 => 3 etc. This results in more harmonic results in sending pitch information to this parameter.

You can download the new version from here:
https://github.com/stablum/AdditiveVoice/blob/master/build/additive_voice_0.75.bin

cheers,
-Francesco

1 Like

Hello,

I just released a new version 0.76 with a bunch of new features and fixes:

  • The audio input 1 is now an LFO or audio-rate frequency modulation input.
    This input is not DC-coupled, so patching constant voltages will not work.
    Anyways, it’s possible to add LFOs or even audio rate modulation to it.
    The input voltage follows the 1V/Octave convention, so an LFO that peaks
    at +1V and -1V will make the frequencies of all the partials shift of one
    octave higher and one lower.
  • The Gate input 1 is now a sync input to to reset the phase of all the
    partials. The phase is configured from Audio input 4 in this way:
    when the sampled input is 0, then all phases are zero;
    with larger inputs the phase spread among the partials is getting larger.
    This means that the first partial will always be reset with phase 0 and the
    last partial is going to have the largest phase value:
    consider the last partial: the input value is divided by 5 and multiplied
    by 2*pi (hence voltages from 0 to 5V represent the entire circle).
    All the partials between the first and the last will have intermediate
    phase values that are also proportional to the partial index.
    This means that the new phase of the partial with index p is calculated
    as in4*(2*pi)*p/(5*maxp)
  • Capped maximum value of the partials to avoid glitches: maximum value is
    now 40 for Sine and the Poly* waveforms, 80 for all other waveforms
  • Renamed acronym for normal comb and different comb to CN and CD
  • The fundamental is transposed one octave lower
  • Changed the startup preset to something more interesting (30 partials, comb)
  • 1 decimal value floating point print of fundamental input voltage

You can download it at https://github.com/stablum/AdditiveVoice/blob/master/build/additive_voice_0.76.bin :slight_smile:
Documentation here: https://github.com/stablum/AdditiveVoice#readme

Cheers! :slight_smile:
-Francesco

6 Likes

This is awesome !! Thanks !!!

I’ve got my Daisy Patch in the mail now and have been beginning my journey into PD for THIS EXACT REASON! I’m so excited to see someone already took the time to build an additive synth for Daisy! Thank you so much for your hard work!

I’m actually a Web Dev myself with a little bit of C knowledge (I know all about the headaches of pointers and memalloc T.T lol) so if I do go down the C++ rabbit hole instead of PD, I might try to contribute here instead of starting from scratch :slight_smile:

1 Like