EnzoF04

Forum Replies Created

Viewing 20 posts - 21 through 40 (of 102 total)
  • Author
    Posts
  • EnzoF04
    Participant
      • Topics: 17
      • Replies: 102
      • Total: 119
      • β˜…β˜…

      I saw you have the same rtrGlideRate as in the rtrGlideRate method.

      And one can open the panel in a coding app like BBEdit and change it there, save it as a different file with same .panel extension?

      Still really glad that you’ve fixed it! πŸ™‚ πŸ™‚ πŸ™‚

      EnzoF04
      Participant
        • Topics: 17
        • Replies: 102
        • Total: 119
        • β˜…β˜…

        Both of you are a hero! I copy code and change stuff to match naming. I know I have to get more efficient on coding functions with multiple input variables. So it gets more modular. That’s a next step. I’ve opened it again too!Thanks for both of your info and efforts to get it to life again, Goodweather and Human Fly. I’ve come to realize again and again what a cool (small) community the Ctrlr community is.

        in reply to: SOLVED: How to perform bit operations on a variable #117304
        EnzoF04
        Participant
          • Topics: 17
          • Replies: 102
          • Total: 119
          • β˜…β˜…

          Tedjuh helped me with the correct code, I had to use tonumber to convert the data coming from a modulator value.

          
          bit.lshift(tonumber(modVcoValue),1)
          in reply to: Updating ctrlr slider to reflect hardware knob #117298
          EnzoF04
          Participant
            • Topics: 17
            • Replies: 102
            • Total: 119
            • β˜…β˜…

            I’m developing a panel for a Six-trak from Sequential Circuits. It’s a very nice process to see a values on your display change while you ask for a different program/patch.

            What I need to make it work: (It does not work fully for now but values in the synth are visible on my panel.)

            step 1: Get the midi implementation of the Monologue.
            step 2: make sure you know midi (a byte… I mean a bit)
            step 3: get your synth to send program data (and program change) over midi
            step 4: make sure you can store the received data from the synth and process it.
            step 5: the data has to be given ( panel:getModulatorByName(k):setModulatorValue(n, false, false, false)
            ) to a panel component.

            What step do you wish to get support on? It’s a very cool process; I endorse you to continue and get it done!

            Grtz!

            in reply to: Suggestions/help for processing binary sysex #117292
            EnzoF04
            Participant
              • Topics: 17
              • Replies: 102
              • Total: 119
              • β˜…β˜…

              Thanks for the reply, BillFM; I’ll get into it! This is what I think I have to do with the received data. I have to learn more. Thanks for your input! πŸ™‚

              in reply to: SOLVED: What’s wrong in my function #117289
              EnzoF04
              Participant
                • Topics: 17
                • Replies: 102
                • Total: 119
                • β˜…β˜…

                Here is how I do it; it’s not a classroom example of good coding but it works for me.

                swLfoPls = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source)
                
                -- this for sending a midi cc based on the value in a panel component / modulator
                
                	local modLP = panel:getModulatorByName("modLfoPls")  -- putting the specific modulator name in a variable
                	local modLPValue = modLP:getModulatorValue()  -- putting the value in the specific modulator in a variable
                	local swLP  -- declaring a variable for the midi message
                
                	if modLPValue == 1 then  -- if component value is 1, the send the 'on' value, decimal 127, hex 0x7f
                		modLPValue = 0x7f  -- the value 'on' value in hex = 7f or 127 in decimal
                		swLP = CtrlrMidiMessage({0xb5, 0x10, modLPValue})  -- first byte is telling midi CC is be sent, second byte is the cc number, third byte (the variable) is the 'on' value.
                	else
                	modLPValue = 0x00
                		swLP = CtrlrMidiMessage({0xb5, 0x10, modLPValue})
                	end
                	panel:sendMidiMessageNow(swLP)
                
                end
                • This reply was modified 4 years, 1 month ago by EnzoF04.
                in reply to: position of data in sysex received #117284
                EnzoF04
                Participant
                  • Topics: 17
                  • Replies: 102
                  • Total: 119
                  • β˜…β˜…

                  Dnaldoog, could you please help me with shifting the bits in the parameters with a range?

                  I’ve come to the conclusion that that is what I need to do. But how! πŸ˜‰

                  I’ve got a modulator on the panel and I fetch the value of it in this way: (not perfect but works for me)

                  	local modVcoC = panel:getModulatorByName("modVcoCrsFreq")
                  	local modVcoCValue = modVcoC:getModulatorValue()

                  Let’s say that the value is 8 (decimal). That is in binary:
                  0 0 0 0 1 0 0 0
                  I need to alter the bits into:
                  0 0 0 1 0 0 0 0

                  I guess I have to store the modVcoCValue into an other variable (in Hexadecimal) and can do the bit operations in that variable. I need a for i = 1 to 7 (7 bits to be shifted). And after that I have to handle the altered hexadecimal variable to a midi message.

                  Hope you can crystallize a decent work around for this? Many thanks again!

                  in reply to: position of data in sysex received #117281
                  EnzoF04
                  Participant
                    • Topics: 17
                    • Replies: 102
                    • Total: 119
                    • β˜…β˜…

                    Confused again. When sending sysex it needs to start with F0 then 01 (for Sequential) and end in F7, right?

                    b5 02 value

                    should be a CC message (sending out on channel 4) I think.

                    I guess you are right. And when doing this, I need to shift bits because in the sent bytes the last bit(s) are ‘X’-ed out when data is smaller than 7 bits. That will do the trick, I guess.

                    • This reply was modified 4 years, 1 month ago by EnzoF04.
                    Attachments:
                    You must be logged in to view attached files.
                    in reply to: position of data in sysex received #117279
                    EnzoF04
                    Participant
                      • Topics: 17
                      • Replies: 102
                      • Total: 119
                      • β˜…β˜…

                      I observed the midi monitor; what was going out when I changed the slider on the panel. b5 is the sysex of parameter change, second byte is the parameter (similar to the CC) in this case it’s parameter 02 and the third byte is the actual data. For parameter 02 (coarse frequency) it can be between (hex) 00 and (hex) 60.

                      in reply to: position of data in sysex received #117276
                      EnzoF04
                      Participant
                        • Topics: 17
                        • Replies: 102
                        • Total: 119
                        • β˜…β˜…

                        OK, local declaration is a good advice! Didn’t know if they were global when ‘just’ declaring. If you are able to post it in a private message on the forum, I’d really appreciate it.

                        Here is my code for altering the other data.

                        rtrVcoCoarse = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source)
                        
                        	modVcoC = panel:getModulatorByName("modVcoCrsFreq")
                        	modVcoCValue = modVcoC:getModulatorValue()
                        	
                        	modVcoCMsg= CtrlrMidiMessage({0xb5, 0x02, modVcoCValue})
                        	panel:sendMidiMessageNow(modVcoCMsg)
                        
                        end
                        in reply to: position of data in sysex received #117274
                        EnzoF04
                        Participant
                          • Topics: 17
                          • Replies: 102
                          • Total: 119
                          • β˜…β˜…

                          It’s all really abstract in my head but your explanation is clear and I can wrap my mind around it from time to time. That’s really cool; good job on explaining how it works. Now my challenge is to change parameter data over sysex. For example the coarse frequency. I’ve experienced that it is a 7 bit parameter with a maximum of hex 60 (dec 96). On the Six-Trak the value’s are in half. on the panel 47 (dec) sent as b5 02 2f will become a parameter of 23 in the synth. So I need to make code where I calculate hex from component:getValue().

                          I did the code for switching the on/off parameters (1 bit) as follows:

                          swUnison = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source)
                          
                          	modUni = panel:getModulatorByName("modUnison")
                          	modUniValue = modUni:getModulatorValue()
                          	
                          	if modUniValue == 1 then
                          		modUniValue = 0x7f
                          
                          		swUni = CtrlrMidiMessage({0xb5, 0x25, modUniValue})
                          	else
                          	modUniValue = 0x00
                          		swUni= CtrlrMidiMessage({0xb5, 0x25, modUniValeu})
                          	end
                          	panel:sendMidiMessageNow(swUni)
                          
                          end
                          in reply to: position of data in sysex received #117264
                          EnzoF04
                          Participant
                            • Topics: 17
                            • Replies: 102
                            • Total: 119
                            • β˜…β˜…

                            UPDATE! It’s getting to work; all ‘on/off’ switches work on sysex now! I’ve removed the CC because of the difference between CC and sysex. And the best thing is: it’s bi-directional. So they update correctly when receiving program data and the synth follows the changes made on the panel.

                            Now I’m going to match all the rotary values.

                            But how…. πŸ˜‰

                            • This reply was modified 4 years, 1 month ago by EnzoF04.
                            Attachments:
                            You must be logged in to view attached files.
                            in reply to: position of data in sysex received #117260
                            EnzoF04
                            Participant
                              • Topics: 17
                              • Replies: 102
                              • Total: 119
                              • β˜…β˜…

                              Dnaldoog, can you please explain this lShift and rShift again in a different way?

                              I think of this bit shifting as follows, please correct me if I’m wrong:
                              in a byte (I use alphabetical characters as placeholders)
                              a b c d e f g h
                              that is bit rShifted by (2,2), becomes
                              a b g h c d e f
                              Am I right?
                              Two positions off the start of the data, wich is ‘c’ the data is shifted 2 positions to the right and the ‘overload’ which is ‘e f’ is moved to the blank places at positions 3 and 4?

                              in reply to: position of data in sysex received #117259
                              EnzoF04
                              Participant
                                • Topics: 17
                                • Replies: 102
                                • Total: 119
                                • β˜…β˜…

                                Hi Tedjuh,

                                Dutch too, I assume? Would be nice! My main goal is to set a decent panel for the Six-Trak; with bidirectional communication, the correct way. I have bidirectional communication, synth gets parameters and sends parameters from and to the panel but the data is not the same. Have to figure it out. Panel sends in CC and synth sends in sysex. It’s challenging but fun!

                                in reply to: position of data in sysex received #117253
                                EnzoF04
                                Participant
                                  • Topics: 17
                                  • Replies: 102
                                  • Total: 119
                                  • β˜…β˜…

                                  Dnaldoog!

                                  I think i fixed the MSB & LSB switch; altering code in the ‘run” function:

                                  		for n=0,mbTemp32Byte:getSize()-1,2 do
                                  			local msb=bit.lshift(mbTemp32Byte:getByte(n+1),4)
                                  			local lsb=mbTemp32Byte:getByte(n)
                                  			table.insert(t,lsb+msb) --swapped msb+lsb to lsb+msb
                                  		end

                                  Parameters over more than one bit seem to match on panel as well on synth!

                                  The single bit parameters need to be converted from 1 for ‘on’ to 127 for ‘on’.

                                  • This reply was modified 4 years, 2 months ago by EnzoF04.
                                  in reply to: position of data in sysex received #117244
                                  EnzoF04
                                  Participant
                                    • Topics: 17
                                    • Replies: 102
                                    • Total: 119
                                    • β˜…β˜…

                                    Page 11 of the Six-Trak manual has me confused about bit positioning,

                                    For example Glide rate 15 is 0ggg gxxx. 0111 1000 Maybe that means the data is left justified because of the Six-Trak processor architecture? But is then converted to right justified for MIDI?

                                    but if it’s all the other way around then all values should be wrong in my code. I don’t understand what If P=127,SEQ A and B, STACK A and B means.

                                    Massively confused.

                                    That’s why I’m confused too. A big part of all parameters in program is correct.
                                    If P = 127 (sent program 127) the sequencer and voice stacking mode.

                                    Almost all things work. So don’t be confused.
                                    I’m confused about the 6 bits for coarse value and the fact it only can hold 48 (00 to 47) values. While six bit data can hold up to 64 values. (see coarse value)

                                    attached is my Excel reference.

                                    Data transmitted is right justified as manual says, see attached.

                                    • This reply was modified 4 years, 2 months ago by EnzoF04.
                                    Attachments:
                                    You must be logged in to view attached files.
                                    in reply to: position of data in sysex received #117242
                                    EnzoF04
                                    Participant
                                      • Topics: 17
                                      • Replies: 102
                                      • Total: 119
                                      • β˜…β˜…

                                      perhaps there is a discrepancy between sysex and midi cc on the value basis??

                                      in reply to: position of data in sysex received #117241
                                      EnzoF04
                                      Participant
                                        • Topics: 17
                                        • Replies: 102
                                        • Total: 119
                                        • β˜…β˜…

                                        One small thing that doesn’t really matter but may further your understanding of lua is that if a key to a table contains no strange characters (like a space for example) then they can be declared without the [” β€œ].

                                        without I’ll get a compile error. Changed it back with “[ ]”.

                                        Things that are ‘strange’:
                                        Unison on/of sw doesn’t go with received data always
                                        Unison slider have to be switched twice ‘on’ to get affected in the synth
                                        Coarse frequency is correct received and displayed in the component but not coherent to the value changed value coming of the panel.
                                        VcfEnvAmnt is not as it should. When loading a program from synth, it is altered but when I change it in the panel it is off scale or something (wrong)/
                                        I commented the LfoAmount to ‘out’ because it generates a ‘Error message [string “run”]: 77: attemt to index a nil value.

                                        further testing is going on massively. πŸ™‚ I’m glad at the moment!!

                                        in reply to: position of data in sysex received #117236
                                        EnzoF04
                                        Participant
                                          • Topics: 17
                                          • Replies: 102
                                          • Total: 119
                                          • β˜…β˜…

                                          Do we need to change the lShift and rShift? The manual says received parameter data is right justified and LSB sent first.

                                          Why I’m thinking of this is because i get strange values for some parameters.

                                          EDIT: I don’t know. I think it works like it should. The strange thing is that when i change program, the coarse frequency is 14 and sounds like green, when I change the coarse frequency of the synth with my panel to 20 for example, the sound is blue-ish. When I change the coarse frequency back to 14 with the panel, the sound is NOT green again.
                                          This is with some parameters on the panel.

                                          I receive in sysex and I alter parameters with CC.

                                          • This reply was modified 4 years, 2 months ago by EnzoF04.
                                          • This reply was modified 4 years, 2 months ago by EnzoF04.
                                          Attachments:
                                          You must be logged in to view attached files.
                                          in reply to: position of data in sysex received #117233
                                          EnzoF04
                                          Participant
                                            • Topics: 17
                                            • Replies: 102
                                            • Total: 119
                                            • β˜…β˜…

                                            I’m very pleased with the progress. Call back to the panel of data incoming from the synth and updating panel components working. A BIG STEP FORWARD! Really great! Getting my head around all kinds of stuff this way. See attached, big thanks for now, gtg, be back later!

                                            • This reply was modified 4 years, 2 months ago by EnzoF04.
                                            Attachments:
                                            You must be logged in to view attached files.
                                          Viewing 20 posts - 21 through 40 (of 102 total)
                                          Ctrlr