Old 4th April 2004, 21:41   #1
psperl
Junior Member
 
Join Date: Apr 2004
Posts: 20
projectM (Milkdrop for Linux) released

I switched to Linux last year and the WORST thing about it was no Milkdrop. So my friend and I rewrote Milkdrop in OpenGL! If you use linux and want Milkdrop check it out. Also, it uses no platform independant code, so someone could port it to windows or mac. Screenshots and downloads are at http://xmms-projectm.sourceforge.net

Also, unlike Milkdrop which can only support up to 4 custom waves/shapes, projectM treats custom waves/shapes as objects, so you can create as many as you like. I know you guys like that!

Mad props go out to all the preset authors. Rovastar is officially my favorite. Over the past nine months of reverse engineering Milkdrop, he really stuck out. Unchained was close behind (his presets crashed projectM more anyone else's), and Zylot and Adderassi were honorable mentions. Keep up the GREAT work!

Long Live Milkdrop! (and projectM)
Attached Images
File Type: jpg hw4330ca.jpg (99.3 KB, 2236 views)

Last edited by psperl; 4th April 2004 at 22:05.
psperl is offline   Reply With Quote
Old 5th April 2004, 11:05   #2
Rovastar
Moderator
 
Join Date: Jun 2001
Location: London, England
Posts: 3,632
Send a message via AIM to Rovastar
Looks interesting although I am not likely to be testing for some time as I have no Linux.

It will be interestuing to see how you have converted soem of the effects to OpenGL.

What is the success rate like for presets being correct on this clone. There were problems on other engines getting for example the multiple centres of rotaion presets.

"Rules are for the guidance of wisemen and the obedience of fools"

Visuals - Morphyre www.Morphyre.com
Rovastar is offline   Reply With Quote
Old 5th April 2004, 12:52   #3
mark
Forum King
 
mark's Avatar
 
Join Date: Jul 2002
Location: Norn Ir'nd, leek...
Posts: 6,287
I'd like to see win32 binaries and linux rms/apt files please!
mark is offline   Reply With Quote
Old 5th April 2004, 13:52   #4
psperl
Junior Member
 
Join Date: Apr 2004
Posts: 20
success rate

The "success rate" for 1.03 presets is really high (>95%). Only in weird cases do 1.03 presets not work right, and we've done lots of testing. There are some differances with the weird simple waveforms (1,2,3,5,6), since we don't really know what those things are mathematically.

Anyway, 1.04 presets are another story. As you can see from the shots, some of them work great. Other times they work but are too slow even on my Athlon 64. But overall I'de say 1.04 presets have a fair success rate. I've been using the www.milkdrop.co.uk presets and not the ones here until very recently, so those are probably more stable.

Sometimes if they don't work, I'm sure you could easily patch the file to work flawlessly by changing some constants. It's really hard to get all those variables synced to Milkdrop's.

don't forget, infinite custom waves/shapes, and it's open source, so you *could* add whatever you want. I know you guys can handle the math!

-Peter Sperl
psperl is offline   Reply With Quote
Old 6th April 2004, 06:52   #5
Krash
Major Dude
 
Krash's Avatar
 
Join Date: Jun 2001
Location: Sydney, Australia
Posts: 977
Good to see.
I'm a Microsoft heathen, however, so I won't be checking your work out myself - but from the screen shots the rendering looks good - optimising for good framerate is likely to be pretty difficult without doing platform-specific code.

You might want to let Geiss know about this - he might be happy to help you out with things like the actual mathematics of the fixed waveforms.

- Krash

Eighty-three percent of all statistical quotes are made up on the spot.
Krash is offline   Reply With Quote
Old 6th April 2004, 08:49   #6
mark
Forum King
 
mark's Avatar
 
Join Date: Jul 2002
Location: Norn Ir'nd, leek...
Posts: 6,287
who wants to spam this in gd?
mark is offline   Reply With Quote
Old 6th April 2004, 12:49   #7
psperl
Junior Member
 
Join Date: Apr 2004
Posts: 20
8 shapes in one preset

here is a screenshot of Idiot - Texture Boxes (Remix) modified to use 8 shapes instead of 4. All I did was copy the four shapes, change their colors, and scale them down just a bit to make the screen less cluttered.

Anyway, as Krash mentioned, do you guys think Geiss would be cooperative and help us develop stuff like warp and the simple waves? I though Milkdrop was owned by Nullsoft, and hence I didn't think they would be very welcoming to this kind of thing, especially since Mildkrop is one of Winamp's advantages over other music players.

-Pete Sperl

http://xmms-projectm.sourceforge.net
Attached Images
File Type: jpg hw4336ca.jpg (92.9 KB, 1161 views)
psperl is offline   Reply With Quote
Old 6th April 2004, 13:05   #8
ryan
not fucked, not quite.
(Forum King)
 
ryan's Avatar
 
Join Date: Feb 2002
Location: Tn
Posts: 8,798
Send a message via AIM to ryan
yay! My presets are on linux!
ryan is offline   Reply With Quote
Old 6th April 2004, 13:08   #9
Rovastar
Moderator
 
Join Date: Jun 2001
Location: London, England
Posts: 3,632
Send a message via AIM to Rovastar
The biggest problem with Ryan will probably be getting a reply. Other MilKDrop clones authors didn't have much response.

As for Nullsoft I don't know what the offical stance.

Q: What mesh size do you use?

gx,gy : 32,24 (interpolation resolution)

Is this the mesh?

To be honest the

Current Settings:

texsize: 1024x1024 (rendering resolution)
gx,gy : 32,24 (interpolation resolution)
FPS : 60 (Frames per second)

Is pretty slow for "...Athlon64 3200+ w/1GB ram and a Geforce 4 Ti4200." I would expect a mesh of 80x60 or something and stil get around 60fps? What does MilKdrop give you?

"Rules are for the guidance of wisemen and the obedience of fools"

Visuals - Morphyre www.Morphyre.com
Rovastar is offline   Reply With Quote
Old 6th April 2004, 13:20   #10
psperl
Junior Member
 
Join Date: Apr 2004
Posts: 20
yes gx,gy is the mesh. I personally use a mesh size of 48x36 at 60 FPS and it works well on most presets. There are still some that slow me down, But I bet I could go higher and it would work for most presets.

I am CERTAIN there is much optimization to do. Up until a few weeks ago we were just trying to get proper rendering behavior, let alone good performance. We aren't crappy programmers and I've seen projectM run on a lowly pentium2 400, so performance is only going to get better. I haven't personally run Milkdrop in over a year and I've never booted windows on this Athlon 64, so I couldn't tell you.

I'de imageine right now projectM is *slower* than Milkdrop, but we are just getting heavily into the performance stuff.
Remember, OpenGL drivers for linux probably aren't as good as DirectX ones for Windows, and platform-independant OpenGL and C code means I have to do A LOT of stuff the hard way. Still, performance isn't bad.

Do you know how much code it takes to write a parser? Ask Ryan why he used Nullsoft's AVS one! Also, I don't remember there being any Milkdrop clones for any platform that support 1.04.

-Pete Sperl
http://xmms-projectm.sourceforge.net
psperl is offline   Reply With Quote
Old 7th April 2004, 00:56   #11
Entropy42
Junior Member
 
Join Date: Jul 2001
Posts: 13
This is the greatest news I have seen in a long time.

I was just trying to get MilkDrop running via xmms-winamp and... It wasn't pleasant.

I'm now upgrading SDL on my RedHat box to try and get ProjectM running.

BTW, Rovastar, you mentioned that you would like to be able to test except you don't have Linux. What if someone mastered a LiveCD distro (most likely Knoppix) including ProjectM? (Knoppix is a bootable Linux distro-on-a-CD - just pop it in your drive and go. It runs right from the CD so it doesn't touch your HD unless you want it to.)

