• Get wav length in milliseconds OR sample rate

    4
    0 Votes
    4 Posts
    218 Views
    D

    Appreciated guys, can't believe I missed these! Also got a bit confused with getting getSampleLength and getSampleRate.
    Case of the mondays I guess.

    const var SamplePlayer1 = Synth.getAudioSampleProcessor("SamplePlayer1"); const var audioFile1 = SamplePlayer1.getAudioFile(0); const var samples = SamplePlayer1.getSampleLength(); const var sampleRate = audioFile1.getSampleRate(); const var lengthMs = (samples / sampleRate) * 1000;

    Thanks again.

  • Trapezoid XY Pad

    7
    0 Votes
    7 Posts
    628 Views
    Evan SplashE

    @Lindon Thanks for the advice! I'll start with that.

  • 0 Votes
    8 Posts
    646 Views
    ustkU

    @orange Here's an example:

    HiseSnippet 1549.3ocuV02SaaDF2FvsKYcSsR6emz8WUtqHZRgBkQaWgPxZzJgHLEUooIzg8Y7Ibtyx2Yfro9+6i09.rOL6av1yycNINjzWVzVopfumW+cOudrq0LQDK5TkfmkwzNNtK2OWFxTJYtia8iGlwbbuiWvPgNoUBkKb5tui6W6c.UoY4DKo8FlQUJVjiq6x+HRvs1JNle9qeXOZJUDxlPxw4DIOj8Z9.tdB09u7m3oocnQri4CpH8FuranTzRlJK.7rrWCmLZ3EzyY8nnXK447JpJww867Z7jMYrsVONJht95Qat4la+zs2X6lz3FaPOq4lauwi2XqG+zshcbuU6HtVlGnoZlxwck8jQCCRjWIrN3DtheVJCOzzI.7rkbGYZDdEQpNsR3oQiCTJHrsRkv1x1v123c.OhOl9jv2cMLHSznZ.zcoog2xSAulUgWiJvaNPxsBjVwBo64EDlyyzS3f34K85JfrYLExSUghUVG2+vqkDDPnWa.8BVmb3vXE72rQiUIvudvNwEhPMWJHRQOolcnv+A0+s50p+t5jaxJNdt7P2jKSSY4ykMVZj+gTzWTL3LV9pjKooErwBBW+oiodu+XZ0Tdn8VWQPonqfqOLiIdeEBNkgJ3q2zceplhIhRZfbYrbMGgf69rKg1.aZol29L0EZYFzHLSNCpVjQEoT8zkPXiVICHFLUdCSNBEWOrZi3+Y0Uep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bqfWB0Jg7bCy0fEB8vy1gt9Hvf.TsXYNwGEl+7F6P3OynC7wCeHd8Q6YEgBMg2mn9diw9Y9uXBNF10TfKlaHFCtF+fg.7+ip0lSffpHw3ppYhHH1ZM80uCJnuJiJdlIKtJHP0Pv7byAc2uKgcIzNOU2EDNhRYuBZDai77G+08IrYZQdiockql7pSsj.MSEYFWvtFt03cAQRo8AtsKIiIKeaxoJI.31ZPtHhc8L9LXTS83E4yMB0uLBA9a7Je+HYALgjbYEi9tcp637Oh1I.+.

    You "just" have to implement your filter algorithms and manage per channel integrators (ch arg)

  • Replacing Sample in Sampler

    2
    0 Votes
    2 Posts
    107 Views
    Oli UllmannO

    @VeryHuman
    Maybe you should have a look at the custom sample import demo project from Christoph:

    https://github.com/christophhart/hise_tutorial

  • ComponentPropertyListener not working.

    Solved
    3
    1 Votes
    3 Posts
    103 Views
    David HealeyD

    @ulrik Ah you're right, I was misunderstanding the snippet.

  • Icon Fonts - Syntax error in unicode escape sequence

    14
    0 Votes
    14 Posts
    347 Views
    ustkU

    @d-healey Yeah just tested and I didn't help going further...

  • Malicious use of snippets

    2
    7 Votes
    2 Posts
    142 Views
    A

    @d-healey delet dis nephew

    On a serious note: it's a good point. Probably needs a snipper preprocessor which will execute the scripts, check if any startAsProcess calls were made or FileSystem deletion was used and warn the user about it or load it in the same window like the snippet browser with the ability to display the offensive lines.

    Just checking the script for text wouldn't be enough as you can easily encode a blowfish string and hide it into an eval call.

  • Record audio of unknown length

    14
    0 Votes
    14 Posts
    504 Views
    T

    @ustk genious, thank you!

  • Defaults / Presets?

    Unsolved
    4
    0 Votes
    4 Posts
    194 Views
    ustkU

    @clevername27 it happens with sliders too, and without LAF as well

  • Help me understand Server.callWithPOST

    26
    0 Votes
    26 Posts
    2k Views
    David HealeyD

    @guangcoder said in Help me understand Server.callWithPOST:

    Server.setBaseURL("http://hise.audio");

    This needs to be your server URL.

  • Simple Copy Protection MacOS Issue

    11
    0 Votes
    11 Posts
    968 Views
    Oli UllmannO

    @Adam_G
    Here is my project if you would like to take a look at it:

    https://we.tl/t-hdRoNkpvt8

  • Melatonin Blur?

    11
    0 Votes
    11 Posts
    568 Views
    ustkU

    @aaronventure Oh wait, this SC is from an external screen. Effectively the rendering of the gradient is fine on the mac's retina
    The blur doesn't improve though

  • Help with iteration

    13
    0 Votes
    13 Posts
    1k Views
    LindonL

    @VirtualVirgin just delete them then.

  • File.startAsProcess

    20
    0 Votes
    20 Posts
    454 Views
    Oli UllmannO

    @d-healey
    Stupid mistake! I was referring to the zip file in startAsProcess(“”) and not the pkg file.
    So the installer was not copied as I thought, but it was unpacked again.

    Thank you very much, David. The correspondence with you helped me to find the error.

  • Transport Handler ......

    11
    2 Votes
    11 Posts
    680 Views
    LindonL

    @ulrik As always mate ...perfect.

  • Show and Tell: Grid based layout system

    2
    12 Votes
    2 Posts
    1k Views
    VirtualVirginV

    @d-healey

    Three thumbs up!
    Building matrices is on my todo list for next week, so this will come in handy!

  • Trouble with index variable for loop inside loop

    16
    0 Votes
    16 Posts
    450 Views
    VirtualVirginV

    @Christoph-Hart
    I would think it's best just to let the user decide if they want to use it, like any other CC.

    Now, upon testing the CC learn (I was curious to make sure it is blocking the consumed CCs at the output for use with MIDI plugins, and it does), but I must say that the CC learn being channel agnostic is not a good idea. This is not how most VST instruments will handle this.

    Here in this simple MIDI utility I made, I just ran a test to check the channel filter operation in conjunction with the MIDI learn.

    Screenshot 2024-11-12 at 11.28.22 AM.png

    The MIDI learned control to CC#1 (Velocity Transpose Amount) is not affected by the channel filter, so even if my notes aren't going through, my CC values are.

    The MIDI learns need to be channel selectable somehow in order to work in multitimbral settings where the VSTi endpoint is only meant to receive from one channel, otherwise you will have lots of unwanted CC messages going to the other channels/instruments.

    Is there a way currently to make sure the CC learn can be filtered by channel?

    I am not seeing channel selection in the MidiLearnPanel:
    Screenshot 2024-11-12 at 11.59.53 AM.png

  • Confusing results from message delay?

    16
    0 Votes
    16 Posts
    503 Views
    VirtualVirginV

    @d-healey said in Confusing results from message delay?:

    @VirtualVirgin I have a chord detector script which adds notes to an array as they come in and then processes them. Sounds like a similar thing.

    Here's a simple snippet that adds note numbers to an array in on note on and removes them in on note off. Works with notes played at the same time and sequentially.

    HiseSnippet 731.3ocsUstSaCCE1tzfV6tngzd.xOKSHTaoEnBMMfdYqaqP0JCMooIjiiSiEI1QNNrUMs248FrcbRfFfJtTokeTky8udNemSFqjTVbrTgvUOYVDCgel0jYBseWeBWfF1Cgeg0HRrloryTc3rHRbLyEgwq7NiBbkxnzm+71CIADAkMWEBcpjSYehGx0y0Nd+OxCBFPbYmvCK3cq8GRkhtx.YBfmUrpihHzyISYGQLtUxB8dRrOB+ZKGhScB0ya6lN65UuUy1McbZ41Bz3rSmNc7Z2fzdqcnTDd09tbsTMQSzrXHoGJcmMwW9CQVANkGycBXFgFnIPkyTi55yCbGeYyIFgvkGOuUsRVq5UVi3t7qzOuk8xTC1yinXSCW5tfTiGAjvEfT4LHsl0DphGomawfmmZMT.SPOBLaJBkLeQk9.1pqD7Pn2LjbNafBDtJhZaWu9F1vOquW0pJ1TagDvs8ar+122yKQP0bovVJNBzdrn15U+U0JARJIvV.9LB.AL.2bJSab3njPGlplISURSylQIw9C8.aGDnXD2Ym3yTrZBvieW09lo2y6QmeEKTdwhRn4OrRFDXb2jyaX1vLWrk7.qIRq0F1WPBRXW4HLIt93c0G13kl0+K3nTLTv0GGwxkGHCbMiMy62lLfxGfvaeYXOhlX3G45.+hXJM2.GbO1EvFYFaohUOV74ZYDrSdKpDPhktIAD80Y1lc9bCP+3ZzICkQDy0yJdS3QP2qemz8GJDWyZLWS8WLFKs.LBcp+GXL+Hwys564wn54.rr0futrWDtmx+YYhlKlNhnU7ehvVv9vD3XJkAUWHXAPxsvkLrkL45FYSGXBS3lJ7W3I2XCiLN2XiKMhBITk7LZ1Vf4LzSR0.XRjdltB78BP1tAJcynXeNDtJdl4pbwTcq.atrAt0xFXqkMv1KafaurAtyxF3t2eflOZcPhVFls1fPiF2O8TBF2WP.FXJaE8OLLOJoG

    Peek 2024-11-11 23-23.gif

    Thanks :)
    I'll check this out tomorrow.
    I did end up solving for the delay problem by moving the rest of the code into a child container with another script processor.
    Screenshot 2024-11-11 at 10.52.57 PM.png

    Screenshot 2024-11-12 at 12.25.24 AM.png

    The notes from the note recorder get delayed by 1 sample, and that gives room for the array to record all of the voices before sorting the order in the next module.
    The basic problem that the delay solves is that the array cannot be sorted and reversed until all of the notes are in.

    It is working so far:
    Screenshot 2024-11-12 at 12.33.00 AM.png

    I have a stray note off that I will try to clean up, but at the moment is not effecting the function.

  • SNEX Amp Distortion

    3
    0 Votes
    3 Posts
    289 Views
    T

    @orange Thanks,You always save my day.

  • Is there a method to force parallelization of code processing?

    13
    0 Votes
    13 Posts
    638 Views
    LindonL

    @VirtualVirgin said in Is there a method to force parallelization of code processing?:

    @Lindon said in Is there a method to force parallelization of code processing?:

    @VirtualVirgin this is not how MIDI works - as the MIDI Spec 1.0 makes very plain - MIDI is a serial protocol, so the notes must follow each other and cannot arrive at the same time....

    I understand in theory the idea that that the MIDI messages are in serial.
    If you generate notes for harmony, say using the Synth.addNoteOn() in HISE,
    the order you generate them in the code will be the order they arise later on in a MIDI monitor, even if they are generated at the same sample. Note numbers generated out of sort order, say 74, 60, 77, will show up in the MIDI monitor later in that same order.

    But in practice, the way I see it, MIDI messages that occur within the same sample are in some ways handled as if happening at the same time because a timestamp will read the same for all notes at that sample, and cannot be distinguished from using that information. So for time ID purposes they are the same.

    MIDI from quantized DAWs, notation software and plugins generating harmonies will therefore return a time delta of "0" between messages in those vertical stacks (chords).

    Screenshot 2024-11-10 at 12.17.09 PM.png

    So not technically "at the same time", but from an ID perspective certainly categorized as the "at the same time" (timestamp).

    Anyway, my question arises from trying to figure out how to handle MIDI messages occurring on the same sample when they need processing with a quick turnaround.
    I'm sure you know a bit about it. I'll have some more questions later.

    Yes, but no..... the MIDI spec says (if I remember correctly) that any receiving object needs only to act serially, so it can freely ignore the timestamp... so what you are doing is legal and accounted for - but no midi processor is required to process it in the same sample.... in fact given the laws of physics - they cant. - So it should come as no surprise when a midi processor of some sort (in this case HISE) doesnt behave the way you want.

21

Online

2.1k

Users

13.1k

Topics

113.6k

Posts