Author Topic: BASS_FX 2.4.12.1  (Read 839542 times)

Coding_Carlos

  • Posts: 2
Re: BASS_FX 2.4.6
« Reply #525 on: 4 Oct '10 - 18:31 »
Hi, I want to use BASS_FX in my iPhone application - there will be a paid and free version. What are the licensing issues? --- I will be using effects, i.e. reverb/chorus and pitch

Ian @ un4seen

  • Administrator
  • Posts: 26095
Re: BASS_FX 2.4.6
« Reply #526 on: 5 Oct '10 - 16:23 »
Sorry, I confused a Gain value with Bandwidth. I wanted to ask, is my value of Bandwidth normal? What value of bandwidth is better?

I think the bandwidth (1.5 octaves) is probably a bit high. Also, as your band centre frequencies aren't evenly spaced, the bands will be overlapping each other by varying amounts. If you would like to have 18 equally spaced bands, you could use a bandwidth of 0.5 octaves with the following centre frequencies: 44, 63, 88, 125, 177, 250, 354, 500, 707, 1000, 1414, 2000, 2828, 4000, 5657, 8000, 11314, 16000.

DrummerB

  • Posts: 19
Re: BASS_FX 2.4.6
« Reply #527 on: 7 Oct '10 - 20:41 »
Does anyone experience playback performance issues on the iPhone? I'm testing on a iPhone 3GS and when using tempo or pitch modified playback I experience lag. Tempo manipulation itself word very well, but as soon as I start scrolling a table view the playback starts to lag. I basically implemented the tempo sample from the OSX version for testing. Maybe playback should be done in a separate thread? Or am I doing something wrong? Thanks.

(: JOBnik! :)

  • Posts: 1080
Re: BASS_FX 2.4.6
« Reply #528 on: 15 Oct '10 - 19:04 »
Hi ;D

Does anyone experience playback performance issues on the iPhone? I'm testing on a iPhone 3GS and when using tempo or pitch modified playback I experience lag. Tempo manipulation itself word very well, but as soon as I start scrolling a table view the playback starts to lag. I basically implemented the tempo sample from the OSX version for testing. Maybe playback should be done in a separate thread? Or am I doing something wrong? Thanks.

I didn't test BASS_FX on iPhone, but if there's a performance issue with it, please try to use:
BASS_ATTRIB_TEMPO_OPTION_USE_QUICKALGO and BASS_ATTRIB_TEMPO_OPTION_PREVENT_CLICK
attributes.

It will reduce a sound quality a bit.

japostoles

  • Posts: 6
Re: BASS_FX 2.4.6
« Reply #529 on: 20 Oct '10 - 21:17 »
I'm getting EXC_BAD_ACCESS when using the tempo changing functions on an iPhone 3G.

My audio comes from a file using audio units, so I have the following so I have a BASS_StreamPutData using the BASS_FX_TempoGetSource() as the source, and then a BASS_ChannelGetData() to retrieve the data.

The EXC_BAD_ACCESS occurs randomly, and only when I have the BASS_ChannelGetData() in there.  If I just have the PutData in there it's fine.. but it's when I call the get it decides to crash at some point.

Any ideas?  The back trace shows different points, so it's not helpful when debugging.  I'm assuming it's some kind of memory access issue?

(: JOBnik! :)

  • Posts: 1080
Re: BASS_FX 2.4.6
« Reply #530 on: 23 Oct '10 - 20:43 »
Hi ;D

Can you please provide some error log?

japostoles

  • Posts: 6
Re: BASS_FX 2.4.6
« Reply #531 on: 24 Oct '10 - 00:20 »
As far as I can tell, the crash seems to occur in the thread right here:


#0  0x0000c958 in BASS_FX_BPM_BeatDecodeGet ()
#1  0x0000c460 in BASS_FX_BPM_BeatDecodeGet ()
#2  0x0000ce4c in BASS_FX_BPM_BeatDecodeGet ()
#3  0x0000d93c in BASS_FX_BPM_BeatDecodeGet ()
#4  0x0000f30c in BASS_FX_BPM_BeatDecodeGet ()
#5  0x000323ac in BASS_ChannelSetPosition ()
#6  0x000331a0 in BASS_ChannelGetData ()

