sox-devel@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* dev request
@ 2013-09-08 21:08 Brad Holland | Muzik Liberated
  2013-09-08 23:28 ` Eric Wong
  2013-09-09 14:13 ` Cedric Roux
  0 siblings, 2 replies; 4+ messages in thread
From: Brad Holland | Muzik Liberated @ 2013-09-08 21:08 UTC (permalink / raw)
  To: sox-devel


[-- Attachment #1.1: Type: text/plain, Size: 1269 bytes --]

Hey Guys, 
Since you are sox developers we thought that you may well be the best people to talk to.
We are looking for a small script (perhaps using sox) that scans a raw audio file and applies some modulation to the audio file which amplifies the content at specific points (when the signal is lower than -6db) and  continues to do this every time the sound does this throughout its decay.

This is to combat 8-bit sample artifacts when creating custom roms for a  drum machine. (Alesis HR-16). There is a special ASIC chip in this machine that detects a 6db spike in a waveform and the chip then turns down the gain -6db in essence, by keeping the amplitude of the waveform above the noise floor inherent in an 8-bit audio data you are able to achieve much higher fidelity in short decaying 'drum shot' type sounds.

We are a community of enthusiasts for the machine, although none of us could code anything like this. We'd be willing to pay/donate to the project or an individual to knock us up a bit of code to convert this..

A much more in-depth explanation of the process we need to accomplish is written in this post:http://www.burnkit2600.com/diy-sound-roms/  

If someone is interested in helping us with this please get back to me! 

Cheers
Brad

[-- Attachment #1.2: Type: text/html, Size: 1698 bytes --]

[-- Attachment #2: Type: text/plain, Size: 433 bytes --]

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* dev request
@ 2013-09-08 21:11 Brad Holland | Muzik Liberated
  0 siblings, 0 replies; 4+ messages in thread
From: Brad Holland | Muzik Liberated @ 2013-09-08 21:11 UTC (permalink / raw)
  To: sox-devel@lists.sourceforge.net


[-- Attachment #1.1: Type: text/plain, Size: 1269 bytes --]

Hey Guys, 
Since you are sox developers we thought that you may well be the best people to talk to.
We are looking for a small script (perhaps using sox) that scans a raw audio file and applies some modulation to the audio file which amplifies the content at specific points (when the signal is lower than -6db) and  continues to do this every time the sound does this throughout its decay.

This is to combat 8-bit sample artifacts when creating custom roms for a  drum machine. (Alesis HR-16). There is a special ASIC chip in this machine that detects a 6db spike in a waveform and the chip then turns down the gain -6db in essence, by keeping the amplitude of the waveform above the noise floor inherent in an 8-bit audio data you are able to achieve much higher fidelity in short decaying 'drum shot' type sounds.

We are a community of enthusiasts for the machine, although none of us could code anything like this. We'd be willing to pay/donate to the project or an individual to knock us up a bit of code to convert this..

A much more in-depth explanation of the process we need to accomplish is written in this post:http://www.burnkit2600.com/diy-sound-roms/  

If someone is interested in helping us with this please get back to me! 

Cheers
Brad

[-- Attachment #1.2: Type: text/html, Size: 1698 bytes --]

[-- Attachment #2: Type: text/plain, Size: 433 bytes --]

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: dev request
  2013-09-08 21:08 Brad Holland | Muzik Liberated
@ 2013-09-08 23:28 ` Eric Wong
  2013-09-09 14:13 ` Cedric Roux
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Wong @ 2013-09-08 23:28 UTC (permalink / raw)
  To: sox-devel

Brad Holland | Muzik Liberated <brad@muzikliberated.com> wrote:
> We are looking for a small script (perhaps using sox) that scans a raw
> audio file and applies some modulation to the audio file which
> amplifies the content at specific points (when the signal is lower
> than -6db) and  continues to do this every time the sound does this
> throughout its decay.

I think using the "compand" effect should get you there.  Tuning it for
your audio is the trickier part.  Here's some great posts on using it
(not written by me):

http://sourceforge.net/mailarchive/message.php?msg_id=23427259
http://mid.gmane.org/20090829011522.cf27e6ee.fmiser@gmail.com
http://mid.gmane.org/20091231022430.aaa510b3.fmiser@gmail.com

(disclaimer: I'm no expert in audio nor sox, just a Unix plumber)

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: dev request
  2013-09-08 21:08 Brad Holland | Muzik Liberated
  2013-09-08 23:28 ` Eric Wong
@ 2013-09-09 14:13 ` Cedric Roux
  1 sibling, 0 replies; 4+ messages in thread
From: Cedric Roux @ 2013-09-09 14:13 UTC (permalink / raw)
  To: sox-devel

[-- Attachment #1: Type: text/plain, Size: 1719 bytes --]

On 09/08/2013 11:08 PM, Brad Holland | Muzik Liberated wrote:
> Hey Guys,
> Since you are sox developers we thought that you may well be the best people to talk to.
> We are looking for a small script (perhaps using sox) that scans a raw audio file and applies some modulation to the audio file which amplifies the content at specific points (when the signal is lower than -6db) and  continues to do this every time the sound does this throughout its decay.
>
> This is to combat 8-bit sample artifacts when creating custom roms for a  drum machine. (Alesis HR-16). There is a special ASIC chip in this machine that detects a 6db spike in a waveform and the chip then turns down the gain -6db in essence, by keeping the amplitude of the waveform above the noise floor inherent in an 8-bit audio data you are able to achieve much higher fidelity in short decaying 'drum shot' type sounds.
>
> We are a community of enthusiasts for the machine, although none of us could code anything like this. We'd be willing to pay/donate to the project or an individual to knock us up a bit of code to convert this..
>
> A much more in-depth explanation of the process we need to accomplish is written in this post:http://www.burnkit2600.com/diy-sound-roms/
>
> If someone is interested in helping us with this please get back to me!
>
> Cheers
> Brad

Hi Brad,

attached hack might do the trick.
If not, tell me, I'll have a closer look,
there might be bugs in there (just a quick
and dirty hack).

You can compile it, right? If you're using
windows you may need to change stuff in there
to handle binary files correctly.

Anyway, just tell me if something is wrong, whatever it is.

Regards,
Cédric.

[-- Attachment #2: christmas.c --]
[-- Type: text/x-csrc, Size: 1374 bytes --]

#include <stdio.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <math.h>

int main(int n, char **v)
{
  char *infile;
  char *outfile;
  FILE *f;
  struct stat s;
  float *data;
  float *max;
  ssize_t size;
  ssize_t i;
  float gain;
  int up;
  float last;

  if (n != 3) {
    printf("gimme <input float mono file> <output float mono file>\n");
    return 1;
  }

  infile = v[1];
  outfile = v[2];

  if (stat(infile, &s)) { perror(infile); return 1; }
  size = s.st_size;

  data = malloc(size * sizeof(float)); if (data == NULL) abort();
  max = malloc(size * sizeof(float)); if (max == NULL) abort();

  f = fopen(infile, "rb"); if (f == NULL) { perror(infile); return 1; }
  fread(data, size, 4, f);
  fclose(f);

  max[size-1] = fabsf(data[size-1]);

  /* populate max */
  for (i = size-2; i >= 0; i--) {
    float m = fabsf(data[i]);
    if (m > max[i+1]) max[i] = m; else max[i] = max[i+1];
  }

  /* apply gain */
  gain = 1;
  up = 1;
  last = data[0];
  for (i = 0; i < size; i++) {
    data[i] *= gain;
    max[i] *= gain;
    if (up == 0 && data[i] > last) {
      /* local minimum */
      if (max[i] <= 0.5) gain *= 2;
    }
    if (data[i] > last) up = 1;
    else if (data[i] < last) up = 0;
    last = data[i];
  }

  f = fopen(outfile, "wb"); if (f == NULL) { perror(outfile); return 1; }
  fwrite(data, size, 4, f);
  fclose(f);

  return 0;
}

[-- Attachment #3: Type: text/plain, Size: 433 bytes --]

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk

[-- Attachment #4: Type: text/plain, Size: 158 bytes --]

_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-09-09 14:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-08 21:11 dev request Brad Holland | Muzik Liberated
  -- strict thread matches above, loose matches on Subject: below --
2013-09-08 21:08 Brad Holland | Muzik Liberated
2013-09-08 23:28 ` Eric Wong
2013-09-09 14:13 ` Cedric Roux

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).