Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Animated Knob + custom bitmap

For general discussion related FlowStone

Animated Knob + custom bitmap

Postby billv » Wed Sep 18, 2013 7:17 am

Loading my bitmap into animated knob i get this old issue.. where the cells don't
redraw on the same spot.
ScreenShot273.png
ScreenShot273.png (4.97 KiB) Viewed 22341 times

Saw this a bit in SM but always fixed it....
Not getting anywhere when i look at the code for the fix.... :?
Can someone give me a tip....
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: Animated Knob + custom bitmap

Postby MyCo » Wed Sep 18, 2013 9:35 am

set the right bitmap cell count. I can't tell you more without looking at the actual schematic for the knob that you are using.
User avatar
MyCo
 
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany

Re: Animated Knob + custom bitmap

Postby billv » Wed Sep 18, 2013 10:15 am

MyCo wrote:cell count

yeh...can't work out how to get control of it....(its the FS Animated knob)
Knob_bitmap issue.fsm
(183.43 KiB) Downloaded 1068 times

..so the fix is in this part..??....
Code: Select all
   # Work out how many cells we have   
   x = (@cells.widthPixels / @cellSize).to_i
   y = (@cells.heightPixels / @cellSize).to_i
   cellCount = [x,y].max
   
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: Animated Knob + custom bitmap

Postby Jay » Wed Sep 18, 2013 11:48 am

Hi Billv got it fixed here! cell size is 30, changed the sweep to start - 0, finish - 360!

Knob_bitmap issue.fsm
(183.55 KiB) Downloaded 1092 times


best regards
Jay
 
Posts: 276
Joined: Tue Jul 13, 2010 5:42 pm

Re: Animated Knob + custom bitmap

Postby billv » Wed Sep 18, 2013 12:24 pm

Jay wrote:Hi Billv got it fixed here! cell size is 30, changed the sweep to start - 0, finish - 360!

Great Jay...thanks a lot. Still struggling to work it out though... :lol:
This will be a big help with optimizing my synth.
i've got it down to 280,000 parts...from 900,000+ :D :D ..the knob change will
maybe get me another 50,000 reduction...
Cheers.
and (Thanks Myco)
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: Animated Knob + custom bitmap

Postby trogluddite » Wed Sep 18, 2013 7:02 pm

Yes, Jay has it.

The knob code works a bit differently than the old SM knobs - it assumes you have a strip of frames that cover a full circle 0-360deg. If your strip does have the full circle, you can use the start and sweep angles to choose the knob range that you want to use on screen.
With an old style strip that only contains the frames that you are going to use, it miscalculates the frame size, and you get the weird clipping effect. So, Jay's 0-360 values effectively tell it to use all of the frames.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Animated Knob + custom bitmap

Postby billv » Wed Sep 18, 2013 8:40 pm

Thanks for explanation Trog....makes more sense to me now...
trogluddite wrote:a bit differently than the old SM knobs

Same with "hide cursor"...easy in SM.....but how is done in FS.. :?
Didn't see a clear answer in user guide mouse cursor section......

Going online they are using show()....hide()......

Or maybe, with this from User Guide...
However, you could use the x and y position to return a different result depending on whether the
mouse is in a particular area or location.
Page- 191

So don't use true or false in " isInMousePoint ".....???
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: Animated Knob + custom bitmap

Postby Nubeat7 » Wed Sep 18, 2013 9:50 pm

just connect the "show cursor" prim with the interact of your knob... afaik there is no ruby solution for this
Attachments
show cursor.fsm
(178.45 KiB) Downloaded 1022 times
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: Animated Knob + custom bitmap

Postby billv » Wed Sep 18, 2013 10:53 pm

Thanks nubeat7...look forward to getting home and having
a look....cheers...
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: Animated Knob + custom bitmap

Postby billv » Thu Sep 19, 2013 7:05 am

Thanks nubeat7.....I missed the 'showcursor' prim altogether...didn't know we had it :oops:
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia


Return to General

Who is online

Users browsing this forum: No registered users and 76 guests