Recent Posts

Pages: 1 ... 5 6 [7] 8 9 10
61
VB Examples / I want to use more than 256colors to draw spectrum.
« Last post by linkknil on May 30, 2007, 03:49:38 PM »
Sorry. my english is really bad... :'(
 
For X = 0 To bands - 1
     Y = newy(X)
     If Y > specheight Then Y = specheight
     If Y < 0 Then Y = 0
           While (Y >= 1)
               Call FillMemory(specbuf((Y - 1) * SPECWIDTH + X * 12), 10, (Y - 1) / specheight * bhnum)
               Y = Y - 1
           Wend
 Next
Call SetDIBitsToDevice(frmDis.hdc, 0, 0, SPECWIDTH, specheight, 0, 0, 0, specheight, specbuf(0), bh, 0)

Cause of 'specbuf' can't be large than 255 . So I can't use more than 256 colors.
Is there anyway ro resolve this ?

p.s Thank you for your coding of spectrum code  ;)

62
BASS_FX / Re: Changing volume of a WAV file
« Last post by (: JOBnik! :) on May 23, 2007, 02:58:51 PM »
Hi ;D

Sorry for a long delay with reply... I didn't enter the forum ;)

In your code, you should 1st Set the effect and only the SetParameters on it ;)

i.e:
Code: [Select]
...
  BASS_FX_DSP_Set(chan, BASS_FX_DSPFX_VOLUME, 0);
  BASS_FX_DSP_SetParameters(chan, BASS_FX_DSPFX_VOLUME, @volume);
...
63
BASS_FX / Changing volume of a WAV file
« Last post by Jeroennl on May 16, 2007, 04:42:45 PM »
I'm trying to change the volume of my wave file but it doens't seems to work.

I'm using;
Code: [Select]
  BASS_FX_DSP_SetParameters(chan, BASS_FX_DSPFX_VOLUME, @volume); where @volume;
Code: [Select]
  volume.lChannel := 0; volume.fVolume := 0.5;  .

The rest of the code:

Code: [Select]
  chan := BASS_StreamCreateFile(FALSE, PChar(SourceFileName), 0, 0, BASS_STREAM_DECODE);

  BASS_ChannelGetInfo(chan, chaninfo);
nChannels := chaninfo.chans;
  if (chaninfo.flags and BASS_SAMPLE_8BITS > 0)then
  begin
    wBitsPerSample := 8;
  end
  else
  begin
    wBitsPerSample := 16;
  end;
nBlockAlign := nChannels * wBitsPerSample div 8;
BASS_ChannelGetAttributes(chan, frq, vl, Tmp);
  BASS_FX_DSP_SetParameters(chan, BASS_FX_DSPFX_VOLUME, @volume);
  BASS_FX_DSP_Set(chan, BASS_FX_DSPFX_VOLUME, 0);
  nSamplesPerSec := frq;
nAvgBytesPerSec := nSamplesPerSec * nBlockAlign;

  RecStream := TFileStream.Create(naam, fmCreate);
 
  frmProgress.Show;
  frmProgress.Label43.Caption := 'MP3 naar WAV converteren:';

// Write header portion of wave file
  temp := 'RIFF'; RecStream.write(temp[1], length(temp));
  temp := #0#0#0#0; RecStream.write(temp[1], length(temp));
  temp := 'WAVE'; RecStream.write(temp[1], length(temp));
  temp := 'fmt '; RecStream.write(temp[1], length(temp));
  temp := #$10#0#0#0; RecStream.write(temp[1], length(temp));
  temp := #1#0; RecStream.write(temp[1], length(temp));
  if nChannels = 1 then
     temp := #1#0
  else
     temp := #2#0;
  RecStream.write(temp[1], length(temp));
  RecStream.write(nSamplesPerSec, 2);
  temp := #0#0; RecStream.write(temp[1], length(temp));
  RecStream.write(nAvgBytesPerSec, 4);
  RecStream.write(nBlockAlign, 2);
  RecStream.write(wBitsPerSample, 2);
  temp := 'data'; RecStream.write(temp[1],length(temp));
  temp := #0#0#0#0; RecStream.write(temp[1],length(temp));
  while (BASS_ChannelIsActive(chan) > 0) do
  begin
    BytesRead := BASS_ChannelGetData(chan, @buf, 10000);
    RecStream.Write(buf, BytesRead);
    Application.ProcessMessages;
    PercentDone := Trunc(100 * (BASS_ChannelGetPosition(Chan) / BASS_ChannelGetLength(chan)));
    frmProgress.ProgressBar.Position := PercentDone;
    frmProgress.LabelOp.Caption      := 'Voortgang ' + IntToStr(PercentDone) + '%';
  end;
  BASS_StreamFree(chan);

  frmProgress.LabelOp.Caption      := 'Bestand sluiten ...';
  i := RecStream.Size - 8;
  RecStream.Position := 4;
  RecStream.write(i, 4);
  i := i - $24;
  RecStream.Position := 40;
  RecStream.write(i, 4);
  RecStream.Free;
  frmProgress.LabelOp.Caption      := 'Klaar';
  frmProgress.Close;

But i don't get the volume change to work can anyone help me with this?
64
BASS_FX / Re: time for eq to take effect
« Last post by (: JOBnik! :) on April 20, 2007, 09:10:43 PM »
Hi ;D

Hi JOBnik,
first of all, thank you for the great BASS_FX!

You're welcome :)

In my Application, I need to have a PEAKEQ on a specific center-frequency at a specific time. Because changing the setting of eq.fCenter takes some time to take effect, I need to set the parameter in advance. Do you know how to calculate this amount of time?

