Jump to content

Photo

ZC in Ubuntu Hardy Heron 64-bit


  • Please log in to reply
47 replies to this topic

#1 Zieg30CT

Zieg30CT

    Initiate

  • Members
  • Real Name:Richter

Posted 13 September 2008 - 11:39 PM

In Zelda Classic for Linux, regardless of the build I use, I have no sound. Is it the program itself that is the problem or do I need to install dependencies for the sound to function properly? Please help. I really enjoyed using this program when I was using Windows Vista and I'd like to get it working in Ubuntu.

#2 Zieg30CT

Zieg30CT

    Initiate

  • Members
  • Real Name:Richter

Posted 14 September 2008 - 01:24 AM

Any ideas how to get the program to recognize my sound drivers?

#3 Koopa

Koopa

    The child behind the turtle

  • Members
  • Location:Switzerland

Posted 14 September 2008 - 07:57 AM

Hello,Zieg.

I've used ZC in Ubuntu myself (Gutsy) and had sound problems. The problem is, ZC uses MIDI for sound and it uses ALLEGRO's midi functions on top of that. Midi is a fairly "old" technology and not one most modern linux distributions support really well. (For example, my laptop's sound card plays midi under Windows, but I've never got midi to work with the linux driver.)

The first step is to get midi working as such. Download any .mid file form the net and try and play it under linux (pmidi is one program that comes with ubuntu, though you might have to install it first). That's the hard part.

Once that's done, you need to tell allegro (via config file) what your midi set-up is.

There's some information on all of this on this page.

#4 Zieg30CT

Zieg30CT

    Initiate

  • Members
  • Real Name:Richter

Posted 14 September 2008 - 09:44 PM

I see so it may be possible to get it working but it will just take a few workarounds to do so. Well I'll give it a shot. There's no way I'm giving up on playing ZC.

#5 Eurysilas

Eurysilas

    Paladin

  • Members

Posted 14 September 2008 - 10:10 PM

I hate to appear to undercut my esteemed colleague, but quite simply, there IS no way to get sound in ZC as of yet. Yes, you can try reconfiguring "ag.conf" to use Timidity++, but the sound lags so bad you have to eventually close out the program. There is no fix for this, and last time I made a thread about it here it was ignored.

#6 Saffith

Saffith

    IPv7 user

  • Members

Posted 14 September 2008 - 11:20 PM

What worked for me was this: download midiptch.tar.bz2 from this page and extract it into ZC's directory.
If that works, you can convert soundfonts to .dat files for better sound quality.

#7 Zieg30CT

Zieg30CT

    Initiate

  • Members
  • Real Name:Richter

Posted 14 September 2008 - 11:25 PM

@Eurysilas
Yeah I attempted to do it and the sound is pretty bad. Will I have any luck running ZC for Windows through Wine? (excluding Wine 1.1.4 because I already tried it and only succeeded once at running it without problems)

@Koopa (and other ZC developers I guess)
Just a thought here but would it be possible in a later release to change the ZC sound format from midi to another format Linux, and Windows of course, could both utilize without much of a problem? I'm not to sure as to what is being done with the development of ZC 2.5 but if it can be done it'd make some people happy, including me. Although I guess Allegro probably dictates what can and can't be used in terms of sound, but I'm not sure.

Edited by Zieg30CT, 14 September 2008 - 11:26 PM.


#8 Zieg30CT

Zieg30CT

    Initiate

  • Members
  • Real Name:Richter

Posted 14 September 2008 - 11:46 PM

@Saffith
tried the download and did what you said. I can't believe it but I've got sound! Thank you very much icon_biggrin.gif

how exactly do I convert soundfonts to .dat files? I downloaded a soundfont earlier called SGM-V2.1. Is it suitable to be converted?

Edited by Zieg30CT, 14 September 2008 - 11:55 PM.


#9 Saffith

Saffith

    IPv7 user

  • Members

Posted 15 September 2008 - 12:31 AM

QUOTE
how exactly do I convert soundfonts to .dat files?

