Skip to content

Instantly share code, notes, and snippets.

View peterj35's full-sized avatar

Peter peterj35

View GitHub Profile
@peterj35
peterj35 / wavesuferWaveformDataOnServer.md
Created August 11, 2020 01:16
How to generate waveform data on the server? - from https://wavesurfer-js.org/faq/

How to generate waveform data on the server?

You can use the audiowaveform program. For example, let's generate peaks for a MP3 file called 'long_clip.mp3'.

Generate JSON-formatted peaks data from the file long_clip.mp3:

audiowaveform -i long_clip.mp3 -o long_clip.json --pixels-per-second 20 --bits 8

Then normalize the peak data so the values stay between 0 and 1 using the Python script below:

// Camera.h -- defines and such for a 3rd person camera
// NOTE: must include quakedef.h first
#ifndef _CAMERA_H_
#define _CAMEA_H_
// pitch, yaw, dist
extern vec3_t cam_ofs;
// Using third person camera
extern int cam_thirdperson;