Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Exporting Sound

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83854] Re: Exporting Sound
  • From: Szabolcs Horvát <szhorvat at gmail.com>
  • Date: Sun, 2 Dec 2007 04:15:08 -0500 (EST)
  • References: <fireum$s1h$1@smc.vnet.net>

Helen Read wrote:
> Has anyone succeeded in exporting sounds (as .wav) from v.6? The 
> documentation indicates that this is possible, but I could not find a 
> single example of how to actually do it.
> 
> As a simple example (I'm actually working with far more complicated 
> sounds), try this.
> 
> ding = SoundNote["F", 1, "Tinklebell"];
> 
> Sound[ding] brings up a GUI for playing the ding sound.
> 
> EmitSound[Sound[ding]] can be used to play the sound programatically.
> 
> But what is it that I'm supposed to export?
> 
> Export["ding.wav",ding] does not work,
> 
> nor does Export["ding.wav",Sound[ding]]
> 
> nor does Export["ding.wav",EmitSound[Sound[ding]]]
> (I admit this last was a longshot, but I tried everything I could think of.)
> 
> Depending on whether I try to export the SoundNote itself, or the Sound, 
> or the EmitSound, I get error messages like:
> 
> First::normal: Nonatomic expression expected at position 1 in First[None].
> 
> Or:
> 
> Export::nodta: "Null contains no data that can be exported to the WAV 
> format."
> 
> Or:
> 
> Export::nodta: <<1>> contains no data that can be exported to the
> WAV format."
> 
> So again, what is that I'm supposed to export?

SoundNotes cannot be exported to WAV.  Export to MIDI instead.  The WAV 
file can contain any kind of waveform, while the MIDI file contains the 
sequence of notes to be played back.  (The MIDI will sound different 
depending on the equipment used for playback.)

-- 
Szabolcs


  • Prev by Date: Re: Vieta infinite product formula
  • Next by Date: Re: a definite integral
  • Previous by thread: Re: Exporting Sound
  • Next by thread: Re: Exporting Sound