Install the package liballegro4.2-dev and run pat2dat patches.dat <soundfont>. I think you don't need any of the options.

QUOTE
I downloaded a soundfont earlier called SGM-V2.1. Is it suitable to be converted?

Can't say. If it's a .sf2 or .cfg file, it should work, but you'll have to try it and see.

QUOTE
Just a thought here but would it be possible in a later release to change the ZC sound format from midi to another format Linux, and Windows of course, could both utilize without much of a problem?

Not really, no. Pretty much every quest uses midis, so removing midi support would mean no music.
Even if midi support were removed, it might not work. Allegro can be pretty picky.

#10 Zieg30CT

Zieg30CT

    Initiate

  • Members
  • Real Name:Richter

Posted 15 September 2008 - 01:19 AM

1.downloading now from synaptic

2It's an .ins file. If it doesn't work I can always download another one.

3I figured that's why the midi format was still in use after doing a google search on Allegro's limitations.

#11 Koopa

Koopa

    The child behind the turtle

  • Members
  • Location:Switzerland

Posted 15 September 2008 - 03:43 AM

Well, ZC 2.5 is long enough overdue as it is so we're not making any non-essential changes until 2.5 is out. Lunix sound is desirable, but not top priority. For 3.0 we may replace allegro by somethin else entirely - but that would probably break compatibilty with all existing quests, so it's not a decision to be taken lightly.

As to the timidity latency problem, there is a solution but it's not easy. The problem is that in a linux environment, multiple processes run at once and each gets its priority and time slices assigned by the os in a way that works well almost all the time. However, midi playing requires an instant reaction when the buffer is empty. Here's the "solution":

1. Replace your current kernel with the realtime kernel (also available under synaptic, called linux-rt and in universe I think). When you boot, you'll have two kernels of the same version, one ending -generic and the other -rt. Choose the rt one.
2. Give your synthesizer realtime privileges.
There's some documentation on this page.
Be aware of one thing though. There's a good reason realtime is not available by default. When an app runs with realtime priority, everything else freezes while it's busy. That's not what you usually want in a multitasking environment. Also, a realtime crash can crash the whole system.

#12 Eurysilas

Eurysilas

    Paladin

  • Members

Posted 15 September 2008 - 06:59 AM

Saffith: Wait a tick, you've gotten decent sound using the process described in your post? May I ask if their are any catches?

EDIT: Sweet weeping Jesus, I'VE GOT SOUND! icon_eek.gif And not just in the player, but the editor too. A few problems, however; whenever the music changes, I get "stuck notes" from the previous MIDI continue in on the new MIDI. Any remedies (I'll try some Google-fu myself)?

#13 Saffith

Saffith

    IPv7 user

  • Members

Posted 15 September 2008 - 11:17 AM

QUOTE
A few problems, however; whenever the music changes, I get "stuck notes" from the previous MIDI continue in on the new MIDI. Any remedies (I'll try some Google-fu myself)?

Not that I'm aware of. I don't know what causes that; if it's an Allegro problem, there may be no getting around it.

#14 Zieg30CT

Zieg30CT

    Initiate

  • Members
  • Real Name:Richter

Posted 15 September 2008 - 02:09 PM

@Koopa
Yeah from what I've read here and at the Armageddon forums you're definitely right about it being long overdue and I can see that a change in the sound format would only prolong development and and cause people to lose interest in ZC itself.

@Saffith
Since your method works fairly well for sound I'm going to try creating different patches from SoundFonts to see if they'll resolve the lag. Right now I am testing the Fluid SoundFont that was in the repositories.

Edit:
I just tested the patch out and for me the sound lag is gone. I'm going to try out a few other SoundFonts because the one I used sounds a little odd.

Edited by Zieg30CT, 15 September 2008 - 02:17 PM.


#15 Alestance

Alestance

    Saint Alestance - Eliminator of the ZGP format

  • Members
  • Real Name:Lonk
  • Location:Pennsylvania

Posted 15 September 2008 - 02:41 PM

@Saffith:

YOU'VE SAVED ME!


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users