What's strange is I'm not using any BPM functions, just the Tempo, but I'm assuming you use it in the library for the tempo changes  I'm making a call to BASS_ChannelGetData().

Skyer

  • Posts: 4
Re: BASS_FX 2.4.6
« Reply #532 on: 28 Oct '10 - 07:26 »
Hello. I changed my code, but sound is not good yet. :-\ This my code

Code: [Select]
  Channel := BASS_StreamCreateFile(FALSE,
    PChar(SknLbPlaylist.Items[CurSongIndex]), 0, 0,BASS_UNICODE or BASS_STREAM_DECODE or  BASS_STREAM_AUTOFREE);

  If Channel = 0 Then
      Channel := BASS_MusicLoad(FALSE,
      PChar(SknLbPlaylist.Items[CurSongIndex]), 0, 0,
      BASS_MUSIC_RAMP or BASS_MUSIC_DECODE or BASS_MUSIC_PRESCAN or  BASS_MUSIC_AUTOFREE, 0);
  If Channel = 0 then
      Channel := BASS_WMA_StreamCreateFile(FALSE,
      PChar(SknLbPlaylist.Items[CurSongIndex]), 0, 0,
      BASS_UNICODE or BASS_STREAM_DECODE or  BASS_STREAM_AUTOFREE);
  If Channel = 0 then
      Channel := BASS_FLAC_StreamCreateFile(FALSE,
      PChar(SknLbPlaylist.Items[CurSongIndex]), 0, 0,
      BASS_UNICODE or BASS_STREAM_DECODE or  BASS_STREAM_AUTOFREE);
  If Channel = 0 then
  begin
    Error('Selected file couldnt be loaded!');
    exit;
  end;

  Channel := BASS_FX_TempoCreate(Channel, BASS_FX_FREESOURCE or  BASS_STREAM_AUTOFREE);
  If (Channel = 0) Then
  begin
    Error('Couldn''t create a resampled stream!');
    BASS_StreamFree(Channel);
    BASS_MusicFree(Channel);
    exit;
  End;

  FX_parameq := BASS_ChannelSetFX(channel, BASS_FX_BFX_PEAKEQ, 0);

  parameq.fGain := 0;
  parameq.fQ := 0;
  parameq.fBandwidth :=0.5;
  parameq.lChannel := BASS_BFX_CHANALL;

  for i := 0 to BandsCount-1 do begin
    parameq.lBand := i;
    parameq.fCenter := parameq_bands[i];
    BASS_FXSetParameters(FX_parameq, @parameq);
  end;

In trackbars OnChange notify I use this code

Code: [Select]
BASS_FXGetParameters(FX_parameq, @parameq);
parameq.lBand:=TrackBarIndex-1;
parameq.fgain :=TrackBar.Value-15;
BASS_FXSetParameters(FX_parameq, @parameq);

I use this bands 31,63,125,170,250,310,600,1000,1500,2000,3000,4000,6000,8000,10000,12000,14000,16000
And when I used 44, 63, 88, 125, 177, 250, 354, 500, 707, 1000, 1414, 2000, 2828, 4000, 5657, 8000, 11314, 16000, I too had bad sound.

(: JOBnik! :)

  • Posts: 1080
Re: BASS_FX 2.4.6
« Reply #533 on: 31 Oct '10 - 14:53 »
Hi ;D

Please read in these threads to find an answer:
https://www.un4seen.com/forum/?topic=11484.0
https://www.un4seen.com/forum/?topic=10231.msg71350#msg71350

Hello. I changed my code, but sound is not good yet. :-\ This my code

