fiduciary

Author Topic: Sound cliking sometimes when on a swing.  (Read 686 times)

0 Members and 1 Guest are viewing this topic.

Offline Sarevok81

  • Trade Count: (0)
  • No Force
  • *
  • Posts: 10
  • Um...Hello?
Sound cliking sometimes when on a swing.
« on: May 02, 2020, 03:42:15 PM »


Hello everyone,
I have been trying to create a sound bank for my card based on lightsaber os, arduino atmega 328p an dfplayer xy5200 for some time now.
Sound banks worked well but they all present a problem:
A small "click" is heard when a swing file starts playing.

The problem does not always occur but only sometimes.
I checked the hum and swing files and none of them hear the "click".
I cleaned up the meta data of the files and tried the different sound banks at different frequencies.

It seems that the problem depends on the point where the hum file is interrupted: if interrupted in some points the hum file is interrupted without "clik", in other points it creates the noise.

To solve the problem I tried to modify the arduino code to lower the volume before stopping the hum and then raising it again before starting the swing.
The problem thus disappears but the solution is not good because it creates too many delays in the execution of the sound and sometimes the swing palyback is lost.

Have any of you ever had the same problem or know how to solve it?

Offline jbkuma

  • Mining Colony Members
  • Trade Count: (0)
  • Master Force User
  • *
  • Posts: 876
  • Pixels, everywhere.
    • Mad Science Workshoppe
Re: Sound cliking sometimes when on a swing.
« Reply #1 on: May 02, 2020, 07:33:07 PM »
Clicking or Samoset always low power or metadata left in the file. If you are powering the amp from the Arduino you need to switch change your wiring to power it from the battery.

Offline Sarevok81

  • Trade Count: (0)
  • No Force
  • *
  • Posts: 10
  • Um...Hello?
Re: Sound cliking sometimes when on a swing.
« Reply #2 on: May 03, 2020, 01:11:38 AM »
I removed meta data when export wav feom audacity.
This is correct or there is a better program?

Offline MikeyX

  • Trade Count: (0)
  • Force User
  • ***
  • Posts: 202
  • Star Wars collector in the UK.
Re: Sound cliking sometimes when on a swing.
« Reply #3 on: May 03, 2020, 12:56:20 PM »
I know it's a basic question - but just to check: the files should start at a zero crossing point on the waveform. If they don't then you can get clicks like you describe.

Offline Sarevok81

  • Trade Count: (0)
  • No Force
  • *
  • Posts: 10
  • Um...Hello?
Re: Sound cliking sometimes when on a swing.
« Reply #4 on: May 05, 2020, 09:52:47 AM »
I know it's a basic question - but just to check: the files should start at a zero crossing point on the waveform. If they don't then you can get clicks like you describe.

What is the way to check the zero crossing???
I used normlization filter of audacity with option DC offset correction enabled, but I dont'know if this is correct....

Offline jbkuma

  • Mining Colony Members
  • Trade Count: (0)
  • Master Force User
  • *
  • Posts: 876
  • Pixels, everywhere.
    • Mad Science Workshoppe
Re: Sound cliking sometimes when on a swing.
« Reply #5 on: May 05, 2020, 11:06:31 AM »
Removing the metadata in audacity works, the zero crossing thing should not be something to worry about.

Have you tried testing the default files?

Offline Sarevok81

  • Trade Count: (0)
  • No Force
  • *
  • Posts: 10
  • Um...Hello?
Re: Sound cliking sometimes when on a swing.
« Reply #6 on: May 05, 2020, 03:23:12 PM »
Removing the metadata in audacity works, the zero crossing thing should not be something to worry about.

Have you tried testing the default files?

The default files work better, but make the same click.
I used audacity function in menu select-at zero crossing on the hum sound, now the loop of the hum is ok without click.
Tomorrow i try to use the same function on every files and I hope to fix the problem.

When I export files in audacity the meta data windows appears before saving file. Tipiccally I use the clear button before save file. This is enough for save file without meta data or there is something else to do?

Offline MikeyX

  • Trade Count: (0)
  • Force User
  • ***
  • Posts: 202
  • Star Wars collector in the UK.
Re: Sound cliking sometimes when on a swing.
« Reply #7 on: May 08, 2020, 09:13:04 AM »
Removing the metadata in audacity works, the zero crossing thing should not be something to worry about.

