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

Login with username, password and session length
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 2 [3] 4 5
41  Developments / BASS / Re: Playing Split Stereo Files Suggestions... on: 22 Jul '11 - 10:27
Hey Ian!
I was using BASS_Mixer_ChannelGetPosition last night with no luck but then today is started working.
I did a complete rebuild so maybe that helped......Cool
It was 4am when I quit so who knows, but that doesn't matter since it's working now......hehe

Last question for this thread:
once I switched to BassMix I have to add a *2 to most of  my set position code for when I click on the waveform to relocate to get to the correct position all of a sudden

Before BassMix
BassMix.BASS_Mixer_ChannelSetPosition(_SoundPlayer.Stream, posDown);

After BassMix
BassMix.BASS_Mixer_ChannelSetPosition(_SoundPlayer.Stream, posDown * 2);

Any ideas what that is all about?

cya!

Steve


ReplyReply Reply with quoteQuote
42  Developments / BASS / Re: Playing Split Stereo Files Suggestions... on: 21 Jul '11 - 10:47
Ok, figured it out... Smiley
It was some Pause/Resume code that was messing it all up that works fine without BASSMIX
So that is all good now, but now my whole program feels sluggish now graphically.
A fairly big graphics performance hit it seems
The playhead that scrolls over the waveform is way chunky now and same with the Spectrum Meters that jjohnston makes.
Basically, all the graphics that update on a timer like TimeElapsed/Remaining are all moving in slow motion now...... Sad
Kind of like it's displaying at 1/4 the frame rate compared to not using BASSMIX


Any ideas on that one?

thx!

Steve
ReplyReply Reply with quoteQuote
43  Developments / BASS / Re: Playing Split Stereo Files Suggestions... on: 19 Jul '11 - 20:46
Hey!
well, not old data but new data technically.
I'd consider old data from the previous file played.

Better explanation:
If I click on a new sound in the list it plays the 1st 100-200ms of the file and then goes back to the top of the same exact file and plays the whole thing top to bottom then.
More like a false start

No mixtime syncs that I know about that I put in.
It's a very basic setup as far as BASSMIX goes so far with basically only your instructions you have given me up to now.

Steve



ReplyReply Reply with quoteQuote
44  Developments / BASS / Re: Playing Surround Sound files out multiple outputs. on: 19 Jul '11 - 07:34
So after playing with BASSMIX a bit I figured the best way to do this is to
Init Device #1 (Stereo Pair 1-2)
Init Device #2 (Stereo Pair 3-4)
Init Device #3 (Stereo Pair 5-6)

Then create 3 Streams that I feed to 3 Mixers that are also created
(one for each stereo pair in a Pro Sound card)

Most all I figured out already, but how can I set Mixer 1 to go out Device1, Mixer2 out Device2 and Mixer3 out Device3?
Can't find that scenario in the Mixer/Matrix docs

