f



midi music fade out: how?

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.

0
ericwan78 (35)
11/2/2006 4:24:33 PM
comp.lang.java.programmer 52714 articles. 1 followers. Post Follow

3 Replies
399 Views

Similar Articles

[PageSpeed] 21

wanwan wrote:
> 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.

0
andrewthommo (3108)
11/2/2006 4:46:39 PM
"wanwan" <ericwan78@yahoo.com> wrote in message 
news:1162484673.714507.24830@i42g2000cwa.googlegroups.com...
> 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.

    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 


0
owong (6177)
11/2/2006 5:04:39 PM
Oliver Wong wrote:
> "wanwan" <ericwan78@yahoo.com> wrote in message
> news:1162484673.714507.24830@i42g2000cwa.googlegroups.com...
> > 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.
>
>     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

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.

0
11/2/2006 8:58:46 PM
Reply:

Similar Artilces:

java.lang.ExceptionInInitializerError: java.lang.ArrayIndexOutOfBoundsException
Hi, I am new to DB2. I am getting this error while loading the DB2Driver. I don't have any idea about where i might have gone wrong. please help me. Below is the stack trace. Stack Trace: java.lang.ExceptionInInitializerError: java.lang.ArrayIndexOutOfBoundsException at COM.ibm.db2.jdbc.app.DB2Driver.SQLAllocEnv(Native Method) at COM.ibm.db2.jdbc.app.DB2Driver.<init>(DB2Driver.java:245) at COM.ibm.db2.jdbc.app.DB2Driver.<clinit>(DB2Driver.java:130) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Cla...

