Yofiel all-in-one gen~synth

Ernest's icon

I am making a simple patch to share of a single gen~ object containing a complete monophonic synthesizer (two FM oscillators with sync and 40 wavesets, SVF filter, two envelopes, two LFOs, 6-node modulation matrix) .

Is it clear enough how to use with this panel, or does it need more information?

synth.jpg
jpg
Ernest's icon

Here is how it looks when locked.

synthlocked.jpg
jpg
Ernest's icon

Very well, I have uploaded it, and with lack of interest, I will be discontinuing public support for the project. The upload is a simple patch demonstrating the Yofiel synth core. This is a single gen~ object containing:

* 2 complete oscillators with sync, FM, FM feedback; variable mix and ring modulation; 37 oscillator waveforms, all with variable shape; unique 3x oversampled anti-aliasing with the newest technology

* 12/24-dB/octave 3x-oversampled filter: Variable mixing mixing of poles, saturation, and comb filter; graphical pitch tracking; unfiltered oscillator mix with variable oversaturation; table-based gain compensation across six dimensions.

* Two LFOs with gate sync option; Sine, pulse, saw/triangle, and S&H waveforms; adjustable waveform shape and frequency; polyphonic spread by frequency or amplitude.

* Two ADSR envelopes

* Six assignable matrix modulations with individual level control for each of 21 sources, including envelopes, LFOs, gate levels, oscillator pitch, and other parameters, to 37 destinations.

* Optimized for low CPU usage

CPU usage is 1.4% on 4ghz i7. If you have compile errors on first launch, it is due to Max not being able to load it completely before compilation starts. Simply close and reopen.

To download, go to:

Likemushi's icon

Hello ! Great stuf ! But cant download (

Ernest's icon

I;m so sorry, I just changed the name of the file without thinking. My fault.

The link is:

I will be adding some detailed parameter documentation and demo video.

Ernest's icon

A demo video and updated download link is also here:

Ernest's icon

Updated with MIDI input and a presentation-mode display.

synthcorepres.jpg
jpg
Jan Klug's icon

great stuff!
some crazy sounds in there...

and it's nice to see a one-gen~approach in practice; I guess I'll want to dive more into that once gen~ code feels more at home on the Bela...

thanks for sharing!!

brendan mccloskey's icon

@jan
"gen code on the Bela" please please tell me more ;)

lightspeed.johnny's icon

This is awesome! Thanks.

Jan Klug's icon

Ha Brendan,

not much to tell - except this Bela forum post gives some hints & hope ;)

brendan mccloskey's icon

Hi Jan
thanks for the pointer. I'm currently investigating the Mozzi library for Arduino, for standalone DMI prototyping. The other alternative might be CSound and a Galileo. Etc etc. But gen~ on a microcontroller would be the dogs! Bangs in a can.

Brendan

Wetterberg's icon

Hey ernest et al, I'm loving the patch! BUT I'm having trouble getting the filter to run, could ppl do a quick subtractive synth patch to test it? It does... something, but it's definitely not performing as expected. The comb and sat params seem to be working fine.

Ernest's icon

That's strange, I don't have any problems with the filter. Please can you zip up the maxpat file with a preset demonstrating the problem and upload it here? It should be only about 50KB without the audio files.

Ernest's icon

What I do have is a patch update. You need the original download from http://www.yofiel.com/software/cycling-74-patches/synthcore , then you can put this .maxpat file in the same directory and open it. It fixes quirte a number of bugs, adds online help, an onscreen keyboard, a noise oscillator, and envelope single/multi/loop modes. Most of it is fully tested. I have a few things left to check on the MIDI I/O and the ranges of some destination parameters in the modulation matrix. currently I am having a problem with getting virtual midi cables to work on Windows 10, which is holding me up.

synthcore1_2.zip
zip
Wetterberg's icon

>Please can you zip up the maxpat file with a preset demonstrating the problem and upload it here?

there's really nothing to show; take the demo presets already in the maxpat, none of the filter bits work. I'd just be sending back the original maxpat.
Also, there's something screwy with the mod matrix, it would seem modulation (like, say, destination: osc1pitch) only really works if filter saturation is above 0. I can't get the mod matrix to manipulate the envelope stages at all. Hope that can work as a clue.

Ernest's icon

Do you have the wav files that were in the original zipfile in the same folder as the maxpat?

