Show Posts
|
|
Pages: [1] 2
|
|
1
|
Developments / BASS / Re: BASS_FX 2.4.8
|
on: 30 Dec '12 - 08:58
|
|
I finally managed to get BPM detection to work. Unfortunately, I don't think the values are correct.
I have tested various programs available on the internet. Many of them yields the same values as I get with my code (probably because they use the same code).
I have compared the generated values of some songs to a database of BPM's found on the internet. None of my values are close to those values.
However, Mixmeister BPM Analyzer seems to calculate the "correct" values.
Anyone have any thoughts on this?
Regards Thomas
|
Reply
Quote
|
|
|
2
|
Developments / BASS / Re: BASS_FX 2.4.8
|
on: 17 Dec '12 - 15:40
|
|
Thanks for your help. I typecasted like this: timeSetEvent(round((beatpos - curpos) * 1000), 0, @beatTimerProc, NativeUInt(user), TIME_ONESHOT); and it Works fine.
|
Reply
Quote
|
|
|
3
|
Developments / BASS / Re: BASS_FX 2.4.8
|
on: 16 Dec '12 - 17:29
|
Hi  There was a typo in Delphi Unit "BASS_FX.PAS", it's fixed now, please redownload the package  Thanks. That fixed the first error. But not the error in line 104. Regards Thomas
|
Reply
Quote
|
|
|
4
|
Developments / BASS / Re: BASS_FX 2.4.8
|
on: 16 Dec '12 - 08:50
|
Using Delphi XE2 and Windows 8 PRO. Trying to compile the BPM project, but I get compile errors: In bpm.pas: line 347: Incompatible types: Pointer and Integer; This is probably due to an incorrect declaration in bass_fx at line 365. MinMaxBPM and Flags is defined a pointer. In bpm.pas: line 104: Incompatible types: NativeUInt and Pointer;  Regards Thomas
|
Reply
Quote
|
|
|
6
|
Developments / BASS / BASS_FLAC and seek table
|
on: 10 May '12 - 16:46
|
|
If a Flac-file contains no seektable, moving forward/backwards works fine. If a Flac-file contains a corrupted seek table, moving forward/backwards fails somtimes but not always.
Does the Flac-decoder use a the seek table if present?
|
Reply
Quote
|
|
|
8
|
Developments / BASS / Re: Does BASS provide Replay Gain function?
|
on: 24 Dec '09 - 11:38
|
|
Yes, that's what I thought.
I think I had my reference tracks wrong.
Example1: Gain -3.3db Peak 0.941182 This will give a volume of .6839 which means lowering the volume.
Example2: Gain +1.25db Peak 0.936561 This will give a volume of 1.1547 which means raising the volume.
All values from dbPowerAmp.
Does that sound ok to you? Would it mean, that playing those two tracks, the volume would sound at the same level?
Regards Thomas
|
Reply
Quote
|
|
|
9
|
Developments / BASS / Re: Does BASS provide Replay Gain function?
|
on: 24 Dec '09 - 07:52
|
Yes, as your standard/reference value is already taken into account during the replay gain calculation.
I really appriciate your help since I'm not exactly an expert in this area. If I understand you correctly, a higher value in BassFXvol.fVolume than 1 lowers the volume and a lower value will raise the volume? By the way, I'm trying to make my player replaygain capable. Regarding the tags, it seems that there are many ways to store the values. dbPowerAmp stores the values in ID3v2 TXXX frames. Regards and merry christmas Thomas
|
Reply
Quote
|
|
|
10
|
Developments / BASS / Re: Does BASS provide Replay Gain function?
|
on: 23 Dec '09 - 19:17
|
Yes, your meth is correct! The peak level value is denoted as a float (1.0 means 0dB) - so your track seems to be quite silent, as the peak is a around -6dB. So you need to amplify it a bit and such 0.46-0.46dB is about 1.05 in float.
Thanks for the reply. I should have mentioned, that the +.046db is related to my standard value 89db, meaning that the volume should be cut by 0,46db from 90db (calculated by MP3gain). In order to accomplish that, which value should I pass to BassFXvol.fVolume? 1,05?
|
Reply
Quote
|
|
|
11
|
Developments / BASS / Re: Does BASS provide Replay Gain function?
|
on: 23 Dec '09 - 18:36
|
|
Hi Ian
I have the code working now. The problem is, I'm not really sure it makes a difference.
Maybe I don't understand the concept.
Let me give you an example:
A given mp3file has the following values:
MP3gain = TrackGain +0.495db TrackPeak 0.534013 dbPowerAmp = TrackGain +0.460db TrackPeak 0.532684
These values are apparently close to each other.
TrackGain +0.46db means lower the volume. or? TrackPeak means the highest level in the file, but what does the value represent? db?
Anyway, following your example and use TrackGain gives this result:
pow10(+0,46 / 20) yields about 1,05...
My statement is: BassFXvol.fVolume:=power(10,RGinfo.Gain/20)
Can that be right? The global volume is 1 and now I set it to 1,05?
I'm confused, please help (after Christmas will be fine).
|
Reply
Quote
|
|
|
13
|
Developments / BASS / Re: Does BASS provide Replay Gain function?
|
on: 22 Dec '09 - 12:28
|
I don't use Delphi myself, so I'm afraid I can't advise on the specifics of that, but the basic process is to read the Replaygain tags and then apply the gain. If you're dealing with MP3 files, then that probably means ID3v2 tags, which are available via BASS_ChannelGetTags (BASS_TAG_ID3V2). For simplicity, you may want to use a 3rd-party library to parse the ID3v2 tag block (extract the Replaygain info), eg. something like id3lib. The 2nd part (applying the gain) can most simply be achieved with the BASS_FX add-on's BASS_FX_BFX_VOLUME effect, like this (in C)... HFX volfx=BASS_ChannelSetFX(stream, BASS_FX_BFX_VOLUME, 0); // set volume FX on stream BASS_BFX_VOLUME volparam; volparam.lChannel=0; // "global" volume volparam.fVolume=pow10(gain/20); // convert the replaygain dB gain to a linear value BASS_FXSetParameters(volfx, &volparam); // apply it
Thanks, Ian. I'll give it a try. Regards Thomas I have an error 19. This is the sequence of statements: PLAY.Hdl:=BASS_StreamCreateFile(False, f, 0, 0, BASS_UNICODE); PLAY.HdlFX:=BASS_ChannelSetFX(PLAY.Hdl,BASS_FX_BFX_VOLUME,0); PLAY.hdlFX contains 0 and the errorcode is 19. This is as far as I get. Any ideas? Regards Thomas
|
Reply
Quote
|
|
|
14
|
Developments / BASS / Re: Does BASS provide Replay Gain function?
|
on: 21 Dec '09 - 17:28
|
I don't use Delphi myself, so I'm afraid I can't advise on the specifics of that, but the basic process is to read the Replaygain tags and then apply the gain. If you're dealing with MP3 files, then that probably means ID3v2 tags, which are available via BASS_ChannelGetTags (BASS_TAG_ID3V2). For simplicity, you may want to use a 3rd-party library to parse the ID3v2 tag block (extract the Replaygain info), eg. something like id3lib. The 2nd part (applying the gain) can most simply be achieved with the BASS_FX add-on's BASS_FX_BFX_VOLUME effect, like this (in C)... HFX volfx=BASS_ChannelSetFX(stream, BASS_FX_BFX_VOLUME, 0); // set volume FX on stream BASS_BFX_VOLUME volparam; volparam.lChannel=0; // "global" volume volparam.fVolume=pow10(gain/20); // convert the replaygain dB gain to a linear value BASS_FXSetParameters(volfx, &volparam); // apply it
Thanks, Ian. I'll give it a try. Regards Thomas
|
Reply
Quote
|
|
|
15
|
Developments / BASS / Re: Does BASS provide Replay Gain function?
|
on: 21 Dec '09 - 12:23
|
BASS won't apply Replaygain, but you can do so yourself by reading the Replaygain information from the tags and then applying it in a DSP function (or use BASS_FX's volume effect).
Hi Ian If I use MP3gain, the audiofile will be modified and the replaygain will work without player intervention. But if I use dbPoweramp, only the tags are placed in the file. This means I will have to use your suggested action. Do you have any examples (delphi) how to do that? I'm playing using this statement: PLAY.Hdl:=BASS_StreamCreateFile(False, f, 0, 0, BASS_UNICODE); Regards Thomas
|
Reply
Quote
|
|
|
16
|
Developments / BASS / Re: BASS 2.4 BASS_GetVolume
|
on: 12 Mar '08 - 09:18
|
O.o Now that is odd indeed, almost sounds like several volume controls are stacked (thus influencing each other). That is the only explanation I have for that odd behavior. Yes, it is very strange. I do not see how GetVolume could possibly return E-5.
It returned "1.51.......E-5", not just E-5. The dot's represent multiple digits. And it only happens under XP, not Vista. It has to be in steps, there exist no stepless slider, a "analog" slider is not possible on a computer programatically
When I say "slider" I really mean a simple bar with positions from 0 to 100. When the user clicks the bar, I read the position and calculate the new volume setting. Very simple. PS! Are you using BASS_CONFIG_CURVE_VOL or not?
No. I tried to set it to linear, but that had no effect. Summary: GetVolume value multiplied with 100 and rounded gives the position in my bar (range 0-100). The bar position divided by 100 is used in SetVolume. That works ok except that it does not correspond with the VistaMasterVolume linear slider. This was the initial problem. I'll just have to live with that. If I run my program on XP, the output is linear, but it does not control the MasterVolume, just the WaveVolume. Thanks for your interest.
|
Reply
Quote
|
|
|
17
|
Developments / BASS / Re: BASS 2.4 BASS_GetVolume
|
on: 11 Mar '08 - 17:17
|
Actually. 1.0*100 and then turn that to integer is how I do it in one of my own apps. So that is correct. Then later the slider result is 100*0.01 (I divide by 100 using multiply as it's a tad faster) This means that the middle of the slider matches 50% or 0.5 nicely, whether the volume is float or dB. And best of all by simply changing the granularity maybe you watt to use 0-64 on the slider rather than 0-100 that is very easy. It's not really a slider problem. GetVolume does not return a linear value. If VistaVolume = 50% then the value returned is 0.308..., not 0.5. If you want to set the volume to 50%, then you must pass 0.308... The 10-step test is only to show a manual way to convert between the liniear and log scale. (in 10 steps) So if some card or driver only support two steps. 0% and 100% volume, then Vista will only be able to support those two settings. I suggest you start to rethink your audio apps so volume adjustments happen internally instead, and assume that the users have their system playback and recording volumes et exactly how they want them. BASS_ChannelSetAttribute() or BASS_SetConfig() with the BASS_CONFIG_GVOL_STREAM flag (why isn't this float as well Ian?  ) is advised. The case here is, that the user clicks the slider to change volume (not in steps). PS! What is that Round() command doing? check the documentation for your programming language, does it round down to nearest or up, or does it round down if .5 or below and up if above? It rounds up if .5. Also I suspect you are using integer for the case, remember that integer and float do not work that well together in comparisons so double check your code. Compare float to float and integer to integer, never mix the two up or the very nature of what a float is could haunt you  The Round function automatically converts from float to integer. You also mentioned E-5 ? That's a musical note identifier. Is this MIDI your adjusting the volume of or?
The E-5 came as the return value from GetVolume, when the volume(mastervolume) was set to 0 (from windows).
|
Reply
Quote
|
|
|
18
|
Developments / BASS / Re: BASS 2.4 BASS_GetVolume
|
on: 11 Mar '08 - 14:29
|
|
It's not doing the conversion correctly or not at all. I'll be happy to debug it.
The "table" is a case statement, where the GetVolume (vol) is multiplied with 100 and rounded to get a whole number which (x) is used to set the equivalent position in a slider (range 0-100).
The case values to the left is the readings from GetVolume, when setting the WindowsMixer slider to 10,20....
Please have a look at my other post.
|
Reply
Quote
|
|
|
19
|
Developments / BASS / Re: BASS 2.4 BASS_GetVolume
|
on: 11 Mar '08 - 09:06
|
|
I managed to get access to an XP machine. This is what I found out (rinning XP):
1. If the slider is set to 0, then GetVolume returns 1.51.......E-5 instead of 0 2. Get/SetVolume acts upon the Wave volume, not the masterVolume. This means, that if the masterVolume is changed, the change is not seen in my application. This is contrary to how it works in Vista. 3. The returned volume is linear (good), but in Vista it is dB (bad).
|
Reply
Quote
|
|
|
20
|
Developments / BASS / Re: BASS 2.4 BASS_GetVolume
|
on: 11 Mar '08 - 06:40
|
I found this note: "For the endpoint volume APIs, there are two variants of each of the APIs - there's a dB version which takes input in dB, and there's a "scalar" version which takes a linear floating point value between 0.0 and 1.0[1]. The "scalar" version is intended for applications that want to implement a master volume control because it provides a linear function that maps nicely to a position slider. The other nice thing about the "scalar" version of the endpoint volume APIs is that it provides a volume taper that gives a linear volume experience for audio devices that correctly handle volume dB." http://blogs.msdn.com/larryosterman/archive/2007/05/09/curvy-volumes.aspxIt seems to me, that the value returned from GetVolume, is the dbValue not the scalar value.
|
Reply
Quote
|
|
|