21 May '13 - 05:57 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: 1 [2] 3 4 ... 30
  Reply  |  Print  
Author Topic: BASS_FX 2.4.9  (Read 257864 times)
Irrational86
Posts: 960


« Reply #20 on: 11 Jan '04 - 06:04 »
Reply with quoteQuote

lol...ok, thanks, hehehe
Logged
DanaPaul
Posts: 335


« Reply #21 on: 11 Jan '04 - 10:25 »
Reply with quoteQuote

Arthur, you have e-mail with a small attachment Wink

Incidentally, I've started a web page that includes a collection of suggestions for Delphi distributable example code applications.  If anyone has sugestions or comments please post or send e-mail...

http://members.aol.com/wtgdana/delphi_distributable_code.htm
Logged
Irrational86
Posts: 960


« Reply #22 on: 11 Jan '04 - 15:59 »
Reply with quoteQuote

Excuse me Dana, but you got a mistake in your webpage about the DWORD type, look at these two screen shots (this is the help for Delphi 7)...focus on the red circle

Screen shot 1
Screen shot 2
« Last Edit: 11 Jan '04 - 15:59 by XMinioNX » Logged
Chris
Posts: 1505


« Reply #23 on: 11 Jan '04 - 17:07 »
Reply with quoteQuote

Sorry Dana  there are no Diffrends about the normal DWord and the Windows DWord...
Here are some excerpt from the Orginal Delphi 6 Sources (between delphi6 and delphi 7 are no difference about the IntegerTypes

Longword   0..4294967295   32 Bit, unsigned 32 Bit

---------------------------------------------------------------------

now lets jump to the orginal Windows.pas

DWORD = Types.DWORD

-------------------------------------------------------

now lets jump to the Types.pas

DWORD = LongWord


Greets chris
Logged
DanaPaul
Posts: 335


« Reply #24 on: 11 Jan '04 - 22:00 »
Reply with quoteQuote

I'll update the page with this info.

In Delphi 2 Windows.pas declares... DWord = integer.  LongWord type doesn't exist, and Cardinal comes the closest to a 0..4294967295 4 byte integer type, but in theory only.

IMHO, regardless of Delphi version, re-typecasting DWord type  isn't progress.
Logged
Alex
Guest
« Reply #25 on: 23 Jan '04 - 00:11 »
Reply with quoteQuote

Hi, i found the following DSP code for c from a link in this thread and i want to use it in delphi.
I know that there is a similar function in bass_fx20alpha but i want to try it

The C code was
Here's a simple dynamic amplification DSP...
#define amptarget 30000 // target level
#define ampquiet 800 // quiet level
#define amprate 0.02f // amp adjustment rate

typedef struct {
     float gain; // amplification level
     int delay; // delay before increasing level
     int count; // count of sequential samples below target level
     int high; // the highest in that period
     int quiet; // count of sequential samples below quiet level
} AUTOAMPSTUFF;

void CALLBACK autoamp(HDSP handle, DWORD channel, void *buffer, DWORD length, AUTOAMPSTUFF *amp)
{
     short *data=(short*)buffer;
     DWORD c;
     for (c=0;c<length/2;c++) {
           int s=(int)(data[c]*amp->gain); // amplify sample
           int sa=abs(s);
           if (abs(data[c])<ampquiet)
                 amp->quiet++; // sample is below quiet level
           else
                 amp->quiet=0;
           if (sa<amptarget) { // amplified level is below target
                 if (sa>amp->high) amp->high=sa;
                 amp->count++;
                 if (amp->count==amp->delay) { // been below target for a while
                       if (amp->quiet>amp->delay)
                             // it's quiet, go back towards normal level
                             amp->gain+=10*amprate*(1-amp->gain);
                       else
                             amp->gain+=amprate*amptarget/amp->high; // increase amp
                       amp->high=amp->count=0; // reset counts
                 }
           } else { // amplified level is above target
                 if (s<-32768) s=-32768;
                 else if (s>32767) s=32767;
                 amp->gain-=2*amprate*sa/amptarget; // decrease amp
                 amp->high=amp->count=0;
           }
           data[c]=(short)s; // replace original sample with amplified version
     }
}

...

AUTOAMPSTUFF amp;

amp.gain=1;
amp.delay=BASS_ChannelSeconds2Bytes(handle,1)/2;
amp.count=amp.high=amp.quiet=0;
BASS_ChannelSetDSP(handle,(DSPPROC*)&autoamp,&amp);


I managed to go this far because of some knowladge in PHP but i don't know what to use instead of data[c] to read the samples

type
  TAUTOAMPSTUFF = record
    gain: float; // amplification level
    delay: Integer; // delay before increasing level
    count: Integer; // count of sequential samples below target level
    high: Integer; // the highest in that period
    quiet: Integer; // count of sequential samples below quiet level
  end;
.....
implementation
var
 amp:TAUTOAMPSTUFF;

const
  amptarget = 30000; // target level
  ampquiet = 800; // quiet level
  amprate = 0.02; // amp adjustment rate


  procedure DynamicAmp(handle: HDSP; channel: DWORD; buffer: Pointer; length: DWORD; user: DWORD); stdcall;
var
  c: DWORD;
  data: PSingle;
  S,sa: Integer;
begin
  data := buffer;
  c := 0;
  for c := 0 to (length div 2) do
  begin
    s := data[c] * (amp.gain)); // amplify sample
    sa := abs(s);
    if ((abs(data[c])) < (ampquiet)) then inc(amp.quiet) // sample is below quiet level
    else amp.quiet := 0;

    if (sa < amptarget) then // amplified level is below target
    begin
      if (sa > amp.high) then amp.high := sa;
      inc(amp.count);
      if (amp.count = amp.delay) then // been below target for a while
      begin
        if (amp.quiet > amp.delay) then // it's quiet, go back towards normal level
          amp.gain := amp.gain + (10 * amprate * (1 - amp.gain))
        else amp.gain := amp.gain + (amprate * amptarget / amp.High); // increase amp
        amp.high := 0; // reset counts
        amp.count := 0;
      end;
    end
    else // amplified level is above target
    begin
      if s > 32767 then s := 32767
      else if s > 32767 then s := 32767;
      amp.gain := amp.gain - (2 * amprate * sa / amptarget); // decrease amp
      amp.high := 0;
      amp.count := 0;
    end;
      data[c]=s; // replace original sample with amplified version
  end;