It may appear sometimes that the filter is not working because, for example, if you have a sinewave going in with cutoff of 0 and pitch track of 1, then the resulting fc is exactly that of the sinewave, which, as it has no harmonics, results in no audible effect. then even if you turn up the resonance, it still appears not to be working much, because the filter is gain compensated, and so, as the resonance which is added is a perfect sinewave, it sounds exactly like it did before. Moreover, adding saturation has no effect on the sinewave, because the sinewave has no harmonics to distort. Now most synthesizers don't try to make it so perfect, and the filter introduces noise artifacts....but this filter I tried to do perfectly as I could.

I found the bug in the mod matrix , as I said I am working on it.

Ernest's icon

What I am currently doing is simplifying the gen~ object. Now it does not have a subpatch. However I am limited to 43 inputs on the codebox. For efficiency, the stuff which adjusts param ranges from the panel are outside the codebox, so they are only evaluated when they change (params inside the codebox are evaluated at a slower rate than the audio signal, but do increase cpu load). Before I was passing everything as params into the subpatch. So the CPU is now down about 25%. I can't put the codebox inside a gen~ subpatch because the subpatches are limited to 16 inputs, but by putting it in the top level, I get 43. So this is now what it looks like. I plan to get the current functionality checked before adding anything new,, so I think it will be done in less than a week, hopefully :)

gen.jpg
jpg
Noah's icon

I'm really stoked you made this. I'd wanted to see what sort of things you were doing under the hood of Godel, but it was a bit intimidating to say the least (Through no fault of your own, of course. It's just the way things naturally get in projects that large). This looks much easier to analyze. Thanks!

Ernest's icon

Yes, the MIDI is pretty complicated, but I am not using pattrstorage in this design. So it's fairly easy to understand the audio path and params that affect the audio. For MIDI, the panel controls do have the same scripting name as shown in the messagebox under each dial, but the scripting names are only used to receive new settings from the MIDI in via a pattrhub object in the top level patch. I'm trying to simplify the MIDI subpatch, this is how it looks now. The one thing I can do is move the gain control inside gen~ too, and use a slider instead of live.dial to set the output gain. Other than that I am at a bit of a loss how to make it simpler -- the subpatches inside the settings patch hav eless wiring, but quite large objects for parsing. I put alot of notes in them. I still have to add data entry and cc#s 100/101 for controlling the range of the pitch bend. I am not certain how to zero pitch bend over the 14-bit range for best compatibility with MIDI controllers.

midisettings..jpg
jpg
Wetterberg's icon

Hey. I still can't get the filter properly working... It's really weird, it's like all the patches sound... alright, but they're mostly distorted and/or using the comb in some way.

Anyway, I'm watching this with a keen eye.

Ernest's icon

Well, it's very strange, there's been 140 downloads and no one else has reported any problem. I got a number of enthusiastic cries. What I have done in the current version is changed the saturation, so that it actually does oversaturate at higher settings, and at lower settings it just reduced the amount of Q. Please could you share your machine type, OS, audio hardware, and Max version? I do have a Mac mini in the shed and I should pull it out and test it on it, I do remember for some designs I had to increase the signal vector size, but with only 2% cpu on my 4ghz i7, it hardly seemed worth checking.

When I started thorough regression tests, it was taking three days to work through everything, and I didn't want to have to do it again. So I decided to complete everything I was planning to share first. Now it will probably take 4 days to check thoroughly. But I also added filtered noise oscillators, a karplus oscillator, soft sync and phase control, another two envelope types, another LFO, chorus, delay, reverb, FFT analysis, hover tips, oscillator waveform displays, and several panels inside the patch of user guides. I am planning to finish the glide, which will also have glissando with pitch mapping to scales, and convert the gen~ design for the audio effects into codebox, updating the MIDI I/O, then starting QA. Here is a picture of the panel, and I shared the codebox library in the gen~ forum today.

core41.jpg
jpg
Wetterberg's icon

cheers,
osx el cap, 10 gig ram, i7 , max 7.3.1, built-in and UMC202.

stkr's icon

it is fantastic, thanks.

sorry to bang on about this but it would so amazing, easier for you to build, maintain and push and for users to update if this was modularised and put in '.maxproj' format. it sort of deserves it it being so big and comprehensive.

Ernest's icon

Well, I have maxde projects before, and no one was able to use them due to filepath problems, I tried all kinds of ways to fix them but the APOI kept changing. Of course this was over the Max6~7 change so maybe it is more stable now.

I finalized the architecture this week, and am half way through a complete check of everything. Here is the architecture diagram, which is in Max on a separate tab. It is based on the Waldorf Q, which you may know was discontinued because it was too expensive to build.

There are now 180 params in gen. I added quite a bit.

synthcore_architecture.jpg
jpg
Ernest's icon

Synthcore 2.0a is available for download :)