I've done some work with Knoppix remasters before, I could do it again. Hardest thing is getting the binary NV drivers in there...
Entropy42 is offline   Reply With Quote
Old 7th April 2004, 06:43   #12
Zylot
Major Dude
 
Zylot's Avatar
 
Join Date: Jul 2001
Location: Pa, US(of)A
Posts: 803
We're on Linux, awsome!

-------------
What do you wish for?
--Instrumentality
Zylot is offline   Reply With Quote
Old 7th April 2004, 16:35   #13
Zylot
Major Dude
 
Zylot's Avatar
 
Join Date: Jul 2001
Location: Pa, US(of)A
Posts: 803
Hey, this would be cool if you threw the latest version in a zip for windows as well!

-------------
What do you wish for?
--Instrumentality
Zylot is offline   Reply With Quote
Old 7th April 2004, 18:44   #14
psperl
Junior Member
 
Join Date: Apr 2004
Posts: 20
Primary development is going to continue on linux for the near future. Today, Carmelo is working on a simple programmable particle system using existing shapes/waves and I'm working on increasing 1.04 compatability. Also, PERFORMANCE.

Also, there are 3 separate groups tryiong to port to windows right now, at least 3. I hope 1 of them succeeds, although they all should. One of the porting projects looks especially promising and could create the best vis ever, but let's wait and see.
psperl is offline   Reply With Quote
Old 7th April 2004, 22:01   #15
Zylot
Major Dude
 
