New Quark - GraphicalModule (GM) : a new collection of widgets

Hello folks, I hope you’re doing well !

Here’s my first Quark : GraphicalModule, yet another collection of widgets to create Graphical User Interfaces.

Pictures first :

Those two examples are documented in the built-in documentation. They provide basic usage example (and copy-paste templates) for a continuous synth interface, and a sequencer interface.

And two interfaces I built for myself, using it :


So what’s inside ?

  • sliders in different flavours. They respond to CTRL, SHIFT and ALT (and combinations), which allows to switch between discrete and continuous values, and to switch back-and-forth from a given state (giving a ‘live-instrument feel’).

  • a somewhat limited piano roll, a sequencer, and a probabilist sequencer. With the multisliders, they’re part of a ‘sequencer interface’ which allows to update the current beat from within a routine, and to highlight important beats.

  • a text view that resizes automatically, and can be oriented in the 4 direction (but can only be centered).

  • a palette system.

  • a color picker.

  • a terminal output simulation where you can post messages, along with their timestamp.

  • ready made buttons such as a checkbox, a play/pause/stop button, a record button, a button with visual feedback, a grid multi-button.

  • svg support on most buttons.

  • everything is responsive.

  • every non-internal method is documented at least once (in case of duplicates, which is indicated), classes are illustrated with examples.


There it is. I hope you have fun playing with it !

I tried to make it as stable as possible before releasing it, but since I’m the only one who tested it, there’s likely issues / bugs / improvements I missed. So this is considered beta release for now.

Any remark / suggestion / help / question / bug report / feedback / etc is welcome !

Musicalement,
Simon

23 Likes

Hello everyone :musical_note: !
Here’s a small update of the Graphical Module.


First, a new class I was impatient to use for quite some time : GMCurveEnvView:

Basically, an EnView that provides handles to modify the curvature of its segments. One can also add points with CTRL + LMB, or remove points using RMB.


Then, GMKeyboard, a widget that represents a piano keyboard:

and can be configured in several fashions. Keys emit visual feedback when interacted with, it supports both sustain and non-sustain mode, and can easily be controlled from an external MIDI source as documented in the buit-in examples.


Lastly, GMRoundButton, a simple, erm, round button, with visual feedback that allows to build rythmic interfaces on tactile screens:

Here’s how I used it to provide a drumkit on one of my softs.


Now the not-so-quite interesting stuff:

  • I’ve implemented a maxFontSize method to GMTextView
  • I’ve updated the project README.md so it actually presents the Quark
  • I fixed minor issues I’ve been encountering
  • I made small documentation updates
  • I updated some method names to improve consistency. Deprecated methods will yield a warning until they’re removed

And that’s it. As always, feedback is appreciated!
Simon

11 Likes

Excellent work and really needed! Thanks for this!!!

This looks awesome! Thanks for sharing!

Very cool. Thank you

Bonjour @Dindoleon merci beaucoup pour cette jolie contribution !!

I have a small feature request: Would it be possible to integrate a ‘set’ method in GMRoundButton (and maybe in others widgets) to use the button programmatically just as a visualizer (without triggering and without interacting with mouse)? And perhaps another method ‘trigger’ to trigger it programmatically ?

Merci et à bientôt,

José

Hello José,

Yes, this is definitely two features I need to implement in every control. To be honest, since developing this Quark takes a lot of time, but is needed for my other projects, I decided to ‘rush’ publication, postponing such problems/features until I or an user faces them.

Now, this is an actual issue, so I’ll try to update GMRoundButton quickly, then other widgets. In fact, I’ve done it (partially) already for GMRecordButton, which now has a setDisplay method which only toggles its visual state.

If I can ask you for feedback, since controls actually evaluate a function, is it really pertinent to add a trigger method ? I know this is a handy short cut, but developer, instead of triggering, should evaluate associated function directly, then call for a visual update ?


As a side note, for everyone using this Quark, this is still BETA, as such, I update the main branch directly, regularly, even though I do not post modifications here. I still keep track of those modifications and will post ‘patch-notes’ from time-to-time, but they’re not tied to a ‘single big update’, they are documenting changes that have been made over time since last ‘patch notes’. That’s a long statement to say ‘You might want to update this Quark regularly’ :slight_smile: .

1 Like

Merci @Dindoleon !

Great! Is this method available now then?

Yes, you’re right ! It’s not necessary.

Merci beaucoup et encore bravo !!

José

Sois patient petit scarabée :beetle: .

Yes, it should work now, just update your Quark to fetch latest changes (and send me a PM if anything broke, I only did minimal tests).

Both GMRoundButton and GMFeedbackButton now implement a blink method which starts their animation (without evaluating their associated function). Refresh call is internally deferred so it can be used directly within Routines, MIDIFuncs, and equivalents.

In case you were using it, I’ve deprecated the stringRatio method, replaced by fontRatio (just a name change, does the same). You’ll get a warning until changed.

1 Like

Super, merci @Dindoleon, en effet je n’ai pas eu à attendre trop longtemps :smiley: :+1:

I’ll test that, and if I have any issues, I’ll let you know!

Grand merci encore!

José