synthcore_panel.jpg
jpg
Sergio Granada-Moreno's icon

cheers man! gen-based effects sound outstanding!
text tips are also great, haven't seen that before in a max patch...
awesome work, thanks for sharing :)

Ernest's icon

I would appreciate hearing if you find any issues. So far there are 90 downloads and no feedback.

I found two issues. First, more critically, changing to a preset where the comb feedback changes a great deal can cause transient spikes which cause the filters to hang. Note the second comb can receive input from the first comb with serial output configuration, so the transient spikes get very large. So I am adding a saturator in the comb feedback circuits. Currently it provides +24dB headroom, after which it damps the signal so that it does not exceed +36dB. This does mean the output can still get very loud, depending on the filter settings, but that is why I put a limiter in the design. and it allows using comb self oscillation if desired. That is, I am designing for maximum flexibility rather than overcautious safety, and with the saturating filters and harmonic wavesets (many of which were created with FM), this allows the creation of very deep tonality even with two oscillators.

Second, I forgot to update the delay filter lights. I am adding some more buffer pokes so they show the actual dealy time after any modulation. I had just got so used to ignoring the lights I forgot to update them.

Otherwise, I find no issues. Look forward to hearing what you think.

Ernest's icon

Update upload which fixes the above issues and reduces the download to 6MB, http://www.yofiel.com/software/mac-and-pc-apps/synthcore2

Ernest's icon

v2.0c adjusts limiter att/rel ranges, bend spring, and pitch modulation values to more usable ranges; declicks oscillators set to gate sync when a new note is played and a note is already playing; and retriggers envelopes s&h when envelopes are in loop mode.

Brian K's icon

This is really cool, I am new to using synth patches for max/msp, but I am having a good time just making weird sounds. For some reason, my midi controller only works part of the time. It will seemingly shut itself off, and then somehow come back on again. I am not sure, but it may be my own user error being new to this. Thanks for sharing!

Ernest's icon

Thanks for the feedback. I can't think offhand why MIDI in would work for a while then stop working, but I will do some more testing. I'm glad you are enjoying it.

version 2.0d removes periodic grinding overtones on continuous filter drive modulation, butterflies on limiter with rapid gain changes, and adds a little gain compensation to filtered noise oscillators. Still working on the gain compensation tables for the filtered noise, it takes a very long time to get them right. But the filter drive modulation is really sweet now. Inspired by watching Frank Zappa tune his guitar some 30 years ago, always wanted to make that.

Brian K's icon

Wow that is so cool. There is obviously so much attention to detail here; it is very impressive. I will keep an eye on this thread, and will let you know if I find a fix what is causing the midi issue. Could definitely be my own issue. Thanks again!

Ernest's icon

Well thank you for the feedback. I am running a stress test (see picture) and so far after several thousand notes it is not hanging. However I found a compatibility problem with midi messages and the kslider object. The kslider object issues notes with velocity 0 when the bottom of the key is pressed, and 127 when the top of the key is pressed, which is contrary to normal piano action and a vestige of the graphics object used to make it, which counts pixels from the bottom left corner, so the velocity is backwards. So what I do is subtract velocities from the kslider object from 127, to get a reasonable velocity value. But when playing the kslider object with midi messages, the velocity value is issued uninverted. So the reason you may have seen some notes not playing is that if they have a velocity of 127, I was subtracting them from 127, producing a velocity of zero and hence no sound. So I am adding a bypass for the midi notes, so they don't get subtracted from 127 and play properly.

MIDI protocol supports 31khz, typically with 30 bits for a data message, so messages can arrive within 1ms of each other, which is as fast as the Max scheduler can run. So I checked the scheduler queue, but there doesnt seem to be a problem there, because almost all of the design in in gen~. The most compute-intensive message is a program change, which sets all the dials on the screen, and its possible people with slower machines may have hangs. So I will dig out my old mac mini and do some testing on that too.

