2013-11-04 8 views
8

Sto cercando di convertire un file in un file MIDIWAV, su OS X.Converti in WAV utilizzando fluidsynth su OS X

Finora, ho questo:

fluidsynth -F output_sound soundfont.sf2 note.mid 

Questo crea un file output_sound, tuttavia, che il file non è WAV, sembra di essere in formato sint16 dato che ottengo questo output:

~ $ fluidsynth -O help 
FluidSynth version 1.1.6 
Copyright (C) 2000-2012 Peter Hanappe and others. 
Distributed under the LGPL license. 
SoundFont(R) is a registered trademark of E-mu Systems, Inc. 

-O options (audio file format): 
    's16' 

c'è un wa facile y per convertire lo output_sound in un file WAV nel Terminale (o in qualsiasi forma di script)? .

+0

Con [SoX] (http://sox.sourceforge.net/). –

+0

@CL .: grazie, ha funzionato. Pubblicato il comando esatto in una risposta nel caso in cui qualcuno lo trova utile – houbysoft

+0

come? Ho cercato il sito web SOX per "midi" e ho trovato 0 successi – dermen

risposta

4

Grazie di CL commento sono arrivato fino a questo:

sox -t raw -r 44100 -e signed -b 16 -c 1 raw_audio audio.wav 
+0

Avevo bisogno di impostare -c 2, inoltre ho aggiunto --norm. – dirkk0

+0

dove si trova il file MIDI? – dermen

5

C'è un modo più semplice rispetto all'utilizzo SoX: quando FluidSynth viene installato con il supporto libsndfile, emette WAV per impostazione predefinita.

Ad esempio, utilizzando Homebrew:

$ brew install fluid-synth --with-libsndfile 
... 
$ fluidsynth -T help 
FluidSynth version 1.1.6 
Copyright (C) 2000-2012 Peter Hanappe and others. 
Distributed under the LGPL license. 
SoundFont(R) is a registered trademark of E-mu Systems, Inc. 

-T options (audio file type): 
'aiff','au','auto','avr','caf','flac','htk','iff','mat','mpc','oga','paf','pvf','raw','rf64','sd2','sds','sf','voc','w64','wav','wve','xi' 

auto: Determine type from file name extension, defaults to "wav" 
$ fluidsynth -F output_sound.wav soundfont.sf2 note.mid 
+0

Grazie mille! Tuttavia, ho dovuto reinstallare fluid-synth per farlo funzionare – Bolein95

3

ho trovato la soluzione più semplice per essere timidezza:

timidity input.mid -Ow -o out.wav 

Se si utilizza homebrew è anche banale da installare:

brew install timidity 
+0

Questo ha funzionato per me;) Avevo provato fluidsynth, ma non è riuscito a convertire correttamente i file midi che ho creato usando [python-midi] (https: // github. com/vishnubob/python-midi) ... – dermen