Drum machine Structure.



  • I want to set up a simple drum machine to learn more and I am wondering how you approach that .

    1. Since I want to be able to send individual drums to a reverb ,pan etc , I guess I need to use multiple samplers.
      To minimize processing , should I reduce the voice amount or something or am I stuck with the processing amount for each sampler or what steps can I take ?

    2. I found that when zooming in on the sample and dragging the start time to what looks visually like the start , I lose a bit of the transient/punch , is the display a bit off or what is going on ?

    3. I cant seem to be able to apply a small fadeout on the sample , should I do that when preparing the sample or am I missing the option somewhere ?

    4. I would like to use buttons on the Drum machine to trigger samples , do I script that in the noteOn of from the noteInit ?

    5. do you guys use GM mapping or something , or just map like you want ?

    Any pointers ?



    1. Multiple samplers is probably the only way, in the future I hope we have group FX (or group sends).

    2. Trim your samples in an audio editor. I don't know if HISE's display is slightly off but an audio editor is easier to use, and if you move your samples to a different sampler in the future you won't have to retrim them.

    3. See #2

    4. on note on is triggered when a MIDI message is received, on init is triggered when your plugin is loaded. So neither of those will help you to trigger an action when a button is pressed.

    5. Only use GM if you're making something that conforms to the GM standard. I have never done this.



  • @d-healey

    1. Bit confused here , all of my controls are in the onInit script so not only triggered when plugin loaded, that is , the controls run in realtime ?
      Wouldnt I script this triggering of the sample there and if not , where ?


  • @lalalandsynth said in Drum machine Structure.:

    @d-healey

    1. Bit confused here , all of my controls are in the onInit script so not only triggered when plugin loaded, that is , the controls run in realtime ?
      Wouldnt I script this triggering of the sample there and if not , where ?

    Your on init may well contain an onPad01 callback (or whatever you call the pad) - this is where you'd have your play note code - but only

    if (pad01) // pad pressed...
    {

    // do your stuff here

    }



  • @lalalandsynth

    all of my controls are in the onInit script

    on init is a callback function, like on note on or on timer. When the function is triggered the code within the function is processed. The on init callback is the default callback, so any code that isn't inside one of the other callbacks is inside on init.

    When you write a function to trigger the action of one of your buttons you are writing a new callback function. onMyButtonControl(component, value) is a callback function. This isn't inside on init or on note on.



  • Thanks ,turns out this was very simple...so far 🙂



  • @d-healey Probably a language/terminology issue for me but I dont really understand.

    Anything that is in the onInit Script is triggered on load , so if I made a button that triggers a note within the onInit script, it would trigger the button on load. Not sure how to implement an if statement that would only play it when button on , not off and not also on compile.

    Bit defeated at the moment , lol !

    Oh, i figured it out !



  • @lalalandsynth

    There is no on init script. Within your script you have callbacks, on init is one of the callbacks. If you've ever scripted in Kontakt you actually have to write out on init and end on to define the callback, but in HISE it's default so there is no need to write it.

    All code that is not inside another callback is inside the on init callback and will be triggered on load. Buttons (and any other controls) are not triggered by the on init callback.

    After all of the code in the on init callback has been executed HISE then triggers all of the on control callbacks, but only for controls that have Save In Preset enabled.



  • @d-healey said in Drum machine Structure.:

    he code in the on init callback has been executed HISE then triggers all of the on control callbacks, but only for controls that have Save In

    Ah, now I understand , thanks so much , so the reason the button was triggering is because it was saved in preset.



  • @Lindon said in Drum machine Structure.:

    @lalalandsynth said in Drum machine Structure.:

    @d-healey

    1. Bit confused here , all of my controls are in the onInit script so not only triggered when plugin loaded, that is , the controls run in realtime ?
      Wouldnt I script this triggering of the sample there and if not , where ?

    Your on init may well contain an onPad01 callback (or whatever you call the pad) - this is where you'd have your play note code - but only

    if (pad01) // pad pressed...
    {

    // do your stuff here

    }

    This presents an issue when using one shots , it will not play the full sample.



  • 3b331a18-42c3-475e-931c-4c050e2c8ca7-image.png



  • @d-healey I meant when it is set to One shot and using this method it will not play the whole sample.
    And if I remove the else , it just plays the note forever.

    //kick Trigger
     inline function onkickBtnControl(component, value)
    {
        if (value)
    	Synth.playNote(36, 100);
    	else
    	    Engine.allNotesOff();
    };
    


  • Found this that solves the one Shot issue , although I am not entirely sure how .
    Just putting it here if anyone needs it.

    HiseSnippet 1672.3oc4X0uaaaCDWJIZq1qoXcn+w9mAPTLf4.jl5ORZKZ2PcyWEFqt0HNsX.EEsLRT1bQhTPjJodCEXuE60XOB6QpuAaGIkrncbbRyV+.aFH.gG4w6286Nx6n5kx8IBAO0wsx9iRHNtW1q+Hlb3VCwTlSmsA4damlEe.+0NaNJAKDj.GW2EenZZ2JK4n+816uINBy7IkhbbdFm5SdDMlJKk9p1+HMJ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OIgvNstobxKr.+2S6rMVhUMXkKCVGTpVRUPvcaxQPmql1sfteIhCk7DXWGWMxw8RR8rWIuYLCO6PCTJje9z40iau8250dz3AsIsOlFHGZ2T7PBcvPq1j+91VU0.Rw0EDZWESISux2IL0zBSne1BSnOdXpkElZejElb9WESmrQZncddPVDVNYO9pG1jOAbQ8DMSqZXlInxQ1O748Ri+mW3dUudpBEyFuKLC7Bo7uuwa9ynV1amvPhurDrK4s6O89+MS1P4aLP4q75KgadhorA8wwIPs57G1VL5C5CagDyHNNnO8WrV1e1dyLftRmT5ezVapG.uOgMgsxA9djDBVBQ+Rcd0gs2auGlxyRlVq2dectx9ovCqAlvdhmvH.sKs8wsR4BQH3N58RXOUurzAJtpTxdvc9ohIkAszAgdFCpWTbvDpuqB0T+tX3EIu1d0ZqTeerNbCu1WOtwTiaN03VSMd8oFuwTiu0Tiuc4XCg1EmnRLTesgoJK84muxRvFzCCtr0J2jNX7lajTl+Vujl0Pw5yYLiOFvm8I82p3C2MrKd9f6Y74TpTfw9TUzYG1QvwRPh4Z0sIg3rH4Xo1frKmwSFxYT+IOC.4zCFPRsg9L8mGHkvQvRIWq8dltYKE8sseDkQvoSbz9ciJZb9oh4Et9ZOCbQpq0P+2nv3h+uuv37ntqjWVDAVOU9Idb9xd5axQpBuerf5d7LITPsnnlGT4qOTs2mXW+aAUMUy35EMk1mvBzC9K3W9jMJJVplrQwjN9EaE3a4+u9ELtKRXpJG598hfxvQ1ozBnmBEjfBZePPYL1Ok+ReyW1Pg0Kok.njo+L9U75pFiZ3ne.JnmW80p6DCkpdouu5fvM.Fd15z7BnSqKfNqeAzYiKfN25Bnysu.5bm4pipKgGjI4wlKIAA81wjX4ty3DqEc9a.NAoDv.
    


  • @lalalandsynth said in Drum machine Structure.:

    @d-healey I meant when it is set to One shot and using this method it will not play the whole sample.
    And if I remove the else , it just plays the note forever.

    //kick Trigger
     inline function onkickBtnControl(component, value)
    {
        if (value)
    	Synth.playNote(36, 100);
    	else
    	    Engine.allNotesOff();
    };
    

    you dont need the else...



  • @Lindon If I dont use the else it just holds the note forever.



  • @lalalandsynth

    If I dont use the else it just holds the note forever.

    That's what one shot is.



  • @d-healey I mean if I replace it with a sine , it will hold the sine forever.
    If I play the keyboard in one shot mode , it just plays the sample to its end.
    If I play with the button it holds the note forever, not the same thing?



  • @lalalandsynth

    I mean if I replace it with a sine , it will hold the sine forever.

    Replace what with a sine?



  • If i place a sine generator and bypass the sampler the note is held forever using the button without the else.

    So therefore I assume that the voice is being held in the sampler as well , maybe not ?



  • @lalalandsynth A sine wave generator never has an end, a sample does. So you will get different results, unless the sample loops.


Log in to reply
 

8
Online

703
Users

2.8k
Topics

23.7k
Posts