English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 10 April 2023, 06:27   #1
Haplo
Registered User
 
Join Date: Sep 2019
Location: Sydney
Age: 47
Posts: 60
Audible tick when playing samples with ptplayer

Hi all,

I have a few small .wav samples that I have saved to "IFF (Amiga/SVX8/SV16), signed 8-bit PCM" using Audacity. When I play these samples using ptplayer, I hear one audible "tick" noise at the beginning of them, regardless of whether a MOD is also playing or not. The IFFs don't have this noise when played back in Audacity.

When this happens in a circuit is it because of a sudden DC level change in the audio signal. Is something similar happening here? How to fix this?

Last edited by Haplo; 11 April 2023 at 12:22.
Haplo is offline  
Old 10 April 2023, 08:32   #2
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,039
Did you trying setting the first 2 sample bytes (raw, not iff) to 0? The player should do that automatically to prevent it, but...
You could also try loading a sample into Protracker and saving it back to take care of that.
a/b is offline  
Old 10 April 2023, 10:51   #3
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Yes, this is a FAQ, and a/b's hint is correct.
Please read the FAQ section in ptplayer.readme. (There is also an option without clearing the first two bytes).
phx is offline  
Old 10 April 2023, 14:58   #4
Haplo
Registered User
 
Join Date: Sep 2019
Location: Sydney
Age: 47
Posts: 60
Yes, I am already using the "NULL_IS_CLEARED" option. Moreover, in my experience, not getting this right will cause a high-pitch noise at the end of the sample (as the FAQ says), not a "click" at the beginning.

I'll run the samples through Protracker anyway, just in case Audacity is doing something unexpected.


Edit:
I have confirmed that locations $0 and $1 stay 0. Also, passing the samples through ProTracker didn't help, regardless of the value of "NULL_IS_CLEARED". The click at the beginning is still there. What else could be wrong?

Last edited by Haplo; 10 April 2023 at 15:23.
Haplo is offline  
Old 10 April 2023, 15:50   #5
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Perhaps the samples aren't properly normalized, i.e. not centered around value 0.
meynaf is offline  
Old 10 April 2023, 18:17   #6
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by Haplo View Post
Yes, I am already using the "NULL_IS_CLEARED" option. Moreover, in my experience, not getting this right will cause a high-pitch noise at the end of the sample (as the FAQ says), not a "click" at the beginning.
Correct. I missed that. Then there is something else.
Can you share such a sample for testing?
phx is offline  
Old 11 April 2023, 10:29   #7
Haplo
Registered User
 
Join Date: Sep 2019
Location: Sydney
Age: 47
Posts: 60
They seem to be properly centred around 0 as well.

