Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2006

Tip: Looking for answers? Try searching our database.

midi music fade out: how?

Thread view: 
wanwan - 02 Nov 2006 17:24 GMT
I'm using sun.audio.AudioPlayer class to play midi file in the
representation of AudioStream

I found no built in function that can do a fade out.

I thought about modifying the stream and reduce the amplitude
gradually, but I don't know how to.  

Please help.
Andrew Thompson - 02 Nov 2006 17:46 GMT
> I'm using sun.audio.AudioPlayer class

*

>...to play midi file in the
> representation of AudioStream

* That is an obscure class!  How did you find out about it?
Why not use some of the (at least publicly documented)
classes from the javax.sound.midi package?
<http://java.sun.com/j2se/1.5.0/docs/api/javax/sound/midi/package-frame.html>

> I found no built in function that can do a fade out.
>
> I thought about modifying the stream and reduce the amplitude
> gradually, but I don't know how to.

I doubt you will, not without going into the MIDI
sequence itself and altering the note velocities**.
Note that some 'OS level' players cannot alter the
level of MIDI playback because the programmers
either could not, or did not, hook into the sound
card's synthesizer volume control (which is quite
distinct from the channel through which you might
hear MP3's, MPEG soundtracks, WAV's..).

** Though that is a bit of a WAG.

Andrew T.
Oliver Wong - 02 Nov 2006 18:04 GMT
> I'm using sun.audio.AudioPlayer class to play midi file in the
> representation of AudioStream
[quoted text clipped - 5 lines]
>
> Please help.

   When I google for "fade out midi java", I get
http://jmusic.ci.qut.edu.au/jmtutorial/BandMachine.html which has some
source code demonstrating fading in and out MIDI.

   - Oliver
Jeff - 02 Nov 2006 21:58 GMT
> > I'm using sun.audio.AudioPlayer class to play midi file in the
> > representation of AudioStream
[quoted text clipped - 11 lines]
>
>     - Oliver

Since you are using a midi file, most sequencer software will allow you
to apply a fade over a specified time. PowerTracks Pro is relatively
inexpensive ($49) and can perform many additional features you may wish
to use later. Alternatively, I haven't used it, but MidiYodi appears to
be a freeware program that can fade a midi file.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.