Skip to main content

Posts

Howto: Design and Code a Music Visualizer

Just here for code? Look no further.
What is a Music Visualizer? A generation of visuals based on the music. demo



How to Implement a Music Visualizer?
Processing the audio file and run a Fourier transformation on audio data to get information about the original sound wave (amplitude and frequency)Store this data Output a visual based on the stored data when music is played
Things to Think About Before CodingHow to play the sound?How to implement Fourier transformation?How to interpret information from the Fourier transformation?How to sync visual with music?What does the data in an audio file represent? 
How I Implemented my Music Visualization Software

I wrote my visualization software in c and used the SDL2 sound API to play an audio WAV file.  To compute the Fourier Transformation I used FFTW, a C routine library known for efficiently computing Discrete Fourier (DFT) Transformations.  My visuals (power spectrum from selected frequencies) is outputted to the Linux Terminal.



Using DFT Res…
Recent posts

MMC2 Linux Device Tree Configuration For SD CARD on ARM PART ii

This blog entry is useful for ARM microprocessors running Kernel versions 4.4.16-ti-rt and newer. For configuring mmc2 on earlier kernel versions go to part I of this topic: MMC2 Linux Device Tree Configuration For ARM PART i

What has changed since earlier kernel releases?There has been a recent changes (end of last year) to the dt bindings for eDMA3.  Older kernels used DEPRECATED binding for DTS files.  The old bindings were ti,edma3-tpcc/ti,edma3-tptc.  And to get mmc2 (labeled mmc3 in dts files) to work properly you must use theti,edma-xbar-event-map property for edma:
&mmc3 { vmmc-supply = <&vmmcsd_fixed>; ti,dual-volt; ti,needs-special-reset; ti,needs-special-hs-handling; pinctrl-names = "default"; pinctrl-0 = <&mmc3_pins>; cd-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; cd-inverted; bus-width = <4>; max-frequency = <25000000>; dmas = <&edma 12 &…

MMC2 Linux Device Tree Configuration For SD CARD on ARM PART i

Update: 
This blog is useful for ARM microprocessors running Linux Kernel versions 4.1.2-ti-r4 to 4.4.0. It could still be relevant for earlier kernel releases but earlier releases have not been tested.If your ARM microprocessor is running kernel's4.4.16-ti-rt and newer go to part II:MMC2 Linux Device Tree Configuration For ARM PART ii
Interfacing a second SD card reader to the Beaglebone Black I could not find any tutorials or guides in forums on how to interface another SD card to the beaglebone black, so I thought I'd share and show you how I got mine up and running.  I won't explain the device tree bindings in detail but you can use my solution as a reference.Firstly, my beaglebone black, at the time, was running the 4.1.2-ti-r4 Linux Kernel.  And I was interfacing Digilent's PmodSD: Full-sized SD Card Slot to the mmc2 lines of the microprocessor.The PmodSD reference manual can be found here.Schematics are always fun to look at: AM335x schematics

MMC2 PINMUX CONFIGUR…