Paul Scheidt

Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • in reply to: Yamaha SY35 Voice Editor #82544
    Paul Scheidt
    Participant
      • Topics: 2
      • Replies: 11
      • Total: 13
      • โ˜…

      I got it. Yes, I’ve seen Sysex banks in SY format work just fine with the TG, so it makes sense that your editor should work since it’s writing the whole voice.

      Feel free to copy any code you want from my TG33 panel because I’ve tested it extensively in both directions for the individual voice parameter changes:
      1. Changes in Ctrlr show up on the TG
      2. Changes on the TG show up in Ctrlr

      in reply to: Yamaha SY35 Voice Editor #82541
      Paul Scheidt
      Participant
        • Topics: 2
        • Replies: 11
        • Total: 13
        • โ˜…

        Wow! This looks really nice. I know the TG33 uses the same architecture as these, but I’m not sure if the panel would work with it directly. Any ideas? Your panel puts my TG33 one to shame! ๐Ÿ™‚

        in reply to: new ctrlr user with a yamaha tg33 #80955
        Paul Scheidt
        Participant
          • Topics: 2
          • Replies: 11
          • Total: 13
          • โ˜…

          Hi, I wrote the TG33 panel. It sounds like you have everything set up right. Hit the big “Load current voice” button in Ctrlr and see if it loads the voice from the TG33 into the panel.

          If that works, then you have communication working in both directions and the panel should work as intended.

          in reply to: IncDec Selected Modulator ? #73446
          Paul Scheidt
          Participant
            • Topics: 2
            • Replies: 11
            • Total: 13
            • โ˜…

            I’ve taken several cracks at this, and as best I as I can tell, the Ctrlr methods to get the modulator name return the data type “userdata” and not the data type “string”.

            From the LUA 5.1 Reference Manual:

            The type userdata is provided to allow arbitrary C data to be stored in Lua variables. This type corresponds to a block of raw memory and has no pre-defined operations in Lua, except assignment and identity test. However, by using metatables, the programmer can define operations for userdata values (see ยง2.8). Userdata values cannot be created or modified in Lua, only through the C API. This guarantees the integrity of data owned by the host program.

            More specifically on your code:

                local NAME=mod:getProperty("name")
                local endChar = string.sub(NAME,-1)

            First line sets value NAME to be the userdata type. The second line throws an error because you’re trying to run a string function on a userdata value.

            As it says there, you can’t modify userdata values in LUA. Using the modulator’s VSTIndex seems to be the only way to identify which modulator called a function.

            I’m hoping you find a solution, but that’s been my experience so far. Maybe there’s a more advanced LUA trick to translate the userdata to a string?

            in reply to: Yamaha TG33 panel #73296
            Paul Scheidt
            Participant
              • Topics: 2
              • Replies: 11
              • Total: 13
              • โ˜…

              So for sustain, there’s a lot of weird choices on parameter scales everywhere in the TG33. All of the volume parameters (including the envelope levels) are log-scale functions but implemented with linear-scale SysEx. So if I want to represent them visually in Ctrlr, I have to translate the linear-scale SysEx into log-scale. For example, level 99 is max volume but level 90 is significantly quieter. Things below level 80 get hard to hear at all.

              I’ve got no way to “prove” what’s going on, so I had to tweak the envelope graphs based on making changes and listening to the result. And having done these trials, I can tell you that there’s a lot of non-linearity going on. The TG33 is capable of some REALLY long envelope shapes, so the graph display actually scales (“zooms out” if you will) if the shape goes longer than the default settings.

              All the code for the envelope graphs is in the DrawEnv functions. I tried to put in some notes in that code to make it easier to understand what’s going on, including the scaling and the linear-to-non-linear translations. It’s been a little while since I wrote all that, so I can’t remember all of it off the top of my head.

              And VSTIndex seems to be the only reliable way to figure out which modulator called a function so I don’t have to create a bunch of duplicate functions. The getName function returns userdata type data and not string type data, which I find very frustrating. So VSTIndex it is…

              in reply to: Yamaha TG33 panel #73294
              Paul Scheidt
              Participant
                • Topics: 2
                • Replies: 11
                • Total: 13
                • โ˜…

                Musicalcurtains, glad you like the design! The only idea that comes to mind is that many of the controls that you’ve described use translation functions in Ctrlr, because the displayed value is wildly different than the value transmitted via MIDI SysEx. I’m using built-in Ctrlr functionality and the LUA math routines to do that, but there must be something going wrong in one of those two areas on OSX… Not sure what I can do to help debug this since I don’t have any Apple devices.

                human fly, it opened in edit mode? I definitely didn’t save it that way! Weird. I know you’re developing your own panels, so I hope some of my LUA code helps or inspires you. I’m no Ctrlr or LUA expert, but I was able to finally brute force my way through a couple problems.

                in reply to: console error #72902
                Paul Scheidt
                Participant
                  • Topics: 2
                  • Replies: 11
                  • Total: 13
                  • โ˜…

                  I had the same console error with 5.5.2 on Windows 10, so I’m using 5.4.29 and it works fine.

                  in reply to: Error getting Sysex #72731
                  Paul Scheidt
                  Participant
                    • Topics: 2
                    • Replies: 11
                    • Total: 13
                    • โ˜…

                    I had the same experience with console() under the latest Ctrlr build. Go download the 5.4.16 version and console will work.

                    in reply to: No MIDI CC nor Sysex sending from panel #72609
                    Paul Scheidt
                    Participant
                      • Topics: 2
                      • Replies: 11
                      • Total: 13
                      • โ˜…

                      I had all sorts of weird crap happening with that latest “5.5.2” version of Ctrlr that all went away when I went back to the “5.4.16” version from the Downloads link. I highly recommend going back to that version, although it does seem to crash quite a bit. Save your work often!

                      Another tip is that most SysEx strings include a “device ID” byte that I’ve found to be very trial and error. Could be 0, could be 1, could be some other random value that’s buried in your synth’s MIDI menu. That would explain why you see the MIDI transmit but the synth didn’t receive it. The synth thinks the MIDI message is for another device so it ignores it.

                      in reply to: what do you need to know in order to make panels? #72536
                      Paul Scheidt
                      Participant
                        • Topics: 2
                        • Replies: 11
                        • Total: 13
                        • โ˜…

                        I don’t know who wrote it originally, but there’s a great 10 character preset box already set up in Martin’s Reface DX panel.

                        It was pretty straightforward to modify, but since there’s a function called every time the name box is modified (I think his was called nameChange), you have to implement a flag to short circuit that function when you process a new bulk SysEx dump.

                        Maybe this will be a better explanation:
                        1. Process bulk SysEx of “Patch 1”
                        2. Change to “Patch 2” on the synth
                        3. Process bulk SysEx of “Patch 2”

                        During #3 above, the 10 character text box is being modified from “Patch 1” to “Patch 2”, so Ctrlr will call nameChange AFTER #3. You need to implement a flag around the SysEx processing code so that the call to nameChange doesn’t do anything for these cases.

                        in reply to: documentation SUCKS big time… #72533
                        Paul Scheidt
                        Participant
                          • Topics: 2
                          • Replies: 11
                          • Total: 13
                          • โ˜…

                          Enzo,

                          I’m also new to Ctrlr, so I completely understand the frustration. You have to go slow, building up a panel piece by piece. Debug each piece before starting on the next one.

                          The single most useful information I found was this post to explain the basic procedure to build a new panel:

                          what do you need to know in order to make panels?

                          This breaks things down into 2 basic steps:
                          1. Get the modulator on the panel to SEND the correct message(s) for that particular control. Go reverse engineer a couple example panels to see which uixxxxx type to use and what each parameter does.

                          2. Setup the midiMessageReceived function to RECEIVE the corresponding message(s) from the instrument. This function needs to break down the MIDI message, decode it (if necessary), then setModulatorValue on the correct modulator on the panel. This gets tricky because you may need to keep track of 3 different value scales:
                          a. ModulatorValue
                          b. The MIDI value sent/received (e.g., MSB/LSB for SysEx, MIDI CC, etc…)
                          c. What’s actually displayed on the synth
                          I’m still a beginner but translating between these 3 scales seems to be the major reason to get into native lua code.

                          Two things I’ve figured out just by trial and error using the current build of Ctrlr (5.5.2) on Windows 10:
                          1. The panel:sendMidiMessageNow() command seems to cause trouble. For me, it’s sending bogus MIDI messages to the wrong output device and even caused my panel to stop loading. So, I don’t recommend using the panel:sendMidiMessageNow() command as written in that post.

                          I just put the SysEx “voice dump” command into a uiButton modulator and it works fine.

                          2. I can’t get any console() commands to work. At all. Errors no matter what I do. I figured out a workaround: create a modulator called test so that you can output raw values to it.

                          Specifically, in relation to the above thread, that means putting in this kind of statement into the assignValues script:
                          panel:getModulatorByName("test"):setModulatorValue(programData:getByte(1), false,false,false)

                          where programData:getByte(1) is the data you want to view. Hope this helps! I’m still learning so I’d appreciate any other tips as well.

                        Viewing 11 posts - 1 through 11 (of 11 total)
                        Ctrlr