Xcode 8.1 beta 3 – AQDefaultDevice messages [duplicate]

A cleaner solution (than the one given by user6026720) that fixes Simulator logs without affecting Device logs is available at https://stackoverflow.com/a/39651073/1033581: Under Product > Scheme > Edit Scheme… > Run, set the OS_ACTIVITY_MODE environment variable to ${DEBUG_ACTIVITY_MODE} so it looks like this: Go to your project build settings, and click + to add a User-Defined … Read more

Reading MIDI files in Java

I’ve never looked deeply into the MIDI support in Java, and the last time I played seriously with MIDI programming was when Commodore Amiga was king. It looks like you may have to do quite a bit of manual work. Here’s a crude example that interprets all NOTE_ON and NOTE_OFF events, for the rest of … Read more

How to split video or audio by silent parts

You could first use ffmpeg to detect intervals of silence, like this ffmpeg -i “input.mov” -af silencedetect=noise=-30dB:d=0.5 -f null – 2> vol.txt This will produce console output with readings that look like this: [silencedetect @ 00000000004b02c0] silence_start: -0.0306667 [silencedetect @ 00000000004b02c0] silence_end: 1.42767 | silence_duration: 1.45833 [silencedetect @ 00000000004b02c0] silence_start: 2.21583 [silencedetect @ 00000000004b02c0] silence_end: … Read more

Java equivalent of C# system.beep?

You can use this: java.awt.Toolkit.getDefaultToolkit().beep(); EDIT If you are trying to play anything of duration and with different sounds you should really look into the Java MIDI library. The default beep won’t be able to meet your needs as you can’t change the length of the beep. http://www.oracle.com/technetwork/java/index-139508.html

How to join two wav files using python?

Python ships with the wave module that will do what you need. The example below works when the details of the files (mono or stereo, frame rates, etc) are the same: import wave infiles = [“sound_1.wav”, “sound_2.wav”] outfile = “sounds.wav” data= [] for infile in infiles: w = wave.open(infile, ‘rb’) data.append( [w.getparams(), w.readframes(w.getnframes())] ) w.close() … Read more

Detecting whether a headset is plugged into an Android device or not.

You can use the broadcast receiver. So, You might write this code in “AndroidManifest.xml” <receiver android:name=”com.juno.brheadset.HeadsetStateReceiver”> <intent-filter> <action android:name=”android.intent.action.HEADSET_PLUG”/> </intent-filter> </receiver>–> But, This doesn’t work. When OS send this “HEADSET_PLUG” intent, OS set the flag “Intent.FLAG_RECEIVER_REGISTERED_ONLY” So, You should write the code like below in Activity or Service class instead of “AndroidManifest” things. public class … Read more

multiple audio html : auto stop other when current is playing with javascript

you can use event delegation. Simply listen to the play event in the capturing phase and then pause all video file, but not the target one: document.addEventListener(‘play’, function(e){ var audios = document.getElementsByTagName(‘audio’); for(var i = 0, len = audios.length; i < len;i++){ if(audios[i] != e.target){ audios[i].pause(); } } }, true);

Chord detection algorithms?

This is quite a good Open Source Project: https://patterns.enm.bris.ac.uk/hpa-software-package It detects chords based on a chromagram – a good solution, breaks down a window of the whole spectrum onto an array of pitch classes (size: 12) with float values. Then, chords can be detected by a Hidden Markov Model. .. should provide you with everything … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)