end;

Thank you
Alex
Logged
3delite
Guest
« Reply #26 on: 14 Feb '04 - 21:48 »
Reply with quoteQuote

Hi!

I was looking for a dsp equalizer for my app, when I came across BASS_FX and found out it's exactly what I needed!!! Please add support for 32bit floating point dsp data soon!!! When will the final be ready!???
You may want to check out, bass_fx will be a plugin for MP3 Stream Editor 1.3 hopefully in full 32bit fp! Cool
http://3delite.fly.to

Cheers!
Logged
3delite
Guest
« Reply #27 on: 15 Feb '04 - 19:35 »
Reply with quoteQuote

Working on the plugin, I wonder am I doing it right? Huh
My code looks like, setup:

    BASS_ChannelGetAttributes(Stream.Channel, freq, vol, pan);
    for i := 0 to 8 do begin
        Result := BASS_FX_DSP_Set(Stream.Channel, BASS_FX_DSPFX_PEAKEQ, DSPPriority);
        case i of
            0: Bands.fCenter := 100;
            1: Bands.fCenter := 250;
            2: Bands.fCenter := 500;
            3: Bands.fCenter := 1000;
            4: Bands.fCenter := 3000;
            5: Bands.fCenter := 5000;
            6: Bands.fCenter := 8000;
            7: Bands.fCenter := 11000;
            8: Bands.fCenter := 14000;
        end;
        Bands.lBand := i;
        Bands.fBandwidth := (FormConfig.TrackBarBandWith.Position / 10);
        Bands.FQ := 0;
        Bands.fGain := - FormConfig.Tag2Bar(i).Position;
        Bands.lFreq := freq;
        BASS_FX_DSP_SetParameters(Stream.Channel, BASS_FX_DSPFX_PEAKEQ, @Bands);
    end;


