SynthMaker

Help with clicks in first very simple synth

Archive Β· 2005 25 old posts

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

mathman Β·

Well I've had great fun tonight creating my first synth ... maybe it's too simple to be even called a synth ... πŸ˜‰

MIDI In -> MIDI to Poly -> Sin Osc -> Poly to Mono -> Audio Out

This works OK but clicks badly so I added in an ADSR

MIDI In -> MIDI to Poly -> Sin Osc -> Mono Multiply with ADSRsr -> Poly to Mono-> Audio Out

where the ADSRsr has inputs as follows: Attack = 512 Decay=512 Release=512 Sustain=0.1 Hold is set to true

(sorry I couldn't link to an image)

The problem comes when try to play more than one note at a time, it sounds like its clipping badly.

Perhaps I need to add something to scale the output so it stays within a certain range?

Any suggestions/help much appreciated - thanks

jorge Β·

Hi mathman,

mathman wrote: Perhaps I need to add something to scale the output so it stays within a certain range?

Exactly, try this:

[old link] If you need more help let us know.

Shifrin Β·

<edit>

Jorge beat me to it πŸ™‚

</edit>

jorge Β·

Hi Shifrin

Shifrin wrote: <edit>

Jorge beat me to it πŸ™‚

</edit>

πŸ™‚, you could have left yours, it's always good to have a second opinion. Actually, what you said about clipping was useful. I'd like to know what kind of clipping SM should do internally.

Shifrin Β·

jorge wrote: Hi Shifrin

Shifrin wrote: <edit>

Jorge beat me to it πŸ™‚

</edit>

πŸ™‚, you could have left yours, it's always good to have a second opinion. Actually, what you said about clipping was useful. I'd like to know what kind of clipping SM should do internally.

Yeah I should have left it πŸ˜‰ Will do next time! To be honest I'm not sure which type of clipping would be best. It seems at the moment that data sent to the sound card is wrapping around, is that right? I.e. 16bit data that if over 32767 or whatsever simply wraps back around to for example 12345 in the case of 45112? Maybe I've got that wrong but either way some sort of limiting would be grand πŸ™‚

Shif.

mathman Β·

Thanks guys πŸ™‚

As it happens I do have a couple more questions:

(1) How did you decide upon a value of 0.2 for scaling down?

(2) I set hold to true using the output of a component which compares 2 values and outputs true if they are equal. I guess there must be an easier way? (Is an INT of 1 true?)

Thanks in advance

stefan Β·

jorge wrote: Hi Shifrin

Shifrin wrote: <edit>

Jorge beat me to it πŸ™‚

</edit>

πŸ™‚, you could have left yours, it's always good to have a second opinion. Actually, what you said about clipping was useful. I'd like to know what kind of clipping SM should do internally.

Imo, just basic clamping within the DS Out module. Wrapping sucks. πŸ™‚

lalo Β·

what would be nice is...

adapt the volume to the number of voices played toghether.... as a module or option... so if you play 6 notes together the output doesn't clip..

lalo

stefan Β·

lalo wrote: what would be nice is...

adapt the volume to the number of voices played toghether.... as a module or option... so if you play 6 notes together the output doesn't clip..

lalo

That would sound dreadful most of the time πŸ™‚

Shifrin Β·

stefancrs wrote: Imo, just basic clamping within the DS Out module. Wrapping sucks. πŸ™‚

Yeah, that'd work for me πŸ™‚

Shif.

stefan Β·

Shifrin wrote: stefancrs wrote: Imo, just basic clamping within the DS Out module. Wrapping sucks. πŸ™‚

Yeah, that'd work for me πŸ™‚

Shif.

And maybe a "clip indicator" on the actual component.

Shifrin Β·

stefancrs wrote: Shifrin wrote: stefancrs wrote: Imo, just basic clamping within the DS Out module. Wrapping sucks. πŸ™‚

Yeah, that'd work for me πŸ™‚

Shif.

And maybe a "clip indicator" on the actual component.

Read my mind πŸ˜‰

Shif.

lalo Β·

stefancrs wrote: That would sound dreadful most of the time πŸ™‚

sorry for my bad english but what does it mean 'dreadful' ?

full of rasta hairs? πŸ˜€

lalo

stefan Β·

lalo wrote: stefancrs wrote: That would sound dreadful most of the time πŸ™‚

sorry for my bad english but what does it mean 'dreadful' ?

full of rasta hairs? πŸ˜€

lalo

Haha. It really OUGHT TO! No, it means "horrible" πŸ™‚

Shifrin Β·

lalo wrote: sorry for my bad english but what does it mean 'dreadful' ?

full of rasta hairs? πŸ˜€

lalo

Hahaha πŸ˜€

Shif.

malc Β·

mathman wrote: (1) How did you decide upon a value of 0.2 for scaling down?

0.2 would allow you to play up to five notes at once without distortion. Each note's signal woild run from 0 to 0.2 instead of 0 to 1. I don't think there was any particular reason Jorge picked this value.

mathman wrote: (2) I set hold to true using the output of a component which compares 2 values and outputs true if they are equal. I guess there must be an easier way? (Is an INT of 1 true?)

Indeed, ints are converted to booleans automatically: 0 is false and everything else is true.

lalo wrote: full of rasta hairs?

That's terrible lalo - worse than one of mine! πŸ™‚

lalo Β·

malc wrote: lalo wrote: full of rasta hairs?

That's terrible lalo - worse than one of mine! πŸ™‚

πŸ˜€ πŸ˜€ you know i'm a stoopeed cat πŸ˜€

lowe

lalo

lalo Β·

malc wrote: mathman wrote: (1) How did you decide upon a value of 0.2 for scaling down?

0.2 would allow you to play up to five notes at once without distortion. Each note's signal woild run from 0 to 0.2 instead of 0 to 1. I don't think there was any particular reason Jorge picked this value.

that's why i said in this thread that a primitive modules that return the actual ongoin' polyphony would be very helpful if one want to do a kind of 'automatic' gain level... even if it sounds ....dreadful ( πŸ˜€ this time i'll shut up) can be useful in some occasion. just my 2 cents... ..waitin' for stefan tellin me i'm wrong πŸ˜€ ....

lowe lalo

stefan Β·

lalo wrote: malc wrote: mathman wrote: (1) How did you decide upon a value of 0.2 for scaling down?

0.2 would allow you to play up to five notes at once without distortion. Each note's signal woild run from 0 to 0.2 instead of 0 to 1. I don't think there was any particular reason Jorge picked this value.

that's why i said in this thread that a primitive modules that return the actual ongoin' polyphony would be very helpful if one want to do a kind of 'automatic' gain level... even if it sounds ....dreadful ( πŸ˜€ this time i'll shut up) can be useful in some occasion. just my 2 cents... ..waitin' for stefan tellin me i'm wrong πŸ˜€ ....

lowe lalo

Well, such a component would be useful. I'd never use it for that purpose, but for other things. Like showing number of voices played or so. Ofcourse, you could use it for an ugly auto-gain control if you like πŸ™‚

lalo Β·

stefancrs wrote: Well, such a component would be useful. I'd never use it for that purpose, but for other things. Like showing number of voices played or so. Ofcourse, you could use it for an ugly auto-gain control if you like πŸ™‚

fair enough πŸ™‚ freedom is the beautiful thing in the world πŸ™‚

you know..i like to do ugly things πŸ˜€

is there a beautiful tune played by Ornette Coleman (wich is one of my favourites musicians/composer/improviser) wich is entitled 'ugly beauty' (by Monk one of my gurus too)...

everything is relative...even me πŸ˜€

lowe and thank you very much for your opinions/help stefan

lalo

Tom7777 Β·

Maybe Malc and Jorge should make a peak max/limit/cutter module that has a input, high and low input and then cuts (Makes high or low) anything below or above the values set. This would be a great and simple way to stop clicking and you could use them on more than part of a synth also and there would be alot of ways to use them also apart from stopping clicks. If you guys think thats a good idea for a module please post a reply or something to let people know its wanted (If it is?) because thats something i would like to see made for sure. πŸ™‚

stefan Β·

Here you go: clamp.osm

Tom7777 Β·

Nice one πŸ™‚ I wish i could code DSP also.... I gonna try to learn it. I bet you can make a load of modules using it that are hard to make using the default modules πŸ™‚

stefan Β·

Tom7777 wrote: Nice one πŸ™‚ I wish i could code DSP also.... I gonna try to learn it. I bet you can make a load of modules using it that are hard to make using the default modules πŸ™‚

Doing a poly version working just like my mono clamper is really easy:

clampPoly

Tom7777 Β·

Cool 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.