Code: [Select]
  Channel := BASS_StreamCreateFile(FALSE,
    PChar(SknLbPlaylist.Items[CurSongIndex]), 0, 0,BASS_UNICODE or BASS_STREAM_DECODE or  BASS_STREAM_AUTOFREE);

  If Channel = 0 Then
      Channel := BASS_MusicLoad(FALSE,
      PChar(SknLbPlaylist.Items[CurSongIndex]), 0, 0,
      BASS_MUSIC_RAMP or BASS_MUSIC_DECODE or BASS_MUSIC_PRESCAN or  BASS_MUSIC_AUTOFREE, 0);
  If Channel = 0 then
      Channel := BASS_WMA_StreamCreateFile(FALSE,
      PChar(SknLbPlaylist.Items[CurSongIndex]), 0, 0,
      BASS_UNICODE or BASS_STREAM_DECODE or  BASS_STREAM_AUTOFREE);
  If Channel = 0 then
      Channel := BASS_FLAC_StreamCreateFile(FALSE,
      PChar(SknLbPlaylist.Items[CurSongIndex]), 0, 0,
      BASS_UNICODE or BASS_STREAM_DECODE or  BASS_STREAM_AUTOFREE);
  If Channel = 0 then
  begin
    Error('Selected file couldnt be loaded!');
    exit;
  end;

  Channel := BASS_FX_TempoCreate(Channel, BASS_FX_FREESOURCE or  BASS_STREAM_AUTOFREE);
  If (Channel = 0) Then
  begin
    Error('Couldn''t create a resampled stream!');
    BASS_StreamFree(Channel);
    BASS_MusicFree(Channel);
    exit;
  End;

  FX_parameq := BASS_ChannelSetFX(channel, BASS_FX_BFX_PEAKEQ, 0);

  parameq.fGain := 0;
  parameq.fQ := 0;
  parameq.fBandwidth :=0.5;
  parameq.lChannel := BASS_BFX_CHANALL;

  for i := 0 to BandsCount-1 do begin
    parameq.lBand := i;
    parameq.fCenter := parameq_bands[i];
    BASS_FXSetParameters(FX_parameq, @parameq);
  end;

In trackbars OnChange notify I use this code

Code: [Select]
BASS_FXGetParameters(FX_parameq, @parameq);
parameq.lBand:=TrackBarIndex-1;
parameq.fgain :=TrackBar.Value-15;
BASS_FXSetParameters(FX_parameq, @parameq);

I use this bands 31,63,125,170,250,310,600,1000,1500,2000,3000,4000,6000,8000,10000,12000,14000,16000
And when I used 44, 63, 88, 125, 177, 250, 354, 500, 707, 1000, 1414, 2000, 2828, 4000, 5657, 8000, 11314, 16000, I too had bad sound.

Knight_Rider

  • Posts: 131
Re: BASS_FX 2.4.6
« Reply #534 on: 9 Feb '11 - 18:16 »
Some fancy new effects for Bass_FX would be cool... Have been waiting so long for this!

darren

  • Posts: 6
Parameters for BASS_BFX_BQF_HIGHSHELF
« Reply #535 on: 13 Feb '11 - 04:07 »
I'm trying to find parameter settings that will produce an audible change using the BASS_BFX_BQF_HIGHSHELF
(in iOS). Calling the toggleHighKill method below produces no audible result.


// define the handle
self.newStream = BASS_StreamCreateFile(FALSE, [fileName cStringUsingEncoding:NSUTF8StringEncoding], 0, 0, BASS_STREAM_DECODE|BASS_SAMPLE_MONO);

self.tempoStream = BASS_FX_TempoCreate(newStream, BASS_STREAM_DECODE);
   
self.killHandle = BASS_ChannelSetFX(tempoStream, BASS_FX_BFX_BQF, 2);


