Entwickler-Ecke

Multimedia / Grafik - Tonhöhe ändern von Wave-Datei, Algorithmus


ssb-blume - Do 11.12.14 11:18
Titel: Tonhöhe ändern von Wave-Datei, Algorithmus
Hallo,

Kennt jemand den Algorithmus zum Ändern der Tonhöhe von wav-Dateien?
Die Samplerate will ich nicht ändern.
Ich kenne Audacity, muß aber ca. 6000 Dateien ändern, da muß unbedingt ein
eigenes Programm her.

Hilfe wäre sehr nötig!

Hansi


WasWeißDennIch - Do 11.12.14 11:30

Da fällt mir spontan BASS [http://www.un4seen.com/] bzw. BASS FX ein, damit müsste es gehen.
Zitat:
BASS FX 2.4.11
An extension providing several effects, including reverse playback and tempo & pitch control. C/C++, Delphi, and Visual Basic APIs are included.


Sinspin - Do 11.12.14 14:57

Pitch control würde aber darauf hinauslaufen alle Dateien neu zu samplen. Also einlesen, samplen, schreiben.

Ein anderer Ansatz ist die Information über die Samplerate die im Header der WAV-datei steht. Ich weis aber nicht ob man die auf einen beliebigen Wert ändern kann oder nur Oktavenweise. Ist schon 10 Jahre :bawling: her das ich mich damit das letzte mal befasst habe.


GuaAck - Do 11.12.14 22:01

Hallo,

samplerate ändern oder einlesen und einfach neu samplen bewirkt bei einer Absenkung der Tonhöhe, dass das Musikstück dann länger dauert.

Verfahren zur Änderung nur der Tonhöhe sind viel komplizierter. Fourier-Transformation (FFT), dann Frequenzen neu setzen und inverse FFT ist ein möglicher Ansatz. Aber es gibt auch Ansätze über neuronale Netzwerke. Ich würde mal die in dem unten angeführten Link beschriebene Tools näher ansehen.

Ich hatte vor 10 Jahren mal viel mit WAV (unter Delphi 7) zu machen, außer der BASS.DLL kaum was gefunden. Da habe ich mir eine eigene Klasse "WAVDatei" gemacht. Kann ich Dir gerne schicken. Das größere Problem ist bestimmt der Algorithmus.

Frag doch mal bei Audacity an. Eine Stapelbearbeitung haben die ja drin. Es müsste nur so wie z. B. bei XNVIEW (für Bilder) sein, dass man eine Befehlssequence auf eine ganze Reihe von Dateien anwenden kann.

Gruß
Guaack


http://de.audiofanzine.com/pitch-shifter-time-stretcher/artikel/leitartikel/time-stretching-und-pitch-shifting-teil-i.html


Delete - Fr 12.12.14 04:40

Auszug aus der Audacity-Hilfe unter Chains - for batch processing and effects automation

How to use Chains
There are two related Chain commands in the File Menu called Edit Chains and Apply Chain. Look first at Edit Chains to determine if an existing Chain (Audacity only ships with one) will suit your needs or to create a new chain. Next, use Apply Chain to perform the action on your selected audio.
The two uses of Chains are for:
1. Batch processing (where many audio files are processed unattended with one or more effects then exported to a new file)
2. Effects automation (where the selected audio in the track or tracks in the current project is subjected to the same prescribed sequence of effects, and optionally, a file exported from the entire audio.)
See the examples below.


Delete - Sa 13.12.14 23:00

Suche: VST pitch shift

http://stackoverflow.com/questions/7251563/algorithm-smbpitchshift-pascal
http://www.axiworld.be/vst.html
http://www.tobybear.de/files.html
http://www.un4seen.com/filez/5/bass_vst24.zip
http://sourceforge.net/projects/delphiasiovst/
http://www.dspdimension.com/admin/time-pitch-overview/


ssb-blume - So 14.12.14 09:23

Ich hatte das Thema schon als erledigt gekennzeichnet. Habe eine Funktion gefunden:

* NAME: smbPitchShift.cpp
* VERSION: 1.2
* HOME URL: http://www.dspdimension.com
* COPYRIGHT 1999-2009 Stephan M. Bernsee <smb [AT] dspdimension [DOT] com>
* See http://www.dspguru.com/wol.htm for more information.

Nochmal vielen Dank an alle!

Hansi