# (software synth) MIDI: how to get it working?



## harishankar (May 8, 2010)

Being an amateur music composer who likes instrumental music, why are so many MIDI programs so outdated and neglected in FreeBSD?

Somebody on this forum mentioned that rosegarden was supported. They didn't mention that it is one of the oldest versions of that software. So much for that. 

I feel cheated. Why isn't higher versions of MIDI software available on FreeBSD? Yeah, timidity is also quite an old version in FreeBSD compared to Linux. x(

Also I am editing this to ask if anybody on FreeBSD has got software synth working. timidity fails to play any midi file and so does fluidsynth with soundfont loaded.


----------



## graudeejs (May 8, 2010)

Because most people using FreeBSD are probably computer geeks, not musicians.
Also lack of maintainers is probably one of the reasons. Compare masses of Linux vs FreeBSD community, the difference is HUGE


----------



## Zare (May 8, 2010)

Because composing is probably one of the neglected aspects of FreeBSD development.

FreeBSD can't grant realtime privileges to normal user process, something needed for low latency operation. It's audio hardware support doesn't cover many pro/semi-pro chipsets. 

However, thank your program developers that they tied their stuff so tight to ALSA, and rendered them unportable.


----------



## harishankar (May 8, 2010)

I realize that. I know MIDI is not exactly mainstream but FreeBSD being a general purpose OS as advertised I expected that most software would be updated/kept in sync with newer versions.

Actually with fluidsynth/qsynth I can actually get MIDI support with JACK, but there are very few recent versions of MIDI software.

With software synth I can get most of what I want. What is disappointing is that the ports actually are mere recompiles of Linux versions of such apps which are hardlinked to Linux specific /dev/ entries.


----------



## graudeejs (May 8, 2010)

You can always help and improve this, by becoming maintainer of some midi ports


----------



## harishankar (May 8, 2010)

I could if I had the time. Unfortunately I am a little overwhelmed with work at the moment.

MIDI is a bit complicated too, with a lot of the stuff tied in to JACK and other audio toolkits. It will certainly be non-trivial. I think officially though the MIDI stuff which doesn't work should be removed from the FreeBSD ports. It gives a wrong impression that things work just the same as in Linux and it's not quite correct.


----------



## Beastie (May 8, 2010)

Updating MIDI-related ports? What for?

The problem is that MIDI is virtually not supported on most BSDs. On FreeBSD I think there's only support for a very limited set of MIDI hardware, so don't dream of making the synthesizer chip on any soundcard work.
Unfortunately, only one person has been working on it since the dawn of mankind if I'm not mistaken and the last activity was maybe 5 years ago.

There are some very good software, but they just can't work because of the lack of hardware support.

I personally only use trackers.


----------



## harishankar (May 8, 2010)

This is not about hardware MIDI support which even Linux lacks in many respects. This is about software synth MIDI.

Try even getting the soft synth to work is impossible in FreeBSD. Just try to install qsynth and see if you can get to play any MIDI file using timidity. If you can get this to work, let me know.

*This thread is not about hardware MIDI*. It's about getting to use software MIDI on FreeBSD. Even that is broken because most MIDI related apps (read all) don't recognize Qsynth or Fluidsynth and timidity cannot run as a background sequencer client in FreeBSD, unlike in Linux where it can be run in ALSA sequencer mode.

I wish I knew how to connect MIDI apps to fluidsynth in FreeBSD. In Linux, again Fluidsynth can tie up to an ALSA port. Maybe I am missing something here.


----------



## harishankar (May 8, 2010)

I am kind of giving up on this. 

timidity++ can play MIDI files stand-alone using a sound font or patches, but it doesn't appear to have any "OSS client" mode similar to ALSA client in Linux where it emulates a MIDI "device" which MIDI applications can connect to and sent MIDI events. This of course cannot be overcome without advanced programming and writing some seriously heavy code for the timidity port of FreeBSD to emulate possibly /dev/sequencer OSS interface which is anyway not implemented in FreeBSD.

I wish I had the advanced programming skills for device programming, but I don't. 

No luck then I guess.


----------



## robbak (May 8, 2010)

I realise that you are not interested in hardware MIDI, but the fact remains that until MIDI hardware works, there is little incentive to use FreeBSD for MIDI, and so no one is working on MIDI software. It is a recognized problem, but no developers have stepped forward, and, when anyone does, they get little support from the community when it comes to testing.
So it all dies in the tree.


----------



## tyr_5B (May 9, 2010)

No guarantees, but you might want to take a look at
http://freesci.linuxgames.com/?page=faq#entry-OSSsoundiscrappy;can'tIuseTimidityforMIDIoutput?

and
http://www.onicos.com/staff/iz/timidity/doc/oss-hack.html (for the file)


it took a few small workarounds to get it compiled, like grabbing awe_voice.h from audio/sdl_mixer, but I now get sweet MIDI music in DOSBox.

All the best.


----------



## harishankar (May 9, 2010)

tyr_5B said:
			
		

> No guarantees, but you might want to take a look at
> http://freesci.linuxgames.com/?page=faq#entry-OSSsoundiscrappy;can'tIuseTimidityforMIDIoutput?
> 
> and
> ...



Oh, thank you thank you. I'll take a look at that.


----------



## harishankar (May 9, 2010)

robbak said:
			
		

