waveform

How do I convert a string of hexadecimal values to a list of integers?

时光毁灭记忆、已成空白 提交于 2019-11-30 16:54:28
问题 I have a long string of hexadecimal values that all looks similar to this: '\x00\x00\x00\x01\x00\x00\x00\xff\xff\x00\x00' The actual string is 1024 frames of a waveform. I want to convert these hexadecimal values to a list of integer values, such as: [0, 0, 0, 1, 0, 0, 0, 255, 255, 0, 0] How do I convert these hex values to ints? 回答1: You can use ord() in combination with map(): >>> s = '\x00\x00\x00\x01\x00\x00\x00\xff\xff\x00\x00' >>> map(ord, s) [0, 0, 0, 1, 0, 0, 0, 255, 255, 0, 0] 回答2:

How to Get a soundcloud like waveforms in Android

送分小仙女□ 提交于 2019-11-30 13:58:16
I have generated a simple waveform like the picture below with my code. But I want to give more gap between each line I want it to be like the soundcloud waves like the picutre below. Here is my code: public class VisualizerView extends View { private static final int LINE_WIDTH = 15; // width of visualizer lines private static final int LINE_SCALE = 55; // scales visualizer lines private List<Float> amplitudes; // amplitudes for line lengths private int width; // width of this View private int height; // height of this View private Paint linePaint; // specifies line drawing characteristics //

High quality graph/waveform display component in C#

﹥>﹥吖頭↗ 提交于 2019-11-30 13:34:09
I'm looking for a fast, professionally looking and customizable waveform display component in C#. I'm wanting to display mainly real-time audio waveforms (fast!) in both time and frequency domain. I would like the ability to zoom, change axis settings, display multiple channels, customize the feel and colors etc... Anybody knows of anything, whether commercial or not? Thank you! Diego I bumped into a code project awhile ago that was doing this. Check out http://www.codeproject.com/KB/miscctrl/GraphComponents.aspx it may be what you are looking for to do real-time graphing in .net as far as i

How to make waveform rendering more interesting?

半世苍凉 提交于 2019-11-30 00:24:39
I wrote a waveform renderer that takes an audio file and creates something like this: The logic is pretty simple. I calculate the number of audio samples required for each pixel, read those samples, average them and draw a column of pixels according to the resulting value. Typically, I will render a whole song on around 600-800 pixels, so the wave is pretty compressed. Unfortunately this usually results in unappealing visuals as almost the entire song is just rendered at almost the same heights. There is no variation. Interestingly, if you look at the waveforms on SoundCloud almost none of

High quality graph/waveform display component in C#

纵饮孤独 提交于 2019-11-29 19:08:18
问题 I'm looking for a fast, professionally looking and customizable waveform display component in C#. I'm wanting to display mainly real-time audio waveforms (fast!) in both time and frequency domain. I would like the ability to zoom, change axis settings, display multiple channels, customize the feel and colors etc... Anybody knows of anything, whether commercial or not? Thank you! Diego 回答1: I bumped into a code project awhile ago that was doing this. Check out http://www.codeproject.com/KB

drawing waveform - converting to DB squashes it

感情迁移 提交于 2019-11-29 12:48:49
I have a wave file, i have a function that retrieves 2 samples per pixel then i draw lines with them. quick and painless before i deal with zooming. i can display the amplitude values no problem that is an accurate image of the waveform. to do this i used the following code //tempAllChannels[numOfSamples] holds amplitude data for the entire wav //oneChannel[numOfPixels*2] will hold 2 values per pixel in display area, an average of min amp, and average of max for(int i = 0; i < numOfSamples; i++)//loop through all samples in wave file { if (tempAllChannels[i] < 0) min += tempAllChannels[i];//if

How to render audio waveform?

浪子不回头ぞ 提交于 2019-11-29 11:02:52
Is there any audio/programming-related stack-exchange site? I'm trying to make a wave form in WinForms What algorithm should I use? For example, if I have 200 samples per pixel (vertical line), should I draw the lowest and the highest sample from that portion of 200 samples? Or should I draw average of low and high samples? Maybe both in different colors? Try dsp.stackexchange.com At 200 samples per pixel, there are several approaches you can try. Whatever you do, it often works best to draw each vertical line both above and below 0, ie. treat positive and negative sample values seperately.

Reading an audiofile and displaying the waveform with Java.

寵の児 提交于 2019-11-29 08:43:05
Can anyone advise me on how I could read an audio file, store it in a byte array and proceed to display its waveform? My knowledge of Java is very basic. If anyone can link me to learning materials for Java audio programming it would be great. Bjorn Roche Both your questions have been answered on SO. See my answers to these questions: Basics of audio and java: How can I create a sound file in Java Drawing waveforms and waveform overviews: How can I draw sound data from my wav file? You will need to understand some basics about Pulse Code Modulation, as that is how waves are represented

Saving each WAV channel as a mono-channel WAV file using Naudio

可紊 提交于 2019-11-29 07:29:26
I'm trying to convert a WAV file(PCM,48kHz, 4-Channel, 16 bit) into mono-channel WAV files. I tried splittiing the WAV file into 4 byte-arrays like this answer and created a WaveMemoryStream like shown below but does not work. byte[] chan1ByteArray = new byte[channel1Buffer.Length]; Buffer.BlockCopy(channel1Buffer, 0, chan1ByteArray, 0, chan1ByteArray.Length); WaveMemoryStream chan1 = new WaveMemoryStream(chan1ByteArray, sampleRate, (ushort)bitsPerSample, 1); Am I missing something in creating the WAVE headers ? Or is there more to splitting a WAV into mono channel WAV files ? The basic idea

How to make waveform rendering more interesting?

风格不统一 提交于 2019-11-28 22:11:27
问题 I wrote a waveform renderer that takes an audio file and creates something like this: The logic is pretty simple. I calculate the number of audio samples required for each pixel, read those samples, average them and draw a column of pixels according to the resulting value. Typically, I will render a whole song on around 600-800 pixels, so the wave is pretty compressed. Unfortunately this usually results in unappealing visuals as almost the entire song is just rendered at almost the same