@griffinboy Can't wait to see what you make, this sounds amazing!
Best posts made by LozPetts
-
RE: More Types of Saturation
-
RE: Is it possible to insert a looping video in a UI?
@ulrik That one didn't work properly for me so I use this:
https://www.cssportal.com/css-sprite-generator/
What I did to get this working was:
- Trim the empty space from the video edges.
- Convert the video to GIF - https://ezgif.com/video-to-gif
- Extract the frames from the GIF as PNG files - https://ezgif.com/split
- Convert all the PNGs into a filmstrip with the above CSS Sprite Generator
- attach filmstrip to Panel in HISE.
/** Looping Video Panel */ inline function createHeadSprite(name, x, y) { local widget = Content.addPanel(name, x, y); Content.setPropertiesFromJSON(name, { "width": WIDTH OF SINGLE PNG, "height": HEIGHT OF SINGLE PNG, "saveInPreset": true, "allowCallbacks": "Clicks, Hover & Dragging" }); // Asset Strip widget.loadImage("{PROJECT_FOLDER}FILMSTRIP.png", "filmstrip"); widget.setPaintRoutine(function(g) { // Calculate the index (the filmstrip has 100 slices, each ???px high var index = parseInt(this.getValue()*197.0); g.drawImage("filmstrip", [0, 0, this.getWidth(), this.getHeight()], 0, index * ???); }); // This is the sensitivity of the rotation widget.data.sensitivity = 300; // Save the down value as reference for all drag deltas widget.data.downValue = 0.0; widget.setMouseCallback(function(event) { if(event.clicked) { // Store the current value for reference when dragging this.data.downValue = this.getValue(); } if(event.drag) { // Use both axis to allow diagonal drag behaviour var delta = event.dragX + -1.0 * event.dragY; // normalize the delta using the given sensitivity var deltaNormalized = delta / this.data.sensitivity; // Calculate the new value and truncate it to 0...1 var newValue = this.data.downValue + deltaNormalized; newValue = newValue - Math.floor(newValue); // Update the panel this.setValue(newValue); this.changed(); this.repaint(); } }); return widget; }; const sprite = createHeadSprite("LOOPPANEL", X, Y); // timer for animation (FPS) reg count = 0; sprite.setTimerCallback(function() { count = (count+1) % 24; this.setValue(count * 1/24); this.changed(); }); //Speed sprite.startTimer(62); //Play with this to set speed
Hope that helps someone out!
-
RE: Is it possible to insert a looping video in a UI?
@d-healey I saw in another thread you advised someone to check the pool to see how much memory the bitmaps were using (if I understood correctly at least!). Created a popup window, Image pool table, although looking at it now it might not be showing the full size as hise sees it.
-
RE: Is it possible to insert a looping video in a UI?
@ulrik Thank you! Thank works beautifully - I had a few issues but I've got it going smoothly and it looks killer. Thank you to you all.
RE memory usage, I cropped the dead space from the video when I converted it to a film strip, according to the image pool table it looks like it's using around 100mb RAM, much better than expected.
@d-healey Once again thanks for your help - is there a way we can update the documentation to reflect the fix above? Or can only Christopher do that?
-
RE: Convolution impulse not included in final plugin
@Soundavid Thanks for your response!
I already have multithreading and 'Rebuild Pool Files' enabled as I suspected they might help! I hadn't cleaned my build folder, I've done that now and recompiled and ITS WORKING! Thank you so much for your help.
Just as a learning moment - did I do something wrong here? How often should I be cleaning my build directories? -
RE: Creating a velocity limiting knob, can someone show me how this should look?
@d-healey That would help. Face palmed pretty hard there.
Just in case it helps anyone in future!
function onNoteOn() { //Velocity Limiter Knob Message.setVelocity(Math.min(Message.getVelocity(), MaxVelKnob.getValue())); Console.print("Velocity: " + Message.getVelocity()); };
Latest posts made by LozPetts
-
RE: Packaging my first instrument - LinkOSX question?
@d-healey Understood - I've spent the last hour pouring over the relevant documentation and can't see any mention of how to actually declare the location of the HR files in a script that HISE will then pick up for extraction - any ideas on how to do this? I can point the plugin to the containing folder, and get the HR file, but then there doesn't seem to be any info on injecting this into that extraction process on the first run, unless I'm being blind.
-
RE: Packaging my first instrument - LinkOSX question?
@d-healey Surely if it's installed by a package I could pop the HR1 in the App Data/Application Support folder and set that as the location for that and then simply ask the user where they want the samples to be extracted to? That way the location of the HR1 file would always be the same as the installer would always put it there?
When you say use a custom system, where do I look at how to do this/ implement this? I didn't know this was an option!
-
RE: Packaging my first instrument - LinkOSX question?
@d-healey Is it possible to pre-load/script the location of the HR1 file so that I can install it to a set location via the package? That way users only need to extract the samples to their sample folder rather than extract the individual HR1 files for each expansion every time there's an update/new expansion.
-
RE: Packaging my first instrument - LinkOSX question?
@d-healey Okay -
I'm trying to bypass the need to extract an HR1 on first install and simply have my .ch1 files be in the /Samples/ folder of each Expansion, is that possible? Can LinkOSX/LinkWindows just be bypassed and the paths be set by using the above to grab the Expansions folder and then scripting that to be where the samples are in each expansion folder?
I hope that makes some degree of sense.
-
RE: Packaging my first instrument - LinkOSX question?
@d-healey Hiya - I've read through all that but the issue is that the plugin going to update overtime to include these expansions. Each new expansion release will require an updated version of the plugin to work due to new elements being added there too.
My plan was to simply package the plugin and expansions together and distribute this to users for install each time a new expansion is added.
The issue I'm having is I want to avoid users needing to give the plugin the sample path and expansions directory when they open it up, as this isn't the most user friendly thing if people aren't tech savvy.
I have found (using a comment from yourself I believe!) the option to use the global app data folder rather than the users/application support/ folder, which should make this a bit easier. I'm building a test of this now, but I'll still need to amend the LinkOSX and LinkWindows files to point to the correct folder.
-
Packaging my first instrument - LinkOSX question?
Is there a way to wildcard the user's home folder in the LinkOSX file? I tried "~", which usually works in OSX but no luck.
Do I need to put a script together to generate a new LinkOSX file and sample directory (I'm deploying samples via Expansions so this MUST be Username/Library/Application Support/My Company/My Plugin/Expansions -
RE: Stumped by displaying webpage in WebView
Bump - anyone with web view experience able to weigh in? I've done some more playing around and can't get any further with it.
-
RE: Stumped by displaying webpage in WebView
@d-healey Because that's where they are in the example projects on GitHub, to do with making sure they get embedded correctly perhaps?
-
RE: Stumped by displaying webpage in WebView
@LozPetts So I started again based on a recent thread from Clevername27 - I'm now here -
Content.makeFrontInterface(1000, 650); const var web_DOCS_CoreHTML_GUI = Content.getComponent("web_DOCS_CoreHTML_GUI"); // WebView // HTML file points redirects to internet var startingPage = FileSystem.getFolder(FileSystem.AudioFiles).getParentDirectory().getChildFile("Images/path-example/index.html"); web_DOCS_CoreHTML_GUI.set("enableCache", true); web_DOCS_CoreHTML_GUI.reset(); web_DOCS_CoreHTML_GUI.setIndexFile(startingPage);
With the suggested HTML test file below located at the path detailed in the code above:
<!doctype html> <html> <head> <meta charset="UTF-8"> <title></title> <meta http-equiv="refresh" content="0; URL=https://www.ferretsfightingllamas.com" /> </head> <body> </body> </html>
I have no idea what Ferretsfightingllamas.com is but I'm excited to find out when this gets working haha.
I currently get a white webview window with my HTML file displayed on a dark background.
-
RE: Stumped by displaying webpage in WebView
@d-healey Figured as much, just thought I'd give it a go! Hopefully someone with WebView experience chimes in