nfg.forums

NFG Forums => SIG X68000 => Topic started by: TheRogue on December 24, 2009, 06:37:37 PM

Title: Audio In/Out ports on the X68000
Post by: TheRogue on December 24, 2009, 06:37:37 PM
I'm interested in how exactly these function,  as I can't just connect my midi synth to Audio In and my speakers to Audio Out. I have to connect the headphone jack to Audio In on my synth, and my speakers to audio out, and I would prefer to do it the other way. I don't speak Japanese so if someone would like the relevant sections scanned from the X68k XVI manuals, I can do that. Thanks guys!
Title: Re: Audio In/Out ports on the X68000
Post by: Magic Knight on December 24, 2009, 07:44:15 PM
I've checked the manual. The Audio In input takes an analogue signal and digitizes it, it's not supposed to be connected to a MIDI synth.

I'm not sure what you're trying to do. From the MIDI synth I connect to an amplifier, it's also possible to connect to computer speakers. There's no way of getting the MIDI sound through the X68000 as far as I know. 
Title: Re: Audio In/Out ports on the X68000
Post by: NFG on December 24, 2009, 11:19:40 PM
It should also be noted the audio inputs on the X68 are mono.
Title: Re: Audio In/Out ports on the X68000
Post by: aramokona3 on December 25, 2009, 05:02:58 AM
Examples to use the audio in/out ports

>basic

   10 int f
   20 dim char a(65535)
   30 print "Hit any key to start recording"
   40 asc(inkey$)
   50 a_rec(a,4,65535)
   60 f=fopen("a.pcm","c")
   70 fwrite(a,65535,f)
   80 fclose(f)

save"recorder.bas"
run
Hit any key to start recording
(recording)

   10 int f,l
   20 dim char a(65535)
   30 f=fopen("a.pcm","r")
   40 l=fread(a,65535,f)
   50 fclose(f)
   60 print "Hit any key to start playing"
   70 asc(inkey$)
   80 a_play(a,4,3,l)

save"player.bas"
run
Hit any key to start playing
(playing)

NOTE:
a_rec(array,freq,size)
a_play(array,freq,mode,size)
freq:0=3.9KHz,1=5.2KHz,2=7.8KHz,3=10.4KHz,4=15.6KHz(4bits/sample,monaural)
mode:0=mute,1=left,2=right,3=center

Unfortunately, OPMDRV3.X of Human68k version 3.02 which have been released on
the internet does not work properly in the ordinary method. So you may need the
bundled Human68k to run the above program.
Title: Re: Audio In/Out ports on the X68000
Post by: TheRogue on December 25, 2009, 09:51:47 AM
Ok interesting. I was hoping that it could be used as a pass-through so I could have the X68k sound mixed with the MIDI synth and played back through one set of speakers. That's what I'm doing now, but by using the headphone jack on the front of my X68k and the audio in on my SC-88.
Title: Re: Audio In/Out ports on the X68000
Post by: papa_november on December 26, 2009, 03:43:04 AM
Holy crap the X68000 can actually record audio? Most other systems of the time needed a digitizer connected to the parallel or serial port for that.

I always thought that the audio in port was just a pass-through.
Title: Re: Audio In/Out ports on the X68000
Post by: TheRogue on December 26, 2009, 06:17:59 AM
Yeah, I was under the same impression papa_november was. I was hoping I could pass the midi synth output through the audio in port and plug my speakers into audio out, so then I could use the headphone jack on the front of the XVI and hear both the ADPCM and the MIDI over my headphones if I wanted to be quieter. I can do all that now through the passthrough on my SC-88, it's just the headphone jack on my synth needs to be re-soldered, so I have to wiggle the connector to get sound from my headphones. I'm going to re-solder it one day soon, just haven't got around to it yet.
Title: Re: Audio In/Out ports on the X68000
Post by: aramokona3 on December 28, 2009, 12:28:27 AM
The audio input port of X68000 is connected to the analog input pin of MSM6258,
OKI's VOICE IC. MSM6258's AD converter makes 4-bit ADPCM data from analog signal.
MSM6258's DA converter makes analog signal from 4-bit ADPCM data. ADPCM data to
be converted is provided by either DMAC or its AD converter. The former is the
playback-mode and the latter is the recording-mode. MSM6258 can not mix both
ADPCM data.

It is possible in theory to mix ADPCM data provided by PCM files and MSM6258's
AD converter in realtime. However, I don't recommend this method unless you are
a hard-core programming fan. Because, you will have to output the results by
using YM2151 (OPM) and a special software. In addition, music that has passed
through MSM6258 is low-quality, because it has been converted to digital data
with low sampling frequency once and converted to analog signal again.