How to play digital samples?

All 680x0 related coding posts in this section please.

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

qwe
Atari nerd
Atari nerd
Posts: 46
Joined: Mon Oct 29, 2012 10:06 pm

How to play digital samples?

Postby qwe » Thu Oct 09, 2014 8:33 am

Hi friends.
Someone on the net affirm that Atari St is able to play digital samples.
I found only snippet of code but not found working code.
I need a guide step by step to do that.
Is there still someone that plays digitalized sound?
What tools do you use to get samples file?

Thanks in advance

User avatar
bod/STAX
Atari Super Hero
Atari Super Hero
Posts: 508
Joined: Wed Nov 24, 2004 8:13 pm
Location: Halesowen, West Midlands, England

Re: How to play digital samples?

Postby bod/STAX » Thu Oct 09, 2014 3:24 pm

Yes the STF can play digital sound samples. The STE has a DMA chip specifically for this purpose.

Here's the source code to the Megabang demo by TLB. The source includes a routine that is set-up
on Timer A to replay sequenced samples at 7.5khz. It shouldn't be too difficult to adapt it to
replay samples at higher frequencies (depending on your experience of 68000 assembler). The
replay code isn't difficult to rip out.

You can use any sound sampler that can save in either signed or unsigned samples. I'm sorry I can
never remember whether the STF uses signed or unsigned samples but samples need saving out
so that each sample byte is between 0-255 in value rather than -128 through 0 to +127.

Have Fun! :)
You do not have the required permissions to view the files attached to this post.
So let it be written, So let it be done. I'm sent here by the chosen one.

User avatar
bod/STAX
Atari Super Hero
Atari Super Hero
Posts: 508
Joined: Wed Nov 24, 2004 8:13 pm
Location: Halesowen, West Midlands, England

Re: How to play digital samples?

Postby bod/STAX » Thu Oct 09, 2014 3:24 pm

Yes the STF can play digital sound samples. The STE has a DMA chip specifically for this purpose.

Here's the source code to the Megabang demo by TLB. The source includes a routine that is set-up
on Timer A to replay sequenced samples at 7.5khz. It shouldn't be too difficult to adapt it to
replay samples at higher frequencies (depending on your experience of 68000 assembler). The
replay code isn't difficult to rip out.

You can use any sound sampler that can save in either signed or unsigned samples. I'm sorry I can
never remember whether the STF uses signed or unsigned samples but samples need saving out
so that each sample byte is between 0-255 in value rather than -128 through 0 to +127.

Have Fun! :)
You do not have the required permissions to view the files attached to this post.
So let it be written, So let it be done. I'm sent here by the chosen one.

qwe
Atari nerd
Atari nerd
Posts: 46
Joined: Mon Oct 29, 2012 10:06 pm

Re: How to play digital samples?

Postby qwe » Fri Oct 10, 2014 7:33 am

Thank you very much.
Sorry for my ignorance on the topic, but for a "sound sampler" do I need a special hardware or just a microphone connected to the PC?

User avatar
bod/STAX
Atari Super Hero
Atari Super Hero
Posts: 508
Joined: Wed Nov 24, 2004 8:13 pm
Location: Halesowen, West Midlands, England

Re: How to play digital samples?

Postby bod/STAX » Fri Oct 10, 2014 10:27 am

I don't really know regarding the PC, for the ST you do need a cartridge such as ST-Replay 4 or Stereo Master.

I would assume that if your sound card can accept input from a device such as a microphone then all you
would need is the software to record the input. Years ago when I did some sample editing on the PC I used
to use a program called noisemaster, but as I said I've never tried sampling sound on the PC.

If you want to sample stuff from a song then you could get hold of an MP3 to WAV converter. There are plenty
on the web. The resulting WAV file will be huge but you will get perfect sample quality (i.e. no mains hum).
So let it be written, So let it be done. I'm sent here by the chosen one.

qwe
Atari nerd
Atari nerd
Posts: 46
Joined: Mon Oct 29, 2012 10:06 pm

Re: How to play digital samples?

Postby qwe » Fri Oct 10, 2014 12:56 pm

I think ST-Replay 4 or Stereo Master are no more for sale.
The cheaper way should be a microfone connected to a pc; really can a WAV file be played on Atari ST?
If so I resolve my problem.
Is there no one that produces sounds using crossplatform?

User avatar
bod/STAX
Atari Super Hero
Atari Super Hero
Posts: 508
Joined: Wed Nov 24, 2004 8:13 pm
Location: Halesowen, West Midlands, England

Re: How to play digital samples?

Postby bod/STAX » Fri Oct 10, 2014 1:56 pm

Yes a WAV can be played on an ST as its raw sample data. You need to make sure it's the correct
frequency though (and big enough to fit in ram of course).

If you've converted an MP3 to WAV the frequency will be 48khz so if your going to play it on an STE
then you'll need to re-sample it to 25khz, 12.5 or 6khz in either stereo or mono.

If you're going to play it on an STF you'll need to re-sample it one of the playable frequencies that
can be played by the source code in MONO ONLY.

And also it need's to be signed or unsigned depending on the machine.
So let it be written, So let it be done. I'm sent here by the chosen one.

User avatar
FedePede04
Atari God
Atari God
Posts: 1211
Joined: Fri Feb 04, 2011 12:14 am
Location: Denmark
Contact:

Re: How to play digital samples?

Postby FedePede04 » Fri Oct 10, 2014 2:04 pm

Hi.
you can use the PC, but only use the mic port if you need to record something from a microphone, or else use The line In port, in case you have a lab-top and it only have a mic in, you need to buy a usb sound card.

i could be something like this :)
http://www.sandberg.it/product/USB-Sound-Box-7.1

regarding software try search for Audacity it is freeware.
if you want the samples to be played on the Atari-ST then the program can export them as 8bit unsigned Raw.

Best Regards
Peter
Atari will rule the world, long after man has disappeared

sometime my English is a little weird, Google translate is my best friend :)

User avatar
MiggyMog
Atari Super Hero
Atari Super Hero
Posts: 865
Joined: Sun Oct 30, 2005 4:43 pm
Location: Scotland

Re: How to play digital samples?

Postby MiggyMog » Tue Jan 06, 2015 8:54 pm

Another replay example has been provided by Ray / An-Cool

http://s390174849.online.de/ray.tscc.de/samples.htm

You could also look for disk images for any of the ST Samplers as most come with replay code.

I had Mastersound and stereo master and source was included with those.
('< o o o o |''| STM,2xSTFM,2xSTE+HD,C-Lab Falcon MK2+HD,Satandisk,Ultrasatandisk,Ethernat.


Social Media

     

Return to “680x0”

Who is online

Users browsing this forum: No registered users and 4 guests