Welcome to %s forums

BrainModular Users Forum

Login Register

round a number with a x.x precision

I need help on a Patch
Post Reply
La Tenaille
Member
Posts: 547
Location: Saint Etienne (France)
Contact:

Unread post by La Tenaille » 10 Sep 2013, 17:42

Hello,
I'm looking for a way to round a number with a x.x precision. It's to send a precise tempo from midi clock to master.
Can you help ?
Thanks

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 10 Sep 2013, 18:20

yes, actually the round module don't have settings to choose, so the workaround is to insert a fader with precision x.xx after your value .?

La Tenaille
Member
Posts: 547
Location: Saint Etienne (France)
Contact:

Unread post by La Tenaille » 10 Sep 2013, 22:46

I already tried this, but I don't know how to get the value out of the rounding fader :|

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 10 Sep 2013, 23:18

from its outlet..?
where do you want to send this value..?

La Tenaille
Member
Posts: 547
Location: Saint Etienne (France)
Contact:

Unread post by La Tenaille » 10 Sep 2013, 23:27

to master sync tempo. The fader is rounded, but its fader outlet isn't...

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 10 Sep 2013, 23:49

ok, try fader > float to string ( precisionx.x) then a strings to float > tempo

grego mondo
Member
Posts: 466
Location: 22110 Rostrenen
Contact:

Unread post by grego mondo » 11 Sep 2013, 07:59

I would do like that :

*10
round
/10

maybe not so nice but efficient ...
En attendant cordialement l'apocalypse ... 100% Usine !!
https://lesformesdufond.kaz.bzh/grego-mondo/
PC i7 2.6Ghz - Win11 / RME Fireface UFX
Tubas / Serpent / Music Box
Interfaces Midi / OSC / DMX

La Tenaille
Member
Posts: 547
Location: Saint Etienne (France)
Contact:

Unread post by La Tenaille » 11 Sep 2013, 10:08

both work fine. Thanks for your help :)

ceasless
Member
Posts: 330
Contact:

Unread post by ceasless » 11 Sep 2013, 10:53

You could also use the 'trunc' module, if it is only important that the number lose it's decimal place (and not that you need the logic where 0.5 = 1, 1.5 = 2). With trunc 1.1-1.9=1,2.1-2.9=2, etc.

La Tenaille
Member
Posts: 547
Location: Saint Etienne (France)
Contact:

Unread post by La Tenaille » 11 Sep 2013, 14:14

Hi ceasless,
I need a precise tempo. Trunking is not precide enough and I can hear the decay when using slicers or short delays.

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 11 Sep 2013, 17:24

If you want rounding to one decimal, multiply the number with 10, round that, and then divide by 10.
Bjørn S

La Tenaille
Member
Posts: 547
Location: Saint Etienne (France)
Contact:

Unread post by La Tenaille » 11 Sep 2013, 18:25

grego mondo wrote:I would do like that :

*10
round
/10
.
:P

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 12 Sep 2013, 08:41

La Tenaille wrote:
grego mondo wrote:I would do like that :

*10
round
/10
.
:P
Oooops! Didn't see that...
Bjørn S

grego mondo
Member
Posts: 466
Location: 22110 Rostrenen
Contact:

Unread post by grego mondo » 12 Sep 2013, 12:57

Anyway, it's always nice to see others have the same logic as you, it reassures !!
En attendant cordialement l'apocalypse ... 100% Usine !!
https://lesformesdufond.kaz.bzh/grego-mondo/
PC i7 2.6Ghz - Win11 / RME Fireface UFX
Tubas / Serpent / Music Box
Interfaces Midi / OSC / DMX

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 25 guests