Thanks for your help!

If I understood you right, you're creating only 1 band and in a specific time you want to change the fCenter of that band to some other frequency.
I would suggest making 2 bands with a desired fCenter, but keeping the fGain of the 2nd band to 0.0f and changing it when the time comes, not forgetting
changing the fGain of the 1st band to 0.0f at the beginning of that specific time.
65
BASS_FX / time for eq to take effect
« Last post by Holger on April 19, 2007, 02:35:55 PM »
Hi JOBnik,
first of all, thank you for the great BASS_FX!

In my Application, I need to have a PEAKEQ on a specific center-frequency at a specific time. Because changing the setting of eq.fCenter takes some time to take effect, I need to set the parameter in advance. Do you know how to calculate this amount of time?

Thanks for your help!
66
Announcements / BASS_FX 2.3
« Last post by (: JOBnik! :) on April 09, 2007, 06:00:14 PM »
Hi ;D

Current BASS_FX version is 2.3.
Released: 21.05.2006
Win32:
MacOSX:

Updates and Changes:

2.3 - 21/05/2006
* New in BASS_FX:
  * This version has some API changes.
  * You'll have to recompile your application to use this version.
  * =====
     If you like BASS_FX or use it in a commercial/shareware products,
     then you may wish to make a donation to support its development (see the docs for info).
    =====

* Tempo:
  * Fixed a bug, that wouldn't clear buffers if a source channel isn't seekable.
  * Removed flags:
     BASS_FX_TEMPO_QUICKALGO
     BASS_FX_TEMPO_NO_AAFILTER

    you can set these using a function below, in real-time.

  * Added 2 new functions:
     BASS_FX_TempoSettingSet
     BASS_FX_TempoSettingGet

    with options (check the docs for more info about using them):
     BASS_FX_TEMPO_SETTING_USE_AA_FILTER
     BASS_FX_TEMPO_SETTING_AA_FILTER_LENGTH
     BASS_FX_TEMPO_SETTING_USE_QUICKALGO
     BASS_FX_TEMPO_SETTING_SEQUENCE_MS
     BASS_FX_TEMPO_SETTING_SEEKWINDOW_MS
     BASS_FX_TEMPO_SETTING_OVERLAP_MS

* DSP:
  * Added new struct:
     BASS_FX_DSPSWAP

  * Added multi-channel support and a per channel control with flags/macro:
    each effect with a per channel control has a new "lChannel" param
    (if you won't set the new param, then the effect will be affected on all channels as by default)

     BASS_FX_DSPFX_SWAP      -> it's now possible not only swap, but remap as well.
     BASS_FX_DSPFX_FLANGER
     BASS_FX_DSPFX_VOLUME   -> it's now needed to set a global volume, before boosting.
     BASS_FX_DSPFX_PEAKEQ
     BASS_FX_DSPFX_LPF
     BASS_FX_DSPFX_DAMP
     BASS_FX_DSPFX_AUTOWAH
     BASS_FX_DSPFX_ECHO2
     BASS_FX_DSPFX_PHASER
     BASS_FX_DSPFX_ECHO3
     BASS_FX_DSPFX_CHORUS
     BASS_FX_DSPFX_APF
     BASS_FX_DSPFX_COMPRESSOR
     BASS_FX_DSPFX_DISTORTION


  * Channel flags (check the docs for channels order):
     BASS_FX_DSP_CHANALL
     BASS_FX_DSP_CHANNONE
     BASS_FX_DSP_CHAN1 .. BASS_FX_DSP_CHAN8

    * If you have more than 8 channels (7.1), use this macro.
      BASS_FX_DSP_CHANNEL_N(n)

  * Added a DENORMAL check for all effects.
  * BASS_FX_DSP_Reset is updated for all effects.

* BPM:
  * Added Real-Time Beat Position Trigger:
     BASS_FX_BPM_BeatCallbackSet
     BASS_FX_BPM_BeatFree

  * BASS_FX_ERROR_BPMX2 error code *removed* and *replaced* with BASS_ERROR_ALREADY
  * Fixed bugs:
    * Serious memory-leak is fixed using both options.
    * A bug that would free resources before the detecting process is finished.
    * A bug that would still continue to detect previous data even if changing file to
      scan, using a BASS_FX_BPM_BKGRND flag.
    * A bug that would still return BPMs out of MIN/MAX range if using BASS_FX_BPM_MULT2 flag.

67
Bugs / Re: Found Bug
« Last post by (: JOBnik! :) on March 19, 2007, 08:56:07 PM »
Hi ;D

It's a known issue :)
You can read about it in BASS forum, clicking on this link :)

It's already fixed for the next release, that should be released really soon :)
68
Bugs / Found Bug
« Last post by Nugelo on March 19, 2007, 07:11:39 PM »
Found Bug. Echo3 (vb6) doesnt work  ??? ??? ???
69
BASS_FX / Re: Enquiry on bass_fx
« Last post by (: JOBnik! :) on January 09, 2007, 05:36:06 PM »
Hi ;D

I guess all answers could be found in a BASS forum, in this link:
http://www.un4seen.com/forum/?topic=6599.0
70
BASS_FX / Enquiry on bass_fx
« Last post by sky on January 07, 2007, 08:25:40 AM »
Hi Jobnik,

I am new to bass. Would like to enquire whether the effects that I used in Bass_fx (tempo,pitch,samplerate) be decoded into a wave file? Can you advise how am I going to do it?

Thanks a lot! :)

Cheers
Sky :)
Pages: 1 ... 5 6 [7] 8 9 10