HN user

Stenzel

127 karma

Mainly audio signal processing, also iOS Apps, speech synthesis and synthesis of singing voice. Freelancer.

7aa82bc7a548f58c98b7b53f6cdb3c7890071babcbae6979014ee7da5a2f228a

Posts0
Comments29
View on HN
No posts found.

Processors with saturating capabilities usually clip at 0x7FFFFFF and 0x80000000, so the clipping thing has no relation to the original topic. But in fixpoint DSP, 0x8000 (add trailing zeros if you like) is often the only possibility to achieve a multiplicative identity by using a = - b * 0x8000, with the negation part of the assembly instruction.

There is no illusion of pitch, and it is a common misconception that the fundamental frequency must be present in a tone. Pitch is the perceived periodicity of a tone, which is roughly the greatest common divisor of the harmonics. If perceived pitch without fundamental is considered an auditory illusion with, common pitch detection techniques should fail if the fundamental is not present, but they work quite well in the absence of the fundamental. So either there is no illusion of pitch or algorithms have illusions too.

Sadly most sorce code follows the exact opposite convention - starting with legalese, followed by boring initialisation. I wish more source code would come to the point right at the start, and I am thankful for the new acronym BLUF that expresses this concept quite clearly.

Much faster if constraints are represented by single bits in an integer mask and binary masking operations are used - even the hardest soduko solves instantly.

The transposed direct form II allows a biquad to be calculated with two scalar by vector multiplications and some shuffling, which should be faster than the proposed matrix solution I believe.

MIDI is great, and I am so thankful that they had the foresight to require a mandatory opto-coupler in the input to avoid ground loops of interconnected gear. Even today, very few devices have a comparable insulation in their USB connection.

This book contains some wrong and oversimplified statements, the explanation of the sampling theorem is awkward and suggests that the author has not fully understood it himself.

Example of wrong claims: "The heart of digital noise generation is the random number generator." Not true, many digital noise generators use LFSR.

"Just as analog filters are designed using the Laplace transform, recursive digital filters are developed with a parallel technique called the z-transform." Hello no, there are gazillion ways to design filters - analog or digital - without those transforms.

"The frequency domain becomes attractive whenever the complexity of the Fourier Transform is less than the complexity of the convolution. This isn't a matter of which you like better; it is a matter of which you hate less."

Clearly I hate both domains less than this book. It might serve as an introduction to DSP, but please remain suspicious, if some claim herein seems oversimplified, it probably is.

If you sell hardware, you have to deal with CE/FCC/RoHS and -worst of all- WEEE compliance, to name just a few. In comparison, GPDR is a piece of cake. Just sayin.

The distortion sounds like it is applied to individual strings, if it were applied after summing, it would not only resemble more a real electric guitar, but also sum- and difference frequencies of detuned strings would be audible much nicer as beating.

Furthermore, the intervals E-A/A-D/D-G and B-E are not exactly perfect fourths, they should be equal tempered. Luckily the difference is almost negligible for the fourth, the perfect interval would be 4/3 = 1.3333 versus 2^(5/12) = 1.3348 for equal temperament. The interval G-B however is a major third, here the perfect interval is 5/4 = 1.25 while equal tempered is 2^(4/12) = 1.26 Those minor errors accumulate if one string is tuned based on the preceding one, the interval from lowest to highest strings can be calculated:

(4/3)^4 * 5/4 = 3.95 for perfect intervals, 2^(4 * 5/12) * 2^(4/12) = 4 for equal temperament.

The highest string should be exactly two octaves (= a factor of 4) above the lowest one, so the equal temperament should be preferred. A practical result is that tuning a guitar using only intervals of adjacent strings will never really converge to the ideal result, so tuning (fretted) octaves and flageolets should be used in addition.

So some positive feedback gets an app more attention - I get that, apps than infantilize their users are getting popular. But does it really have to be presented at precise intervals, calculated by a clever algorithm made by neuro-scientist? I doubt the impact will differ when triggered at slightly sanitized random intervals instead.