// method
- (void) toggleHighKill
{
   BASS_BFX_BQF fx;
   fx.lFilter = BASS_BFX_BQF_HIGHSHELF;
   fx.fCenter = 12000.0;
   fx.lChannel = BASS_BFX_CHANALL;
   if ( self.highKillIsOn == YES) {
      fx.fGain = 0;
      fx.fBandwidth = 5.0;
      fx.fQ = 1.0;
      fx.fS = 0.5;
      self.highKillIsOn = NO;
      DLog("high kill turned off\n");
   } else {
      fx.fGain = -15.0;
      fx.fBandwidth = 5.0;
      fx.fQ = 1.0;
      fx.fS = 0.5;
      self.highKillIsOn = YES;
      DLog("high kill turned on\n");
   }
   
   BASS_FXSetParameters(self.killHandle, &fx);   
}

I can successfully apply other FX to the tempoStream.

Any suggestions welcome.


(: JOBnik! :)

  • Posts: 1080
Re: Parameters for BASS_BFX_BQF_HIGHSHELF
« Reply #536 on: 16 Feb '11 - 18:41 »
Hi ;D

Some fancy new effects for Bass_FX would be cool... Have been waiting so long for this!
Please write which you have in mind? :)

I'm trying to find parameter settings that will produce an audible change using the BASS_BFX_BQF_HIGHSHELF
(in iOS). Calling the toggleHighKill method below produces no audible result.


// define the handle
self.newStream = BASS_StreamCreateFile(FALSE, [fileName cStringUsingEncoding:NSUTF8StringEncoding], 0, 0, BASS_STREAM_DECODE|BASS_SAMPLE_MONO);

self.tempoStream = BASS_FX_TempoCreate(newStream, BASS_STREAM_DECODE);
   
self.killHandle = BASS_ChannelSetFX(tempoStream, BASS_FX_BFX_BQF, 2);


// method
- (void) toggleHighKill
{
   BASS_BFX_BQF fx;
   fx.lFilter = BASS_BFX_BQF_HIGHSHELF;
   fx.fCenter = 12000.0;
   fx.lChannel = BASS_BFX_CHANALL;
   if ( self.highKillIsOn == YES) {
      fx.fGain = 0;
      fx.fBandwidth = 5.0;
      fx.fQ = 1.0;
      fx.fS = 0.5;
      self.highKillIsOn = NO;
      DLog("high kill turned off\n");
   } else {
      fx.fGain = -15.0;
      fx.fBandwidth = 5.0;
      fx.fQ = 1.0;
      fx.fS = 0.5;
      self.highKillIsOn = YES;
      DLog("high kill turned on\n");
   }
   
   BASS_FXSetParameters(self.killHandle, &fx);   
}

I can successfully apply other FX to the tempoStream.

Any suggestions welcome.

There're params that you can't set for certain filters, if you would check for BASS_ErrorGetCode, you would notice the error code 20 (BASS_ERROR_ILLPARAM - an illegal parameter was specified)

e.g:
For Shelving filters you don't use the params (set them to 0 value to not use them):
fBandwidth
fQ


but must set the fS param as you already do :)

btw, if you need less/more fGain, you can go over -+15dB ;)
« Last Edit: 16 Feb '11 - 18:44 by (: JOBnik! :) »

Knight_Rider

  • Posts: 131
Re: BASS_FX 2.4.6
« Reply #537 on: 21 Feb '11 - 13:12 »
Hey jobnik :P
did you ever try virtualdj? they have some really cool FX, like beat-doubling where they repeat every beat and then jump back and forward, don't quite know how to describe that, but it sounds kinda cool :)

i know this can be partly done with several timers and other complicated functions in bass already, but it would be way less complicated if bass fx would offer such an effect... or other cool effects, try virtualdj, it'll surely inspire you :)

Bonvie

  • Posts: 34
