SynthMaker

really, really basic question

Archive · 2005 33 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

angstrom ·

OK, I've tried and failed to get past the very basic step in SM.

After failing to make my first synth using analogue methodology I tried simply using the VSTi module, simple enough. (its the same as the one in this tutorial)

But when I press 2 keys AAARGH my speakers are being killed by insane square waves !!! what is going on there?

I do remember reading that you have to multiply 'something' by 0.1 - and thinking 'what the hell is that all about! " , so I bet that is related but cant find whatever that was. I'm not sure what to search for as I am totally in the dark here.

If you read the 'documentation' thread you will see that I am having problems with the metaphor of SM.

Any help is appreciated as this is about my 5th false start on SM

Nu Audio Science ·

New tutorials here for people like us 🙂

Barebones project The Barebones project is a little bare at the moment 🙂 , It's only just started but there are some basic bulding blocks there tomake a quick start 😉

Hope these help a little, i'm just learning SM myself.

angstrom ·

yes, thanks.

in that tutorial though - if I make that synth and press a key I get a correctly pitched sine wave. If I press 2 keys I get the most hideous noise in the world, why is that?

rl ·

digital clipping noize. reduce output level of each voice and you should be ok

malc ·

Hi angstrom,

Sorry to hear that you've had such a frustrating start. I have just read your post on the other thread and I'll answer that one shortly.

The reason you get the noise pollution is because there is no restriction on the signal level sent to the audio out. If a signal goes above 1 and you send it to an audio out you'll get the fright of your life.

With the template VSTi module the oscillator will generate a signal that varies between -1 and 1 for each note that you play. If you play 4 notes you'll get 4 independent signals.

In order to send the signals to the sound out you need to merge them into one. This is what happens in the Poly to Mono. The signals just get added together to give you a new signal. Because of the addition the new signal runs from -4 to 4 so whenever it goes above 1 you get that blast of distortion.

The philosophy of SynthMaker is to give you total control to achieve maximum performance and so the signal limiting is left up to you. A simple way to do this is to multply the signal by some fraction. In the example I've been talking about, multiplying the result by 0.25 would allow you to play 4 notes without distortion but it would affect the volume level.

SynthMaker could enforce limiting, clipping or compression at some point to prevent this happening. However, if you didn't need to do it, you'd be wasting processing power.

I'm not sure how this is handled in SE.

If you have any other problems, please let us know, don't suffer in silence or worst still make this false start number 6 🙂

Malc.

angstrom ·

Thanks Malc that makes sense. It actually worked too when I stopped trying to use an int with .25 typed into it !

Just so you know where us SE people are coming from - it's not really so different. In SE the parent container determines the polyphony (EG: properties polyphony = 6 ). Any element connected to a midi2cv gate or pitch output within such a container is duplicated invisibly by the parent container polyphony .

so the polyphony process is pretty transparent as there is no real need to convert back to one data stream unless needed for CPU / audio reasons.

you can force voices back into what would would call 'mono' if you require ... in SE you do this with a 'Voice combiner', in NI this is also called 'voice combiner'

similar thing different terminology.

malc ·

Yeah the Voice Combiner sounds like it does the same job as the Poly to Mono. But you say you don't need to use this? It must happen at some point, so presumably it's done behind the scenes.

When you set the polyphony does that reduce the signal level for each voice automatically?

Nu Audio Science ·

Yeah it is set automatically by how many notes are playing, In theory it works but in some instances it doesn't, Still it is about 95% of the time it works 🙂

Perhaps a note out from the midi 2 poly so that you could do any calculations that need doing from the number of notes being played, This sounds better than a static rule because it would have a constant level that wouldn't change with notes pressed 🙂

platinumears ·

malc wrote: I'm not sure how this is handled in SE.

Clipping is incorporated into the audio out module, which is the equivalent of your ASIO / DX out modules, and is not included in the VST exports.

It does make life a bit easier.. 😉

dan

angstrom ·

To explain the SE polyphony handling

here's a pretty brutal & simple synth from this SE wiki page which I made.

the VCA is a base level module which merely gives a log volume curve - it could be replaced by a multiplier, the automator and patch select are not relevant to this thread. The IO module(s) deals with all transactions with the outside - I suspect that the IO enforces the parent polyphony(?)

this is the parent structure (container), by right clicking on this container I have set the polyphony to 6

Oddly when SE does overload it's audio out - it sounds much more like analogue clipping than SM's digital destruction. Quite pleasant in fact. I'm not sure why that is.

I know this is probably evil in 12 different ways ... but I suggest you download a copy of SE for comparison! now that you are so far along with SM - it isn't cheating you know ! I'm not saying SE is superior at all, but just that it often helps to see things through other peoples eyes.

Back to SM though. with this example synth (from here) the envelope obviously deals with the multiplication by .3 to keep the level under control but it still gives nasty distortion as I traverse the keys. How do most users tame this clipping deal?