Zylot's Avatar
 
Join Date: Jul 2001
Location: Pa, US(of)A
Posts: 803
Huzzah

-------------
What do you wish for?
--Instrumentality
Zylot is offline   Reply With Quote
Old 8th April 2004, 01:27   #16
Entropy42
Junior Member
 
Join Date: Jul 2001
Posts: 13
For those who want a preliminary form of VJ mode, insert the following line just before SDL_Init() in main.c :

setenv("DISPLAY",":0.0",1);

Where :0.0 is replaced with whatever X display you want ProjectM to display to. (It'll most likely be :0.0)

Start XMMS on any other display. It can even be a remote one (this is where it blows away VJ Mode of Windows plugins, which require the second display to be on the same machine, i.e. you need to be running dualheaded.)

A good example of this that I haven't used yet with ProjectM, but have used with the last version of G-Force to be open-source (and ported to Linux):

Hardcode the display to :0.0 as shown above
Connect projector/speakers to the machine that will be running XMMS
Start up an instance of a TightVNC server. (www.tightvnc.com)
Connect to the TightVNC server with another machine running a TightVNC viewer. (This assumes some sort of network connection between the two machines is available. In my case the "client" machine was a laptop with an 802.11b card)
Fire up XMMS inside the TightVNC session, start the plugin.

Voila! You have the XMMS UI showing on one machine, with the vis plugin showing on another.

(For now you'll still have to switch ProjectM to fullscreen with a keyboard local to the playback/vis machine)
Entropy42 is offline   Reply With Quote
Old 8th April 2004, 02:53   #17
psperl
Junior Member
 
Join Date: Apr 2004
Posts: 20
Entropy42, so I'm assuming you got projectM running? Could you inform me of your system setup? We're trying to get it tested on ATI setups but everyone so far has nvidia.

Since you are the second person to mention this exact feature, I guess I'll add an option to the end of the config file.

I'll also add a "fullscreen on startup" option for this scenario. I could release this tonight, except I have to figure out how to validate the X display the user selects via the config file.

Also, Carmelo got offended because Rovastar was talking trash about our performance (and we respect Rovastar greatly), so he's rewriting the evaluator to use a stack instead of an infix operator tree. Btw, the evaluator is 70% of the work projectM has to do, so that's where we're going to get nearly all of our performance improvements.
psperl is offline   Reply With Quote
Old 8th April 2004, 09:13   #18
Rovastar
Moderator
 
Join Date: Jun 2001
Location: London, England
Posts: 3,632
Send a message via AIM to Rovastar
Sorry if I offended anyone. I was merely enquiring if it had comparable speeds to MilkDrop.

Ryan is known for writing quick code I wondered it reached those dizzy heights.

"Rules are for the guidance of wisemen and the obedience of fools"

Visuals - Morphyre www.Morphyre.com
Rovastar is offline   Reply With Quote
Old 8th April 2004, 15:41   #19
Entropy42
Junior Member
 
Join Date: Jul 2001
Posts: 13
Quote:
Originally posted by psperl


Since you are the second person to mention this exact feature, I guess I'll add an option to the end of the config file.
Actually I'm not. I'm the same person that emailed you. I mainly posted the feature for the benefit of others, since I'd already mentioned it to you.

Running 0.92 now, it rocks. (Note to others - no patching needed with psperl's new version, it's now a config option.)

Performance is excellent for some presets, and drops for some others. I'm going to dig through the code to figure out what differs between the presets that result in these 3 categories on my 1.1 GHz Athlon:
a) <5% CPU, regulated to 90 FPS displayed (I have it set to 60...)
b) Approx. 30% CPU, regulating to 50 FPS indicated with F5
c) 100% CPU, FPS varies around 55 for most presets, drops into the 30s for a small handful.