Capture1.jpg
jpg
Ernest's icon

Ok, on a 2.5Ghz Mac Mini, I had no midi problems or hangs. The attached screenshot shows synthcore 1.3, which has 3 oscillators instead of two, 15 modulation nodes instead of 12, and 4 new oscillator types. It also shows the test app firing controller changes at maximum midi rate. After severla minutes I stopped the random controller changes and selected a preset, and the synth still worked perfectly.

Activity monitor reported CPU load without the midi stress test was 25%. With the stress test running, cpu load increased 2%. But as expected, the majority of the load was display. With sound running, I switched to the settings tab in the patch, so none of the real-time display of waveforms is being drawn on screen. CPU load drops to under 13%. This compares with my 4Ghz i7 with Nvidia graphics, which reports 5% cpu load with grpahics showing, and 2.5% without the graphics. The cpu profiling in gen~ is much closer to mac activity monitor numbers. On Windows, the reported gen~ load includes graphics rendering overhead, and is reported as a percentage of the throttled cpu clock in power saving mode (which is typically 40% of capacity) and does not take the number of cores into account.

I did find the scope display occasionally stops, which doesn't affect sound, but to remove jitters the scope was set to trigger on signals crossing zero, and in ultra low-frequency and synced oscillators, sometimes the signal does not cross zero a long time. So I added something to fix that, as it may be confusing to users.

I did also find, on the mac, using 'import' messages on buffers no longer works, and also, buffer channels cannot be reliably set via variables in functions unless the wave is imported. So I outcast the functions using variables to set buffer channels where it was a problem, and I declared the buffer data files directly in the buffer object. This is the reverse of how mac handled buffers in quicktime days, when declaring the filename in the buffer object did not always work properly and import messages were more reliable. So it's possible quite a number of people found the wavesets were not making sound, but in absence of more detailed information on when it was not working, I can't be sure.

Screen-Shot-2017-01-31-at-4.53.32-AM.png
png
Ernest's icon

Mr. wetterberg has confirmed I fixed his 'no filters bug' in private message. I posted it in separate thread, but for those following the original design, the fixed version is here: http://www.yofiel.com/software/mac-and-pc-apps/249-synthcore-2

Brian K's icon

I am using synthcore20d now, and I have not had any issues. Sounds like maybe that change with kslider fixed it for me. This is awesome, really appreciate the work you have done on this.

Ernest's icon

Thats great news Brian ) Maybe you will like version 2.3c even more, it has quite a number of new features.

Brian K's icon

Awesome, I am going to have to check that out. I am loving the presets on there, especially "electric interference." so rad.

Ernest's icon

Well, I am planning on sharing a few preset banks (they can be loaded from the settings page). So if you want to share any of your creations, feel free to contact me )

Brian K's icon

I will definitely share anything I happen upon. I am relatively new to this, so not found anything worth sharing yet, hoping to get there though.

I was wondering if there is a way to re-map midi controller settings? I tried editing the code to set the delay 1 feedback to position 6, but that didn't seem to do the trick, as CC6 is still controlling the output mode. Apologize if this is a bad/noob question.

Param
    wheel (0, max=127, min=0)            // 1 mod wheel **
,    d1m (0, max=1, min=0)            // 2 delay 1 mix
,    d2m (0, max=1, min=0)            // 3 delay2 mix
,    foot (0, max=127, min=0)            // 4 foot controller **
,    brange (0, max=127, min=-127)      // 5 bend range **
,    d1z (0, max=0.99, min=0)            // 6 delay 1 feedback

Ernest's icon

Yes, reordering the params in the massive message at the top of the 'generate lists' subpatch (inside the settings patch) and pressing the indicated button a couple of times will cause the cc# assignments to update automatically. There's alot of comments there indicating how it works.

Brian K's icon

Awesome, thanks much appreciated!

Ernest's icon

Yeah, there is something in th epatch that requires pressing the button more than once, but I didnt actually expect anyone to get that far into it so I didnt worry about it. It is correct when the output looks like this (note large second textedit box from bottom right). Please can you use the Yofiel forums if you have any further questions, so others can see it. All the best.

Capture.jpg
jpg
ironside's icon

This look interesting! Does anyone know if this still exists? The links don't seem to be available anymore.

Ernest's icon

It is superceded by a new design here:

Pizo's icon

Late to the game but excited to try!! Appreciate it!

Anthony Palomba's icon