that seems odd.

platinumears ·

angstrom wrote: Oddly when SE does overload it's audio out - it sounds much more like analogue clipping than SM's digital destruction. Quite pleasant in fact. I'm not sure why that is..

See my answer above.. that is the only difference between the way SE and SM sum multiple voices.

Dan 🙂

unkargherth ·

angstrom wrote: How do most users tame this clipping deal? < image removed > that seems odd.

Look at example.osm. Go down in depth of schematic as

Top>>FM·x>>Synth>>VCA>>VCA

And note this fine [b]pow[b] module :O

Basically it converts an incoming linear Volume to a high slope exponential out. If you connect you main volume to input and firts output to a multiplier. you get a nice Volume curve, that, not beign clip free. it works most of the time

If you wnat a real control, check the MIDIDto MONO module. It ouputs a float with number of playing notes. Use it as a divisor to control the final volume

Nu Audio Science ·

Aaaaaaaaaah the MIDI to mono has number of notes out 🙂

angstrom ·

OK, thanks for the answers, especially the clue about the pow module, which kind of answered my question in one way. But I am interested in this enigmatic voice allocation numeric output, It seems pretty useful to me.

Just to prove I have no shame and am really beating my head hard on this trying to get it into my thick skull.

(N is connected to the float in, you cant quite see it there) why does the float here give a readout of like '9' or in this case '14' , surely it should be '1' if I am pressing one key and '0.5' if I am pressing 2 not 14 if I am pressing no keys and still 14 if I am pressing a few keys.

I also guess there is probably a Poly problem in the above schematic, there's bound to be. Would I have to convert a mono float to a poly float to use this here. Oh, go on just point me at the thread where this has been answered 20 times already - there must be one!

I know I could just use the high level blocks available, but that's not the way I work - I need to understand the basis of the app. Otherwise ... what's the point? I'll persevere until I get it.

infuzion ·

angstrom wrote: (N is connected to the float in, you cant quite see it there) why does the float here give a readout of like '9' or in this case '14' , surely it should be '1' if I am pressing one key and '0.5' if I am pressing 2 not 14 if I am pressing no keys and still 14 if I am pressing a few keys.

That is strange... how about connecting the PCKeyboard directly?

BTW, you need to change the PolyMult to a PolyDivide. Logic: if you add more notes at once, you have more speaker-breaking signal. Mulitipling, thus making the signal louder, will only make it worse. Dividing=lessening.

angstrom ·

infuzion wrote: BTW, you need to change the PolyMult to a PolyDivide. Logic: if you add more notes at once, you have more speaker-breaking signal. Mulitipling, thus making the signal louder, will only make it worse. Dividing=lessening.

yes, thanks.

but if midi-mono N out worked the way I thought it did - it would output .25 so when I press 4 keys a poly multiply of 1 by .25 would be non painfull.

When I saw integers coming out I thought - aha - a divide is required... until I spotted the size of the integer didn't change and was oddly large. When I realised that 1/14 was going to be veeeery quiet I took a screenshot instead.

I realise this is an R&D module BTW, but does anyone else get this?

you may notice I have my own dedicated confusion icon now 😉

infuzion ·

angstrom wrote: When I saw integers coming out I thought - aha - a divide is required... until I spotted the size of the integer didn't change and was oddly large. When I realised that 1/14 was going to be veeeery quiet I took a screenshot instead.

A divide works fine, though more notes to tend to make it less loud. Might have to do some sort of logrithmic ramping to get the volume dampening right.

you may notice I have my own dedicated confusion icon now 😉

Nifty, though it's hard to see :/

malc ·

Hi angstrom,

The component is R&D and as such not much thought has gone into the name yet but it's purpose is to show you the number of voices that are playing. You can then use this information however you choose.

I've no idea why it shows 14 (I'm assuming that you don't actually have 14 voices playing). Maybe this is a bug but if it is I can't replicate it. For each note you play the number shoudl increase and then drop back to zero as you release.

If you start from scratch with just a MIDI In and a MIDI Mono what does the N output give for the number of voices, does it start at 14? Any more info on this would be much appreciated.

Thanks.

angstrom ·

I started from scratch and N incremented correctly it seemed - although when I re-read your post I realised that N should reset on key off (?)

This one doesn't it seems to me. Download a slightly odd OSM file also it doesn't make a sound, which is pretty typical of the things I have made so far. Looks like I am your case study for "man who does everything wrong" 🙂

Anyway .. I think I'll just keep disecting the various examples and chunks that are floating around until I get a working methodology/ mental map for handling this voice num & clipping thing.

Everyone else seems to manage it perfectly well !

rl ·

Confucius said: divide by zero is no good. Add (1) to N and listen to da sound.

still clicks there since you have no adsr control.

hope this helps

angstrom ·