Does seem a bit nutty to have to play three 5.1 files with channels muted to be able to do this tho.....8(
If there is a better route, please let me know
Would be great if I could just make a 6 channel mixer and route any channels out whatever deveice stereo pair needed, but I haven't stumbled on how to do that yet.

I SOooo appreciate all the help so far!!   Cool

thx!

Steve

p.s. Sucks that Pro Sound Cards don't give you the option to run at 5.1 like a game card.
I tried to set my RME Hammerfall to surround mode.
I can see the 5.1 option but windows said that format was not supported and always reverts to Stereo and I'm guessing that it how all the sound cards made for music will act since they are not aimed at games.




ReplyReply Reply with quoteQuote
45  Developments / BASS / Re: BassMix add-on Track to fast as it was pitched on: 19 Jul '11 - 01:46
Robin, I was having the same problem and just fixed it.
Take a look at the bottom of this thread
http://www.un4seen.com/forum/?topic=12795.msg88764#msg88764

It's in C# but might point you in the right direction
Goodluck!

Steve
ReplyReply Reply with quoteQuote
46  Developments / BASS / Re: Playing Split Stereo Files Suggestions... on: 19 Jul '11 - 01:44
Ok, I tried that and it didn't work but I only tried on the GetData  since I didn't see the /Level part
Thankfull I saw you post to Robin on the same issue.

I was my PeakMeterDisplay code that was freaking it out that was doing a BASS_ChannelGetLevel call
I changed those to BassMix.BASS_Mixer_ChannelGetLevel and all good now with that!  Cool

Here's is the corrected method if it will help anyone in C#

 private void UpdatePeakMeterDisplay(object sender, EventArgs e)
        {
            float[] level = new float[2]; // dealing with stereo
            if (BassMix.BASS_Mixer_ChannelGetLevel(_SoundPlayer.Stream, level)) //Changed for BassMix
            {
                if (BassMix.BASS_Mixer_ChannelGetLevel(_SoundPlayer.Stream, level)) //Changed for BassMix
                {
                    float left = level[0]; // the left level
                    float right = level[1]; // the right level
                    this.meterLeft.Dispatcher.BeginInvoke((Action)delegate()
                    {
                        this.meterLeft.Value = left * 100;
                    });

                    this.meterRight.Dispatcher.BeginInvoke((Action)delegate()
                    {
                        this.meterRight.Value = right * 100;
                    });
                }

            }

        }


One more thing Ian.  Using BASSMIX I get many files double triggering the first 100-200ms at the head.
We make an audio database for sound effects so users are auditioning many files by down arrowing down a list and right now doubles are being played all the time when clicking thru the list with BASSMIX in the chain.

This actually might have been the problem I saw a year ago when my Mac coder popped it into the OSX version that made me tell him to yank it out cuz it was driving me nuts and responsiveness went to hell.......hehehe

I'm playing with the  BASS_CONFIG_BUFFER option now but doesn't seem to help.
Anything under 500ms plays choppy and anything up to 5000 still double triggers the head of the file
Any other settings to play with to fix this?

Awesome job with tech support as always!

Steve
ReplyReply Reply with quoteQuote
47  Developments / BASS / C#.NET WASAPI on: 18 Jul '11 - 10:54
I've hit a brick wall trying to get the WASAPI Addon playing audio.
I'm managed to get all the other addons working (for the most part) but this one has me stumped.
Anyone have a C# test project they can share for me to look at so I can sort this out and figure out how it is intertwined with existing BASS?
not finding many examples with this one as with the others

thx so much!

Steve


ReplyReply Reply with quoteQuote
48  Developments / BASS / Re: Playing Split Stereo Files Suggestions... on: 17 Jul '11 - 11:11
Ian/Bernd...

So I got it rocking in my C# test app all good!

But once I put it in my main app it's playing all crazy. 
It speeds up and slows down, stutters, pauses randomly and double triggers playback at the head.

It almost sounds like it time compressed heavily at times.
Songs will have the correct pitch but be 4x shorter as if you are fast forwarding on a DVD.

If I remove these flags ( BASSFlag.BASS_STREAM_DECODE | BASSFlag.BASS_SAMPLE_FLOAT) then it plays correct but doesn't really seem like it doing it's job and seems bypassed then.

Anything I should be looking for you can think that might cause this you can think of or a way to fix this?

Thx as always guys!

Steve
ReplyReply Reply with quoteQuote
49  Developments / BASS / Re: Playing Split Stereo Files Suggestions... on: 16 Jul '11 - 07:03
ooohh...I found the docs in the help file explaining fairly well....Cool

s>
ReplyReply Reply with quoteQuote
50  Developments / BASS / Re: Playing Split Stereo Files Suggestions... on: 15 Jul '11 - 20:01
Thx for the info guys!!
I'll try and play with it this weekend.
If you know of any threads or tutorials you can point me to to help understand hooking up BASSMIX (or any other addon for that matter) please pass it along.
I'm still trying to grasp the concept stil...hehehe

I loaded up the demo project for BASSMIX about 6 months back, but if I remember correctly it didn't do  a whole lot compared to the other examples.
I was expecting a mixer with sliders and pans.
I'll check it out again later to see if I was missing something.

thx!

Steve

ReplyReply Reply with quoteQuote
51  Developments / BASS / Re: Playing Split Stereo Files Suggestions... on: 14 Jul '11 - 00:45
Thx IAN!

I've been trying to avoid using BASSMix since I read an issue with latency and other issues, but it might not be avoidable for much longer.

Is it gonna add lag from the moment I hit play till when I hear the audio compared to not using BASSMix?

My Mac coder had it hooked up a long time ago in our OSX version and everything felt sluggish so I had him yank it out in the end so I've been trying to avoid it in the .NET version since it seems like lots of work to start using it and have to go back if performance suffers

great support as always!!

Steve
ReplyReply Reply with quoteQuote
52  Developments / BASS / Playing Split Stereo Files Suggestions... on: 13 Jul '11 - 02:29
So, I was wondering if anyone has tackled this yet before I start to code it.
I want to play two separate mono files that are filename.L.wav and filename.R.wav as one Interleaved Stereo file.

Any suggestions of the best way to do this?

thx in advance!

Steve

C# .NET



ReplyReply Reply with quoteQuote
53  Developments / BASS / Re: End of file on: 2 Jun '11 - 02:49
Ok, I'll ask my buddy to convert it and post it for C# guys once I do.
thx!

Steve
ReplyReply Reply with quoteQuote
54  Developments / BASS / Re: Detect silence? on: 2 Jun '11 - 02:48
My coder Vic converted Ian's code to C# for me to use.
thought I'd contribute also for all the C# guys out there.........Cool



 /// <summary>
        /// Get file silence length
        /// </summary>
        /// <param name="file">file name</param>
        /// <param name="threshold">threshold</param>
        /// <returns>Point(-1, -1) on error or Point(start, end) </returns>
        System.Windows.Point GetSilenceLength(string file, int threshold)
        {
            short[] buf = new short[50000];
            long count = 0;
            int chan = 0;
            long pos = 0;

            System.Windows.Point rc = new System.Windows.Point(-1, -1);
            try
            {
                chan = Bass.BASS_StreamCreateFile(file, 0, 0, BASSFlag.BASS_STREAM_DECODE);
                if (chan == 0)
                {
                    Utils.LogWrite(LogEventType.Error, string.Format("GetSilenceLength: Couldn't create BASS stream (error = %{0})", Bass.BASS_ErrorGetCode()));
                    return rc;
                }

                while (Bass.BASS_ChannelIsActive(chan) != BASSActive.BASS_ACTIVE_STOPPED)
                {
                    int a;
                    int b = Bass.BASS_ChannelGetData(chan, buf, 20000); // decode some data
                    b /= 2; // bytes -> samples
                    for (a = 0; a < b && Math.Abs(buf[a]) <= threshold; a++)
                        ; // count silent samples

                    count += a * 2; // add number of silent bytes
                    if (a < b)
                    {
                        // sound has begun!
                        // move back to a quieter sample (to avoid "click")
                        for (; (a != 0) && Math.Abs(buf[a]) > threshold / 4; a--,count-=2) ;
                        break;
                    }
                }
                rc.X = count;

                pos = Bass.BASS_StreamGetFilePosition(chan, BASSStreamFilePosition.BASS_FILEPOS_END);
                while (pos > count)
                {
                    int a, b;
                    pos = (pos < 100000)? 0: pos - 100000; // step back a bit
                    Bass.BASS_ChannelSetPosition(chan,pos);
                    b = Bass.BASS_ChannelGetData(chan,buf,100000); // decode some data
                    b /= 2; // bytes -> samples

                    for (a = b; a > 0 && Math.Abs(buf[a - 1]) <= threshold / 2; a--)
                        ; // count silent samples

                    if (a > 0)
                    {
                        // sound has begun!
                        count = pos + a * 2; // silence begins here
                        break;
                    }
                }
                rc.Y = count;

            }
            catch (Exception ex)
            {
                Utils.LogWrite(LogEventType.Error, "GetSilenceLength:" + ex.Message);
            }
            finally
            {
                if (chan != 0)
                    Bass.BASS_StreamFree(chan);
            }

            return rc;
            
        }
ReplyReply Reply with quoteQuote
55  Developments / BASS / Re: End of file on: 1 Jun '11 - 04:17
Thanks a lot!
Is That VB?

Any chance for a C# version? (I'm a novice still)
Sorry, I should have mentioned that earlier......hehehe

thx!

Steve
ReplyReply Reply with quoteQuote
56  Developments / BASS / End of file on: 31 May '11 - 23:17
Anyone find a good way to determine when a file is completed playing?
I want to skip to the next one in the list when completed, but currently the way I'm doing it is failing on tiny little 1-2 second files.
Works great on anything bigger tho.
Anyone have a better method then the below way that might now trip up as bad?

Thx!

---------

double totaltime = Bass.BASS_ChannelBytes2Seconds(_SoundPlayer.Stream, len); // the total time length
double elapsedtime = Bass.BASS_ChannelBytes2Seconds(_SoundPlayer.Stream, pos); // the elapsed time length
double remainingtime = totaltime - elapsedtime;             
              if (remainingtime <= .05)   //Play next once end has been reached with some added sensitivity
                  {
                     DOStuff
                   }


ReplyReply Reply with quoteQuote
57  Developments / BASS / Re: WPF Sound Visualization Library on: 7 Apr '11 - 08:28
I've been using the Spectrum Meter for a while now and I must say that every WPF guy should be using these controls!
Very very nice work indeed with the best support ever!

Steve



ReplyReply Reply with quoteQuote
58  Developments / BASS / Re: Bass.NET in WPF Locking Up on: 17 Mar '11 - 05:31
It all looks fine at first glance when I compare it to my WPF port also.
If you make a zip of the project I'll test to see if it's doing the same on my rig.

Would be great to have a SimpleWPF.cs included in the future
I went thru similar pain myself......hehehe

cya!

Steve
ReplyReply Reply with quoteQuote
59  Developments / BASS / Re: Playing Surround Sound files out multiple outputs. on: 19 Feb '11 - 11:44
Thanks for the info Ian!

does this apply to Pro Audio ASIO sound cards also or mainly just gaming cards with 5.1 or 7.1?

Cya!

Steve

ReplyReply Reply with quoteQuote
60  Developments / BASS / Playing Surround Sound files out multiple outputs. on: 13 Feb '11 - 00:39
My next task is to try and get BASS to play a 5.1 files out 6 channels of an audio card.
I want to give users the option to select stereo pairs for playback.
So L and R go out 1-2   C and LFE go out 3-4 and LS and RS out 5-6 for example.

Do I need to open 3 instances of BASS to do this or are there some addons I should be looking at to do this?
How can I tell it to play only channels 5 and 6 of a 5.1 file?
Should I be checking out Bassmix for this?
Any suggestions before I sketch this out will be super appreciated so I don't waste time researching the wrong area........Cool

thx!


Steve
ReplyReply Reply with quoteQuote
Pages: 1 2 [3] 4 5
Powered by SMF 1.1.18 | SMF © 2013, Simple Machines