> I realise that you are not interested in hardware MIDI, but the fact remains that until MIDI hardware works, there is little incentive to use FreeBSD for MIDI, and so no one is working on MIDI software. It is a recognized problem, but no developers have stepped forward, and, when anyone does, they get little support from the community when it comes to testing.
> So it all dies in the tree.



I don't know why this should be so. The same hardware MIDI problem exists in Linux as well, but soft-synth work well through the ALSA interface emulating a real MIDI device. timidity run in ALSA sequencer client mode is a good example. Most MIDI programs have no trouble recognizing it.

The biggest problem is not hardware, again, but the lack of support by MIDI programs to use soft synthesizers like timidity or fluidsynth. 

Again I repeat FreeBSD should remove those MIDI programs from ports because it gives a wrong impression that MIDI will work, when in fact it is unsupported.


----------



## harishankar (May 9, 2010)

Well I just found that qsynth works well with a soundfont and jack-keyboard application produces sound and works.

The problem only is getting a good tracker or music composer that works with fluidsynth or other soft-synth. If anybody knows of any program that works with jack MIDI let me know.


----------



## harishankar (May 9, 2010)

Sadly there are so many MIDI sequencers but very few which don't depend on ALSA.


----------



## harishankar (May 9, 2010)

*{not a rant} considering returning to Linux*

Hi guys. It's been a good journey with FreeBSD so far. I've used it on occasions but always hit a roadblock when it comes to multimedia, in particular sound and music composing. The problem is that the majority of good sound apps are tied down to ALSA which is regrettable and while I don't deny that OSS seems much better and stabler (from my experience with FreeBSD) the fact that many of those apps I used in Linux don't work is a problem.

I found a few workarounds for the MIDI issue, including using a tracker program with support for the EAW sound patches (milkytracker). But on the other hand, I think it be wiser to use a system which has better support for these applications.

It's truly a pity because I love the base system of FreeBSD, especially the structure of the system configuration (rc.conf) and the way kernel modules are loaded (boot/loader.conf) the devfs system is really great. I am not a fan of ports though and I dislike the fact that most of the port manager applications are tailored to using ports, not binary packages.

I wish to stay on in FreeBSD though. Also having to reinstall Linux after configuring FreeBSD so much is a painful process. 

Anybody have any ideas on any decent MIDI sequencers that actually don't use ALSA and can connect to the fluidsynth interface? Downloading from the upstream provider and compiling them from source and using "make install" is not a problem for me.

So far I've not found any that use fluidsynth/JACK and all rely on ALSA.


----------



## dennylin93 (May 9, 2010)

Try asking on the freebsd-multimedia@ mailing list. There's a chance that you'll get better responses.

By the way, both portmaster and portupgrade support packages as well, so they're not really tailored just for ports (check the -P and -PP options). Portupgrade has supported packages for quite a long time while portmaster recently gained support thanks to dougb@.


----------



## harishankar (May 9, 2010)

Thanks for the suggestion of freebsd-multimedia mailing list. I think I'll look at its archives, but since I already researched pretty thoroughly into the MIDI issue, I am not very hopeful as it's not technically feasible to get ALSA applications to work on FreeBSD without practically rewriting these whole applications to use JACK instead.

(By the way the archives search engine is giving an Internal server error)

The problem with portmaster and portupgrade is that though they support packages, they take their version info from ports, not packages, so using the -PP option (for packages only) can result in problems, especially with dependencies. The problem is that are used more to supplement the ports system rather than being an outright packaging system in their own right. 

For all that I like FreeBSD a lot, and I wish to continue using it. My biggest problem is the sound issue though.


----------



## klanger (May 9, 2010)

Would VirtualBox and Linux or even MS Windows as guest OS help?
That way, you could have your FBSD base, and all needed support for multimedia.


----------



## harishankar (May 10, 2010)

I don't have the necessary disk space to install a guest OS. Maybe in future when I get a bigger hard disk.


----------



## hselasky@ (Oct 1, 2019)

FYI
There is now a new daemon to get "ALSA sequencer mode" working under FreeBSD:









						GitHub - hselasky/alsa-seq-server: Userspace ALSA MIDI sequencer server
					

Userspace ALSA MIDI sequencer server. Contribute to hselasky/alsa-seq-server development by creating an account on GitHub.




					github.com
				




--HPS


----------



## SKull (Oct 1, 2019)

klanger said:


> Would VirtualBox and Linux or even MS Windows as guest OS help?
> That way, you could have your FBSD base, and all needed support for multimedia.


As someone who likes FreeBSD and producing sound: I use windows for that (and gaming). It's simply not worth the hassle ond BSD (or even on linux). Just my two cents.


----------



## robert1307 (Jan 1, 2020)

hselasky@ said:


> FYI
> There is now a new daemon to get "ALSA sequencer mode" working under FreeBSD:
> 
> 
> ...



Could you share more details about usage? I'm running it as:
`sudo ./alsa-seq-server -d /dev/umidi0.0`

After that:
`aconnect -o
client 0: 'Client-0' [type=kernel]
    0 'port-0          '`

but there is no /dev/umidi0.0 created.

Also:
`aplaymidi -p0 MIDI_sample.mid
Cannot create queue - Invalid argument`

Thanks.


----------



## hselasky@ (Jan 2, 2020)

I'm not sure if my alsa sequence server supports everything you need in order to support MIDI file playback. Try to ktrace aplaymidi, and see if any IOCTL's are failing.


----------