Something definately seems to be wrong with the FPS limiting and/or FPS display code, since in two cases they're tightly regulated to framerates other than the set framerate. I have lots of free time this weekend, including two 4-hour car rides with my laptop, so I'll try and see if I can figure out what's going on then.
Entropy42 is offline   Reply With Quote
Old 8th April 2004, 21:32   #20
psperl
Junior Member
 
Join Date: Apr 2004
Posts: 20
Rovastar, I was just kidding around, you didn't actually offend anyone. We just use the language gratutiously. We know that we're not doing per-pixel as fast as we can, so I was just saying you "motivated" us to get started.

As for those FPS issues Andrew. The framerate limiter probably is screwed up. I'll look at that too. I think I hust made something up real fast one day when i wanted to see my fps.

As far as I know however, the only thing that should have any adverse effect on performance is per-pixel/per-point, and that's porbably whats slowing you down.
psperl is offline   Reply With Quote
Old 8th April 2004, 23:34   #21
Entropy42
Junior Member
 
Join Date: Jul 2001
Posts: 13
Yup, taking a closer look at the presets indicates it seems to be related to the number/complexity of per-pixel equations.

The one thing I can't figure out are those wicked fast 90fps 0% CPU presets. I need to identify one and look at the preset (didn't write down the name of one of those.)

At least from a preliminary look at the code, it appears the equation parser is run once per mesh point (and possibly once per equation per mesh point?)

Since the equations are the same for all mesh points and only the input data changes, wouldn't it be significantly faster to run the parser once and do all computations for all mesh points in that one parser run? (An additional benefit is that this would open up the way to parallelizing some operations, in which case multiplications and additions and some other ops could be sped up even more with SSE or 3DNow)

Correction: To be specific, I mean the general expression evaluation routine is run once per mesh point, not the parser.

The example I was thinking of would be in eval_tree_expr() in eval.c - Right now this is called once for each operation for each mesh point.

Instead, you could pass the data for each mesh point to eval_tree_expr() and inside each operator case, perform the operation for every mesh point and return an array corresponding to the results for each mesh point.

