Author Topic: BASS.NET API 2.4.17.5  (Read 1128773 times)

Guest

  • Guest
Re: BASS .NET API 2.2.0.11 !
« Reply #25 on: 28 Feb '06 - 14:38 »
Please update for the new BassMix call "BASS_Mixer_StreamAddChannelEx"


radio42

  • Posts: 4839
Re: BASS .NET API 2.2.0.11 !
« Reply #26 on: 28 Feb '06 - 18:28 »
Yepp, will do so soon!

radio42

  • Posts: 4839
Re: BASS .NET API 2.2.0.12 !
« Reply #27 on: 1 Mar '06 - 21:53 »
01.03.2006: Version 2.2.0.12 is out!

- some documentation updates.
- supporting latest BASSmix beta (new BASS_Mixer_StreamAddChannelEx method)

Note: It is already up, Ian just needs to update the version number on the web...

ken

  • Posts: 752
Re: BASS .NET API 2.2.0.12 !
« Reply #28 on: 6 Mar '06 - 08:36 »
NetRadio example "crash" (MetaSync) when a new metadata is sent from a shoutcast server, (song changes)  (ver 2.2.0.12)

try this broadcast: http://217.118.212.70:8500
« Last Edit: 6 Mar '06 - 08:40 by ken »

radio42

  • Posts: 4839
Re: BASS .NET API 2.2.0.12 !
« Reply #29 on: 6 Mar '06 - 16:55 »
I have just tested it...here it is not crashing ?
I listened to the stream for over 45 minutes and all went okay ?!

Where exactly is it crashing (line of code) ?

And are you using the propper BASS.dll v2.2.0.4 ?

radio42

  • Posts: 4839
Re: BASS .NET API 2.2.0.13 !
« Reply #30 on: 6 Mar '06 - 19:14 »
05.03.2006: Version 2.2.0.13 is out!

- new overload for BASS_ChannelSetSync added to support BASS_SYNC_MESSAGE


ken

  • Posts: 752
Re: BASS .NET API 2.2.0.13 !
« Reply #31 on: 7 Mar '06 - 07:41 »
I think it's a threed issue, VS2005 is not so forgiving as VS2003 on that.

Line 461:  this.statusBar1.Text = Marshal.PtrToStringAnsi(new IntPtr( data ));

Cross-thread operation not valid: Control 'statusBar1' accessed from a thread other than the thread it was created on.

radio42

  • Posts: 4839
Re: BASS .NET API 2.2.0.13 !
« Reply #32 on: 7 Mar '06 - 21:16 »
Arrg, that can be true - I have so far (and lazy) only tested the ugly samples on vs2003.

You are right!
Whenever BASS callbacks are involved I should have used "this.Invoke(...)" or "this.BeginInvoke(...)" together with a global delegate to call asynchroniously a method in the main UI thread.

So please exchange the last method called "MetaSync" with the the following code which will use delegate callbacks instead and should work fine.
I am going to improve the samples in the next version ;-) THX

Code: [Select]
private void MetaSync(int handle, int channel, int data, int user)
{
    // BASS_SYNC_META delivers a pointer to the metadata in data parameter...
    if (data != 0)
    {
        // NOTE: this will just deliver the first meta data string!
        // since the pointer given is typically a series of null-terminated strings!
        string txt = Marshal.PtrToStringAnsi(new IntPtr( data ));
        this.Invoke(new UpdateStatusDelegate(UpdateStatusDisplay), new object[] { txt });
    }
    // or alternatively use the TAG_INFO object
    if ( _tagInfo.UpdateFromMETA( data, false ) )
    {
        this.Invoke(new UpdateTagDelegate(UpdateTagDisplay));
    }
}

public delegate void UpdateTagDelegate();
private void UpdateTagDisplay()
{
    this.textBoxAlbum.Text = _tagInfo.album;
    this.textBoxArtist.Text = _tagInfo.artist;
    this.textBoxTitle.Text = _tagInfo.title;
    this.textBoxComment.Text = _tagInfo.comment;
    this.textBoxGenre.Text = _tagInfo.genre;
    this.textBoxYear.Text = _tagInfo.year;
}

public delegate void UpdateStatusDelegate(string txt);
private void UpdateStatusDisplay(string txt)
{
    this.statusBar1.Text = txt;
}

ken

  • Posts: 752
Re: BASS .NET API 2.2.0.13 !
« Reply #33 on: 8 Mar '06 - 09:55 »
There is a few tags that don't work. Like Lyrics and some additional tags

I use Tag&Rename 3 http://www.softpointer.com/tr.htm

radio42

  • Posts: 4839
Re: BASS .NET API 2.2.0.13 !
« Reply #34 on: 8 Mar '06 - 15:17 »
Sure, as the documentation says:
- only the TEXTual tags are supported, plus Picture-Tags

So things like: Lyrics, synced Lyrics etc. are not supported and are not planned to be supported.

For exensive Tagging support I suggest using an extra lib, eg. www.audiogenie.de

big_gun

  • Posts: 353
Re: BASS .NET API 2.2.0.13 !
« Reply #35 on: 13 Mar '06 - 05:19 »
I have found a good ID3v2 tag component for .net, it's http://home.fuse.net/honnert/hundred/?UltraID3Lib

