MathGroup Archive 2007

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

Search the Archive

Re: Exporting Sound

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83878] Re: Exporting Sound
  • From: Jerry <JLK2941 at yahoo.com>
  • Date: Mon, 3 Dec 2007 05:49:04 -0500 (EST)
  • References: <fireum$s1h$1@smc.vnet.net> <fitt1j$6pv$1@smc.vnet.net>

Sir, thanks for your tip on recording a midi file.

Funny though, when I use

ding = SoundNote["F", 1, "Tinklebell"];

Sound[ding]

I play it in V6 and I hear the note.
Then I record it to a file as you suggest:

Export["ding.mid", Sound[ding], "Sound"]

I then double click ding.mid in the directory where it was 
placed and I get MediaPlayer and I hear a sound. But, it's 
clearly not the same sound. It's the same length and type 
but it's at a higher frequency. Any idea why?

Thanks

Hans Michel wrote:
> Helen:
> Try
> ding = SoundNote["F", 1, "Tinklebell"];
> Export["C:\ding.mid", Sound[ding], "Sound"]
> 
> What tipped me off to the format was what is in the General Help File for 
> SoundNote.
> 
> "Style ... represents General MIDI instrument"
> 
> Now how to get MIDI sound to a Wave format?
> 
> There is an example Under Sound > EXAMPLES > Applications
> data = SystemDialogInput["RecordSound"]
> 
> This opens a dialog box to record a sound. The Input is a Sound Driver but 
> then how do you record the ding which you would play in Mathematica?
> 
> There must be an easier way?
> 
> Note that "Wav" format is primarily a Windows audio format that plays in 
> Windows Media Player, but Windows Media Player can also play MIDI files.
> 
> There are some free introductory software that can read MIDI files
> 
> Like http://www.finalemusic.com/notepad/ (can it export to Wave?)
> 
> There are many that will convert MIDI to Wave.
> 
> Hans
> 
> "Helen Read" <hpr at together.net> wrote in message 
> news:fireum$s1h$1 at smc.vnet.net...
>> 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?
>>
>> -- 
>> Helen Read
>> University of Vermont
>>
> 
> 


  • Prev by Date: Presentations Package Announcement
  • Next by Date: Re: Hiding number cell
  • Previous by thread: Re: Exporting Sound
  • Next by thread: Re: Exporting Sound