All posts by werner

C++ sigh

I cannot properly express my hatred towards C++. I really cannot put it into words. You would think that starting a sentence with insults and strong words would do it, but no, it would only appear as a feeble attempt to express how I really feel. A polite ‘fuck you C++’… will only be reciprocated with a ‘fuck you too Werner’. So I’m totally at a loss. Even comparing C++ its complexities and ambiguous sense of morality to Merkel would not do it justice. Sometimes, I feel like I would like to pick up the phone, call Stroustroup, pull him through the cable and have ‘a nice and friendly chat’ with him. Will not do either because he already speaks like the Swedish cook. Maybe the best comparison would be a Kafkaesque interaction between administration trying to rob your of your will to live and you as the victim. I feel as if I want to die.

Timestretcher

timestretchsegmentsThe timestretcher I’ve been working on is going ahead quite well. I’m currently working on timestretcher parameter changes. When changing the tempo, the segments should still align correctly. In the image  each color is a new synthesized segment. As can be seen, they overlap nicely.  A wave from one segment is picked up by the next, and so on.

 

Speed requirements timestretcher

I’m currently optimizing my timestretcher. Just to give an idea of the speed we need to achieve: with a windowsize of 4096 samples and an overlap of 16 frames. We have about 5.8 milliseconds between frame calculations. Now, this is stereo which means that we only have 2.9 milliseconds/frame. In each frame we have to detect sine waves, extract them relocate them to other positions. Typically we have around ~600 peaks per frame. That leaves us about 4.8 microseconds per peak. Each peak must be detected, extracted, repositioned, resampled and added to the final frame again. Currently I manage to do this in 13 microseconds. And now the push is on. Can we speed this further up with a factor 2.7 ?

BpmDj at Chaos Communication Camp 2015

This year we will again be at the Chaos Communication Camp 2015 (which takes place around Berlin)

At CCC 2011, we gave a talk on how BpmDj performs its audio analysis. Two years later, at OHM 2013, we explained how the nearest neighbor detection and associated weight matrix is created. This year, we won’t talk about the project anymore, but instead give you the opportunity to meet the developers.

Actually, we want you to come to us with ~100 tracks and an idea for a mix. We will then sit together and create that mix. As a reward you will receive one of our heat sensitive ‘stay-tuned-stay-sharp-keep-mixing’ cups.

11782341_10205654209527497_5904057869868228386_o

Updated version of the audiosplitter

The old VCC/2 line, which I originally made with a second opamp has been replaced with a 100K resistor pair. Not the best solution because now it hums even louder. The grounds and the opamp bias have been properly decoupled this time (still hum). Some of the capacitor values have been lower in cutoff frequency (still hum). I tried placing a resistor over the input to remove the hum. That works if the resistor is ~680 Ohm. Yet in that case, if there is an input signal, it is barely amplified (no hum, no signal). Putting the entire thing in a metal box did not do a thing. So no pickup of magenetic fields (still hum). Replacing the powersupply with a batterypack resulted in >huray< no hum ! So it is most certainly a power supply problem. Hum removal is a non trivial problem. Grmpf.

11802511_10205599263433879_911238989618258279_o

IAB startSetup NullPointerException

Another fine example of Googles ‘write once, let others fix our problems’. Even at this moment (June 2014) the ‘patch’ is still not in the released sdk. To solve the problem replace

 if (!mContext.getPackageManager().queryIntentServices(serviceIntent, 0).isEmpty()) {

with

  PackageManager pm=mContext.getPackageManager();
  List<ResolveInfo> intentServices = pm.queryIntentServices(serviceIntent, 0);
  if (intentServices != null && !intentServices.isEmpty())

Then in the dispose code

replace

  if (mContext != null) mContext.unbindService(mServiceConn);

with

  if (mContext != null && mService!=null) mContext.unbindService(mServiceConn);

I hope this helps.

The Symbian/Qt/Nokia platform. A total nightmare.

In June/July 2011 I had the misfortune to program for a Symbian/Nokia phone. Really bad experience. Below  a list of all the shit I had to go through to get QtCreator working somewhat.

  • crappy error messages. ‘a data abort exception has occured’
  • qml is a complete paradigm shift
  • unstable operating system. ‘it might be in an unstable state if you interrupt the working of this program’
  • version control unfriendly. Often a file added by somebody else must be readded in the repository which leads to duplicate entries in the project file.
  • memory mapping of large files doesnt work
  • memory requirements are too stringent
  • debugger doesn’t work. One always gets memorydumps without access to the symbols.
  • bloody slow compilation
  • the X7 Symbian 3 phone is slow.
  • Try to get the audiostream from a decoder. With phonon it should be possible but it doesnt work.
  • just click on the ‘documentation’ tab left. You get an error ‘Die Seite konnte nicht gefunden werden ‘qthelp://com.nokia.qtcreator.220/qdoc//doc/index.html
  • sometimes code gets hidden and cannot be unhidden unless the project is opened and closed.
  • how can one create a subfolder ?
  • copying files to and from the phone more often than not does not work.
  • try to use phonon or qtmultimedia to access the decoded part of a video !
  • searching in all project files simply doesn’t work.
  • qt creator often seems to require compilation twice.  ‘build’ and then ‘run’, leads to a rebuild.
  • no linux, nor vmware. You must program in windows
  • QtCreator crashes when there are more than 4000 error messages from the compiler.
  • sometimes when adding a new file, it insists to add it somewhere in a subdirectory.
  • The arm processor in those phones is not fully functional. For instance the ‘smull’ and ‘adc’ instructions are not supported. Mainly because it is based on a too old model of the processor.
  • ‘piss-poor’ headphone volume; something many buyers noted as well
  • Filenames (without their paths) are used to identify files. So the same filename at twop different locations is treated by the make system as the same file.
  • How to set the volume of th phone ?  Yes a truly horendous hack by obtaining the address of a undocumented function and then hoping that it will actually point to the right thing ! http://bugreports.qt.nokia.com/browse/QTMOBILITY-830
  • No support from Nokia what_so_ever. Even if you are hired by them (which I inderectly was !)

I was so happy that I could stop programming for/on this utter swamp of a platform.