Have you tried testing the default files?

The default files work better, but make the same click.
I used audacity function in menu select-at zero crossing on the hum sound, now the loop of the hum is ok without click.
Tomorrow i try to use the same function on every files and I hope to fix the problem.

When I export files in audacity the meta data windows appears before saving file. Tipiccally I use the clear button before save file. This is enough for save file without meta data or there is something else to do?

Sorry I didn't check back sooner - sounds like you have found the Audacity function to move to the nearest zero-crossing point (and then clip up to that point) - this is necessary for any sounds that loop, an for any sounds that are part of unmixed fonts where the sounds are chained together otherwise you often get a nasty click like you describe. If you imagine the waveform as a continuous cycle if you don't have both sounds that meet with a zero crossing then it makes a 'jump' which causes the click (unless you get lucky).

Metadata click issues usually are at the end of the file (where the card tries to play the metadata as if it is part of the sound). If you clear them in Audacity then it clears all metadata as far as I can make out. I have had files in the past that had a metadata click, but had no visible metadata in Audacity. Used Audacity to clear the metadata (as you describe) and that fixed the issue. Also you can tell it has removed invisible metadata as the exported file will be a few bytes smaller.

Offline Sarevok81

  • Trade Count: (0)
  • No Force
  • *
  • Posts: 10
  • Um...Hello?
Re: Sound cliking sometimes when on a swing.
« Reply #8 on: May 08, 2020, 11:28:00 AM »
Removing the metadata in audacity works, the zero crossing thing should not be something to worry about.

Have you tried testing the default files?

The default files work better, but make the same click.
I used audacity function in menu select-at zero crossing on the hum sound, now the loop of the hum is ok without click.
Tomorrow i try to use the same function on every files and I hope to fix the problem.

When I export files in audacity the meta data windows appears before saving file. Tipiccally I use the clear button before save file. This is enough for save file without meta data or there is something else to do?

Sorry I didn't check back sooner - sounds like you have found the Audacity function to move to the nearest zero-crossing point (and then clip up to that point) - this is necessary for any sounds that loop, an for any sounds that are part of unmixed fonts where the sounds are chained together otherwise you often get a nasty click like you describe. If you imagine the waveform as a continuous cycle if you don't have both sounds that meet with a zero crossing then it makes a 'jump' which causes the click (unless you get lucky).

Metadata click issues usually are at the end of the file (where the card tries to play the metadata as if it is part of the sound). If you clear them in Audacity then it clears all metadata as far as I can make out. I have had files in the past that had a metadata click, but had no visible metadata in Audacity. Used Audacity to clear the metadata (as you describe) and that fixed the issue. Also you can tell it has removed invisible metadata as the exported file will be a few bytes smaller.

I used the zero corssing select to correct the hum and lookup clicks, the only sounds that are looped and I solved the problem.
In my sound bank all the swings are mixed with the hum sound in the background, so I have the swing sound at the beginning of the file and then the hum sound continues for 90 seconds. I used the normalization filter on all files to correct the DC offset and added a fade in of 0,2/0.5s at the beginning of the swing and a fade out at the end of the 90 seconds of hum.

By doing so in the clash sounds I managed to solve all the artifacts.
Unfortunately in the swing there are some clicks that are heard sometimes and do not seem related to one or more sund in particular.
This bug did not manage to solve it.

On the PlecterLabs website there is a guide that says that the files should be exported in unsigned WAV 16b mono, but Audacity cannot export in unsigned 16bit format, the only format is the signed 16 bit.
Could this be the problem?

Offline jbkuma

  • Mining Colony Members
  • Trade Count: (0)
  • Master Force User
  • *
  • Posts: 876
  • Pixels, everywhere.
    • Mad Science Workshoppe
Re: Sound cliking sometimes when on a swing.
« Reply #9 on: May 08, 2020, 06:04:12 PM »
If you are getting clicking in the default files, it's probably not the zero crossing thing.  We've been using these fonts for years without issue.

Offline MikeyX

  • Trade Count: (0)
  • Force User
  • ***
  • Posts: 202
  • Star Wars collector in the UK.
