• Software
  • RE: Input and Biquad/QuadBiquad.h and Source...

ryjobil

Hello,

Well...I went and did not conquer. The violin was out of tune and my rosined bow was not rosined enough. Now, I can start on the circuit construction and ideas for the BELA platform/Cape.

Seth

P.S. Thank you...I did enjoy it. I will most likely try to finish the rest of the ideas on Youtube.com for the BELA lectures and then proceed to circuits, vocoder, and other ideas.

ryjobil

Hello...I looked over the source in the github repo.

It is fine and okay by me but...

I have not figured out how to make any of it work just yet. I have four strings on this violin and six strings on my guitar.

I am not getting any pause of sound or change in sounds. I made another post on this blog site to better suit the needs of quick viewers.

Seth

P.S. If there is a particular circuit to make that is specific, please let me know. I will make this circuit and proceed. Anyway, I am very excited to make this 'heavily rosined' bow make angelic sounds of beauty once and for all. Ha. So in hindsight, I will keep trying and learn more about different circuits while I stay patient for replies.

    silver2row
    The vocoder has the best instructions. If you make the connections as diagrammed on the github README.md then the vocoder will work. You will need a microphone preamp for the ADC CH1 connection
    https://github.com/transmogrifox/Bela_Misc/tree/master/vocoder

    The "klingon tone" will also work without external connections because the defaults are set to something that will change the sound, and quick review of the code shows it starts in an active state:
    https://github.com/transmogrifox/Bela_Misc/tree/master/klingon_tone
    You can do more with knobs connected, but it will do something audibly different without.

    The sample/hold modulator, ADSR and state variable filter require more understanding of Bela and the code. The TransmogriFX repo ( https://github.com/transmogrifox/transmogriFX_bela/tree/master/src ) works as a complete system but it requires a combination of correct hardware connections and an understanding of what the hardware inputs do in the code -- neither of which are documented yet, so you have to study the code and experiment to figure out my particular way of doing things to make it work.

      ryjobil

      Yes sir,

      I will keep attempting the source learning. Also, I will try to build the preamp for the ADC connection.

      Seth

      P.S. I should have something done in the next couple of months. I am slow on building but things come together in the end. Thank you for supporting this channel. I appreciate your time a neat videos, i.e. esp. the vocoder playing.

      ryjobil quick review of the code shows it starts in an active state

      i was under the impression that the default was 'bypass = true'.
      i should think that it therefore starts in bypass?

        Remork i was under the impression that the default was 'bypass = true'.
        i should think that it therefore starts in bypass?

        While it is true that make_klingon(...) will create a Klingon Tone initialized to bypass state, the specific sketch referenced sets it to active state when you start the sketch.

        See render.cpp, in function setup(...)

            //Bypass is the least intuitive function:
            // If second argument is true, it forces bypass state.
            // If second argument is false, it toggles bypass state.
            // The second call below is all that is needed after make_klingon(), since the constructor function
            // sets bypass state to true.  A call to kot_set_bypass(kot, false) would then toggle to active-state
            // since it is already initialized to bypass state (true).
            // However for clarity in the example it is explicitly set to true, then toggled to demonstrate the normal sequence when
            // the current bypass state is unknown.
            kot_set_bypass(kot, true);
            kot_set_bypass(kot, false);

        Notice I fixed the comment here, but haven't pushed a fix to the comment in the code, so you will see a discrepancy if you read this section of the code before I get around to fixing it.

          8 days later

          ryjobil ,

          Okay...things are settling down again (maybe). So, I looked throughout the over-the-1500 lines of code in render.cpp.

          I came up empty so far.

          ...

          I have not found exactly where this specific set of lines are located. Um, are you sure they are in render.cpp? And if they are in render.cpp, which setup (This_Or_That) function should I look to when looking for this specific set of calls.

          Seth

          P.S.

          bool kot_set_bypass(klingon* kot, bool bypass)
          {
          	if(!bypass)
          	{
          		if(kot->bypass)
          			kot->bypass = false;
          		else
                  {
                      kot->bypass = true;
                  }
          	}
          	else
          	{
          		kot->bypass = true;
          	}
          
          	return kot->bypass;
          }

          Is this it? I found this in klingon.cpp. Oh! Is it in this repo, https://github.com/transmogrifox/Bela_Misc, and not this one...https://github.com/transmogrifox/transmogriFX_bela?

          Hello Once More,

          ryjobil and Remork ...

          ...

          Um...hmm. I added the scripts to the folder in the form of a .zip file like stated in the instructions for using BELA.local.

          This section of .zip dropping worked but I am receiving an odd error:

          Makefile:153: *** Invalid/empty project. A project needs to have at least one .cpp or .c or .cc or _main.pd or _main.scd or _main.csd or run.sh file.  Stop.

          So, I was thinking that, I am solely guessing here, the Makefile in question here has limitations that I should overcome and quickly. Does this sound correct?

          Seth

          P.S. The Makefile is missing but I have not used a Makefile thus far from what I have understood. So, it is hidden maybe?

          Hello,

          I have narrowed the search for errors and came across only one error in my checking of things:

          /root/Bela/projects/Bela_Misc-master/build/specdense.o

          Seth

          P.S. It seems that specdense.o is not mentioned in my source files or I have to figure out a workaround. Either way, specdense.o may need to be different, i.e. spec_dense.o?

          Remork

          Hello...okay. I will try that idea. I used the .zip file instead of unzipping firstly.

          Seth

          P.S. It does not matter right now. My board is not booting. I need to put on a new image. I will update you all soon.

          
          
          make: *** No rule to make target '/root/Bela/projects/Bela_Misc-master/build/specdense.o', needed by 'syntax'.  Stop.
          make: *** No rule to make target '/root/Bela/projects/Bela_Misc-master/build/specdense.o', needed by 'syntax'.  Stop.
          Open file Bela_Misc-master build/PDM_digital_IO...
          Error: EISDIR: illegal operation on a directory, read,0, Error: EISDIR: illegal operation on a directory, read,0,Building project ...
          Build finished
          make: *** No rule to make target '/root/Bela/projects/Bela_Misc-master/build/specdense.o', needed by '/root/Bela/projects/Bela_Misc-master/Bela_Misc-master'.  Stop.
          make: *** No rule to make target '/root/Bela/projects/Bela_Misc-master/build/specdense.o', needed by '/root/Bela/projects/Bela_Misc-master/Bela_Misc-master'.  Stop.
          Open file Bela_Misc-master build/klingon_tone.cpp...
          Error: EISDIR: illegal operation on a directory, read,0, Error: EISDIR: illegal operation on a directory, read,0,Open file Bela_Misc-master build/klingon_tone.cpp...
          Error: EISDIR: illegal operation on a directory, read,0, Error: EISDIR: illegal operation on a directory, read,0,

          I am receiving the same error if I put in a .zip file or a set of unzipped files. Also, I am receiving the same specdense.o error that is needed (it seems). I keep looking over documentation and I cannot resolve this issue for now.

          It seems like the difficulty you are facing is related to getting started with Bela, understanding the way it is designed to be used. If my guess is correct, then below might help you get the code running.

          This first statement is to describe the assumption I am making about which Zip file you are talking about. The way to get a Zip file from the github repository I sent in a link is like this,
          https://github.com/transmogrifox/Bela_Misc
          ,then there will be an option "Code" and "Download Zip".

          Is that the Zip file to which you have made reference?

          If this is what you mean, then you may unzip this zip file you will have a directory structure of the repository, which looks like the corresponding github page -- within there are multiple directories each having a different sketch. Each one is its own Bela project and I am uncertain what Bela would do with the whole of Bela_Misc copied to a single project directory.

          You need a new project that includes all the .cpp, .h and .txt files you see here:
          https://github.com/transmogrifox/Bela_Misc/tree/master/klingon_tone

          This means on our PC you would browse to the kingon_tone directory under the unzipped Bela_Misc directory and upload those files to a new project from the Bela IDE, like below.

          1) Download Bela_Misc repository zip from https://github.com/transmogrifox/Bela_Misc
          2) Extract zip to your PC
          3) Open web browser to Bela IDE -> create new project, name it whatever you want
          4) Delete the default (auto-generated) render.cpp
          5) Use menu option to upload project files
          6) Browse to extracted zip directory, klingon_tone
          7) Upload all .cpp, .h, .txt files from directory klingon_tone to this new project directory
          8) Build and run
          9) If 8 works, then you can modify code using the IDE editor to observe how it may change the sound, and/or adjust project settings in the IDE (e.g AGC gain, DAC gain). Defaults will be ok for testing basic compilation and verify sound has changed.

          If you have more experience with Bela, there are more elegant ways you can learn to copy the code to the correct place The above method is one way that is easy to explain, and it works.

            ryjobil Each one is its own Bela project and I am uncertain what Bela would do with the whole of Bela_Misc copied to a single project directory.

            it would place them all in the same project and fail gloriously at link time with multiple duplicate symbols!

              giuliomoro and ryjobil ,

              Okay...so:

              Do not install the complete unzipped or zipped directories and files at once

              and...

              Use one directory at a time

              Now, I will attempt this idea. I was just installing the complete BELA_Misc unzipped file in its entirety.

              Seth

              P.S. I will get back to you after installing the single directory and see what happens.

              ryjobil 1) Download Bela_Misc repository zip from https://github.com/transmogrifox/Bela_Misc
              2) Extract zip to your PC
              3) Open web browser to Bela IDE -> create new project, name it whatever you want
              4) Delete the default (auto-generated) render.cpp
              5) Use menu option to upload project files
              6) Browse to extracted zip directory, klingon_tone
              7) Upload all .cpp, .h, .txt files from directory klingon_tone to this new project directory
              8) Build and run
              9) If 8 works, then you can modify code using the IDE editor to observe how it may change the sound, and/or adjust project settings in the IDE (e.g AGC gain, DAC gain). Defaults will be ok for testing basic compilation and verify sound has changed.

              I will attempt this idea too!

              Seth

              ryjobil

              Hello,

              I am sorry. You are right about me being too new w/ .cpp and BELA as of now. I tried your 1 - 9 instructions.

              I received this error:

              Your code is printing to the console too quickly. Check your audio thread for print messages.

              Seth

              P.S. Please let me know if you know of a workaround or if you think I have completed 1 - 9 incorrectly.

                silver2row Your code is printing to the console too quickly. Check your audio thread for print messages.

                Getting this message confirms you followed the instructions correctly, the code compiled and it is running. The message is a side-effect of not having any pots connected to analog inputs. The application prints each time it detects the pot gets turned. When there is nothing connected to the input, the noise appears as if the pot is constantly being turned back and forth from one extreme to the other faster than a human could ever turn it, and it prints more messages than Bela can keep up with.

                Below shows how to disable reading the pots when nothing is connected to the Analog Inputs:

                In render.cpp:

                void render(BelaContext *context, void *userData)
                {
                    //separate audio inputs into their own buffers
                    format_audio_buffer(context, ch1, 1);
                    format_audio_buffer(context, ch0, 0);

                Comment these lines as shown below

                    //Scan analog inputs and set settings
                   // for(int i = 0; i < N_KNOBS; i++)
                     //   format_analog_buffer(context, kp[i]);

                The remainder of this function posted to help you see where the commented line is found, but you don't need to change anything else below.

                    //Run the klingon on ch0
                    klingon_tick(kot, ch0);
                
                    //Send it to the output
                    for(unsigned int n = 0; n < context->audioFrames; n++)
                    {
                        // Write klingon through ch0, pass-through ch1
                        audioWrite(context, n, 0, ch0[n]);
                        audioWrite(context, n, 1, ch1[n]);
                    }
                }

                Once that is working, then you can make modifications to the code I gave previously for making the effect more extreme.

                  ryjobil

                  Hello...okay. I will test this soon. Thank you.

                  Seth

                  P.S. I will return service shortly! Okay...I tried the commenting of the source in question:

                  // Scan analog inputs and set settings
                  // for(int i = 0; i < N_KNOBS; i++)
                  // format_analog_buffer(context, kp);



                  Same issue...

                  format_analog_buffer(context, kp[i]) is the only function running in the audio thread with print functions. If it is commented out in the code you are compiling you won't have that error.

                  Close the project, re-open it and see if the commented lines were saved. If not, try again.

                    ryjobil

                    Okay...I tried to comment out the rt_printf statements w/ // .

                    Seth

                    P.S. I will try again and again and again. Until! Eureka, it has been done! Please give me time, i.e. as I have only commented the rt_printf statements in the source so far. I will comment out all of the functions for the rt_printf statements.

                    I tried and this is the return output I get:

                    6410.000000	-4.893197	0.000000
                    6420.000000	-4.893508	0.000000
                    Your code is printing to the console too quickly. Check your audio thread for print messages.