I have attached one of the samples, saved using Audacity and then ProTracker 2 clone 1.57. Thanks for taking a look.
Attached Files
File Type: zip item.zip (6.9 KB, 29 views)
Haplo is offline  
Old 11 April 2023, 10:34   #8
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
Does ptplayer support playing back 8SVX directly (I'm not familiar with it) ?
If not, the IFF metadata in the file will cause some audible artifacts if played back.

Last edited by hooverphonique; 11 April 2023 at 10:52.
hooverphonique is offline  
Old 11 April 2023, 10:54   #9
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,039
Players in general expect raw data. But that shouldn't be a problem, e.g. you load an IFF sample in protracker while composing a module, it gets converted and saved as raw within a module itself.
However, if you are using *external* samples, so you load an IFF sample yourself as a raw binary file and feed that to a player, that won't work (as hoover pointed out, the IFF header will be interpreted as raw sample data). Was this the case from the beginning?
a/b is offline  
Old 11 April 2023, 11:29   #10
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,957
Easy, dont use IFF files as samples for Protracker, save them as raw data. This is common bug. some Amiga soundformats handles IFF samples, but not Protracker.
Don_Adan is offline  
Old 11 April 2023, 12:55   #11
Haplo
Registered User
 
Join Date: Sep 2019
Location: Sydney
Age: 47
Posts: 60
This was it! Raw data it is. Thanks everyone for your help!
Haplo is offline  
Old 11 April 2023, 13:03   #12
no9
Registered User
 
no9's Avatar
 
Join Date: Feb 2018
Location: Poland
Posts: 352
Quote:
Originally Posted by Don_Adan View Post
some Amiga soundformats handles IFF samples, but not Protracker.

It does. You can store loop points data there. There is RAW/IFF/PAK switch in PT2.3.
no9 is offline  
Old 11 April 2023, 13:40   #13
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by Haplo View Post
This was it! Raw data it is.
Great! I guess I have to make that clearer in the next readme, and maybe add another point to the FAQ.
phx is offline  
Old 11 April 2023, 15:00   #14
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,957
Quote:
Originally Posted by no9 View Post
It does. You can store loop points data there. There is RAW/IFF/PAK switch in PT2.3.
Maybe for experienced musicians. But i see too many Protracker mods with IFF files as raw samples when i ripped modules. Sometimes this is not hearable but sometimes hearable.
Don_Adan is offline  
Old 11 April 2023, 15:10   #15
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Protracker can load IFF samples, and will convert them to RAW inside the mod.
Thus, if the IFF file format isn't identified as such, you end up with IFF headers in samples.
meynaf is offline  
Old 11 April 2023, 18:38   #16
No.3
Registered User
 
Join Date: Sep 2022
Location: Switzerland
Posts: 114
Quote:
Originally Posted by Haplo View Post
I have attached one of the samples, saved using Audacity and then ProTracker 2 clone 1.57. Thanks for taking a look.
the 8SVX file attached has a broken VHDR chunk i.e. it contains invalid data
No.3 is offline  
Old 11 April 2023, 22:51   #17
pandy71
Registered User
 
Join Date: Jun 2010
Location: PL?
Posts: 2,741
SoX seem to be OK with 8svx files - i use script like this to convert audio files into 8svx. Feel free to modify - it has some additional audio processing to deal with some Amiga limitations.

Code:
@setlocal

@REM Where to Find SoX
@set SoX=C:\sox
@set PATH=%PATH%;%SoX%


@SET PAL=28375160
@SET NTSC=28636363
@rem Paula PAL=3546895
@rem Paula NTSC=3579545.45454545


@rem LowPassFilter F=
@rem Amiga 500/2000: 4.42 kHz (100 nF, 360 ?)
@rem A600: 4.42 kHz (100 nF, 360 ?)11
@rem A1200 Rev1d: 27.7 kHz (3.9 nF, 1.5 k?)
@rem A1200 Rev2: 34.4 kHz (6.8 nF, 680 ?)
@rem A4000: 4.52 kHz (47 nF, 750 ?)

@SET LPF=4420 

@rem SET dither=dither -S
@rem SET dither=dither

@SET dither=

@rem lipshitz, f-weighted, modified-e-weighted, improved-e-weighted, gesemann, shibata, low-shibata, high-shibata
@set noiseshp=improved-e-weighted

@SET /a CLK=%PAL%/8
@SET PERIOD=128

@SET /a AFREQ_I = (((100*%CLK%)/(1*%PERIOD%))+1) / 100
@SET /a AFREQ_F = (((100*%CLK%)/(1*%PERIOD%))+1) %% 100
@SET AFREQ=%AFREQ_I%.%AFREQ_F%

@SET /a APREC_I = (((100*%CLK%)/(4*%PERIOD%))) / 100
@SET /a APREC_F = (((100*%CLK%)/(4*%PERIOD%))) %% 100
@SET APREC=%APREC_I%.%APREC_F%

@SET file=%1
@SET fname=%~n1

@ECHO Samplerate=%AFREQ%
@ECHO Precompensation=%APREC%
@ECHO %LPF%
@ECHO file=%file%
@ECHO filename=%fname%

@rem SET aproc=treble +6.0206 %LPF% .5 treble +6.0206 %APREC% .5 gain -n -0.085576 %dither%
@SET aproc=treble +6.0206 %LPF% .5 gain -n -0.085576 %dither%


@sox --multi-threaded --buffer 524288 --input-buffer 524288 -S -D -G %file% "%fname%.8svx" remix - rate -v -s -I %AFREQ% %aproc% stats -b 8 stat
@sox --multi-threaded --buffer 524288 --input-buffer 524288 "%fname%.8svx" -n spectrogram -z 64 -q 12 -w Kaiser -y 513 -x 496 -o "%fname%_8svx.png"

@pause
@endlocal
I use recent SoX build from https://audiodigitale.eu/repo/sox/ - it has some features not present in old SoX (seem SoX development was stopped few years ago)

Just checked that this particular SoX doesn't have integrated 'spectrogram' command as such it may be not the best one.

Last edited by pandy71; 12 April 2023 at 22:56.
pandy71 is offline  
Old 12 April 2023, 14:48   #18
Haplo
Registered User
 
Join Date: Sep 2019
Location: Sydney
Age: 47
Posts: 60
Thanks. Once I used Audacity to export those IFFs to raw files the annoying click went away.
Haplo is offline  
Old 12 April 2023, 19:31   #19
pandy71
Registered User
 
Join Date: Jun 2010
Location: PL?
Posts: 2,741
Quote:
Originally Posted by Haplo View Post
Thanks. Once I used Audacity to export those IFFs to raw files the annoying click went away.
In SoX you just need to replace extension .8svx to .s8 and it should work equally... Somehow i don't like Audacity (after they changed license and started spying users).
pandy71 is offline  
Old 12 April 2023, 19:35   #20
desiv
Registered User
 
desiv's Avatar
 
Join Date: Oct 2009
Location: Salem, OR
Posts: 1,767
You just need to put a floppy disk in the drive to stop that clicking...
...
sorry... couldn't help it...
;-)
desiv is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Audible "digital" noise from A1200 audio output 8bitbubsy support.Hardware 23 22 August 2020 12:31
Anyone deeply familiar with tick generators? Irl support.Hardware 7 03 May 2019 00:51
A1000 Tick Circuit doubledecca support.Hardware 1 12 November 2015 14:07
Playing samples Lonewolf10 Coders. Tutorials 8 18 February 2013 22:33
Always run with this settings tick G.Longsword request.UAE Wishlist 4 19 March 2006 17:01

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 14:48.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10256 seconds with 14 queries