Re: Sound cliking sometimes when on a swing.
« Reply #10 on: May 09, 2020, 03:01:30 AM »
If you are getting clicking in the default files, it's probably not the zero crossing thing.  We've been using these fonts for years without issue.
jbkuma is absolutely right here - sorry I read the thread as someone trying to create a new font for the card rather than using default fonts. If these are default fonts then the problem would likely have nothing to do with the files themselves as jbkuma notes.

My replies all relate to creating your own font - sorry for any confusion.

Offline MikeyX

  • Trade Count: (0)
  • Force User
  • ***
  • Posts: 202
  • Star Wars collector in the UK.
Re: Sound cliking sometimes when on a swing.
« Reply #11 on: May 09, 2020, 03:19:41 AM »
I used the zero corssing select to correct the hum and lookup clicks, the only sounds that are looped and I solved the problem.
In my sound bank all the swings are mixed with the hum sound in the background, so I have the swing sound at the beginning of the file and then the hum sound continues for 90 seconds. I used the normalization filter on all files to correct the DC offset and added a fade in of 0,2/0.5s at the beginning of the swing and a fade out at the end of the 90 seconds of hum.

By doing so in the clash sounds I managed to solve all the artifacts.
Unfortunately in the swing there are some clicks that are heard sometimes and do not seem related to one or more sund in particular.
This bug did not manage to solve it.

On the PlecterLabs website there is a guide that says that the files should be exported in unsigned WAV 16b mono, but Audacity cannot export in unsigned 16bit format, the only format is the signed 16 bit.
Could this be the problem?

Assuming you are trying to create a new font (see previous post) - you shouldn't need to fade-in/out, and in an old school monophonic font (which is I assume what you are trying to create?) this will likely cause a slightly odd momentary dip in the sound volume. If however this is a polyphonic mixed font (with support from the card to do that) then it would work and smooth out issues a bit.

There are reasons why you can still get occasional clicks - but there are too many to list here - this is where font creation drifts into being art form rather than science. I'm usually able to diagnose and fix all these types of issues by visually seeing the waveforms, looking over the files, and experimenting.

On the unsigned wav file point - what guide are you referring to on Erv's site as I had not seen this before, I've been exporting using signed for years from Audacity without an issue.

Offline Sarevok81

  • Trade Count: (0)
  • No Force
  • *
  • Posts: 10
  • Um...Hello?
Re: Sound cliking sometimes when on a swing.
« Reply #12 on: May 09, 2020, 03:26:37 PM »
It is the first time that I try to create a quality font and for simplicity I started from an existing font and I am trying to convert it for use in the fx-saberos homebrew project that I am assembling these days.
If I can get a good result I will move on to creating a custom font.

The audio files that I'm creating are monophonic, applying a small fade in of 0.020s to the clash and blaster files I managed to improve their reproduction but on the swings it didn't work.
If you want I can share my converted sound bank, maybe you who have more experience can understand what's wrong.

It occurred to me that perhaps the defect I hear before the swings is not really a click, but rather a sort of emptiness or delay that causes a moment of complete silence in the sword before the swing starts playing.
It could therefore be like a sort of click to the human ear but maybe it is not.
In this case I don't know if it will be resolvable by manipulating the audio files ...


Offline J.E.D., I

  • Trade Count: (0)
  • No Force
  • *
  • Posts: 7
  • Um...Hello?
Re: Sound cliking sometimes when on a swing.
« Reply #13 on: May 16, 2020, 08:08:50 PM »
Perhaps this technique will work for you. Its the method I use to loop my hums and swings seamless. I use Audacity.

1. Cut two seconds off the beginning of the swing. When you cut, make sure the cut at 2 seconds is right at the zero line. You msut zoom in a lot to make sure you get your cut at zero.

2. Paste the cut below the original track.

3. Using the time shift tool, slide the two second clip all the way to the end of the original track (still below it). Align the the cut at two seconds with the end of the original track.

4. Now time shift the cut at two seconds .5 seconds past the end of the original track.

5. With the mouse, highlight the original track from the end, backwards 1.5 seconds. Simultaneoulsy drag the mouse over the track you pasted underneath it. Dont highlight the part past the end.

6. Both tracks should be highlighted 1.5 seconds from the end. The part past the end is not highlighted.

7. Click on effects, click crossfade tracks. (not crossfade clips)

8. Hit control A and then click transport, playing, loop play. The swing should loop seamlessly. If not, click undo until your back where you started. Start over and make sure you make your original cut at the zero line near two seconds.

Good Luck