Animated Knob + custom bitmap

For general discussion related FlowStone
Post Reply
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Animated Knob + custom bitmap

Post by billv »

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 25382 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....
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: Animated Knob + custom bitmap

Post by MyCo »

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.
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Re: Animated Knob + custom bitmap

Post by billv »

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 1179 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
   
Jay
Posts: 276
Joined: Tue Jul 13, 2010 5:42 pm

Re: Animated Knob + custom bitmap

Post by Jay »

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 1204 times


best regards
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Re: Animated Knob + custom bitmap

Post by billv »

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)
User avatar
trogluddite
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Animated Knob + custom bitmap

Post by trogluddite »

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!
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Re: Animated Knob + custom bitmap

Post by billv »

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 ".....???
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: Animated Knob + custom bitmap

Post by Nubeat7 »

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 1127 times
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Re: Animated Knob + custom bitmap

Post by billv »

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

Re: Animated Knob + custom bitmap

Post by billv »

Thanks nubeat7.....I missed the 'showcursor' prim altogether...didn't know we had it :oops:
Post Reply