Re: BASS_FX 2.4.6
« Reply #538 on: 22 Feb '11 - 09:21 »
Hi JOBnik,
regarding virtualdj it would be great to have as "fancy new effect" an easy way to match beats, so that beat matching is done by bass_fx and not by the application. (http://www.un4seen.com/forum/?topic=9460.0)

In my point of view it would be great to be able to match beats, even if it is not perfect. But actually I'm not able to do with my current knowledge and time for the private projects.  :(

jjohnston

  • Posts: 39
Re: BASS_FX 2.4.6
« Reply #539 on: 25 Feb '11 - 21:13 »
JOBnik,

Is there an option in SoundTouch to reset phase at specific points in the timestretching process? I think one of the key differences between this time stretching algorithm and others out there is that others reset phase on percussive transients. This serves to reduce the amount of echo/flamming you hear when slowing down songs. Is there any way to combine beat detection and the phase vocoder to do this? Have you ever experimented with this? If it was possible and had any sort of effect, it would be great to get this option included in BASS_FX.

(: JOBnik! :)

  • Posts: 1080
Re: BASS_FX 2.4.6
« Reply #540 on: 9 Mar '11 - 16:53 »
Hi ;D

JOBnik,

Is there an option in SoundTouch to reset phase at specific points in the timestretching process? I think one of the key differences between this time stretching algorithm and others out there is that others reset phase on percussive transients. This serves to reduce the amount of echo/flamming you hear when slowing down songs. Is there any way to combine beat detection and the phase vocoder to do this? Have you ever experimented with this? If it was possible and had any sort of effect, it would be great to get this option included in BASS_FX.

Here's an answer from Olli:
Quote
Phase reset is relevant and necessary in pitch/time shift algorithms that use frequency domain processing,
but SoundTouch does processing in time domain which does not cause drifting of phase response.

(: JOBnik! :)

  • Posts: 1080
Re: BASS_FX 2.4.7
« Reply #541 on: 7 Apr '11 - 18:23 »
Hi ;D

there's now version 2.4.7 is released

2.4.7 - 07/04/2011
------------------
* BASS_FX:
  * Delphi unit updated: BASS_BFX_ENV_NODE = record, changed to BASS_BFX_ENV_NODE = packed record

* DSP:
   * Fixed bug in BASS_FX_BFX_VOLUME_ENV, being applied slightly early when "bFollow" is enabled.
   * BASS_FX_BFX_DAMP made effect parameter setting a bit more convenient. If fGain < 0 then leave the current value.

* iOS:
   * Added armv7 architecture support.
   * Combined the Device armv6/7 architectures and Simulator libraries into a single file.

RickC

  • Posts: 9
Re: BASS_FX 2.4.7
« Reply #542 on: 10 May '11 - 13:56 »
Hi folks :)

Maybe somebody can help me out, as I've just started working with BASS and the FX recently, and am trying to see if I can incorporate it into my product.

An earlier poster mentioned a delay with the tempo change taking effect, and I am experiencing the same issue, a 3-5 second delay.

Relevant code looks like this:

Code: [Select]
// Init player.
if( !BASS_Init(m_BASSDevice, 44100, 0, m_dlg->m_hWnd, NULL) )
{
DispMsg("[Error] Can't initialize BASS library");
}
BASS_SetConfig(BASS_CONFIG_BUFFER, 200);

// Create stream channel from memory buffer.
m_BASSChannel = BASS_StreamCreateFile(TRUE, m_filebuffer, 0, m_nFileBufferSize, BASS_STREAM_DECODE | BASS_SAMPLE_FLOAT | BASS_STREAM_PRESCAN);
m_BASSChannel = BASS_FX_TempoCreate(m_BASSChannel, BASS_FX_FREESOURCE);

// Get original freq value, so we can reset if needed after changes.
BASS_ChannelGetAttribute(m_BASSChannel, BASS_ATTRIB_FREQ, &m_BASSOriginalFreq);

In the SetTempo function.
// Set the tempo change from slider value.
BASS_ChannelSetAttribute(m_BASSChannel, BASS_ATTRIB_TEMPO, (float)nTempo);


Just for reference, this is on a Win 7 64 bit system, Core i5, 4 GB machine. Using VS 2003 with all the latest core components and libs.

