Forum Replies Created
-
AuthorPosts
-
my screen is three 1680×1050 displays.
whatever I design on my screen, without a proper zoom feature would look like an interface from the last century on a 21.5-inch iMac 4K display or something similar.
Believe me, regular stuff looks disturbingly small on modern hi-res displays.The problem is you can not set your panel size to be as a percent of the current display size, which you normally want. You set it’s dimensions in pixels and pixels have nothing to do with size.
Now, consider two screens, both having the same size, but the second one has twice the resolution of the first one. Your panel will look twice as small on the second display.
Since magnifying pixels usually looks like shit, a very common method in UI design is starting with the highest resolution and decreasing the size by adapting to the current screen. In UI design, this ‘zoom’ feature is mainly to decrease the original size to fit the current screen, not the other way around, so you can still get a clear and nice looking interface when it’s on a big high-res screen or on a low-res small screen.
Basically, it is very very difficult to say programmatically, ‘I am designing my panel to be viewed from 1 meter and it should be in 25cm wide and 15 cm high’. Obviously, you can not dictate the screen specs for your panel, so you implement a ‘zoom’ feature. Normally, your program gets the screen size, the screen resolution, and use an adaptive algorithm to present the user the most appropriate size. If it’s too small, it will be difficult to use and see, if it’s too big, it will be invasive and childish basically unprofessional.
So the simplest method is to let the user set the size with a couple of simple clicks and keep that zoom setting either as stateData or something else.
human fly,
my code is correct.
it doesn’t have to be ‘event.mods’ or ‘MouseEvent.mods’
actually, it can be any variable that is declared in the function.
so basicallycustomMouseDown = function(Component, MouseEvent) if MouseEvent.mods:isLeftButtonDown() then -- do something elseif MouseEvent.mods:isRightButtonDown() then -- do something else end
and
customMouseDown = function(Component, CatEvent) if CatEvent.mods:isLeftButtonDown() then -- do something elseif CatEvent.mods:isRightButtonDown() then -- do something else end
are the same thing.
Name of the variable is irrelevant. They are just there to serve as an interface between Ctrlr/juce and lua.
We have here a method called customMouseDown that passes two variables to a lua function called customMouseDown and I called those variables Component and CatEvent. These variables’ order is important just like in any function but you can call them whatever you want.
customMouseDown = function(Component, MouseEvent) if MouseEvent.mods:isLeftButtonDown() then -- do something elseif MouseEvent.mods:isRightButtonDown() then -- do something else end
Hi 2onc,
Can Emu E4 send SysEx on parameter change? If it can, open the midi monitor and paste here a couple of lines when you change a parameter from the sampler.
Also, isn’t there a MIDI channel parameter in the SysEx implementation? I mean, if you have two samplers in the chain, one on ch7 and the other on ch8, how do you indicate which device to respond to on that SysEx?
goodweather,
do you have any information on how to use any of the following?
component:isMouseButtonDown()
component:isMouseOverOrDragging()
component:addMouseListener()
component:SetInterceptsMouseClicks()I’m using mousedrag on a label and want to know when the mouse is up.
Really have been pulling my hair on that for a while…I think there might also be a way to set a method programmatcally, right?
what is component:mouseUp() do you know? Would it be possible to assign programmatically a mouseUp method to a component with
void mouseUp(Component&,MouseEvent const&)Thnx
Hi goodweather,
Thnx for your post.
Actually, initially I was using timers but I had issues when a program was loaded from the library and when multiple non-midi-sending-modulators were updating at the same time; sendMidi sometimes sent very close messages even when I used timers, so to fix that I had to even include an additional initial delay as well to wait for modulators to finish updating, and then sending multiple messages with delays in between them, that worked, but that initial delay changes from system to system depending on cpu power and also it took a lot of milliseconds 🙂 timer method made additional processing and additional code etc, so now with this method I don’t have to care about any timing, different systems or timers etc and I can send multiple messages as quick as I want, not slower, not faster.
now with setting the global delay programmatically, it works flawlessly 🙂
I found this method to be very clean and working very nicely.
I highly recommend it.Thnx a lot.
ok, apparent this actually would create latencies on the modulators as well.
So if you’re sending multiple messages for a program and need to have a little delay between each message, your synth might require a small delay between each message. so the solution is to use this parameter programatically and keep it normally at 0ms to avoid latency on the modulators.this is how I use it.
panel:setPropertyInt(“panelMidiGlobalDelay”,20) — Set MIDI delay to 20ms
panel:setPropertyString(“panelMidiPauseIn”,”1″) — disable MIDI input
for s=1, 5, 1 do panel:sendMidiMessageNow(CtrlrMidiMessage(MidiMsg[s])) MidiMsg[s] = “” end — send 5 Midi messages
timer:setCallback (9, TimerCallback) timer:startTimer(9, 1000) — enable MIDI input
panel:setPropertyInt(“panelMidiGlobalDelay”,0) — Set MIDI delay back to 0msOk, a better question. How does Component:isMouseButtonDown() work? or does it even work?
Thnx for your post humanfly but your link seems to be about something different.
look at Atom’s post here at Juce about this…
https://forum.juce.com/t/cant-a-component-be-a-mouselistener/5935also Look at line 247 here:
https://github.com/RomanKubiak/ctrlr/blob/master/Source/UIComponents/CtrlrComponents/CtrlrComponent.cpp#L247seems like you can attach a mouselistener to a component.
All I need is to be able to assign a callback function to a component on a certain mouse event, in my case a mouseUp event.
ok, apparently there is a property called “panelMidiGlobalDelay” which puts a delay between each midi send. This solves my problems but I have to check if it creates any other performance issues.
The problem is that if you issue a couple of panel:sendMidiMessageNow() calls, Ctrlr sends all of them at the same time. You can see this in the midi monitor. There should be an adjustable delay between them. This causes synth to not understand what’s coming in.
I really hope Atom would implement a delay between midi sends feature.
I’m on Mac.
Version = 5.3.198, Build date = Tue Mar 15 15:53:07 PDT 2016, Branch = Nightly, Juce = 4.0.2, libusb = 1.0.19, liblo = 0.28,I can not quote or post images as well.
human fly,
I think now I understand what you mean about the groups.
When I cut a component from inside a group and paste it outside, I realized that I have to unclick ‘componentGoupped’In two days, I have now 75 panel files 🙂
I’m only using save versioned now. I’m sorting files in the directory with ‘Date Modified’ so even if I do a regular save it appears in the correct position.I was actually working with groups just right now 🙂 I’m making a multi-segment lcd display. It’s working fine. Did not have any problems with groups. I’m using Ctrlr v5.3.198 on mac. However I’ve experienced another problem which caused me to loose almost half a day of work now 🙂
The problem is with the ‘uiLCDLabel’ component. Apparently, the ‘uiLabelInput AllowedChars’ parameter is not working. The solution: use a regular label with font ‘LDC2’ instead of lcdlabel with ‘LCD’ font. ‘uiLabelInput AllowedChars’ parameter is working fine in regular label. Also, for some reason, the ‘LCD2’ font is only available in regular label and ‘LCD’ font is only available in lcdlabel. They are very similar but different. I like the ‘LCD’ font better but I’m not gonna be able to use it due this allowed chars bug 🙁
I have many small LCDs, each in a group, and all these groups are in another group, so i can position, crop and access each separately. Now I have to change all of them to regular labels 🙁
So frustrating… Still, ctrlr is an amazing package 🙂
wow humanfly,
seq-303 is amazing. one of my most favorite controller software 🙂
I mean, is there anything cooler than using the gang function on a VCF frequency sequence 🙂
nice falshbackAs far as what I understood from what you’re trying to do:
the stripes are unavoidable 🙂add an uiImage component, add image to resources, include image resource to uiImage component, add a new layer from layer editor, work in the top layer, leave image as background in the bottom layer.
If you know/find a better way, post here 🙂
Update,
I was able to find a cracked data recovery software for Mac.
EaseUS Data Recovery Wizard v9.8 (build 20151210)
With it, I was able to recover the one before last saved version, which is about half an hour old, so no big deal 🙂
The important thing to note here is that my panel was saved to a drive using a journaling partition format, namely ‘Mac OS Extended’. This wouldn’t have worked on a FAT, FAT32 or ExFAT partition. I am so glad that I did not use ExFAT to format that drive.From now on I will only use the ‘save versioned’ command on Ctrlr.
I hope this info helps someone.
- This reply was modified 7 years ago by Mr.ToR.
FantomXR,
You can find it in WebArchive / WayBackMachine
Here is the link:
https://web.archive.org/web/20161111082401/http://ctrlr.org/nightly/Ctrlr-5.3.163.dmg
It has other issues so only use it for inserting images into components.
Hi FantomXR,
I have the same issue on OSX with Ctrlr v5.3.198
images work on OSX Ctrlr v5.3.163
so I keep Ctrlr v5.3.163 in the Applications folder as well as v5.3.198
I’ve renamed them as ‘Ctrlr v5.3.198’ and ‘Ctrlr v5.3.163’
I normally use v5.3.198 and use Ctrlr v5.3.163 only to load images.
Hope this helps.was this issue resolved?
I can not obtain which button was clicked as well.
This applies to utils.askForTextInputWindow
utils.questionWindow tells which button was clicked. -
AuthorPosts