java.lang.StringIndexOutOfBoundsException: String index out of range: 23 at java.lang.String.charAt(String.java:460)
Hi All I am having the torque3.1.jar and postgresql-7.4. I have compiled the new jdbc driver called as postgresql.jar and have placed it in the lib directory from where the ant scripts catch the jars. Whenever i try to access through torque gestList = BaseGestlistPeer.doSelect(new Criteria()); this error arises java.lang.StringIndexOutOfBoundsException: String index out of range: 23 at java.lang.String.charAt(String.java:460) at org.postgresql.jdbc2.ResultSet.toTimestamp(ResultSet.java:1653) at org.postgresql.jdbc2.ResultSet.getTimestamp(ResultSet.java...

java.lang.Set with elements of type java.lang.Set
Roughly I do something along the lines of: Set set = new HashSet(); Set elem = new HashSet(); set.add(elem); // now we change the elem and add it again to the set elem.add(some object here); set.add(elem); I found out the hard way that 'set' may now contain 'elem' either once or twice, the reason being that 'elem.add()' changes the hashCode of elem such that it is not noticed that it is in 'set' already on the 2nd 'set.add()'. Question: What I would actually want is an IdentityHashSet() set = new IdentityHashSet() but this does not...

to use import java.lang.* or import java.lang.Math or none at all?
Hi guys, i knew that by default all java.lang classes will be imported by the compiler during compilation. but, to make it easier for the computer, should i specify which class i really will be using? does this action will boost the performance during compilation and runtime or not a matter at all? the answer to this post will definitely affect my programming style in the future when i'm considering "to import or not to import"... hmm,,, thanks in advance. JPractitioner wrote: > i knew that by default all java.lang classes will be imported by the > compiler during com...

Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object
I downloaded jdk-6u7-solaris-sparcv9.tar.Z and installed it by these commands: # zcat jdk-6u7-solaris-sparc.tar.Z | tar -xf - # pkgadd -d . SUNWj6rtx SUNWj6dvx SUNWj6dmx # /usr/jdk/instances/jdk1.6.0/bin/sparcv9/java -version Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object # ls /usr/jdk/instances/ jdk1.5.0 jdk1.6.0 # uname -a SunOS sun1 5.10 Generic sun4u sparc SUNW,Sun-Blade-2500 Please help to fix the error. Thanks. TsanChung wrote: > I downloaded jdk-6u7-solaris-sparcv9.tar.Z and installed it by these > commands: > # zcat jdk-6u7-so...

2008 computers.lang for java.programmer
jwehnf iuwhhttp://www.freewebs.com/thuiss/http://indianfriendfinder.com/go/g906725-pmem ashik wrote:Sub: 2008 computers.lang for java.programmerYou have nothing of value to anybody here. Pleasestop wasting our bandwidth.Further, please don't become the latest in a long line of perennial spamming f*ckw*t morons who infestthis usenet newsgroup.-- Andrew Thompsonhttp://www.physci.org/Message posted via JavaKB.comhttp://www.javakb.com/Uwe/Forums.aspx/java-general/200711/1 Andrew Thompson wrote:> ashik wrote:> > Sub: 2008 computers.lang for java.programmer> > You have nothing of...

Error occurred during intialization of VM java/lang/NoClassDefFoundError: java/lang/Object
Good day to all, I have installed the j2se/netbeans binary bundle on red hat 9. I can run everything perfectly as root but when I try to compile with any other user I get: Error occurred during intialization of VM java/lang/NoClassDefFoundError: java/lang/Object When I saw this it seemed like a permissions problem but I checked the permissions and everything seemed fine. All users have execute permissions of javac and java. I have read other threads dealing with the same or similar problem but have not reached any solution yet. I would appreciate if anyone that has run into this type o...

CheckBox in Column of JTable: Exception: java.lang.String cannot be cast to java.lang.Boolean
Hello, I have discovered a hidden error. My project was working for awhile, but then I started to get the below error. My error comes from the fact that I'm using a checkbox in a jtable, and I'm using the below "getColumnClass". Thank you, compile: run: Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean at javax.swing.JTable$BooleanRenderer.getTableCellRendererComponent(JTable.java:5412) at javax.swing.JTable.prepareRenderer(JTable.java:5735) at javax.swing.plaf.basic.BasicTableU...

java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
Hi, I'm trying to use the httpclient within Jython (see http://jakarta.apache.org/commons/httpclient/ for more information on the httpclient). My Jython version is: Jython 2.1 on java1.4.2_04 (JIT: null) My Java version is: java version "1.4.2_04" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode) My CLASSPATH includes: jdom.jar xerces.jar jython.jar jt400.jar log4j-1.2.8.jar commons-httpclient-2.0.jar When I just try to perform the import statements from example code I get the error pasted below....

Programmers, Programmers, Programmers, ...
As Steve Balmer correctly stated, while making his monkey dance, it is applications and hence programmers that make a platform. The fact though is that if you want to do professional programming, then Linux is the platform for you. I know that this statement will get the heckels up on a lot of trolls in C.O.L.A, but I have a recent experience that proves this. I am currently working for a Windows only house producing a system that receives and transmits around 1000 telegrams per second in each direction on a UDP socket, translates them into a different format and creates a log entry for each ...

Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object (ant/tomcat/spring)
Hi, I've been trying to get Spring working with ant and tomcat. Ant was building just fine, but I came in today and tried to build it and got this: Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object ?!?! Makes no sense to me. There _is_ an older version of java installed on my machine; but JAVA_HOME and ANT_HOME are set to the correct paths, and <which java>and <java -version> produce the correct version. Any help would greatly alleviate my frustration! Thanks in advance... Courtney ...

Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object (ant/tomcat/spring)
Hi, I've been trying to get Spring working with ant and tomcat. Ant was building just fine, but I came in today and tried to build it and got this: Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object ?!?! Makes no sense to me. There _is_ an older version of java installed on my machine; but JAVA_HOME and ANT_HOME are set to the correct paths, and <which java>and <java -version> produce the correct version. Any help would greatly alleviate my frustration! Thanks in advance... Courtney ...

Best tool for programming music with Java? No MIDI, please!
I'm interested in programming some music with Java, but all of this MIDI stuff is too much. I'm looking for something simpler. I have found these two tools that might help, and I'm wondering if anyone has experience with them. The first tool is jMusic - http://jmusic.ci.qut.edu.au/ The second is JFugue - http://www.jfugue.org Does anyone know from experience the strengths and weaknesses of these? Or if you know of other tools, that would be helpful too. Thanks gang Caz T Dick Baldwin has a tutorial about Java sound. Check out his Web site, http://www.dickbaldwin.com/. doug ...

java.lang vs java.util
Surprising to see something defined in java.lang <http://developer.android.com/reference/java/lang/Iterable.html> depend on something defined in java.util <http://developer.android.com/reference/java/util/Iterator.html>. Surely the hierarchy should go the other way? On 4/1/2011 9:11 PM, Lawrence D'Oliveiro wrote: > Surprising to see something defined in java.lang > <http://developer.android.com/reference/java/lang/Iterable.html> depend on > something defined in java.util > <http://developer.android.com/reference/java/util/Iterator.html>. > > ...

Web resources about - midi music fade out: how? - comp.lang.java.programmer

The Edinburgh Guitar and Music Festival
I’ve always wanted to go to Scotland, but I won’t be able to catch this event. If you’re in Edinburgh, stop by and check it out.

Electronic dance music - Wikipedia, the free encyclopedia
Electronic dance music ( EDM ) is electronic music produced primarily for the purposes of use within a nightclub setting, or in an environment ...

Sonos to officially support Apple Music starting tomorrow
After launching in public beta last December , Sonos has revealed that it will officially add support for Apple Music to its connected speaker ...

Take a break from music, listen to Anchor – true public radio
... on Apple TV and It’s official: Instagram for iOS now supports multiple account switching . Anchor - True public radio Take a break from music, ...

Apple Music finally arrives on Sonos
Picking a streaming music service can be difficult as they are all largely the same listen to all you want for a small monthly fee. While Spotify ...

X2 lets you stream Spotify, Apple Music, Pandora and more to any car stereo
... like Pandora and Spotify, so why pay at all? If you have a car without Bluetooth or an aux-in port, there's still a simple way to stream music, ...

How Pop Music Explains the Difference Between New Hampshire and Iowa
An analysis of Spotify data shines a light on American political geography.

Belly reforming for UK/North American tours, new music too
by Bill Pearis More '90s reunion news: Belly, Tanya Donelly's post-Throwing-Muses band, are reforming. It's the original lineup of the band, ...

Beyoncé's 'Formation' is the most important music video of 2016
When Beyoncé dropped a surprise music video for her new song "Formation," the internet went nuts. But the video's message makes the song much ...

New Orleans marks Fat Tuesday with costumes, beads and music
Fat Tuesday is the last day of the Carnival season before Lent, a period of penance and spiritual renewal, begins Wednesday

Resources last updated: 2/10/2016 2:30:09 AM