This would allow a significant number of operations to be performed without any branching (which is probably really hurting performance on P4s and can't be good for Athlons either), rather than a significant amount of branching and if() or switch() statements for each operation.

Also, I'm going to change the if(EVAL_DEBUG) statements to #ifdefs - that way the CPU doesn't need to branch on those statements.

Last edited by Entropy42; 9th April 2004 at 00:07.
Entropy42 is offline   Reply With Quote
Old 9th April 2004, 00:10   #22
psperl
Junior Member
 
Join Date: Apr 2004
Posts: 20
Actually, the parser runs once when the program loads the preset. The evaluator then evaluates operations as I ask for them. I give it the operation (like ROT_OP, for rotation) , and it gives me back an array the size of gx,gy with the proper values in it.

I think maybe if we calculated ALL the per-pixel operators at once like you say, we would be able to speed them up a bit, yes, if the operations share deep equations that our optimization routines don't catch.
psperl is offline   Reply With Quote
Old 9th April 2004, 00:37   #23
Entropy42
Junior Member
 
Join Date: Jul 2001
Posts: 13
Yeah, I meant to say (and edited) that the evaluator operates once per mesh point.

At least from the looks of per_pixel_eqn.c, calculations are done on a mesh point by mesh point basis, and only single (double float) values are returned by eval_gen_expr(). (specifically, answer_matrix[i][j] = eval_gen_expr(eqn_ptr); )

Instead of calling eval_gen_expr for each i,j, operating on the single values y_per_pixel, etc, you could instead call it once for each equation, passing it x_matrix, etc, and returning answer_matrix all in one go.

Thus in eval.c, for example when performing addition in eval_tree_expr(), instead of:

code:

case INFIX_ADD:
return (left_arg + right_arg);


(i.e. a single operation nestled inside of a bunch of branches), you could have
code:

case INFIX_ADD:
for(i = 0; i<gx; i++)
{
for(j = 0; j<gy; j++)
{
answer[i][j] = left_arg[i][j] + right_arg[i][j];
}
}


Thus all of the if() and switch() statements within eval.c are run only once per equation, not once per equation per mesh point. In an ideal world this wouldn't make too much difference, but with the P4's wonderful 20-stage pipeline, avoiding branches could make a huge difference.

In addition, the for loop above could be rewritten with SSE or 3DNow! instructions.
Entropy42 is offline   Reply With Quote
Old 10th May 2004, 03:32   #24
ryan
not fucked, not quite.
(Forum King)
 
ryan's Avatar
 
Join Date: Feb 2002
Location: Tn
Posts: 8,798
Send a message via AIM to ryan
yay! Now I'm on Linux.

I might try this thing out.
ryan is offline   Reply With Quote
Old 12th May 2004, 21:47   #25
pinkpanther
Junior Member
 
Join Date: May 2004
Posts: 15
Mac OSX Port PLEASE!

Hello,

I can't begin to tell you how excited I was after reading about projectM. I, however, am a mac user (just got a new dual 1.8 g5) and after drooling over milkdrop in the past, I would love to see it ported to osx. Is anyone currently working on a port? I really hope so - the mac community would benifit a lot because itune's visualizations definitely do not cut it. Any information on projectM regarding the mac world would be amazing. Thanks in advance.
pinkpanther is offline   Reply With Quote
Old 13th May 2004, 01:17   #26
Entropy42
Junior Member
 
Join Date: Jul 2001
Posts: 13
Re: Mac OSX Port PLEASE!

Quote:
Originally posted by pinkpanther
Hello,

I can't begin to tell you how excited I was after reading about projectM. I, however, am a mac user (just got a new dual 1.8 g5) and after drooling over milkdrop in the past, I would love to see it ported to osx. Is anyone currently working on a port? I really hope so - the mac community would benifit a lot because itune's visualizations definitely do not cut it. Any information on projectM regarding the mac world would be amazing. Thanks in advance.
Haven't heard anything yet, but there isn't much preventing it from being ported over to OSX. As projectM's site mentions, almost everything but the XMMS glue is cross-platform. (Well, at least it'll work on any platform SDL supports, and I'm pretty sure OSX is on that list.)

I wouldn't be surprised if you could get projectM running with the OSX port of XMMS. Check out http://fink.sourceforge.net/. (Note, I have no personal experience with Fink, all of my machines are x86 and if I ever get a PPC box it'll be dual-booting Linux.)
Entropy42 is offline   Reply With Quote
Old 13th May 2004, 07:41   #27
mark
Forum King
 
mark's Avatar
 
Join Date: Jul 2002
Location: Norn Ir'nd, leek...
Posts: 6,287
Now we need projectM for PocketPC
mark is offline   Reply With Quote
Old 13th May 2004, 08:52   #28
psperl
Junior Member
 
Join Date: Apr 2004
Posts: 20
I don't want to speak too soon, but I think we can expect a Mac OS X port pretty soon. Maybe. If I had a mac I bet I could do it in a day, but we searched all over CMU's campus and apparently SDL 1.3 requires Mac OSX 10.3, and all the CMU macs use 10.2.8. So, as soon as I get my hands on a copy of OS X 10.3, we'll get to work. A Mac port would probably help projectM's viability as mac users love this kind of stuff. Anyway, someone approacked me about trying to port it to Mac OS X, so maybe they'll have some luck. Anyway, don't hold me to this, but this is one of our immediate term goals. Btw, the new version is MUCH faster and fixes alot of bugs. We've fixed a few more since the latest release but it doesn't warrant a new release yet.
psperl is offline   Reply With Quote
Old 14th May 2004, 01:44   #29
pinkpanther
Junior Member
 
Join Date: May 2004
Posts: 15
I"m glad to hear of a possible osx port on the way--soooooo psyched. Question though, would it be able to run along with itunes? (note: Do not know much anything about porting.) Thanks.
pinkpanther is offline   Reply With Quote
Old 14th May 2004, 02:24   #30
psperl
Junior Member
 