BASS works fine, and so far everything in FX seems to work fine, other than the tempo change delay. It seems to be some sort of buffering issue, and I've tried changing the buffer size as you can see, but no joy.

Any ideas...?

Ian @ un4seen

  • Administrator
  • Posts: 26095
Re: BASS_FX 2.4.7
« Reply #543 on: 10 May '11 - 17:04 »
That code looks fine. To confirm whether the problem is due to something specific to your app or a more general issue, you could try the pre-compiled TEMPO.EXE example in the BASS_FX package and see if you have the same problem with that.

Also, does the format (eg. sample rate) of the file that you are playing make any difference to the delay?

RickC

  • Posts: 9
Re: BASS_FX 2.4.7
« Reply #544 on: 10 May '11 - 18:29 »
Hi Ian, thanx for the shout back :)

Can't see any diff as far as sample rate, and the TEMPO.EXE works ok.

But a thought came to mind...

I'm attempting to replace the old XAudio decoders I've used for many years (for various reasons), but I also have modeless windows open in the background, that are using DirectShow for video playback, as well as the XAudio DirectSound interfaces open.

I'm wondering if having them all running at the same time, is causing a conflict...?

I'm going to try and disable my XAudio decks, since so far I've been wrapping your BASS library with some bools to test it out. I like it so far, and if all goes well, you'll be hearing from me :)

If you have any other ideas, I'd love to hear them -- as it will take me some time to disengage the old players. What I'd like to do, is have the option to use either decoder in my software, so the end use can make a choice as to the features available. Some like the simple playback, and some want the more advanced features that BASS can provide.


Cheers, Rick

RickC

  • Posts: 9
Re: BASS_FX 2.4.7
« Reply #545 on: 11 May '11 - 12:25 »
I figured out the problem Ian, but it brought up another...

I don't want to clutter this thread up, so I'll open a new topic :)

(: JOBnik! :)

  • Posts: 1080
Re: BASS_FX 2.4.7.1
« Reply #546 on: 1 Jul '11 - 12:35 »
Hi ;D

there's now version 2.4.7.1 is released

2.4.7.1 - 01/07/2011
--------------------
* BASS_FX:
   * Documentation updated.

* DSP:
   * Fixed a small issue in BASS_FXGetParameters for BASS_FX_BFX_VOLUME effect, as it would change the lChannel value
     when the global volume (lChannel=0) is requested.

gcip

  • Posts: 1
Re: BASS_FX 2.4.7.1
« Reply #547 on: 9 Aug '11 - 02:15 »
Hello (: JOBnik! :)

May i change tempo in BASS_FX , but not change pitch?
As in program http://www.ronimusic.com/slowdown.htm

I made the samples:
http://dl.dropbox.com/u/37653221/Music/tishina.zip

p.s. Sorry for my bad english =(

p.p.s. Вы русский язык понимаете? Встретил на вашем сайте Российский флаг =) А то на англ. сложно выразить мысли, особенно, когда его не знаешь =) Я так понял, что модуль BASS_FX основан на библиотеке soundtouch. У них есть консольная утилитка, которая показывает возможности их библиотеки. ВОт эта утилитка, умеет замедлять звуковой файл, не изменяя высоту звуков. Значит ли это, что BASS_FX умеет делать тоже самое, только в реальном времени?
« Last Edit: 9 Aug '11 - 06:37 by gcip »

(: JOBnik! :)

  • Posts: 1080
Re: BASS_FX 2.4.7.1
« Reply #548 on: 10 Aug '11 - 12:41 »
Hi ;D

With BASS_FX you can change Tempo/Pitch/Speed in Real time and in decoding/encoding as well.
Please check the Tempo example in BASS_FX package to see the demonstration and the code behind the Real time change.

All SoundTouch features are implemented in BASS_FX.

(: JOBnik! :)

  • Posts: 1080
Re: BASS_FX 2.4.7.1
« Reply #549 on: 30 Aug '11 - 19:31 »
Hi ;D

OSX package has been updated with support for x86_64 architecture :)