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

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.

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

              Hopefully we got rid of that bug years ago 🙂

              silver2row I tried and this is the return output I get:
              This output is helpful. Thanks for posting it.

              Delete the file test_tonestack.cpp It is the only code in the directory that can generate an output formatted like that, and with those numbers. This is a file that I should have put into the "analysis" directory because it's an offline test utility for the tonestack code, but was not meant to be executed in real time. Sorry about that.

              @giuliomoro it is noteworthy that Bela seems to be compiling and executing that program without generating an error (except too many print statements at runtime).

                ryjobil

                Hello Sir,

                Yes sir...erasing on the way. test_tonestack.cpp will be removed. Thank you for the info.

                Seth

                CPU  PID    MSW        CSW        XSC        PF    STAT       %CPU  NAME
                  0  0      0          413393     0          0     00018000   89.0  [ROOT]
                  0  761    3          3          8          0     000600c0    0.0  Klingon_Tone
                  0  771    1          413390     413392     0     00048046    9.2  bela-audio
                  0  0      0          224671     0          0     00000000    0.7  [IRQ16: [timer]]
                  0  0      0          206726     0          0     00000000    0.7  [IRQ21: rtdm_pruss_irq_irq]

                Okay...so that is the output. Nothing changes in the form of output from the input of the guitar to the BELA input to the output of BELA to the amplifier. I know you guys do not have unlimited time. If there is something you think I am missing, please reply.

                Hello,

                I am not sure exactly what to expect w/ running render.cpp in this context. I feel a 'bluesy' sound has taken over the guitar sounds while strumming. I am testing w/ the guitar right now instead of the four string violin.

                Seth

                P.S. ryjobil : I think it is still just bypassing everything while things are plugged in while the source is running. Everything is running on the software side of things, i.e. no errors are stopping BELA. I just do not hear a definitive tone or difference in sound.

                Remember earlier I mentioned channel 0 has klingon tone and channel 2 is just pass-through. Depending how you have hooked up the guitar it might pass-through or it might get the effect.

                If using both in parallel it will be a mix of clean and bluesey.

                The default settings are for a "bluesy" sound with guitar. If you hear some distortion that is somewhat mild, that is what I expect.

                You can get more extreme settings from what was posted above. The first step was just getting the code to execute, and then now maybe you can do some things to make the change in sound more obvious.

                Here's an example of what it will sound like if you get the guitar level turned up high enough on the input:

                  ryjobil

                  Hello...nice! That was one, bluesy guitar sample. I still get too excited when I pick up my guitar to not goof up randomly.

                  Patience, I understand. I need to take time out to try to comprise something that is worth my ears listening.

                  Anyway, I have compiled the source in its current format. To tell you the truth, I do not know what Klingon is supposed to sound like currently. I should read or watch some more Star Trek.

                  So, in hindsight, I will get better acquainted w/ BELA and the source w/ the Klingon and other tones soon.

                  Seth

                  P.S. Seriously, thank you for taking time out to help me. This should be a nice adventure. Oh and I have this violin, not the 3D printed one, I plan on learning. I like to weep. Weeping on guitar is nice but the violin weep is extra nice.

                  Actually "Klingon Tone" is a play on words for "King of Tone". It's a digitized model of the "King of Tone" pedal https://happybluesman.com/why-king-of-tone-pedal-famous/ . The analog circuit is very similar to the Marshall Bluesbreaker in case that helps describe what to expect.

                  The default settings are adjusted so that a guitar with nearly full-range input will "break up". You have to crank up the gain and mix to all hard clipping for it to sound distorted on a weak signal.

                  If you have plugged your guitar direct to Bela input with no amplification then you will need to set the input gain in project settings to about 12 dB. That audio level meter I showed in the video is nice for helping set up the input level, but that is yet another project and it makes sense to get one working correctly before moving on to another.

                    ryjobil

                    Hello! This is making more sense now. I thought it was going to sound like some odd Klingon talk (Ambwonk Chamtwak Nimbtock or however they speak) when strumming around. Ha!

                    I did not know what to expect at all. The bluesy sound reiterating out of the speaker is nice. It is unlike my current set up of plug and play (guitar to amp). I will mess w/ some knobs one day. I have a couple knobs on my amp but only gain, tone, and volume.

                    Seth

                    P.S. I will goof around w/ the source to see what I can achieve. I have a couple projects that I am dedicating to the BBB and promotions. Nothing for funding but it is nice to be a part to something better than just me sitting still. So, I really hit that bluesy guess w/ a nail on the head, i.e. so to say. Anyway, I hope all is well. I cannot wait to try more and more w/ this nifty tool (BELA). Are you guys thinking of using the BBAI anytime soon w/ BELA?

                      silver2row I thought it was going to sound like some odd Klingon talk (Ambwonk Chamtwak Nimbtock...

                      This is a fun idea even though this isn't what KlingonTone does.

                      Good to hear it's working. Now maybe you can try the Vocoder or get back around to making the biquad filters do something extraordinary for you.

                        ryjobil

                        Hello Sir...is the vocoder needing to have a specific circuit or can I just use an amplifier circuit to handle this source instance?

                        Seth