Join Date: Apr 2004
Posts: 20
pinkpanther,

Of course it would work with iTunes. What else?
psperl is offline   Reply With Quote
Old 16th May 2004, 01:08   #31
pinkpanther
Junior Member
 
Join Date: May 2004
Posts: 15
Any updates on projectM's development? I am sooo eager to get this on osx... ;-)
pinkpanther is offline   Reply With Quote
Old 16th May 2004, 08:53   #32
mark
Forum King
 
mark's Avatar
 
Join Date: Jul 2002
Location: Norn Ir'nd, leek...
Posts: 6,287
http://xmms-projectm.sourceforge.net/

check teh sourceforge page for updates (I assume they keep it up to date...)
mark is offline   Reply With Quote
Old 16th May 2004, 12:58   #33
psperl
Junior Member
 
Join Date: Apr 2004
Posts: 20
Carmelo and I have been busy with graduation this week. Graduation is now an hour away, and we plan to start up the Mac port on Monday. We've heard rumors that a special computer cluster on campus has Mac OS X 10.3, so we're going to go check it out.

As cutting edge as CMU is suppossed to be, they still can't keep their machines up to date. You should see how old their Linux installs are. Anyway, I'll keep you guys posted.
psperl is offline   Reply With Quote
Old 17th May 2004, 15:35   #34
Burrit0
Junior Member
 
Join Date: May 2002
Posts: 5
How about a win32 port that runs as a foobar2000 plugin?

This would save MD from dying with Winamp under win32.
Burrit0 is offline   Reply With Quote
Old 17th May 2004, 21:51   #35
psperl
Junior Member
 
Join Date: Apr 2004
Posts: 20
I've got BAD news and GOOD news.

FIRST, the BAD news.

Carmelo and I have completely failed at a Mac port! There is NO chance Carmelo and I will get a MAc port working.

The GOOD News

Alistair Carty, Technical Director of Archaeoptics Ltd. (http://www.archaeoptics.co.uk), reported to me about 15 minutes ago that he's running projectM on a Mac under iTunes. In a few days, he says he'll send me the codebase and we'll get working on an official cross-platform release. He also says he's going to complete a windows port.

This scares me however, since I know projectM needs alot of work to equal what mikdrop is now, so I'll have to bust my arse to finish all of MilkDrop's current features.

We've got to finish the in-program editor (Add 1.04 features to menu and save ability), add brighten, darken, and solarize, the hue shader, fix some bugs that I still haven't ironed out yet, add smooth preset switching, add MMX/3DNow/SSE optimizations, etc.

All that stuff isn't as hard as it sounds, and tyou most likely won't notice they are missing if you are watching projectM next to MilkDrop. They still need to be done however, but you have to remember we wrote this whole thing in less than 8 months, so projectM is still a baby wearing diapers so the shiat doesn't fall out of his pants.

-Pete
psperl is offline   Reply With Quote
Old 17th May 2004, 23:00   #36
pinkpanther
Junior Member
 
Join Date: May 2004
Posts: 15
I'm so glad to hear the mac port is on it's way. I can't wait to run this baby. Thanks so much to everyone who is working so hard on it.
pinkpanther is offline   Reply With Quote
Old 18th May 2004, 07:19   #37
mark
Forum King
 
mark's Avatar
 
Join Date: Jul 2002
Location: Norn Ir'nd, leek...
Posts: 6,287
mark is offline   Reply With Quote
Old 21st May 2004, 18:10   #38
pinkpanther
Junior Member
 
Join Date: May 2004
Posts: 15
any updates?
pinkpanther is offline   Reply With Quote
Old 22nd May 2004, 17:33   #39
Rovastar
Moderator
 
Join Date: Jun 2001
Location: London, England
Posts: 3,632
Send a message via AIM to Rovastar
Easy it has only been 3 days.....

"Rules are for the guidance of wisemen and the obedience of fools"

Visuals - Morphyre www.Morphyre.com
Rovastar is offline   Reply With Quote
Old 22nd May 2004, 22:14   #40
mark
Forum King
 
mark's Avatar
 
Join Date: Jul 2002
Location: Norn Ir'nd, leek...
Posts: 6,287
what about now?
mark is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Visualizations > MilkDrop

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump