Page 3 of 4

Re: Trogs Knob (Bitmap)

Posted: Fri Sep 27, 2013 3:48 pm
by billv
trogluddite wrote:No news yet.

Thanks mate...
trogluddite wrote:but nothing yet that does it every single time like this one does

:D damn thing ....like it's superglued....

So what's your opinion Trog...?

i went chasing that 'request_redraw' logic that runs through the code.....got no-where..

...have you tried to re-design the knob..?

....how long did it take to build..?...point is...
:idea: is it feasible to re-build again from scratch to see where the gremlin appears..??

Re: Trogs Knob (Bitmap)

Posted: Mon Sep 30, 2013 10:55 am
by trogluddite
:oops: :oops: :oops: :oops:
Just sent an apology to Malc....

Remember how at the end of the schematic post I wrote some stuff about how "releaseMouse" had to be in "mouseLUpCaptured" and not "mouseLUp"?
Great advice, that - I really should have taken it myself, and actually remembered to include the "releaseMouse" command in my code! :lol:
Still doesn't explain why it affected some edit boxes and not others - but not giving the mouse control back to Windoze certainly isn't the right way to go about things!

Fixed schematic is in the top post - I also swapped the SHIFT and CTRL modifier keys to match the old SM way that folks are used to.

P.S.) Sorry it's taken a while to sort this - been bed-ridden with a humdinger head-cold all weekend. Still feel like sh*t, but there's only so much boredom I can take! When I feel a bit more like staring at a screen for a few hours, I'll make a start on some little upgrades I have in mind - MIDI learn is top of the list, but I'm open to suggestions.

P.P.S) Billy was asking about the weird way that re-draws work, so here a brief description...
Basically, there's a timer that sets the frame rate for drawing the GUI (using input 100). When the knob value changes, it sets a flag "@redraw_pending" to true. If the flag is true on the next tick, a redraw happens, and the flag is reset to false.
However, if the flag isn't true, the timer stops, so that there aren't a load of useless Ruby events flying around after you've let go of the knob. Next time the knob changes, a redraw happens straight away, and then the ticker gets restarted. "@redraw_running" is just another flag that remembers whether the ticker is active or not.
The rest of the logic is a simply a little test to see if any part of the GUI actually changed, in case the value change is so small that there wouldn't be anything new to see.

Re: Trogs Knob (Bitmap)

Posted: Tue Oct 01, 2013 1:54 am
by billv
trogluddite wrote:Fixed schematic is in the top post

Awesome....thanks trog..will check it out soon....
Rest up....take it easy...mint tea is good...
Cheers mate.

Re: Trogs Knob (Bitmap)

Posted: Tue Oct 01, 2013 9:12 am
by trogluddite
billv wrote:mint tea is good

Strangely enough, that's exactly what I've got sat next to me right now - complete with a teaspoon of honey to get the itch out of my throat! :D

Re: Trogs Knob (Bitmap)

Posted: Wed Oct 02, 2013 4:20 am
by billv
I'm getting the same type issue as before
Image
Have changed cell count to 30, but I cant translate Jay's fix in the other knob,
to The Trog knob code...
Very :oops: cause everything's explained in the code line by line...and i still can't fix..
Can you give me a tip here Trog...
I really want to put this knob in next update and give it a run.... :)

Re: Trogs Knob (Bitmap)

Posted: Wed Oct 02, 2013 8:41 am
by trogluddite
I'll double check it this evening - it's worked with all the Knobman strips that I've used so far.
Does the amount of clipping change when you change the frame count?

Re: Trogs Knob (Bitmap)

Posted: Wed Oct 02, 2013 11:55 am
by billv
trogluddite wrote:t's worked with all the Knobman strips that I've used so far

Yeh I got a result with some knobman strips I've made.... :)
But this 'predator' strip I'm using is not behaving the same way...
I didn't make it....but I think its a knobman job....
Bitmap issue.fsm
(85.2 KiB) Downloaded 1476 times

Re: Trogs Knob (Bitmap)

Posted: Wed Oct 02, 2013 2:51 pm
by Nubeat7
trogluddite wrote::oops: :oops: :oops: :oops:
Just sent an apology to Malc....

Remember how at the end of the schematic post I wrote some stuff about how "releaseMouse" had to be in "mouseLUpCaptured" and not "mouseLUp"?
Great advice, that - I really should have taken it myself, and actually remembered to include the "releaseMouse" command in my code! :lol:
Still doesn't explain why it affected some edit boxes and not others - but not giving the mouse control back to Windoze certainly isn't the right way to go about things!


so in this example it worked as vst export too with the wrong releaseMouse placing, yes?

because i did the same mistake with my fx chainer and there it worked well as exe but not as vst (when commands where in mouseLUp instead of mouseLUpCaptured)

where is the difference between vst and exe?

Re: Trogs Knob (Bitmap)

Posted: Wed Oct 02, 2013 4:10 pm
by Jay
Hi billv

ive made a small modification to the strip loader inside the knob and added a property to the knob ( horizontal strip?) it works out the cell count by simple division in green to obtain the count, it works equal sided (square) cells but something more complex would be needed for rectangular cells such as in a fader animation!

here is the file with 2 strips, one vertical and the other horizontal
knob.rar
(598.27 KiB) Downloaded 1591 times


regards

Re: Trogs Knob (Bitmap)

Posted: Wed Oct 02, 2013 7:59 pm
by trogluddite
Hi Guys,

A fix for the cell count thing is now in the top post - it was just a typo in the code; it wasn't reading the cell count when typed in, only when the bitmap itself changed. Totally my own fault, I got confused whether I was calling them 'cells' or 'frames', and then screwed up the find & replace after I finally made my mind up! :oops:

I also added another little feature to help with this - you can now include the cell count in the bitmap's filename, inside square brackets (e.g. "My Knob Strip [64].png") - it will then set the count automatically when you load the file, though you can manually override it if you need to. The count doesn't have to be at the end of the filename, anywhere will do, as long as you remember the square brackets.

Here a quick preview of the next version with MIDI learn included (just for CC messages so far).
Better Knobs 006 MIDI Learn.fsm
(274.02 KiB) Downloaded 1525 times

Probably best not to use it in anything important just yet - consider it a Beta. To learn a new controller, ALT-click the knob, and then send a controller message (you'll see "LEARN" in the label area). The controller mappings are all stored in the 'Master' module, and can then be saved and loaded. The mapping file-path is stored as a VST preset, so that mappings are auto-loaded. If you don't specify a path, a default map file is used inside the plugin directory.
(NB - when within FS, the 'default' mapping file is auto-saved to the Desktop as "MIDI Assigns.dat"; so if you have a play with this schematic, you'll probably want to delete that later!.)
Hoping to add other kinds of MIDI message, and also to parse the files so that you can read/edit them in a text editor (they are binary files at the moment).

@Nubeat - the weird thing is that it seemed to work fine; but that may just be a coincidence because they were just test files with a couple of knobs and nothing else in there.