WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: does alsa have a built in midi-synth ?  (Read 3312 times)

Offline hitsware

  • Jr. Member
  • **
  • Posts: 97
does alsa have a built in midi-synth ?
« on: July 19, 2012, 09:45:07 PM »
What I want to do is use some dialect of BASIC
(similar to QBasic) to output raw midi-bytes to
a midi-synth. NOT play a midi-file.
In Dos with QBasic I could write to the MPU-401
with :
Code: [Select]
OUT 816, data-byte I've tried DOSBox with TLC to no avail
No avail with XP either, so I may just
not have it set up right.
In both cases the SOUND command works
(pc speaker) but the supposed SB emulator
does not. (no mpu-401 or opl-3)
I'd like to trash the DOSBox and use something
more native to Linux.
Any insights appreciated ...........   
« Last Edit: July 19, 2012, 09:47:23 PM by hitsware »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11322
Re: does alsa have a built in midi-synth ?
« Reply #1 on: July 19, 2012, 10:51:41 PM »
Hi hitsware
The  alsa.tcz  extension includes the  amidi  command which may be of some use:
http://linux.die.net/man/1/amidi
Alsa-modules includes:
/usr/local/lib/modules/3.0.21-tinycore/kernel/sound/core/snd-rawmidi.ko.gz
/usr/local/lib/modules/3.0.21-tinycore/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko.gz
/usr/local/lib/modules/3.0.21-tinycore/kernel/sound/drivers/opl3/snd-opl3-synth.ko.gz
Modprobing one of those might provide the interface you are looking for.

Offline hitsware

  • Jr. Member
  • **
  • Posts: 97
Re: does alsa have a built in midi-synth ?
« Reply #2 on: July 20, 2012, 10:45:00 AM »
THANK YOU ! Rich  :)
That'll give me a start.

Offline hitsware

  • Jr. Member
  • **
  • Posts: 97
Re: does alsa have a built in midi-synth ?
« Reply #3 on: July 20, 2012, 06:38:28 PM »
OK......
Got alsa
Code: [Select]
speaker-test  # produces noisegives me sound.....     
Code: [Select]
cat /proc/asound/cards  # '0' is default channel I think ? returns:
0[Intel  ]: HDA-Intel - HDA-Intel                                       
                HDA Intel at 0xe280000  irq 45
Code: [Select]
amidi -S "90 3C 7F"  # midi message for C notereturns :
cannot open port "default": inappropriate ioctl for device

Any Insights Wellcome (This is sort of fun, reminds me of my first OPL-3 attempts)  :)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11322
Re: does alsa have a built in midi-synth ?
« Reply #4 on: July 21, 2012, 03:51:25 AM »
Hi hitsware
Quote
cannot open port "default": inappropriate ioctl for device
I'm guessing that if you execute   amidi -l   you get the same error. You may have to modprobe one of
the midi drivers.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10993
Re: does alsa have a built in midi-synth ?
« Reply #5 on: July 22, 2012, 12:28:07 PM »
Alsa does not have built-in midi emulation. If your sound card does not do midi, you need to install a soft synth like timidity.
The only barriers that can stop you are the ones you create yourself.