NWC, Linux and MIDI devices 2004-12-04 04:13 pm I have gotten NWC to run quite nicely under Linux, but one problem persists: lack of MIDI devices.I currently have two software synths installed, Timidity++ and FluidSynth. The problem is, they don't work properly as MIDI devices.I can play individual MIDI files with both of them, and after a bit of a struggle, I got them to appear in the KDE Control Center as MIDI devices.However, FluidSynth reserves the whole sound system when it is loaded and won't play any sound. Timidity doesn't persistently reserve all sound output, but it is mute too. (I've tried the Test Midi button in KDE Control Center.)The Wine MIDI Mapper device doesn't work either. When I select it in NWC (as it is the only device available there), NWC complains that there are some problems and tells they need to be fixed before continuing (it doesn't tell what the problems are, though). Quote Selected
Re: NWC, Linux and MIDI devices Reply #1 – 2004-12-04 05:50 pm Thanks for that info, JB. Quote Selected
Re: NWC, Linux and MIDI devices Reply #2 – 2004-12-04 07:50 pm Wonder if experimentation might help.See if Synthfont will work in Linux. Great little program, though it, like any synth font program is demanding on CPU's. http://www.synthfont.com/. I use Synthfont in my laptop while travelling, since its onboard midi generator is deplorable.If it does work, Sue Morton in the NWC newsgroup on or about 11/29/04 mentioned another little program called midiyoke that can be used to directly use synthfont as the output and input for nwc. Get the software at http://midiox.com/myoke.htm.Possible that the two in tandem could work, though Linux does present some challenges to PC based programs. Quote Selected
Re: NWC, Linux and MIDI devices Reply #3 – 2004-12-04 08:31 pm Why, I'm no stranger to SynthFont; I use it in Windows all the time. However, it seems that Kenneth hasn't made a Linux version of it, and I have doubts of its usefulness under Wine (After all, the same functionality on a per-file basis can be achieved using Timidity or FluidSynth).Because Timi and FS both work as mere MIDI players, but not as devices, I suppose I have just a configuration issue; maybe I need to make some port bindings, maybe something else... Linux configuration can be so tedious.A tip for all of you who want to have Linux but also want to run NWC: I recommend Fedora Core 3 as the distribution. One of its advantages is a very good support for TrueType fonts; they can be installed with just a couple of clicks (with the Font Installer app). Quote Selected
Re: NWC, Linux and MIDI devices Reply #4 – 2004-12-04 08:36 pm One more thing: people who have "real" sound cards (not just an integrated chip) may have better luck in MIDI support; I have a laptop so the only option would be some special sound card (I think someone mentioned a special version of Audigy that could used via PCMCIA or somehow else), but those are probably too expensive and maybe do not work especially well. Quote Selected
Re: NWC, Linux and MIDI devices Reply #5 – 2004-12-05 03:01 am I don't know about "currently available" PCMCIA sound cards for laptops, but I tried one about 3 years ago, with my prior laptop. The PCMCIA was no different than the one built into the laptop. In some ways, it was worse, because it would have cost some $50. Quote Selected
Re: NWC, Linux and MIDI devices Reply #6 – 2005-02-03 01:21 pm I got NWC working under linux (fedora 3) with wine (crossover office, but I think it works with any wine) with timidity and alsa.First catch was that you need to edit the wine config file (called config) so that it has the lines[WINMM]"Drivers" = "winealsa.drv"[ALSA]"PlaybackDevice" = "default"Then you need to make sure you have the right module running. For me the module can be started with the commandmodprobe snd_emu10k1_synthThen you can open timidity as a servertimidity -iA -A170 -B3,10 -Os -EFreverb=0 &It should respond with something likeRequested buffer size 32768, fragment size 8192ALSA pcm 'default' set buffer size 32768, period size 8192 bytesTiMidity starting in ALSA server modeOpening sequencer port: 129:0 129:1 129:2 129:3Then when you open nwc32 under wine, it sees timidity as a sequencer. Quote Selected
Re: NWC, Linux and MIDI devices Reply #7 – 2005-02-05 11:12 am Well, congratulations! Too bad that it didn't work for me You modprobed snd_emu10k1_synth; is there a specific purpose for that? I always have started Timidity by first modprobing snd_virmidi and then running timidity with quite the same settings as you do (I could try the exact same ones, though...)Timidity starts up fine, an I know it is working: other programs, like DosBox can use timidity for midi output.In the wined NWC32, all I see is Wine midi out mapper, and if I select that and click OK, I see an error message: "The following play devices failed to open properly: Wine midi out mapper. This problem must be corrected before proceeding." Quote Selected
Re: NWC, Linux and MIDI devices Reply #8 – 2005-02-18 08:29 am It works for me! (mostly).I had to copy the file /usr/share/wine/config into my ~/.wine/ directory, then it worked.However, it doesn't seem to respect the speed it should be playing stuff, and is playing veeeerrryyy slowly... Quote Selected
Re: NWC, Linux and MIDI devices Reply #9 – 2005-02-20 08:12 pm What files do you have in /usr/share/wine/config/? I don't even have such a directory. Quote Selected
Re: NWC, Linux and MIDI devices Reply #10 – 2005-02-20 08:20 pm Ah, I found it out: I had to copy config from /etc/wine/ to ~/.wine.Now it works fabulously well. Thank you Steve S and dan! One reason less to use Windows... Quote Selected
Re: NWC, Linux and MIDI devices Reply #11 – 2005-02-21 10:23 pm I've mostly got NWC running under WINE too.However, I cannot get Timidity to start up as a server. I'm running FC3.Here is what I did, following instructions from Steve S and others:1. copied /etc/wine/config to ~/.wine/config2. altered [WinMM] entry and added [ALSA] entry3. modprobe snd_emu10k1_synth4. timidity -iA -A170 -B3,10 -Os -EFreverb=0  is where I am stuck. Here is the ouput:Requested buffer size 12288, fragment size 4096ALSA pcm 'default' set buffer size 12288, period size 4096 bytesTiMidity starting in ALSA server modeALSA lib seq_hw.c:446:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directoryerror in snd_seq_openHere is my lsmod for all modules with 'synth':> lsmod | grep synthsnd_emu10k1_synth 7745 0snd_emux_synth 38081 1 snd_emu10k1_synthsnd_seq_virmidi 6593 1 snd_emux_synthsnd_seq_midi_emul 6593 1 snd_emux_synthsnd_seq 54097 4 snd_emux_synth,snd_seq_virmidi,snd_seq_midi_event,snd_seq_midi_emulsnd_emu10k1 91845 5 snd_emu10k1_synthsnd_seq_device 8525 5 snd_emu10k1_synth,snd_emux_synth,snd_seq,snd_emu10k1,snd_rawmidisnd_util_mem 4801 2 snd_emux_synth,snd_emu10k1snd_hwdep 8901 2 snd_emux_synth,snd_emu10k1snd 52261 15 snd_emux_synth,snd_seq_virmidi,snd_seq,snd_emu10k1,snd_rawmidi,snd_seq_device,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_hwdepBut, as the message says, I have no /dev/snd/seq> ls /dev/sndcontrolC0 hwC0D0 midiC0D0 pcmC0D0c pcmC0D0p pcmC0D1c pcmC0D2c pcmC0D2p timerI'm confused and way beyond my depth. Help!David Quote Selected
Re: NWC, Linux and MIDI devices Reply #12 – 2005-02-25 04:41 am I'll answer my own question, in case others run into it. (That means I got it working finally!!)Instead ofmodprobe snd_emu10k1_synthas Steve S suggests, I usedmodprobe snd_virmidias Jussi suggests.Then I started timidity just as in Steve's example and it was happy.When I started NWC, lo and behold, there were all kinds of choices for Midi device. I chose TiMidity, but I also have- EMU10k1 MPU-401 (UART)- Emu10k1 WaveTable (4 which all look the same)- Virtual Raw Midi 1-0- Virtual Raw Midi 1-1- Virtual Raw Midi 1-2- Virtual Raw Midi 1-3Which one(s) should I chose? I have a SB Live card. Anyway, I'm getting sound now, so I'm happy.Thanks,David Quote Selected
Re: NWC, Linux and MIDI devices Reply #13 – 2005-02-25 02:01 pm Timidity is the correct one, I guess (at least it's working for me).Virtual Raw Midi devices are sort of "pipes" (that aconnect uses to bind the sequencer to timidity raw input). I don't know exactly why there's so many of them (four), maybe that just is so.Note, that unless you make the virmidi module load at startup, the virmidi ports are gone if you reboot.The EMU ones are probably the result of a modprobe snd_emu10k1_synth. You can probably get them out with modprobe -r snd_emu10k1_synth.***In case you want to use Timidity in other applications, it is located in ports 128:0, 128:1, 128:2 and 128:3 by default. If you have other MIDI devices enabled too, that port may be different. Use aconnect -lo to check, typical output would be like:client 128: 'TiMidity' [type=user]0 'TiMidity port 0 '1 'TiMidity port 1 '2 'TiMidity port 2 '3 'TiMidity port 3 'If an application asks for a midi port, 128:0 should be OK. In case there is no obvious place to enter a port (and you get no sound), just try any midiconfig= or config= in the config file you find... Also try both 128:0 and 0:128, or even 128 0. Quote Selected
Re: NWC, Linux and MIDI devices Reply #14 – 2005-03-22 09:48 pm I downloaded TiMidity, but when I built it something seems to have been left out. How do I compile in support for 'interface A'. WhenI try entering the command in reply 6 I get the followiing error:[andrew@localhost Software]$ timidity -iA -A170 -B3,10 -Os -EFreverb=0 &[1] 7953[andrew@localhost Software]$ /usr/local/share/timidity/timidity.cfg: No such file or directoryInterface `A' is not compiled in.timidity: Can't read any configuration file.Please check /usr/local/share/timidity/timidity.cfgI would appreciate any help you can give me.Andrew Ramage Quote Selected
Re: NWC, Linux and MIDI devices Reply #15 – 2005-03-22 10:03 pm What distribution do you use? If there is a package manager available (yum in FC, apt in Debian, urpmi in Mandrake etc.), try installing Timidity with it.I really don't know about building Timidity from source; I run FC3, and installed it with yum. Quote Selected
Re: NWC, Linux and MIDI devices Reply #16 – 2005-03-22 11:44 pm I use Mandrake 10.0 (on this machine, the other one runs SuSE 9.2) BUT iI've never heard of unpmi. What is it ? Command-line or graphical ? Quote Selected
Re: NWC, Linux and MIDI devices Reply #17 – 2005-03-23 06:56 pm It's been a while since I've used Mandrake, but I think urpmi is command-line, like the other package managers. I think just saying urpmi timidity++ (or if that doesn't work, urpmi timidity) will do.To see the the correct syntax to install packages, just do a man urpmi (after all, it could also be urpmi i <package> etc.) Quote Selected
Re: NWC, Linux and MIDI devices Reply #18 – 2005-03-23 10:56 pm For other reasons, I had to do a complete re-install of Mandrake. I found TiMidity inthe list of available packages so it's now installed. Do I have to enter the timidity line above as root ? Quote Selected
Re: NWC, Linux and MIDI devices Reply #19 – 2005-03-24 10:22 am There's no need, but do remember to install the virtual MIDI ports.Also see My Timidity++ Howto, there is some useful advice there. Quote Selected
Re: NWC, Linux and MIDI devices Reply #20 – 2005-04-01 02:25 am Thanks for all the help, friends. I've been trying for a year to get NWC working with wine. Now it is, thanks to your hints, a proper wine installation, and the very useful WineTools.Now does anyone know how to get SharpEye2 working under Wine? Quote Selected
Re: NWC, Linux and MIDI devices Reply #21 – 2005-05-27 10:58 pm It is much easier to get midi working under linux if you have a soundfount compatible soundcard!you have to use the snd-¨whatever¨ driverinstall Kmid (not kmidi)install awe toolsput a soundfont in an easily accessible placein the sound server setup choose emu10k1 - port 0-3 (any of those will work fine)for the midi mapper use /usr/share/apps/kmid/maps/gm.mapgo to your console and type in sfxload ¨path to soundfont¨ hit enterif it went back to the prompt it loaded just fine.now open NWC and press play. you should hear midi.It works well for me Quote Selected