2 Sep '10 - 20:02 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1] 2  All
  Reply  |  Print  
Author Topic: BASS CD Ripper Library  (Read 6804 times)
3delite
Posts: 476


« on: 28 Oct '08 - 20:52 »
Reply with quoteQuote

Hi!

I made a BASS CD Ripper Library which makes it easy to add audio CD ripping functionality to your application.
  • Ripp multiple tracks or the whole CD as one big file
  • Ripp to WAV or
  • Ripp with any command line encoder on the fly, album mode or multiple track mode

Update 1.1.

  • Added resampling function
  • Fixed unicode version command line problem

Update 1.1.3

  • Added single track ripping function
  • Fixed unicode version WAV writing problem

Update 1.1.4

  • More command line option patterns
  • Fixed progress reporting when using resampling

Update 1.1.5

  • Added option to ripp to WMA

Update 1.1.6

  • Added function to get the channel handles before ripping (set DSPs etc. - standard BASS feature Smiley )

Download: BASS CD Ripper 1.1.6.zip

Beta testers are welcome!

3delite
« Last Edit: 14 Dec '08 - 13:47 by 3delite » Logged
3delite
Posts: 476


« Reply #1 on: 12 Nov '08 - 16:35 »
Reply with quoteQuote

Update 1.1.

  • Added resampling function
  • Fixed unicode version command line problem

Download: BASS CD Ripper 1.1.zip

3delite
Logged
danzman
Posts: 49


« Reply #2 on: 26 Nov '08 - 04:28 »
Reply with quoteQuote

Hi, I toyed around with the sample project and it works great! I do have one question. How do I selectively rip a track or series of non-sequential tracks from a CD. Can you comment on this?
Logged
3delite
Posts: 476


« Reply #3 on: 26 Nov '08 - 10:51 »
Reply with quoteQuote

Ok, it's added. Smiley

Update 1.1.3

  • Added single track ripping function
  • Fixed unicode version WAV writing problem

Download: BASS CD Ripper 1.1.3.zip

3delite
Logged
danzman
Posts: 49


« Reply #4 on: 26 Nov '08 - 11:35 »
Reply with quoteQuote

Thanks! I will try the new version. BTW whem do I use the ANSI or the Unicode version?
(Sorry, I am a newbie when it comes to Audio programming).

Logged
3delite
Posts: 476


« Reply #5 on: 26 Nov '08 - 11:40 »
Reply with quoteQuote

Well, use the unicode version when you want to create unicode file names. Smiley
If you are using Delphi 2009 you probably want to use the unicode version so then everything is unicode. Smiley

3delite
Logged
3delite
Posts: 476


« Reply #6 on: 7 Dec '08 - 03:17 »
Reply with quoteQuote

Update 1.1.4

  • More command line option patterns
  • Fixed progress reporting when using resampling

Download: BASS CD Ripper 1.1.4.zip

3delite
Logged
3delite
Posts: 476


« Reply #7 on: 9 Dec '08 - 18:19 »
Reply with quoteQuote

Update 1.1.5

  • Added option to ripp to WMA

Download: BASS CD Ripper 1.1.5.zip

3delite
Logged
pebbledog
Guest
« Reply #8 on: 10 Dec '08 - 18:49 »
Reply with quoteQuote

How can I use this library in vb.net?  Do you have any way of making this into a COM accessible dll?
Logged
3delite
Posts: 476


« Reply #9 on: 10 Dec '08 - 19:56 »
Reply with quoteQuote

I don't know what a COM accessible dll is, but I think you can.
You just have to translate the BASSCDRipperDefs.pas to VB and use it as the same mode as BASS.
The BASSCDRipperDefs.pas is using dynamic loading but you can use a simple static loading also.
It's just a few minute work to translate it. (I might try to do that (with zero VB knowledge) but then you have to test it, I don't know VB.)

Regards
3delite

EDIT: Here's the attached VB unit, this is my first VB attempt so probably needs much fixing.
But please tell me how you get on with it!

* BASSCDRipper.zip (1.16 KB - downloaded 18 times.)
« Last Edit: 10 Dec '08 - 20:19 by 3delite » Logged
wgrumblat
Posts: 5


« Reply #10 on: 13 Dec '08 - 12:22 »
Reply with quoteQuote

Hi 3delite,

I try to include your ripper library into my VB6 project. I made some changes to the module definitions and the project compiles without error now. But when I try to call the BASSCDRipper_SetParams function, I get a runtime error '53', File not found: BassCDRipper.dll. Although the dll is in the project directory. Do you have any idea about this? All BASS dll's are in the same directory, no problem at all.

If you want, I can send you my module definition file (BassCDRipper.bas) for inspection.

This is my code for the ripper:
----------
Dim pRip As TBASSCDRipperParams
Dim setParameters As Long

pRip.Drive = 2
pRip.FileName = "r:\test\testrip.wav"
pRip.Format = FORMAT_WAV
pRip.Resample = 0
pRip.AlbumMode = 1

setParameters = BASSCDRipper_SetParams(0, pRip) 'This results inthe run time error
----------



Regards,
Wolfgang
Logged
3delite
Posts: 476


« Reply #11 on: 13 Dec '08 - 12:42 »
Reply with quoteQuote