Am I the only one having a problem with the term "analog" for everything non-digital? First of all digits can very well be analog to something, e.g. a CD contains digits analogous to sound pressure in a similar way a vinyl records has grooves analogous to sound. Furthermore analog means quite the opposite of the "real thing" - as the name says, it is an analogy of something, not the thing itself. I could just let go and accept the new meaning of analog, but I think the implication of using it this way leads to the false impression that everything digital is just fake and a mere approximation of the-real-thing. As someone who breathes digitally, this makes me a bit sad.

Keyboard latency 9 years ago

Compare with musical keyboards where not only key number but also the velocity matters, so each key has two electrical contacts, and the whole thing is usually scanned around 10kHz for proper velocity measurement. Although key contacts are arranged in a diode matrix, the latency is usually below 2 ms, even with good old MIDI.

So neither the keyboard matrix nor the debouncing justify a latency of 10 ms or above.

It is nice to see that latency is an issue in gaming now, similar to realtime audio, where most operating systems are still not very usable - with the exception of OS X.

I agree with the article, but the arguments the author gives are not quite spot-on. Ligatures render code unreadable, there is no way to see how to enter a particular character sequence that is shown as a ligature. They might beautify code for some individuals, but they should never be used for showing code in an public or explanatory context, like on the web. Some operators are no longer recognisable, a few just look wrong - a clear case where simplicity and functionality is sacrificed for style.

Accusing you without specific reason so you cannot defend yourself is a bad form harassing. Consider to step up and demand either specifics of the accusation so you can defend yourself, or all charges being dropped immediately in combination of an excuse from your employer. Check your local law if you could threaten to sue them for misconduct if they are not willing to cooperate. Consider not to comply with their demands to restrict your communication, ask your coworkers in a friendly way if they know more or if there was anything you said that made them feel uncomfortable.

In you are after this experience and cannot find an anechoic chamber nearby, an EMC test lab might also work - they usually have a room where walls are covered with radiation absorbent material, which incidentally also absorbs sound very well.

Since you ask, I use lots of assembly level programming for digital audio signal processing. Some ARM instructions offer special DSP specific features like saturation and fractional arithmetic that have no equivalent int C, so it justifies using assembly. Smaller ARM cores without NEON offer some kind of miniature SIMD by operating on two 16-bit or four 8bit numbers, these can speed up things as well. To take full advantage of these it is best to write some portion of code in assembly. I usually wrap a processing sequence into a gcc-style inline assembly macro, this way I can easily compare with a C-only macro and maintain portability, and it saves me from having to deal with the complete instruction set and calling conventions.

I am missing the motivation to purge the preprocessor - only reason he gives is the paradigm that the preprocessor is considered bad practice. I fail to see why. The preprocessor is a useful tool that can save you time and make code more readable and portable. Conditions at compile time guarantee that the compiler is not subjected to a specific portion of code, and it offers the only way to define a constant value without having an implicit type for that. Considering the use of C/C++ outside pure computer programming, like embedded systems or digital signal processing, where portability, code size and target specific substitutions or optimisations matter, there is simply no reason and no way to get rid of the preprocessor without breaking things. Sure you can use it in obscure and wrong ways, but it is not the job of the language to act as a nanny and prevent you from doing evil by restricting access to dangerous toys.

Waldorf Music GmbH | Remagen, Germany | onsite

We are looking for developers to join our development team. The ideal candidate should exhibit both strong problem solving skills and the endurance to purse a project from idea to production. Tasks include programming for a variety of hosts, platforms, and for our hardware products.

As we are after someone with the ability to quickly master new technologies and use them for making great musical instruments, we keep the formal requirements brief:

* Fluent in C/C++ * Good at Math * Proficient in English or German language

Nice to have: * VST/AAX/AU programming experience * Background in digital signal processing * Hardware design (analog/digital) * Assembly level programming * Musical skills

Please send your application to jobs at waldorfmusic.de with some proof of your skills.

We offer work in a team where every member's ideas and creative input is welcome and appreciated. Spontaneous barbecues might happen. Location is Remagen, Germany.