jeudi 1 janvier 2015

Equalizer from audio data

I have a mp3 file, so I need to play it, and display an equalizer (like in attached image).

So playing is not problem, but I have no idea how to measure power of current playing sample's dBs based on frequency.


By which steps I can get data for displaying dBs of current sample?

As I guess, I need to get some array of powers in different frequencies, am I right?


enter image description here


Play any audio file using vba excel

and happy New Year.


I have currently a piece of code wich can read most audio files (including wav, mp3, midi...), but it wont work if there are spaces in the path or File name.


so i have to revert to my other code wich accepts it, but read only wav files...


this is th code for reading all type of audio :



Option Explicit

Private Declare PtrSafe Function mciSendString Lib "winmm.dll" Alias _
"mciSendStringA" (ByVal lpstrCommand As String, ByVal _
lpstrReturnString As Any, ByVal uReturnLength As Long, ByVal _
hwndCallback As Long) As Long

Private sMusicFile As String
Dim Play

Public Sub Sound2(ByVal File$)

sMusicFile = File 'path has been included. Ex. "C:\3rdMan.mp3"

Err.Clear
On Error Resume Next

Play = mciSendString("play " & sMusicFile, 0&, 0, 0)
If Play <> 0 Or Err.Number <> 0 Then 'this triggers if can't play the file
Err.Clear
'Play = mciSendString("'play " & sMusicFile & "'", 0&, 0, 0) 'i tried this aproach, but doesn't seem to work
End If
Err.Clear
On Error GoTo 0
End Sub


Public Sub StopSound(Optional ByVal FullFile$)
Play = mciSendString("close " & sMusicFile, 0&, 0, 0)
End Sub


Any help much appreciated, (i don't want workaround with external player popup, nor wich i can't stop from playing with vba)


Pleasant beep noise like Spotify app?

I know most people despise the sound, but I am looking for a pleasant beep sound similar to the one that spotify uses in their iOS app. The noise occurs when the app is in the background state (when the playback buttons are tapped via control center).


how to turn off annoying beep in fedora gnome when returning from suspend

When going to suspend mode and when returning from it (using opening and closing the lid) Gnome Shell 3.14.2 on Fedora 21 does beeps annoyingly every-time and I had no luck finding how to turn this beep off, while the rest of sound should remain untouched.


Web audio delay node seems to crash when trying to add a feedback loop

I've been playing around with web audio for about a week and found an article that discussed using a feedback loop with the delay node to make an echo effect. When adding the delay, it works perfectly for a single, one shot copy, but when adding in the two lines for linking the feedback (gain node) back into the delay node to create the looping echo effect no sound plays at all.



<html>
<body>
<script>

var audioCtx = new (window.AudioContext || window.webkitAudioContext)();

oscillator = audioCtx.createOscillator();
oscillator.type = 'sawtooth';
oscillator.frequency.value = 50;

var delay = audioCtx.createDelay();
delay.delayTime.value = 0.5;

var feedback = audioCtx.createGain();
feedback.gain.value = 0.8;

//delay.conncect(feedback);
//feedback.connect(delay);

oscillator.connect(delay);
oscillator.connect(audioCtx.destination);
delay.connect(audioCtx.destination);

oscillator.start();
</script>
</body>
</html>


Like this it works, but if you uncomment those two lines it breaks.


The article I was following is here: http://ift.tt/1kY3Odj


Also, as it might matter, I'm using Chrome Version 39.0.2171.95 m


Record audio with Web Audio Api

I have a web app that plays many mp3s in parallel implemented with Web Audio API. I want to make the user able to record everything that comes out of the Master Node of the node chain (the recording starts with a button click and ends the same way) and download it as wav (or any other format).


I don't want to record the microphone of the user's pc, I want to record what the app is playing at the moment.


Can anyone help me ?


manager.setSpeakerphoneOn(true) not working for tablet


manager.setSpeakerphoneOn(true);


works for mobile phones but does not works for tablet. The sound does not plays from the speaker. Does anybody knows why? Please Help