Coder Social home page Coder Social logo

libpyin's Issues

Question

I called _pyin->getRemainingFeatures(); want to get each note's onset and offset.
I can get infos below, but I was wondering what it means? It doesn't looks like the percent of whole music length. Can you explain it? Many thanks

 PYIN::FeatureSet features = _pyin->getRemainingFeatures();
  for (const auto &feature : features) {
    for (const auto &ff : feature.second) {
      if (ff.hasDuration) {
        ff.timestamp
        ff.duration
      }
    }
  }

output:
timestamp: 0.012226261, duration: 0.000651168
timestamp: 0.012935569, duration: 0.000558144
timestamp: 0.013679761, duration: 0.000593028
timestamp: 0.014423953, duration: 0.000593028

DllNotFoundException: LibPyin

Still the guy who opened the last issue and it's a different thing this time...
First of all, Streck, let me just say your work is great and I appreciate you making such incredible tools available for everyone to use.

So, since the .dll in your solution is for 32bit, I actually downloaded a Unity archived version with 32bit support (5.6.5f1) and installed it. Running that one, I also

  • allowed unsafe code on MonoDevelop,
  • placed a gmcs.rsp with the command '-unsafe' inside in the project assets folder
  • placed a script on a MainCamera object in a brand new Unity project containing the line 'LoadLibrary.use()'
  • moved the LibPyin.dll and LoadLibrary.cs files in the assets folder of my project

BUT -> upon running the code I get the error

DllNotFoundException: LibPyin
LoadLibrary.use () (at Assets/LoadLibrary.cs:35)

I'm a total noob (as stated in the previous Issue) and I don't want to be pedantic at all, but I really don't know what to do.
Thanks for any possible replies!! :)

Where's the libpyin.dll

In the Unity example section of the readme.md file it says to add the libpyin.dll to the assets but I can't seem to find this .dll file amongst the libpyin library folders I just downloaded from here. Sorry, maybe this is super obvious but I'm a silly newbie.

Over Nyquist pitches with noisy sample

I am feeding the library a sample that's supposed to have a ~500 Hz tone, but it also has a lot of noise over it. The file is 44100 Hz 16-bit mono file.

The library gives me a list of pitches that read ~23kHz. Based on the file the file should not contain anything over 22050 Hz and the spectrum also doesn't show a lot of high-frequency energy.

Is this some sort of bug? Those values are non-sensical as frequency values for a 44.1 kHz file.

How to detect if pitch is present?

Hello!

I am currently implementing a karaoke machine with a sing-star like game for fun and so far I love your lib, it seems to work out of the box with minimal changes for my C++ Qt5 project which is awesome! Except for my one issue:

This could very well be just me not using the library properly, maybe just a change in documentation?

I am doing the following:

void PitchDetector::processBuffer(QVector<float> &in){
    //lib is in QSharedPointer
    if(!mPyin.isNull()){
        auto instd=in.toStdVector();
        auto sz=in.size();
        std::vector<float> pitches = mPyin->feed(instd);
        auto np=pitches.size();
        auto lastPitchPresent=mPitchPresent;
        // How can I tell if a pitch is present?
        mPitchPresent=(np>0);
        if(mPitchPresent){
            // Just care about first pitch we found
            auto p=pitches[0];
            // What is a valid pitch?
            if(p>0.0){
                mPitch=p;
            }
        }
        auto change=((mPitch!=lastPitch) || (mPitchPresent != lastPitchPresent) );
        if(change){
            qDebug()<<"PITCH SIGNAL: "<<mPitchPresent << mPitch;
            emit noteChanged(mPitchPresent, mPitch);
        }
    }
}

So this works, but the feed() method does always return a pitch! I tried setting different values for ::setCutOff(), including 0.0 and 1.0, but feed never returns without a pitch. The ouput looks like this:

PITCH SIGNAL: true 153
PITCH SIGNAL: true 138
PITCH SIGNAL: true 276
PITCH SIGNAL: true 138
PITCH SIGNAL: true 153
PITCH SIGNAL: true 138
PITCH SIGNAL: true 122
PITCH SIGNAL: true -430
PITCH SIGNAL: true -774
PITCH SIGNAL: true 106
PITCH SIGNAL: true 122

So my question/issue is; How can I know if a pitch was found or not, according to the cut off value selected?

Should I preprocess audio to remove noise?

Why is this not LGPL?

I wanted to use this great library, but I am finding that the GPL license is overly prohibitive, because the main use case for code like this is library use. So if I'd include this into a music app as a plug-in, then it'd require publicizing the whole music app, which I think is unreasonable.

Why isn't it licensed in LGPL?

DLL not found (again?)

Hello.

It seems that the LibPyin.dll has once again been removed from the repository?

Edit: Nevermind, I see it is in the release. Apologies!

Doesn't Work in Unity

It doesn't work in Unity 2020.3.20f1 version.

DllNotFoundException: LibPyin
LoadLibrary.use () (at Assets/LoadLibrary.cs:30)
TestPyin.Start () (at Assets/TestPyin.cs:11)

I have imported the LoadLibrary.cs & LibPyin.dll to the Unity Assets folder.
Do you have any idea how to fix it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.