Skip to main content
LalalandAudio
Associate III
September 24, 2019
Question

Adding a rotating knob ?

  • September 24, 2019
  • 8 replies
  • 4521 views

Can I add a rotating knob ? If so , how ? Would it be possible to load a filmstrip ?

I use that for VST plugins although I see no widgets for that ?

Maybe the circle progress , somehow ?

This topic has been closed for replies.

8 replies

Martin KJELDSEN
Principal III
September 24, 2019

You can use the texturemapper to rotate anything you want. Check out the "Animation Texturemapper" example from the designer.

/Martin

LalalandAudio
Associate III
September 24, 2019

Sweet !, will try

But one thing , rotating something and and using sprites or strips is different.

A real rotation would change reflections and shadows while rotating as opposed to just rotating a static picture , having said that , maybe the texturemapper allows that so I am off to try :)

Martin KJELDSEN
Principal III
September 25, 2019

The texture mapper we provide can map the texture based on "camera" position and rotational parameters (x,y,z). There's no light source involved to provide reflections and shadows. That would be extremely expensive to calculate using the CPU (which is required, since the only graphics IP is ChromArt which provides in hardware alpha blending).

LalalandAudio
Associate III
September 24, 2019

Another issue, figure i post here instead making endless posts .

I have a togglebutton on page 1 , I toggle it to ON position , I use another regular 2 state button to switch to page 2.

When I go back to page one the togglebutton is now off ? How can I make it persistent ?

This also applies to the slider I inserted , its reset when I return to the page .

Martin KJELDSEN
Principal III
September 25, 2019

Usually, you'd persist data through the model - Either as an intermediary state (story it in variables, losing the data when power cycling) or from the model you'd maybe even store it on an SD card or maybe in EEPROM. Following the MVP pattern, your view would tell the presenter (which knows the model) to store the data.

Whenever you enter a screen the presenter should load the data from the model and initialize the view to restore the old state.

/Martin

LalalandAudio
Associate III
September 24, 2019

On that note , would it be possible to say have a set of sliders and then save their position as a preset ?

Probably not in touch fx itself but is this achievable somehow ?

LalalandAudio
Associate III
September 24, 2019

I have a lot of questions...could I display a waveform or scope output or even meter or envelope display from audio Weaver ? Yes, I will read more , just excited , hehe :)

Martin KJELDSEN
Principal III
September 25, 2019

Questions are great :) Yes you can display a waveform - Not through the designer but there's a graph demo somewhere in this forum, try searching for it. There's no integration with third party tools like audio weaver. You'd have to convert into data that you can feed to a graph widget

/Martin

LalalandAudio
Associate III
September 24, 2019

As for the texturemapper example , This just rotates freely.

I mean like a knob , sample attached.

Also , how can I see in that example "How" it is made to rotate ? Is that purely in code or can I access those settings withing TGfx ?

Actually I have the problem with a lot of the demos , hard to see how it is made to do what it does , I must be missing something ?

Here is a sample of what I mean by knob rotation.0690X00000ARc0PQAT.gif

Martin KJELDSEN
Principal III
September 25, 2019

In 4.10.0 the texture mapper is supplied only in code. It's supported through the designer internally in the upcoming release.

The animation example rotates freely since it uses x,y and z as rotation parameters. If you lock a few of those you can rotate along one plane only =)

The AnimationTexturemapper is just a specialization of TextureMapper with support for providing callbacks when an animation is done and handleTickEvent() to drive the animation,.

What handleTickEvent() does for the animation is to calculate new x,y,z rotation values, update the parameters of the mapping and effectuate it. You'll do this by hand when calculating how to rotate your knob.

Actually, we already have a demo that has your knob. Try "demo2" and go to the "External hardware" view. It auto updates, but you have the code there and can play around with reacting to touch events instead.

/Martin

LalalandAudio
Associate III
September 24, 2019

Also notice a graphic glitch when its plugged in and starting , is this a fact with this setup ?

Martin KJELDSEN
Principal III
September 25, 2019

I don't understand what you wrote here. What glitch? When what is plugged in? What setup? :)

LalalandAudio
Associate III
September 25, 2019

As for the rotation , will look into that .

Will just mention that for example when I am making VST plugins , I can load a filmstrip/sprites of a knob, essentially 128 pics.

That way the shadow and glare/reflections can change according to rotation making it much more "realistic".

Not really a problem with sliders as I can have one indicator pic with shadow and move the whole thing, sufficient.

I dont know if you want to look into implementing something like that :squinting_face_with_tongue:

Glitch.

Sorry , should be more clear =)

I have the board either powered via uSb to PC or just a USB power brick.

I have my own graphics loaded, background, slider , switch.

When It comes on there is a very brief graphic flicker. (Little blocks of graphic . 1/4 second or so.

I obviously have a lot to learn !

P:S would be nice to be able to designate a startup screen as well as a screensaver based on non activity for a certain amount of time.

Thanks for your time Martin.

LalalandAudio
Associate III
September 25, 2019

Is there anything I can read to understand how to make TouchGFX , control other functions of the stm board ?

I have a clue how to control external devices , but no idea on how to control say an object ID from Audioweaver or any other functions available on the STM board.

Martin KJELDSEN
Principal III
September 26, 2019

TouchGFX cannot control anything, you could say - But you'll find a sticky in this subforum that explains how to integrate UI and Hardware, Articles, examples, and a video of me explaining how things fit together - Interacting with hardware from the GUI task, and reading hardware inputs from other tasks and presenting those values in the gui.

Let me know

/Martin

LalalandAudio
Associate III
September 26, 2019

Thanks Martin , will have a look :)