Thanks, I can see that a divide by zero error would give me no sound, but if I press one key then midi mono out N whould send a 1 to the divide rather than 0, so it should only equal 0 when no keys are pressed surely? So when I press one key the sine out vol (1) / 1 ==1

or does the divide by zero produce an initial compile error and then when I do increment it - it is now pre-broken?

I'm still confused why the value doesnt reset to zero when all keys are released unless that is a product of the error (?) . N simply keeps incrementing to the int readout ... but appears to only send 0 to the divide.

yep, still baffled by that one.

unkargherth ·

Rl idea is ok. you could get zeros. becuase ints and floats are not processed on sample precision.

Also could be a good idea to move the division to the mono ( blue section). Not sure, but seems logical, as then you divide AFTER the adddtion fo all notes

And for last. a smoothin of division factor so it moves gradually instead of jumping could also help

angstrom ·

Thanks, I'll probably leave that particular area of exploration for a while though and stick with the more standard & simple aproach of multiplying by a float of .2. I could always stick a rudimentary compressor or saturator on the mono section if I ever really need it. I imagine that when midiMono comes out of R&D someone will have developed a method of using it on gain that doesnt sound as weird as mine:) It was all informative though and helped me understand what is going on with the signal flow handling, so thanks for everyones input. I'll move onto being confused about the GUI section next I think 😉

One final thing I should say about the clipping issue though is - that it wasthe SM tutorial that actually set me on the wrong path as it produces clipping. I then tried the VSTi module and it did the same.

I think it might be good if that tute was edited to include the "polyMultiply by 0.2", because it seems a bit offputting that the very first introductory tute makes a really nasty polyphonic clipping noise with 2 keys depressed - where just 2 more modules would make it sound polyphonically 'correct', hopefully eliminating a rash of posts like mine.

infuzion ·

angstrom wrote: I think it might be good if that tute was edited to include the "polyMultiply by 0.2",

a great idea for Tutorial Step 2.

malc ·

Hi angstrom,

I'm really sorry that this is causing you so much trouble. The N value should indeed return to zero once all notes have been released so I'm as baffled as you are as to why it keeps incrementing.

I downloaded the schematic you posted but using PC Keyboard and External MIDI I got it to work just fine. I'll have a look at the code to see if I can spot anything.

Your suggestion about the tutorial is a very good one by the way.

Thanks very much for sticking at it.

Malc.

malc ·

Just looking at the increasing N problem. Are you using the PC Keyboard or an external MIDI controller? Also, does it happen all the time or only after a period of use?

Thanks

angstrom ·

Hi, I am using a midi controller - on the system I did that schematic on it's actually an old soundblaster with midi in. I use an M-audio delta66 for the actual audio out. WinXP pro

I just tried the same thing on my laptop, it has a USB edirol midi controller and an EchoIndigo audio out .. WinXP home.

it's the same deal there - the variable increments with each keypress. HTH

I dont mind blundering around by the way, it's how I tend to learn ... also I wouldn't expect predictable results from an R&D module. I was just experimenting 🙂

malc ·

Thanks for that. So let me just get it absoultely clear in my head. If you start fresh and N is zero. Can you confirm or otherwise that when you play a note N goes to 1 but when you release it N stays at 1? Doing the same again moves N to 2 and when you release it stays at 2.

The reason I'm asking is that the component is just counting the note on and note off MIDI messages, pretty basic really. I'm just looking for a clue that will give me some place to start looking.

angstrom ·

when you play a note N goes to 1 but when you release it N stays at 1? Yes, it it as you state. here is the exact procudure

• open app • insert midi in • insert midi mono • insert float • connect : midi in-> midi mono -> N to float ('floatN') • select "Edirol pcr midi" on MidiIn module • press key : floatN ==1 • release key : floatN ==1 • press key : floatN ==2 • release key : floatN ==2 • etc

malc ·

Thanks alot for that angstrom, that should give me a point to start from - much appreciated.

Malc.

malc ·

I think I may be getting somewhere with this angstrom. When you say press key, release key, press key...do you mean the same key or are you pressing different ones?

Also, can you try selecting the PC Keyboard instead of your external controller and tell me if this shows teh same problem.

Many thanks.

angstrom ·

Midi Keyboard

pressing the same key repeatedly : N increments to 1 and remains at 1 on key off. N never changes from 1 after this.

pressing different keys : N increments 1,2,3,4, etc

Computer keyboard same key repeatedly : increments to 1, key release decrements to 0.(correct)

different keys : increments to 1, key release decrements to 0.(correct)

midi keyboard - then computer keyboard! press 3 different notes on different midi keys: N==3 press a computer key: N==4, on release N decrements back to 3

HTH

malc ·

angstrom wrote: HTH

It certainly does!

Thanks, that nails it for me. I thought I had it sorted but just needed to check that I fully understood what you were seeing.

Many thanks.

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.