I see. You have to create a ripper object first (you are passing 0 as ripper object and that's no good).
First you have to make sure to load BassCDRipper.dll into the process space (don't know how's that done in VB - LoadLibary() in Delphi) and then create a ripper object with BASSCDRipper_Create() (and use BASSCDRipper_Free() when you are done), and then pass this object to all functions that you call (0 will not do it).  Smiley
And also you have to successfully initialize BASS before issueing the BASSCDRipper_Ripp() command!
Thanx for the VB include file, please send it to 3delite AT 3delite.hu and also please send the compiled exe that you made so I can debug and see if the parameters arive successfully and everything is ok.

Regards
3delite
« Last Edit: 13 Dec '08 - 13:18 by 3delite » Logged
wgrumblat
Posts: 5


« Reply #12 on: 13 Dec '08 - 21:29 »
Reply with quoteQuote

Hello 3delite,

I still have the 'File not found' runtime error.

After searching the web, I found only one possible reason: your ripper dll might depend on another dll that is missing on my computer. Can you please check that? Did you create the dll with Delphy? Maybe there is a runtime dll that I need.

I will mail you the .bas module, when I have tested it, to be sure that it works.

Regards,
wolfgang
Logged
wgrumblat
Posts: 5


« Reply #13 on: 13 Dec '08 - 21:36 »
Reply with quoteQuote

OK, this problem is solved. It was the bassenc.dll that was really missing. Thanks to the 'Dependancy Walker' from Visual Studio.

Now I will continue testing.

Regards,
Wolfgang
Logged
wgrumblat
Posts: 5


« Reply #14 on: 13 Dec '08 - 21:50 »
Reply with quoteQuote

Private Sub form_load()
   
    Dim strFile As String
    strFile = "r:\test\testrip.wav"
   
    'create Ripper Object
    lRip = BASSCDRipper_Create()
    'Ripper Parameters
    Dim pRip As TBASSCDRipperParams
    pRip.Drive = 2
    pRip.FileName = VarPtr(strFile)
    pRip.Format = FORMAT_WAV
    pRip.Resample = 0
    pRip.AlbumMode = 1
    'Set Parameters
    lResult = BASSCDRipper_SetParams(lRip, pRip)

    'here I get runtime error 'Bad DLL Calling Convention'
    'but  lResult = BASSCDRipper_SetParams(lRip, pRip) works without error
    'any idea what I am doing wrong?

End Sub
« Last Edit: 13 Dec '08 - 21:53 by wgrumblat » Logged
(: JOBnik! :)
Posts: 896


« Reply #15 on: 14 Dec '08 - 08:52 »
Reply with quoteQuote

Hi Grin

Next functions are wrong for VB:
Sub OnProgress(BASSCDRipper: Pointer; Progress, TotalProgress: Cardinal)
Sub WMAEncBefore(BASSCDRipper: Pointer; WMAEncodingHandle: Cardinal; Track: Integer)

please take a look at BASS/BASS_FX VB modules to see how to fix this.

Pointer = Long
Cardinal = Long

I don't think you have to include this function: VBStrFromAnsiPtr
because the user already included it, using BASS.BAS Smiley

Why won't you update your 1st post with the latest download link, instead of searching all posts for new updates Smiley
« Last Edit: 14 Dec '08 - 08:58 by (: JOBnik! :) » Logged
3delite
Posts: 476


« Reply #16 on: 14 Dec '08 - 12:29 »
Reply with quoteQuote

Private Sub form_load()
   
    Dim strFile As String
    strFile = "r:\test\testrip.wav"
   
    'create Ripper Object
    lRip = BASSCDRipper_Create()
    'Ripper Parameters
    Dim pRip As TBASSCDRipperParams
    pRip.Drive = 2
    pRip.FileName = VarPtr(strFile)
    pRip.Format = FORMAT_WAV
    pRip.Resample = 0
    pRip.AlbumMode = 1
    'Set Parameters
    lResult = BASSCDRipper_SetParams(lRip, pRip)

    'here I get runtime error 'Bad DLL Calling Convention'
    'but  lResult = BASSCDRipper_SetParams(lRip, pRip) works without error
    'any idea what I am doing wrong?

End Sub


My knowledge of VB is close to zero, but as far as I know VB uses stdcall as the calling convention and BASS CD Ripper Library uses stdcall to (like BASS). So I can't recommend you anything. Maybe a VB guru will come by and help.
From the Delphi view using the ripper is the same as using BASS.

Ok I'll update the first post from now on.
Thanx for the comments.

Regards
3delite
Logged
danzman
Posts: 49


« Reply #17 on: 14 Dec '08 - 13:02 »
Reply with quoteQuote

I can see that you are hard-coding the drive designation. Can you get the drive number as in BassCD example? I understand that the drive designations are zero-indexed, meaning - count starts from zero. So the second drive is 1. This happened to me before when I hardcoded the drive number.

-- just my two bits.
Logged
3delite
Posts: 476


« Reply #18 on: 14 Dec '08 - 13:47 »
Reply with quoteQuote

Sorry but I don't understand you. What do you mean by hard coding the drive designation? The drive parameter will be passed to BASSCD so it's the same methode as with using the BASSCD. It is zero based by BASCD, I did not change anything...  Huh

Update 1.1.6

  • Added function to get the channel handles before ripping (set DSPs etc. - standard BASS feature Smiley )

EDIT: It just came to my mind to accomplish the following: is it possible to ripp in real time (issue BASS_ChannelPlay()) to for example get the channel handle with BASSMIX add a recording channel to it, and record the karaoke singing together with the audio cd on the fly, with all the options: to WMA, command line encoder etc.?

Regards
3delite
« Last Edit: 14 Dec '08 - 14:04 by 3delite » Logged
evstevemd
Posts: 101


« Reply #19 on: 19 Dec '08 - 04:44 »
Reply with quoteQuote

I'm still Bass Learner. Once I grasp the basics, I will start wondering with ripping and all these stuffs. Nice work guys!
Logged
Pages: [1] 2  All
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.067 seconds with 17 queries.