Comments (4)
Show me the code that does not work.
from q.
q::decibel(q::detail::db2a(m_threshold))));
BTW, this does not look good. detail
is private and should not be used by clients. Also, why are m_lowestPitch
and m_highestPitch
not q::frequency
types? While this works, it is subverting the strict type system, like using void*
.
I know, I know... off-topic... I just can't resist advocating good modern c++ usage :-)
from q.
😅 I'll try to tidy up the code a bit - some things are a hangover from when I was figuring things out.
Code that doesn't work:
// in header
std::shared_ptr<cycfi::q::signal_conditioner> m_pp;
// in initializer
...
auto m_pp = std::shared_ptr<cycfi::q::pitch_detector>(new cycfi::q::pitch_detector(
q::frequency(m_lowestPitch),
q::frequency(m_highestPitch),
m_inputSampleRate,
q::decibel(q::detail::db2a(m_threshold))));
...
// inside process function
float s = m_pp->operator(inputBuffers[0][i]);
It compiles but with a note:
QlibPitch.cpp:277:21: note: in instantiation of function template specialization 'cycfi::q::signal_conditioner::signal_conditioner<cycfi::q::signal_conditioner::config>' requested here
auto sig_cond = cycfi::q::signal_conditioner(
and then segfaults when I try to run it. I 100% expect this to be an issue with my code - I'm mainly just trying to understand how to share an instance of the signal conditioner across several different function calls.
from q.
// in initializer
...
auto m_pp = std::shared_ptrcycfi::q::pitch_detector(new cycfi::q::pitch_detector(
q::frequency(m_lowestPitch),
q::frequency(m_highestPitch),
m_inputSampleRate,
q::decibel(q::detail::db2a(m_threshold))));
This does not make sense. m_pp
is a std::shared_ptr<cycfi::q::signal_conditioner>
and you are assigning a std::shared_ptr<cycfi::q::pitch_detector>
to it?
from q.
Related Issues (20)
- Some values for lowest and highest pitch cause blank output pitch detection HOT 9
- BiQuad lowpass filter problem HOT 4
- Explanation of how to best use the pitch detector HOT 12
- midi processor dispatch() not catching notes on channels other than 0 HOT 1
- use with raw audio stream pointers (int16_t * audio) HOT 3
- Incorrect Implementation in WAV memory read HOT 5
- [SUGGESTION] Audio fingerprinting
- Mac os 11.2 needs latest portaudio for running HOT 3
- Not able to compile the examples HOT 1
- Use q with a float array ? HOT 1
- Detecting voiced vs unvoiced segments using BACF HOT 2
- Is it possible to add audio effects with song in android using this lib?
- Build fails with glibc>=2.34 HOT 5
- Godd HOT 1
- 404 link to square_osc.cpp in docs/modules/ROOT/pages/quick_start.adoc HOT 1
- = operator overload HOT 4
- Deprecated space in "" operator overloads causes compiler warnings, which causes errors in our release builds HOT 4
- frequency to note conversion questions HOT 5
- Direct access to `audio_stream` samples HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from q.