HISE Logo Forum
    • Categories
    • Register
    • Login

    Random Integer from (-1.0 -> +1.0)

    Scheduled Pinned Locked Moved Solved Scripting
    25 Posts 4 Posters 452 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.
    • d.healeyD
      d.healey @Chazrox
      last edited by

      @Chazrox said in Random Integer from (-1.0 -> +1.0):

      looks the same.

      Yes, but does it work in the new project?

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

      1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @Chazrox
        last edited by

        @Chazrox Screenshot 2025-03-28 at 01.25.31.png

        Can't help pressing F5 in the forum...

        ChazroxC 1 Reply Last reply Reply Quote 1
        • ChazroxC
          Chazrox @ustk
          last edited by

          @ustk I been changing each one to test but it wasnt working. Trying it in a new snippet per David rn. My lines are closed up above. Screenshot 2025-03-27 at 5.25.58 PM.png

          ustkU d.healeyD 3 Replies Last reply Reply Quote 0
          • ustkU
            ustk @Chazrox
            last edited by ustk

            @Chazrox Since it's a namespace, maybe it's in the main script... The console is definitely saying something about a missing semicolon so... 🤷

            Can't help pressing F5 in the forum...

            1 Reply Last reply Reply Quote 0
            • ustkU
              ustk @Chazrox
              last edited by ustk

              @Chazrox And when you compile, is the focus on the script? meaning not "(detached)". This happens when you edit another script at the same time, so the modifications aren't compiled.
              I find myself being tricked a lot by this everyday... "why the heck this isn't working... Oh ok... silly me..."

              Screenshot 2025-03-28 at 01.34.16.png

              Can't help pressing F5 in the forum...

              ChazroxC 2 Replies Last reply Reply Quote 0
              • d.healeyD
                d.healey @Chazrox
                last edited by

                @Chazrox Don't use var for variables except when you have no other choice

                Link Preview Image
                HISE | Docs

                favicon

                (docs.hise.audio)

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

                ChazroxC 1 Reply Last reply Reply Quote 0
                • ChazroxC
                  Chazrox @ustk
                  last edited by

                  @d-healey @ustk

                  I got it to work. I moved it to main script and it worked outside of the namespace. literlaly copy/pasted it out and it worked there. I put it back into the function and made randomFloat a local and it worked.

                  Sometimes I dont even understand how things are fixed but they get fixed.

                  ? 1 Reply Last reply Reply Quote 1
                  • ChazroxC
                    Chazrox @d.healey
                    last edited by

                    @d-healey sorry that pic was cut off. They're const vars for sure. I remember you teaching that in the tutorial. Screenshot 2025-03-27 at 5.44.33 PM.png

                    1 Reply Last reply Reply Quote 1
                    • ChazroxC
                      Chazrox
                      last edited by

                      More than just helping me fix the problem. I always appreciate the logic! You guys are the best! 🙌

                      1 Reply Last reply Reply Quote 0
                      • ChazroxC
                        Chazrox @ustk
                        last edited by Chazrox

                        @ustk said in Random Integer from (-1.0 -> +1.0):

                        is the focus on the script?

                        you mean am I compiling while on the main script?

                        I havent seen that "detached' yet. My namespaces are local (external scripts) to the project. Would that apply to this situation?

                        If im working within a namespace i'll usually do both for good measure...atleast I think thats good measure. lol.

                        ustkU 1 Reply Last reply Reply Quote 0
                        • ustkU
                          ustk @Chazrox
                          last edited by

                          @Chazrox detached appears when you have more than one script in the module list. If you click in the module list to modify another script, or show its network for instance, this detaches the other scripts currently being edited. So if when you make a change, it's not compiled until you "re-attach" the script from the module's list and re-compile.

                          detachedScript.gif

                          Can't help pressing F5 in the forum...

                          ChazroxC 2 Replies Last reply Reply Quote 1
                          • ChazroxC
                            Chazrox @ustk
                            last edited by

                            @ustk hmm...I never noticed that in my project yet. I'll keep that in mind. Sometimes a bunch of stuff will stop working and just start working again, I suspect thats whats happening but I just havent seen that message yet. Thanks!

                            1 Reply Last reply Reply Quote 0
                            • ChazroxC
                              Chazrox @ustk
                              last edited by

                              @ustk 2 weeks later this happens and I remembered this post! Thanks for this again!

                              1 Reply Last reply Reply Quote 0
                              • ?
                                A Former User @Chazrox
                                last edited by

                                @Chazrox said in Random Integer from (-1.0 -> +1.0):

                                Sometimes I dont even understand how things are fixed but they get fixed.

                                If programming was a t-shirt

                                ChazroxC 1 Reply Last reply Reply Quote 0
                                • ChazroxC
                                  Chazrox @A Former User
                                  last edited by

                                  @iamlamprey lmao

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

                                  42

                                  Online

                                  1.7k

                                  Users

                                  11.7k

                                  Topics

                                  101.8k

                                  Posts