And the params changing code:

        if FormConfig.NeedUpdate then begin
            FormConfig.NeedUpdate := False;
            for i := 0 to 8 do begin
                Band.lBand := i;
                BASS_FX_DSP_GetParameters(Channel, BASS_FX_DSPFX_PEAKEQ, @Band);
                Band.fGain := - FormConfig.Tag2Bar(i).Position;
                BASS_FX_DSP_SetParameters(Channel, BASS_FX_DSPFX_PEAKEQ, @Band);
            end;
        end;


When I change the lower freqs it doesn't seem to work. The higher freqs work ok.
Any ideas?

Logged
(: JOBnik! :)
Posts: 984


« Reply #28 on: 20 Feb '04 - 20:33 »
Reply with quoteQuote

Hi Grin

* Sorry, but the 32-bit version of BASS_FX is not ready yet.

Have fun!

Cool JOBnik! Cool
« Last Edit: 20 Feb '04 - 20:36 by (: JOBnik! :) » Logged
3delite
Posts: 623


« Reply #29 on: 23 Feb '04 - 05:24 »
Reply with quoteQuote

 
Tryed to follow the example code logic like this:

   BASS_ChannelGetAttributes(Stream.Channel, freq, vol, pan);

    Result := BASS_FX_DSP_Set(Stream.Channel, BASS_FX_DSPFX_PEAKEQ, DSPPriority);
    Result := BASS_FX_DSP_Set(Stream.Channel, BASS_FX_DSPFX_PEAKEQ, DSPPriority);
    Result := BASS_FX_DSP_Set(Stream.Channel, BASS_FX_DSPFX_PEAKEQ, DSPPriority);
    Result := BASS_FX_DSP_Set(Stream.Channel, BASS_FX_DSPFX_PEAKEQ, DSPPriority);
    Result := BASS_FX_DSP_Set(Stream.Channel, BASS_FX_DSPFX_PEAKEQ, DSPPriority);
    Result := BASS_FX_DSP_Set(Stream.Channel, BASS_FX_DSPFX_PEAKEQ, DSPPriority);
    Result := BASS_FX_DSP_Set(Stream.Channel, BASS_FX_DSPFX_PEAKEQ, DSPPriority);
    Result := BASS_FX_DSP_Set(Stream.Channel, BASS_FX_DSPFX_PEAKEQ, DSPPriority);
    Result := BASS_FX_DSP_Set(Stream.Channel, BASS_FX_DSPFX_PEAKEQ, DSPPriority);
   
    for i := 0 to 8 do begin
        case i of
            0: Bands.fCenter := 100;
            1: Bands.fCenter := 250;
            2: Bands.fCenter := 500;
            3: Bands.fCenter := 1000;
            4: Bands.fCenter := 3000;
            5: Bands.fCenter := 5000;
            6: Bands.fCenter := 8000;
            7: Bands.fCenter := 11000;
            8: Bands.fCenter := 14000;
        end;
        Bands.lBand := i;
        Bands.fBandwidth := (FormConfig.TrackBarBandWith.Position / 10);
        Bands.FQ := 0;
        Bands.fGain := - FormConfig.Tag2Bar(i).Position;
        Bands.lFreq := freq;
        BASS_FX_DSP_SetParameters(Stream.Channel, BASS_FX_DSPFX_PEAKEQ, @Bands);
    end;

And it's working! I think...  Undecided
Well anyway full source code for all the plugins is here: http://web.axelero.hu/csanadim/MP3SE/download/mp3se_plugin_sdk.zip
Docs (under construction): http://web.axelero.hu/csanadim/MP3SE/developer.html
Can't wait for the final!!! Kiss
 

Logged
3delite
Posts: 623


« Reply #30 on: 21 Mar '04 - 16:29 »
Reply with quoteQuote

Quote
* VERSION 2.0 (not "alpha") will support:
  * 32-bit floating-point including in: DSP, Tempo, BPM & Reverse.
  * Multi Channel in some DSPs.
  * Planning to release till the end of this month/year Smiley

 Roll Eyes
Logged
(: JOBnik! :)
Posts: 984


« Reply #31 on: 21 Mar '04 - 19:26 »
Reply with quoteQuote

Hi Grin

Sooooooooooo.... SORRY  Embarrassed

