HISE Logo Forum
    • Categories
    • Register
    • Login

    Some basic questions

    Scheduled Pinned Locked Moved Scripting
    74 Posts 4 Posters 17.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Christoph HartC
      Christoph Hart
      last edited by

      32 per namespace:

      namespace n1
      {
          reg n1_1 = 1;
          // ...
          reg n1_32 = 32;
      }
      
      namespace n2
      {
          reg n2_1 = 1;
          // ...
          reg n2_32 = 32;
      }
      1 Reply Last reply Reply Quote 1
      • LevitanusL
        Levitanus
        last edited by Levitanus

        Very interesting)))
        So i can use 32 pieces of
        reg atck_var
        and 32 of
        reg sus_var &

        And they are global, am i right?

        Another question. I placed Synth.noteOffByEventId(atck_id); into timer callback, as well as to the note_off callback. Now, pretty predictable i receive error in console about missing event by timer or by noteOff callback depends on situation. Is it bad? Or I can eat it as usefull information and newer mind?

        and more, more questions ))))
        When does envelope work? I know that once triggered by the voice KONTAKT envelope works as it was before triggering, even if it has been changed during the note playback.
        For example, if I move some points in noteOn, will it "eat" them respectivelly to the current note and not for any other already triggered?
        or it will work with all currentely produced samples? Or new values will be produced only with next notes, or with artifically played with a bit of delay?

        P.S. and.. I have been confused a little by the dates od requests, so can;t understand actual things. Is timer global for the plugin, or local for each script?

        1 Reply Last reply Reply Quote 0
        • LevitanusL
          Levitanus
          last edited by

          Well I have almost done the "Hello world", but can't find how to set persistence of wigets... Or they will be saved automatically (as fbx)?

          1 Reply Last reply Reply Quote 0
          • Christoph HartC
            Christoph Hart
            last edited by

            Widgets are persistent by default. If you don't want this, you can call

            widget.set("saveInPreset", false);
            
            1 Reply Last reply Reply Quote 1
            • LevitanusL
              Levitanus
              last edited by

              Thanks! But I can't get the widget value by simple:

              modwheel = Content.addKnob("modwheel", 346, 110);// [JSON modwheel]
              Content.setPropertiesFromJSON("modwheel", {
                "max": 127,
                "stepSize": "1"
              });
              // [/JSON modwheel]
              modwheel.showControl(false);
              Globals.MW = modwheel.getValue();
              

              What should be here else?

              1 Reply Last reply Reply Quote 0
              • Christoph HartC
                Christoph Hart
                last edited by Christoph Hart

                The persistent data is not available in the onInit callback. This happens behind the scenes:

                1. The persistent widget values are stored.
                2. The script gets compiled.
                3. The persistent widget values are restored.
                4. For all persistent widgets, the onControl callback gets executed.

                In your case, you need to move the

                Globals.MW = modwheel.getValue();
                

                line in the onControl callback.

                1 Reply Last reply Reply Quote 1
                • LevitanusL
                  Levitanus
                  last edited by

                  why Event is not been ignored?

                  reg note = 0;
                  reg vel = 0;
                  
                  reg newnote = 0;
                  reg lastnote = 0;
                  var i = 0;
                  Globals.pos_interval = 0;
                  Globals.neg_interval;
                  
                  Globals.Attack_length = 600;
                  Globals.Attack_fade = 150;
                  Globals.Release_fade = 200;
                  
                  Globals.Attack = 0;
                  Globals.Legato = 0;
                  Globals.Glissando = 0;
                  
                  function onNoteOn()
                  {
                  	if (lastnote == 0)
                  	{
                  		Globals.Attack = 1;
                  	} 
                  	if (lastnote != 0)
                  	{
                  		if (Message.getVelocity() < 80)
                  		{
                  			Globals.Legato = 1;
                  			interval = lastnote - Message.getNoteNumber();
                  			Globals.pos_interval = Message.getNoteNumber() - lastnote;
                  			Globals.neg_interval = lastnote - Message.getNoteNumber();
                  			if (Globals.pos_interval >0)
                  			{
                  				Message.setVelocity(Globals.pos_interval);
                  			}
                  			if (Globals.neg_interval >0)
                  			{
                  				Message.setVelocity(Globals.neg_interval);
                  			}
                  		} else
                  		{
                  			Globals.Glissando = 1;
                  			interval = lastnote - Message.getNoteNumber();
                  			Globals.pos_interval = Message.getNoteNumber() - lastnote;
                  			Globals.neg_interval = lastnote - Message.getNoteNumber();
                  			if (Globals.pos_interval >0)
                  			{
                  				Message.setVelocity(Globals.pos_interval);
                  			}
                  			if (Globals.neg_interval >0)
                  			{
                  				Message.setVelocity(Globals.neg_interval);
                  			}
                  		}
                  	}
                  	lastnote = Message.getNoteNumber();
                  }
                  function onNoteOff()
                  {
                  	Globals.Attack = 0;
                  	Globals.Leg = 0;
                  	Globals.Glissando = 0;
                  	if (Message.getNoteNumber() == lastnote)
                  	{
                  		lastnote = 0;
                  	}
                  }
                  
                  //script perocessor 2
                  Sampler.enableRoundRobin(false);
                  reg leg_grp = 0;
                  reg vel = 0;
                  reg note= 0;
                  
                  if (Globals.MW > 64)
                  {
                  	leg_grp = 1;
                  }else
                  {
                  	leg_grp = 2;
                  }
                  function onNoteOn()
                  {
                  	note = Message.getNoteNumber();
                  	vel = Message.getVelocity();
                  	Message.ignoreEvent(true);
                  	if (Globals.Glissando = 1)
                  	{
                  		Synth.playNote(note,vel);
                  	}
                  }
                  

                  The problems are:
                  Globals.Legato and Globals.Glissando are set with every event.
                  And even with setting them to 0 leg and gliss samplers are played. But shouldn't because of ignoreEvent

                  1 Reply Last reply Reply Quote 0
                  • d.healeyD
                    d.healey
                    last edited by

                    I might be too tired to be thinking striaght but I think you need to ignore the event in your first script too

                    Libre Wave - Freedom respecting instruments and effects
                    My Patreon - HISE tutorials
                    YouTube Channel - Public HISE tutorials

                    1 Reply Last reply Reply Quote 1
                    • Christoph HartC
                      Christoph Hart
                      last edited by

                      Yes. Events have a natural signal flow so if it gets ignored in the second script, the first script is long gone waiting for the next event...

                      1 Reply Last reply Reply Quote 1
                      • LevitanusL
                        Levitanus
                        last edited by Levitanus

                        Well, in HISE all works pretty fine. Just couldn't add CC gain modulator to the master container.
                        But with compilled VST trash: https://www.dropbox.com/s/oa8xbrnxhqx0k7r/Hise Hello World by Levitanus.rar?dl=0

                        Problem A: engine settings button is visible and crushes the host.
                        Problem B: nothing is sounding, but voices are triggered.

                        Playable keys G3,A3,E4. And CC1

                        1 Reply Last reply Reply Quote 0
                        • d.healeyD
                          d.healey
                          last edited by

                          CC Modulators can't be added to the master container but you can add them as a global modulator :)

                          Libre Wave - Freedom respecting instruments and effects
                          My Patreon - HISE tutorials
                          YouTube Channel - Public HISE tutorials

                          1 Reply Last reply Reply Quote 1
                          • LevitanusL
                            Levitanus
                            last edited by

                            but you can add them as a global modulator :)

                            wah! of course!

                            1 Reply Last reply Reply Quote 0
                            • LevitanusL
                              Levitanus
                              last edited by Levitanus

                              And what is with compiled VST? Where have I mistaken?

                              1 Reply Last reply Reply Quote 0
                              • Christoph HartC
                                Christoph Hart
                                last edited by

                                I'll need to take a look. The engine settings button is definetily a bug and if HISE makes sound but the compiled plugin doesnt then theres something wrong too.

                                1 Reply Last reply Reply Quote 0
                                • Christoph HartC
                                  Christoph Hart
                                  last edited by

                                  Can you upload the project folder (without the samples)? It's hard to check what's wrong with only the binaries...

                                  1 Reply Last reply Reply Quote 0
                                  • LevitanusL
                                    Levitanus
                                    last edited by

                                    Can you upload the project folder (without the samples)?

                                    It's alreasy there.. The folder "testhise"
                                    And the first is the binaries
                                    Will be glad if you take a look :)

                                    1 Reply Last reply Reply Quote 0
                                    • Christoph HartC
                                      Christoph Hart
                                      last edited by

                                      Ah sorry I downloaded the file but somehow overlooked the testhise folder. I'll take a look whats going on.

                                      1 Reply Last reply Reply Quote 1
                                      • Christoph HartC
                                        Christoph Hart
                                        last edited by Christoph Hart

                                        Alright, there were a few issues:

                                        1. you haven't specified a company name and code. This is important, because the compiled file uses a directory in the OS specific app data folder (~/Library/Application Support/Company Name/Project Name/ on OS X and User/App Data/Roaming/Company Name/Project Name on Windows) to store its settings. If this is left blank, it can't resolve the folder correctly.

                                        2. I used the Preset.hip file, the other ones were too complicated. It also complained about the missing "Simple Gain" and "Simple Gain 2" modules, but I simply removed those lines.

                                        3. somehow your sample references got messed up. If you copy the Main Container in the clipboard and paste it in Sublime Text or another text editor, you'll see that the file references in the samplers look like this:

                                        "O:\&#1087;&#1088;&#1080;&#1084;&#1077;&#1088; &#1074;&#1086;&#1082;&#1072;&#1083;\&#1074;&#1099;&#1088;&#1086;&#1074;&#1085;&#1077;&#1085;&#1085;&#1099;&#1077;\sus_side_mf_G3.wav"

                                        It looks like an absolute path (using cyrillic characters in UTF16 notation). What you want is this:

                                        "{PROJECT_FOLDER}sus_side_mf_G3.wav"

                                        The wildcard {PROJECT_FOLDER} will be replaced with the folder where the samples reside.

                                        I did a search and replace and fixed the sample references. Please try to compile this preset (after specifying the company name):

                                        HiseSnippet 2599.3oc6b8zbaabEGfTPwh1N0woyzoSufgosQt1gFjRV1IpsVRT+IxlRhinhR5zzQFBbgzNB.KBvBIq3wS+Dz1y4dmIGaO1aMS5z9AnW6k9QvSuzomZ2G9CwBJPJQHZQRWxYrM22t+d3sue691G1GGW2gngbcINBhWemSsQBh2PpwoVzCqdnJ1RX8kEDeaoUwOG0TttCxEQEV5TaUWWTSAQw7qAiQbpID7+7pGujpgpkFJVjfvtDrFpF1DSikVegmhMLVUsIZGrI2nmcg00HVUIFDOl8jWRQvVU6H0CPapBCKmjvwXzItBhJRyTojyQk2+KWrD6yry57vunxGhJURe8Rkp60bt65KO3yRkJIn443frn6xfKHJI9eYeDkVoIlRbZPUoHlNkVhz7zFGRNwBdzkE1E6h22.EznAylBrnUIFMgIOHccKJxQWUC0BlhfP0CwFMqG4VcEXZtdrSNefS96JsAtItk7Xm8s76PNFAu6VLWRSdhd2jSw7D4LuIBLu2QpglC1lF2CXa2NTZGrtfNEx8cjjpRXdFKZIS0iPq5vZzxSM8bJJ2qhhxcl+lEJvHaWp7wpNxXKch7OSNBmZyl0T2GYLcQnih2StrB6Oycm4Kb+6K+KeRis1zGwupPD.1BSlQYibnXjK6IZBioE5WbyBxxEonmSK9QxEOFYPzvzSk+oxORQ11gbLtIxU1.cfJk74Vs59mmnaahCksJzhxTnu5PVpLecSlFUBDbJ6qkC+9I3lzCg1OZt.AGhvGbH73m4AABnDhAEaCFj+j2.lugp1U8Xz5VA62h0uNatBaD.HUIlXM4FpVtxaznXb+MveIze4vGhpA9.KvnALThcMjNMbzldrGuA1xe32rvKY91X5fsFLIa7TKx9SWjINjKlSgmKXxOWpH.a.SXhsXO0OnrR3LyT84wSSSRS+o3xHMLmKghrCmbJkJGJySWGCHKJ2bohAyAvlterQ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C9SYg1ATC0z962YZe1Y16Qyz4n7S2EdOIzKe83FjDu8eOKDOfZzl36Xb9ym36e0kaPR7u3qyBwCnFsI90x9N99W841Y.9KrY1eSVHd.0PMwOcmI9GM6dkq7vNGq+Ncg4aC6kuVcCRp+q9CYg5ATi3TeGi1+8kNCU2+pS2fjp+seaVnZ.0HNUu1kXWdD1q3aISna2Rl3Ytkr1rNoTstbWJqSvTUygrmVvsyC2G207kHHl2x2YNkzFPa4xQ+WfDb2iLV.umlFbIwePYAgzQTomQLSOiX1dFwC5YDy0yHdXOi3QcAATZtE8nDyfRFHH7+.SwpWjA
                                        

                                        The compiled plugin works on OS X - the stupid settings button is still there, but I'll hide it soon :)

                                        1 Reply Last reply Reply Quote 1
                                        • Christoph HartC
                                          Christoph Hart
                                          last edited by Christoph Hart

                                          FYI, I just pushed a few changes to the HISE repository which adds more safe checks (trying to build your current project should spit out error messages for each issue I listed above). The dreaded setting button is now also gone :)

                                          You'll need to build a new HISE version for this of course, but luckily there is the fabulous tutorial from David...

                                          1 Reply Last reply Reply Quote 2
                                          • LevitanusL
                                            Levitanus
                                            last edited by

                                            Huge Thanks for You! I've got couple of very hard days, and the night should br also very busy, but tomorow I will try everything.
                                            By the way, i tried to fix it before the first compilation:

                                            somehow your sample references got messed up. If you copy the Main Container in the clipboard and paste it in Sublime Text or another text editor, you'll see that the file references in the samplers look like this:

                                            But couldn't. The matter is, I think, there was wrong sample and i just deleted it from the map.

                                            You'll need to build a new HISE

                                            Scares only the first time, then everything just a cup of tea)

                                            1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            29

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.3k

                                            Posts