And it reads/writes tags too.

Rick

Gregory Pruden

  • Guest
Re: BASS .NET API 2.2.0.13 !
« Reply #36 on: 16 Mar '06 - 19:24 »
Hi All,
I am new to everything so excuse my noobery.  I am having problems with tags using the BassTags class with FLAC, OOG and APE files.  I was hoping that it would work the same as MP3 which works great with the TAGINFO class.  It seems to work if I use the native StreamGetTags stuff.   I am using .net 2.0 and VS2005.
Do you need to see my code or a sample file?

Gregory

radio42

  • Posts: 4839
Re: BASS .NET API 2.2.0.13 !
« Reply #37 on: 17 Mar '06 - 08:32 »
Yes, or I at least would need to know what exactly is not working ;-)
Are the Tags not showing up?
Are wrong Tags been shown?

And also aome Test-File(s) would be great (which you send directly to "bn AT radio42.com").

THX

radio42

  • Posts: 4839
Re: BASS .NET API 2.2.0.14 !
« Reply #38 on: 29 Mar '06 - 16:53 »
29.03.2006: Version 2.2.0.14 is out!

- Upgrade to support the latest BASSmix beta (Matrix mixing).
- Matrix mixing is shown in the Encoder.cs sample. 
- C# samples modified, now using delegates to change GUI elements.
- AddOn.BassTag enhanced (checked for more tag types and little tracknumber issue solved).
- Misc.Visuals enhanced: new methods GetFrequencyFromPosX and GetAmplitudeFromPosY added.

GermaniX

  • Posts: 65
Re: BASS .NET API 2.2.0.14 !
« Reply #39 on: 29 Mar '06 - 18:13 »
Excellent! Perfect JoB!

Renegade

  • Posts: 160
Re: BASS .NET API 2.2.0.14 !
« Reply #40 on: 30 Mar '06 - 15:19 »
...
- Misc.Visuals enhanced: new methods GetFrequencyFromPosX and GetAmplitudeFromPosY added.
...

Hey! That's not fair! You're not allowed to read my mind!  ;)

Thanks Bernd! That's exactly what I wanted.  :)

pern

  • Posts: 27
Re: BASS .NET API 2.2.0.14 !
« Reply #41 on: 31 Mar '06 - 06:54 »
Just a question if i can do this with your C# API:

I'm building a Sound to light / Light Chaser controller and i want to controll it from a C# program.

So what i need is

1: Bass beat extractor to trigg the chaser.
2: Sound to light - Volume extraction for four bands : Bass, Middle 1, middle 2, and treble.

Is this possible ?

radio42

  • Posts: 4839
Re: BASS .NET API 2.2.0.14 !
« Reply #42 on: 31 Mar '06 - 08:36 »
Yes, I think all you described is possible.
But all that is possible via BASS - BASS.NET is only the C# wrapper ;-)

The only thing which you might find useful in addition is the beat detection via the BASS.NET "Misc.BPMCounter"class, which only exists in BASS.NET...

Regarding the Volume extraction for four bands this could easily be done via BASS_ChannelGetData and receiving FFT sample...some manual analysation is hence still required on your side ;-)

pern

  • Posts: 27
Re: BASS .NET API 2.2.0.14 !
« Reply #43 on: 31 Mar '06 - 09:00 »
Thanks ,

Is the Volume extraction something you are planning ??

Like :  FromFreq - ToFreq  ,  returns: avg value (And Max value? )

radio42

  • Posts: 4839
Re: BASS .NET API 2.2.0.14 !
« Reply #44 on: 31 Mar '06 - 13:18 »
It is all there already in BASS...take a look to the FFT data in BASS_ChannelGetData(...)

And you'll have in BASS.NET a "Utils" class with methods which helps you to convert an FFT index to frequency etc.

James

  • Guest
Re: BASS .NET API 2.2.0.14 !
« Reply #45 on: 4 Apr '06 - 03:16 »
Does anyone have a simple example of taking a byte[] of wav audio and downsampling from one sample rate to another, changing from stereo to mono ,and outputting to a new byte[] ?

many thanks in advance

radio42

  • Posts: 4839
Re: BASS .NET API 2.2.0.14 !
« Reply #46 on: 4 Apr '06 - 08:37 »
For downsampling you might also use BASSMix which supports changing the samplerate as well as converting from stereo to mono (e.g. via the new Matrix Mixing function).

pern

  • Posts: 27
Re: BASS .NET API 2.2.0.14 !
« Reply #47 on: 7 Apr '06 - 08:57 »
I have now tested the BPMCounter class a little bit, it would be great to be able to:

- Set a fixed release time as an option.
- Select Low Pass detection only.

Any chance for adding these ?

radio42

  • Posts: 4839
Re: BASS .NET API 2.2.0.14 !
« Reply #48 on: 7 Apr '06 - 09:07 »
I'll take a look what I can do ;-)

pern

  • Posts: 27
Re: BASS .NET API 2.2.0.14 !
« Reply #49 on: 7 Apr '06 - 09:18 »
Thanks ;-)

If you need beta-testing of it, just let me know.