Author |
Message |
Antimon
Joined: Jan 18, 2005 Posts: 4145 Location: Sweden
Audio files: 371
G2 patch files: 100
|
Posted: Mon Sep 12, 2005 3:56 am Post subject:
SoftMusic |
 |
|
Recent talk here reminded me of SoftMusic ( http://softmusic.sourceforge.net , also reachable via my homepage), which is a Java application that I wrote once. It uses some static, home-made algorithms to create parallel loops of midi notes, that are played using Java's MIDI implementation. It's very simplistic, buggy, and I don't know on which Java versions it works, but someone might get something from it anyway. I certainly had a lot of fun tweaking around while I wrote it. I've been meaning to get to work on it again to straighten out some bugs and implement more cool features, but I never seem to get my thumbs out...
There is a also a manual, with a chapter containing philosophical ramblings about the nature of music. I've always found music interesting because its nature is so elusive - what exactly is music and what is it really good for? The answer to this is something that my body knows, but it is hard to put down in words.
Cheers,
Stefan Blixt |
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24391 Location: The Netherlands, Enschede
Audio files: 296
G2 patch files: 320
|
Posted: Mon Sep 12, 2005 11:12 am Post subject:
|
 |
|
Thanks for reminding me ... but ... do I really need Java 1.4.something ?
Forgive when this is a stupid question, I know next to nothing about Java.
When I try under 1.5.0 (well I think I use that, but there might be other versions present as well, how can I find out ? And I had to modify softmusic.smc a bit to find a file soundbank.gm in a different place) I get this :
Code: | D:\Download\Music\SoftMusic\softmusic>java -cp bin antimon.softmusic.SoftMusic
Welcome to SoftMusic!
class com.sun.media.sound.MixerSynth
class com.sun.media.sound.AbstractPlayer
class com.sun.media.sound.AbstractMidiDevice
class java.lang.Object
Device #0: US-122 MIDI Port:No details available
Device #1: Microsoft MIDI Mapper:Windows MIDI_MAPPER
Device #2: Microsoft GS Wavetable SW Synth:Internal software synthesizer
Device #3: SynC Modular:External MIDI Port
Device #4: US-122 MIDI Port:External MIDI Port
Device #5: Real Time Sequencer:Software sequencer
Device #6: Java Sound Synthesizer:Software wavetable synthesizer and receiver
File C:\Program Files\Java\jre1.5.0\lib\audio\soundbank.gm contains soundbank co
m.sun.media.sound.HeadspaceSoundbank@ad8659
Loading instruments...
Bad note value in chord.smc: 7
Program change: bank 0 program 0
Program change: bank 0 program 0
Program change: bank 0 program 0
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Color
parameter outside of expected range: Red Green Blue
at java.awt.Color.testColorValueRange(Unknown Source)
at java.awt.Color.<init>(Unknown Source)
at java.awt.Color.<init>(Unknown Source)
at java.awt.Color.<init>(Unknown Source)
at antimon.softmusic.RythmPanel.paintComponent(RythmPanel.java:21)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JViewport.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JLayeredPane.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paintWithOffscreenBuffer(Unknown Source)
at javax.swing.JComponent.paintDoubleBuffered(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
at java.awt.Container.paint(Unknown Source)
at sun.awt.RepaintArea.paintComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
|
And the application's main screen is only painted when I move the mouse over it.
Any clues ? _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
DrJustice

Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
Posted: Mon Sep 12, 2005 12:25 pm Post subject:
|
 |
|
Hi Stefan!
Thank you for the softmusic program!
It's working here on Sun J2RE 1.4.2, playing away as I type this. I haven't applied the pacth yet (I guess I should). It can find a soundbank when starting (there's no lib/audio in my Java install..) so it says it's reverting to default sounds.... Looks like fun, Im going to have play.
DJ
-- |
|
Back to top
|
|
 |
Antimon
Joined: Jan 18, 2005 Posts: 4145 Location: Sweden
Audio files: 371
G2 patch files: 100
|
Posted: Tue Sep 13, 2005 12:37 am Post subject:
|
 |
|
Thanks for trying it out
Jan, I'm sorry that the thing doesn't work for you , I can't say straight away what is going on with that stack trace. I know a few things happened with the Swing code (handling graphical interface stuff) in later versions, so it might have something to do with that. If you want to, you could install JRE 1.4 (which seems to work for DJ) from java.sun.com, and point SoftMusic to it.
Now I really have to dig out the old source code and start fixing things... I'll post a notice here if I manage to recreate and fix the java.lang.IllegalArgumentException problem. |
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24391 Location: The Netherlands, Enschede
Audio files: 296
G2 patch files: 320
|
Posted: Tue Sep 13, 2005 5:01 am Post subject:
|
 |
|
I tried to install 1.4.2_02, well I succeeded actually, but when I popup the Java console it still says I'm still using 1.5. So I tried to disable it in the console, tried adding the 1.4 path to the path environment, restored the original config giles, but unfortunately I still get the same results, more or less.
I got it to play some stuff, but it's a bit hard with the user interface disappearing all the time :-)
When you feel like fixing it please let me know, I've a liking for random players. But when it's just for me please don't do anything you'd rather not do.
It reminds me a bit on a similar program I once wrote, but I lost that one and the sources as well, it probably is somwhere in this pile of old harddisks that I've got laying around ... _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
bachus

Joined: Feb 29, 2004 Posts: 2922 Location: Up in that tree over there.
Audio files: 5
|
Posted: Tue Sep 13, 2005 5:52 am Post subject:
|
 |
|
I have to report much the same problems as blue hell.
Reminds me of a wagish saying about java:
while it was supposed to be "write once, run everwhere"
it turned out "write once, debug everwhere"
Anyway it did look interesting. Keep us updated if you get back into it. _________________ The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham |
|
Back to top
|
|
 |
DrJustice

Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
Posted: Tue Sep 13, 2005 5:55 am Post subject:
|
 |
|
I'm using v 1.4.2_01 to be exact.
In my posting above I wrote "It can find a soundbank..." - that sould be "...can't...". Do I just find a .gm file somwhere and drop it into <java>/lib/audio/ ?.
DJ
-- |
|
Back to top
|
|
 |
|