I just don't have so much time lately, I got a new job and all the time
I'm just working... and working... and... Wink

* It will be updated Wink

Have fun!

Cool JOBnik! Cool
Logged
3delite
Posts: 623


« Reply #32 on: 10 Apr '04 - 19:54 »
Reply with quoteQuote

mmmokay...  Roll Eyes

One more question, I have here. Does it work undex win98?
I am having some problems, when loading the plugins, which use bass_fx.dll, LoadLibrary() fails...  Huh
No problems on XP.
Logged
(: JOBnik! :)
Posts: 984


« Reply #33 on: 11 Apr '04 - 16:57 »
Reply with quoteQuote

Hi Grin

One more question, I have here. Does it work undex win98?
I am having some problems, when loading the plugins, which use bass_fx.dll, LoadLibrary() fails...  Huh
No problems on XP.

I've tested BASS_FX with WinME and it's works perfectly Smiley

* Please write some more info about errors that you get.

Have fun!

Cool JOBnik! Cool
Logged
3delite
Posts: 623


« Reply #34 on: 13 Apr '04 - 02:54 »
Reply with quoteQuote

I'm afraid I can't tell you much more. I write the plugins in Delphi, simple DLLs, and then load them with SafeLoadLibrary(). It works perfectly on XP, but on my Win98, for some strange reason SafeLoadLibrary() or LoadLibrary() (tryed both) returns 0 handle, but only for those plugins which use bass_fx.dll.  Sad Other plugins, like bass_wa.dll user, load ok on both systems. Tryed to copy bass_fx.dll to the plugins folder, which doesn't make much sense since the other plugins don't need this, but that wouldn't help either. Ian pointed out this bug, I'm only running on XP here...
None of my code runs, as the plugin won't even load, so I really don't have any more ideas...  Huh
Logged
(: JOBnik! :)
Posts: 984


« Reply #35 on: 18 Apr '04 - 10:49 »
Reply with quoteQuote

Hi Grin

I've checked your software with WinXP and WinME and it works perfectly with BASS_FX Wink

Have fun!

Cool JOBnik! Cool
Logged
3delite
Posts: 623


« Reply #36 on: 18 Apr '04 - 16:28 »
Reply with quoteQuote

 Cool

Must be that Win98/Win98SE difference...  Huh
I'll test it on SE, for sure!  Smiley
Logged
Chief Sunet
Guest
« Reply #37 on: 19 Apr '04 - 20:34 »
Reply with quoteQuote

My app needs an "A/B" function, where the user clicks a button when he hears where he wants to start a loop. He then clicks the button again where he wants the loop to end.

The function BASS_FX_TempoGetApproxSeconds returns an approximation of the position being heard after applying a tempo change. That and  an approximation of the new length using the same function would be enough to calculate where in the original file the user's loop starts so that I can loop what the user wants looped.

The problem is that although BASS_FX_TempoGetApproxSeconds returns a Float. It's only accurate out to the second. That's just not good enough for a loop.

Is it possible that you could get BASS_FX_TempoGetApproxSeconds to return a position approximation that is accurate at least out to the hundredth place in the next version?

Do you know of an option other than BASS_FX_TempoGetApproxSeconds?

Logged
(: JOBnik! :)
Posts: 984


« Reply #38 on: 24 Apr '04 - 21:14 »
Reply with quoteQuote

Hi Grin

I'm checking it out Smiley

Meanwhile I'm about to add a new Example to BASS_FX "package" showing how to
make it able to use Sync and BASS_FX's Tempo Wink

Have fun!

Cool JOBnik! Cool
Logged
MindWorkSoft
Posts: 13


« Reply #39 on: 26 Apr '04 - 01:05 »
Reply with quoteQuote

Hi JOBnik,

I am now reprogramming again my Whoosh Mp3 to make compatible with your latest version of BASS_FX and BASS.

The latest vesion is so nice specially the BPM/Tempo, I wish you can add another function that I really need and that is the Real time Beat Tap, so that aside from Auto BPM detection, user can also define thier BPM value for the song, or I you could share a little code for Beat Tap.

Thanks
Dards
Logged
Pages: 1 [2] 3 4 ... 30
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines