Mathematica: WAV dosyalarını düzenleme ve kaydetme
Wolfram Mathematica ile WAV dosyalarını içe aktarabilir, analiz edebilir, düzenleyebilir ve dışa aktarabilirsiniz. Size nasıl yapılacağını anlatacağız.
WAV dosyalarını Mathematica'ya aktarma
"Audio = İçe Aktar [yol, komut]" basit komutuyla WAV dosyalarından Mathematica'ya veri aktarabilirsiniz. Yol ve komutun alıntılanması gerekir. Kolay galeri girişi için yardım resim galerisinde verilmiştir. WAV dosyasının çeşitli öğelerini aşağıdaki komutlarla yükleyebilirsiniz:
- "Elements" size WAV dosyasının hangi bilgilerini Mathematica'ya aktarabileceğinizi gösterir
- "AudioChannels", WAV dosyasına katıştırılmış kanal sayısı hakkında sizi bilgilendirir.
- "SampleRate" örnekleme hızını verir
- "AudioEncoding", örneklerin nasıl kodlandığını gösterir. Kural olarak, değer "Integer16" ve "Integer32" arasında, yani 16 ila 32 bitlik tamsayılarda bulunur. 4 ila 64 bit arasında kodlama yapmak mümkündür.
- "Veri", her satırdaki bir kanalın RAW verilerini içeren bir matristir. Uyarı: Bu matris tüm ses malzemelerini içerdiğinden, bazen çok büyük olabilir. 4 GB'a kadar olan dosyalar yüklenebilir. Burada kesinlikle ";" verinin çıktısını bastırma. Matrise "ses" adını verdiğiniz için, onunla çalışmaya devam edebilirsiniz.
- "Ses" kullanmak Mathematica, sesi çalmak için dalga formu ve spektrum ekranı ve küçük bir oynatıcı içeren dosyayı yükler.
- "Kurallar" ile tüm bilgiler bir matrise aktarılır. Altı satır bu sırada "AudioChannels", "AudioEncoding", "Data", "SampledSoundList", "SampleRate" ve "Sound" öğelerini içerir. Dikkat: Bu matris ses dosyasının kendisinden önemli ölçüde daha büyük olduğundan, verileri kesinlikle bir ";" bastırmak.
Mathematica'da WAV dosyalarını analiz etme ve düzenleme
"Veri" kullanılarak içe aktarılan RAW verileri, Mathematica'da diğer tablolar gibi kullanılabilir ve düzenlenebilir. Aşağıdaki komutlar özellikle ses materyalleri için ilginçtir:
- Artık "ses" matrisinde herhangi bir değeri görüntüleyebilir ve istediğiniz gibi değiştirebilirsiniz.
- "Boyutlar [ses]" size satır ve sütun sayısını, yani kanal başına örnek sayısını verir.
- "Area = Take [ses [[X, Tümü]], {başlangıç değeri, bitiş değeri}];" X kanalının bir bölümünü kaldırabilirsiniz.
- "Spektrum Fourier [alan] =;" bu bölümün Fourier analizini yapar.
- Spektral bileşenleri istediğiniz zaman değiştirebilirsiniz.
- "Re [spektrum]", "Im [spektrum]", "Abs [spektrum]" ve "Arg [spektrum]" spektral bileşenlerin gerçek kısmını, hayali bölümünü, genliğini ve fazını verir.
WAV dosyalarını Mathematica'dan dışa aktarma
Değiştirilen ses verilerini tekrar WAV dosyası yapmak için "Dışa Aktar [yol, komut]" girin. WAV dosyasını doğru ayarlamak için aşağıdaki komutları kullanın:
- Dışa aktarmadan önce "ses / = Maks [Abs [ses];]" kullanmalısınız | 1 | normalleştirmek. 1'in üzerindeki ve -1'in altındaki değerler geçersiz kılınır.
- "" SampleRate "-> 44100", ses malzemesini saniyede 44100 örnekte dışa aktarır.
- "" AudioEncoding "->" Integer16 "" ses dosyasını örnek başına 16 bit ile kodlar.
- "" AudioChannels "-> 2" ile ses malzemesi daha fazla kanal içeriyor olsa bile, yalnızca ilk 2 kanalın dışa aktarılmasını sağlayabilirsiniz.
Wolfram Alpha ile ilgili ipuçlarını burada bulabilirsiniz. Audacity programı ile çalışma. burada açıklıyoruz.
En son videolar
Mathematica'ya yol girmek biraz sıkıcıdır: yollar tırnak işaretleri içine alınır ve klasörler eğik çizgi simgesiyle "/" değil, iki eğik çizgi "\\" ile ayrılır. Yolu Explorer'dan kopyalamak burada işe yaramıyor.
En kolay yol "Ekle" -> "Dosyayolu kullanmaktır
"seçin ... "Filepath
"seçin ...">
"Filepath
"seç ..." />
"seç ..." />
ve burada explorer penceresinde istediğiniz dosyaya gidin. Mathematica daha sonra dosya yolunu doğru yazımla not eder.