Using lame3.99.3-64 in Sonar X1

Author
arachnaut
Max Output Level: -67 dBFS
  • Total Posts : 1168
  • Joined: 2007/05/05 17:24:33
  • Location: Sunnyvale, CA USA
  • Status: offline
2011/12/31 22:45:48 (permalink)

Using lame3.99.3-64 in Sonar X1

I just got Sonar X1 64-bit and I looked over the forum for ways of adding MP3 export.
There are several older posts, so I thought I'd post an update for the latest information.

I downloaded  lame3.99.3-64.zip (the 64-bit version) from here:
http://www.free-codecs.com/Lame_Encoder_download.htm

extract lame3.99.3-64.zip into a folder called "lame3.99.3-64"

Create the folder 'C:\Program Files\lame' (you will need administrator status)

Move the extracted folder to this folder. (you will need administrator status)

For me that path is now: "C:\Program Files\lame\lame3.99.3-64"

It looks like this:
http://www.arachnaut.net/images/LameFolder.gif
{there are a few extra files I put there}

Open Sonar X1 (64-bit) and go to Utilities->External Encoder Configuration Utility

Create a New entry:

Friendly name: "Lame mp3 encoder"
Source Format: Wave
CLSID (made for you)
Two check boxes are checked (Modal Encode & Keep Source File)
Extension: .mp3
Description: Lame mp3 encoder version 3.99.3-64
Path: C:\Program Files\lame\lame3.99.3-64
Command line: lame.exe -b320 --verbose %I %O
Save it.
That command uses the 320 Kbps setting and uses a verbose output list. You can change this if you like.

It looks like this:
http://www.arachnaut.net/images/ExternalAudioEncoderSetup.gif

If it worked you will have a registry setting like this:
http://www.arachnaut.net/images/Registry.gif




- Jim Hurley -
SONAR Platinum - x64  - Windows 10 Pro 
ASUS P8P67 PRO Rev 3.0;  Core i7-2600K@4.4GHz; 16 GB G.SKILL Ripjaws X;
GeForce GT 740; Saffire Pro14 MixControl 3.7; Axiom 61
64-Bit audio, SR: 48kHz, ASIO 256 samples latency, Rec/Play I/O Buffers 512k, Total Round Trip Latency 13 ms, Pow-r 3 dither 
#1

12 Replies Related Threads

    arachnaut
    Max Output Level: -67 dBFS
    • Total Posts : 1168
    • Joined: 2007/05/05 17:24:33
    • Location: Sunnyvale, CA USA
    • Status: offline
    Re:Using lame3.99.3-64 in Sonar X1 2011/12/31 23:07:32 (permalink)

    Here is a sample of the output from that program with my settings (-b320 --verbose):

    C:\Program Files\lame\lame3.99.3-64>.\lame.exe -b320 --verbose .\wave-test-96kHz-32bit.wav j:\Desktop\wave-test-96kHz-32bit.mp3
    LAME 3.99.3 64bits (http://lame.sf.net)
    CPU features: SSE (ASM used), SSE2 (ASM used)
    Resampling:  input 96 kHz  output 48 kHz
    Using polyphase lowpass filter, transition band: 20323 Hz - 20903 Hz
    Encoding .\wave-test-96kHz-32bit.wav to j:\Desktop\wave-test-96kHz-32bit.mp3
    Encoding as 48 kHz j-stereo MPEG-1 Layer III (4.8x) 320 kbps qval=3

    misc:

            scaling: 1
            ch0 (left) scaling: 1
            ch1 (right) scaling: 1
            huffman search: best (outside loop)
            experimental Y=0
            ...

    stream format:

            MPEG-1 Layer 3
            2 channel - joint stereo
            padding: off
            constant bitrate - CBR
            using LAME Tag
            ...

    psychoacoustic:

            using short blocks: channel coupled
            subblock gain: 1
            adjust masking: -10 dB
            adjust masking short: -11 dB
            quantization comparison: 9
             ^ comparison short blocks: 9
            noise shaping: 1
             ^ amplification: 1
             ^ stopping: 1
            ATH: using
             ^ type: 4
             ^ shape: 0 (only for type 4)
             ^ level adjustement: -12 dB
             ^ adjust type: 3
             ^ adjust sensitivity power: 1.000000
            experimental psy tunings by Naoki Shibata
               adjust masking bass=-0.5 dB, alto=-0.25 dB, treble=-0.025 dB, sfb21=0.5 dB
            using temporal masking effect: yes
            interchannel masking ratio: 0
            ...

        Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
      6067/6067  (100%)|    0:03/    0:03|    0:03/    0:03|   44.597x|    0:00
    -------------------------------------------------------------------------------
       kbps        LR    MS  %     long switch short %
      320.0       83.1  16.9        99.2   0.5   0.4
    Writing LAME Tag...done
    ReplayGain: -8.4dB

    C:\Program Files\lame\lame3.99.3-64>





    - Jim Hurley -
    SONAR Platinum - x64  - Windows 10 Pro 
    ASUS P8P67 PRO Rev 3.0;  Core i7-2600K@4.4GHz; 16 GB G.SKILL Ripjaws X;
    GeForce GT 740; Saffire Pro14 MixControl 3.7; Axiom 61
    64-Bit audio, SR: 48kHz, ASIO 256 samples latency, Rec/Play I/O Buffers 512k, Total Round Trip Latency 13 ms, Pow-r 3 dither 
    #2
    Brando
    Max Output Level: -47.5 dBFS
    • Total Posts : 2776
    • Joined: 2003/11/06 11:47:20
    • Location: Canada
    • Status: offline
    Re:Using lame3.99.3-64 in Sonar X1 2012/01/01 12:01:43 (permalink)
    Very cool. Many thanks for posting this. 

    Brando
    Cakewalk, Studio One Pro, Reaper
    Presonus Audiobox 1818VSL
    ASUS Prime Z370-A LGA1151, 32GB DDR4, Intel 8700K i7, 500 GB SSD, 3 x 1TB HDD, Windows 10 Pro 64
    #3
    arachnaut
    Max Output Level: -67 dBFS
    • Total Posts : 1168
    • Joined: 2007/05/05 17:24:33
    • Location: Sunnyvale, CA USA
    • Status: offline
    Re:Using lame3.99.3-64 in Sonar X1 2012/01/04 15:06:50 (permalink)
    I guess I should list all the options for the sake of completeness.  One just does 'lame --help' to see this:

    LAME 64bits version 3.99.3 (http://lame.sf.net)

    usage: .\lame [options] <infile> [outfile]

        <infile> and/or <outfile> can be "-", which means stdin/stdout.

    RECOMMENDED:
        lame -V2 input.wav output.mp3

    OPTIONS:
      Input options:
        --scale <arg>   scale input (multiply PCM data) by <arg>
        --scale-l <arg> scale channel 0 (left) input (multiply PCM data) by <arg>
        --scale-r <arg> scale channel 1 (right) input (multiply PCM data) by <arg>
        --mp1input      input file is a MPEG Layer I   file
        --mp2input      input file is a MPEG Layer II  file
        --mp3input      input file is a MPEG Layer III file
        --nogap <file1> <file2> <...>
                        gapless encoding for a set of contiguous files
        --nogapout <dir>
                        output dir for gapless encoding (must precede --nogap)
        --nogaptags     allow the use of VBR tags in gapless encoding

      Input options for RAW PCM:
        -r              input is raw pcm
        -x              force byte-swapping of input
        -s sfreq        sampling frequency of input file (kHz) - default 44.1 kHz
        --bitwidth w    input bit width is w (default 16)
        --signed        input is signed (default)
        --unsigned      input is unsigned
        --little-endian input is little-endian (default)
        --big-endian    input is big-endian


      Operational options:
        -a              downmix from stereo to mono file for mono encoding
        -m <mode>       (j)oint, (s)imple, (f)orce, (d)ual-mono, (m)ono (l)eft (r)ight
                        default is (j) or (s) depending on bitrate
                        joint  = joins the best possible of MS and LR stereo
                        simple = force LR stereo on all frames
                        force  = force MS stereo on all frames.
        --preset type   type must be "medium", "standard", "extreme", "insane",
                        or a value for an average desired bitrate and depending
                        on the value specified, appropriate quality settings will
                        be used.
                        "--preset help" gives more info on these
        --comp  <arg>   choose bitrate to achieve a compression ratio of <arg>
        --replaygain-fast   compute RG fast but slightly inaccurately (default)
        --replaygain-accurate   compute RG more accurately and find the peak sample
        --noreplaygain  disable ReplayGain analysis
        --clipdetect    enable --replaygain-accurate and print a message whether
                        clipping occurs and how far the waveform is from full scale
        --flush         flush output stream as soon as possible
        --freeformat    produce a free format bitstream
        --decode        input=mp3 file, output=wav
        --swap-channel  swap L/R channels
        -t              disable writing wav header when using --decode


      Verbosity:
        --disptime <arg>print progress report every arg seconds
        -S              don't print progress report, VBR histograms
        --nohist        disable VBR histogram display
        --quiet         don't print anything on screen
        --silent        don't print anything on screen, but fatal errors
        --brief         print more useful information
        --verbose       print a lot of useful information

      Noise shaping & psycho acoustic algorithms:
        -q <arg>        <arg> = 0...9.  Default  -q 5 
                        -q 0:  Highest quality, very slow 
                        -q 9:  Poor quality, but fast 
        -h              Same as -q 2.   Recommended.
        -f              Same as -q 7.   Fast, ok quality


      CBR (constant bitrate, the default) options:
        -b <bitrate>    set the bitrate in kbps, default 128 kbps
        --cbr           enforce use of constant bitrate

      ABR options:
        --abr <bitrate> specify average bitrate desired (instead of quality)

      VBR options:
        -V n            quality setting for VBR.  default n=4
                        0=high quality,bigger files. 9=smaller files
        -v              the same as -V 4
        --vbr-old       use old variable bitrate (VBR) routine
        --vbr-new       use new variable bitrate (VBR) routine (default)
        -Y              lets LAME ignore noise in sfb21, like in CBR
        -b <bitrate>    specify minimum allowed bitrate, default  32 kbps
        -B <bitrate>    specify maximum allowed bitrate, default 320 kbps
        -F              strictly enforce the -b option, for use with players that
                        do not support low bitrate mp3
        -t              disable writing LAME Tag
        -T              enable and force writing LAME Tag


      MP3 header/stream options:
        -e <emp>        de-emphasis n/5/c  (obsolete)
        -c              mark as copyright
        -o              mark as non-original
        -p              error protection.  adds 16 bit checksum to every frame
                        (the checksum is computed correctly)
        --nores         disable the bit reservoir
        --strictly-enforce-ISO   comply as much as possible to ISO MPEG spec
        --buffer-constraint <constraint> available values for constraint:
                                         default, strict, maximum

      Filter options:
      --lowpass <freq>        frequency(kHz), lowpass filter cutoff above freq
      --lowpass-width <freq>  frequency(kHz) - default 15% of lowpass freq
      --highpass <freq>       frequency(kHz), highpass filter cutoff below freq
      --highpass-width <freq> frequency(kHz) - default 15% of highpass freq
      --resample <sfreq>  sampling frequency of output file(kHz)- default=automatic


      ID3 tag options:
        --tt <title>    audio/song title (max 30 chars for version 1 tag)
        --ta <artist>   audio/song artist (max 30 chars for version 1 tag)
        --tl <album>    audio/song album (max 30 chars for version 1 tag)
        --ty <year>     audio/song year of issue (1 to 9999)
        --tc <comment>  user-defined text (max 30 chars for v1 tag, 28 for v1.1)
        --tn <track[/total]>   audio/song track number and (optionally) the total
                               number of tracks on the original recording. (track
                               and total each 1 to 255. just the track number
                               creates v1.1 tag, providing a total forces v2.0).
        --tg <genre>    audio/song genre (name or number in list)
        --ti <file>     audio/song albumArt (jpeg/png/gif file, v2.3 tag)
        --tv <id=value> user-defined frame specified by id and value (v2.3 tag)
        --add-id3v2     force addition of version 2 tag
        --id3v1-only    add only a version 1 tag
        --id3v2-only    add only a version 2 tag
        --id3v2-utf16   add following options in unicode text encoding
        --id3v2-latin1  add following options in latin-1 text encoding
        --space-id3v1   pad version 1 tag with spaces instead of nulls
        --pad-id3v2     same as '--pad-id3v2-size 128'
        --pad-id3v2-size <value> adds version 2 tag, pad with extra <value> bytes
        --genre-list    print alphabetically sorted ID3 genre list and exit
        --ignore-tag-errors  ignore errors in values passed for tags

        Note: A version 2 tag will NOT be added unless one of the input fields
        won't fit in a version 1 tag (e.g. the title string is longer than 30
        characters), or the '--add-id3v2' or '--id3v2-only' options are used,
        or output is redirected to stdout.


    MS-Windows-specific options:
        --priority <type>  sets the process priority:
                             0,1 = Low priority (IDLE_PRIORITY_CLASS)
                             2 = normal priority (NORMAL_PRIORITY_CLASS, default)
                             3,4 = High priority (HIGH_PRIORITY_CLASS))
        Note: Calling '--priority' without a parameter will select priority 0.

    Misc:
        --license       print License information


    MPEG-1   layer III sample frequencies (kHz):  32  48  44.1
    bitrates (kbps): 32 40 48 56 64 80 96 112 128 160 192 224 256 320

    MPEG-2   layer III sample frequencies (kHz):  16  24  22.05
    bitrates (kbps):  8 16 24 32 40 48 56 64 80 96 112 128 144 160

    MPEG-2.5 layer III sample frequencies (kHz):   8  12  11.025
    bitrates (kbps):  8 16 24 32 40 48 56 64



    - Jim Hurley -
    SONAR Platinum - x64  - Windows 10 Pro 
    ASUS P8P67 PRO Rev 3.0;  Core i7-2600K@4.4GHz; 16 GB G.SKILL Ripjaws X;
    GeForce GT 740; Saffire Pro14 MixControl 3.7; Axiom 61
    64-Bit audio, SR: 48kHz, ASIO 256 samples latency, Rec/Play I/O Buffers 512k, Total Round Trip Latency 13 ms, Pow-r 3 dither 
    #4
    lhansen
    Max Output Level: -27.5 dBFS
    • Total Posts : 4765
    • Joined: 2005/09/21 09:02:33
    • Location: CT, USA
    • Status: offline
    Re:Using lame3.99.3-64 in Sonar X1 2012/01/04 16:16:14 (permalink)
    Thank you for doing this!!


    Slow Marching Band


    Win 7 x64, Sonar X1E x64, Studio One v2, Focusrite Saffire 24 DSP Pro, Genelec 8030a, True Systems P-Solo, Focusrite ISA One, FMR RNP, GAP-73. 

    "Someone to watch over me".
    #5
    seanathen
    Max Output Level: -90 dBFS
    • Total Posts : 23
    • Joined: 2013/11/13 22:37:19
    • Status: offline
    Re:Using lame3.99.3-64 in Sonar X1 2014/02/27 00:18:39 (permalink)
    Ok, I tried this.  It mixes down the song, then it asks me for a sub format (8, 16, 24 bit), then it starts mixing down, but then it says " unable to launch Lame Encoder" and then it says "Encoder returned an error code".  I filled out all the info exactly like you stated in the original post.  Is there something I'm missing?  What am I supposed to fill in on the " export page"?  Perhaps that's where I'm going wrong?
    #6
    Sidroe
    Max Output Level: -55.5 dBFS
    • Total Posts : 1954
    • Joined: 2010/11/10 18:59:43
    • Location: Macon,Georgia
    • Status: offline
    Re:Using lame3.99.3-64 in Sonar X1 2014/02/27 09:09:55 (permalink)
    I have had excellent results with a patch written especially for the Sonar mp3 encoder. It is called "Aaron's Sonar Mp3 Patch". It is a simple download. Click on the file to install it. It will install an icon on your desktop. Click on the icon and it will prompt you if you want all the encoders or just a specific one. I always choose all. Click on your choice. It will inform you that it is done. I always re-start my computer just for the registry sake. Open Sonar, go to export and when the window opens click to choose which format you want. The dropdown list will have every imaginable mp3 encoder listed! This thing really works! I'll find the link and post it for you.

    Sonar Platinum, Sonar X3e, Sonar X2a , Sonar X1 Expanded and 8.5.3 (32 and 64 bit), Windows 10 on a Toshiba P75-A7200 Laptop with i7 @ 2.4 quad and 8 gigs of RAM and secondary WD 1 Tb drive, Windows 10 desktop, Asus i5 @ 3.2 quad, 12 gigs RAM, 1 Tb drive, 1 500 gig drive, MOTU 24io, 2 Roland Studio Captures, Saffire 6 USB for laptop, Soundtracs Topaz Project 8 mixer, Alesis Monitor 2s, Event BAS 20/20s, Roland Micro-Monitor BA-8s, and 45 years worth of collecting FX, Mics, Amps, Guitars, and Keyboards!
    #7
    Sidroe
    Max Output Level: -55.5 dBFS
    • Total Posts : 1954
    • Joined: 2010/11/10 18:59:43
    • Location: Macon,Georgia
    • Status: offline
    Re:Using lame3.99.3-64 in Sonar X1 2014/02/27 09:13:14 (permalink)
    http://aaron-s-sonar-mp3-patch.software.informer.com/
    Here is a link. I have used this link and it is safe.

    Sonar Platinum, Sonar X3e, Sonar X2a , Sonar X1 Expanded and 8.5.3 (32 and 64 bit), Windows 10 on a Toshiba P75-A7200 Laptop with i7 @ 2.4 quad and 8 gigs of RAM and secondary WD 1 Tb drive, Windows 10 desktop, Asus i5 @ 3.2 quad, 12 gigs RAM, 1 Tb drive, 1 500 gig drive, MOTU 24io, 2 Roland Studio Captures, Saffire 6 USB for laptop, Soundtracs Topaz Project 8 mixer, Alesis Monitor 2s, Event BAS 20/20s, Roland Micro-Monitor BA-8s, and 45 years worth of collecting FX, Mics, Amps, Guitars, and Keyboards!
    #8
    seanathen
    Max Output Level: -90 dBFS
    • Total Posts : 23
    • Joined: 2013/11/13 22:37:19
    • Status: offline
    Re:Using lame3.99.3-64 in Sonar X1 2014/02/27 20:59:36 (permalink)
    His download isn't working.  Someone posted about it today on his forum, I'll check back to see if he updates it somehow.  Thank you though, it looks like it would be amazing!
     
    #9
    mudgel
    Max Output Level: 0 dBFS
    • Total Posts : 12010
    • Joined: 2004/08/13 00:56:05
    • Location: Linton Victoria (Near Ballarat)
    • Status: offline
    Re:Using lame3.99.3-64 in Sonar X1 2014/02/27 21:35:45 (permalink)
    All this information has/d been included with Sonar for many years.
     
    It used to be on the discs but I cant find it in the download files. I'll keep looking.

    Mike V. (MUDGEL)

    STUDIO: Win 10 Pro x64, SPlat & CbB x64,
    PC: ASUS Z370-A, INTEL i7 8700k, 32GIG DDR4 2400, OC 4.7Ghz.
    Storage: 7 TB SATA III, 750GiG SSD & Samsung 500 Gig 960 EVO NVMe M.2.
    Monitors: Adam A7X, JBL 10” Sub.
    Audio I/O & DSP Server: DIGIGRID IOS & IOX.
    Screen: Raven MTi + 43" HD 4K TV Monitor.
    Keyboard Controller: Native Instruments Komplete Kontrol S88.
    #10
    Sidroe
    Max Output Level: -55.5 dBFS
    • Total Posts : 1954
    • Joined: 2010/11/10 18:59:43
    • Location: Macon,Georgia
    • Status: offline
    Re:Using lame3.99.3-64 in Sonar X1 2014/02/28 10:08:09 (permalink)
    Sorry the link is not working. There are other sites to download it from. Just launch a search for the file with your browser and several sites should come up.

    Sonar Platinum, Sonar X3e, Sonar X2a , Sonar X1 Expanded and 8.5.3 (32 and 64 bit), Windows 10 on a Toshiba P75-A7200 Laptop with i7 @ 2.4 quad and 8 gigs of RAM and secondary WD 1 Tb drive, Windows 10 desktop, Asus i5 @ 3.2 quad, 12 gigs RAM, 1 Tb drive, 1 500 gig drive, MOTU 24io, 2 Roland Studio Captures, Saffire 6 USB for laptop, Soundtracs Topaz Project 8 mixer, Alesis Monitor 2s, Event BAS 20/20s, Roland Micro-Monitor BA-8s, and 45 years worth of collecting FX, Mics, Amps, Guitars, and Keyboards!
    #11
    Skyline_UK
    Max Output Level: -54 dBFS
    • Total Posts : 2133
    • Joined: 2004/04/15 17:55:09
    • Location: Midlands, UK
    • Status: offline
    Re:Using lame3.99.3-64 in Sonar X1 2014/02/28 10:50:44 (permalink)
    'Lame XP' is a similar tool. Disregard the 'XP' part of the moniker, it's kept up to date regularly and fully compatible with W7 and W8, the last build being Jan 2014.
     http://lamexp.sourceforge.net/
     
     

    My stuff
     
    Intel Sandy Bridge i7 2600 @ 3.4GHz, 4 cores, 8 threads, 16GB RAM.
    OS & Programs drive: 240GB SSD
    Data drives: 1 x 1TB drive RAID mirrored, plus extra 1TB data drive 
    Windows 10 Home 64 bit
    Cakewalk by BandLab 64 bit, Studio One 3, 
    Band In A Box 2016, Ozone 8
    + too many other plugins
    BandLab page
    #12
    thomasabarnes
    Max Output Level: -43 dBFS
    • Total Posts : 3234
    • Joined: 2003/11/11 03:19:17
    • Location: Milwaukee, WI USA
    • Status: offline
    Re:Using lame3.99.3-64 in Sonar X1 2014/03/02 10:30:08 (permalink)


    "It's not a song till it touches your heart. It's not a song till it tears you apart!" Lyrics of Amy Grant.

    SONAR Platinum X64 (jBridge), Windows 10 Pro 64-Bit, Core i7 990X Extreme Edition Processor 3.46 GHz 6 Cores, Gigabyte EX58-UD5, Crucial Ballistix 24GB 1333MHz DDR3 @1333 MHz, TASCAM UH-7000, Behringer X-Touch, EVGA GTX 980TI Superclocked 6GB, 1TB Samsung EVO 850 SSD, 150GB, 320GB, 1TB 7200rpm HDDs
    #13
    Jump to:
    © 2025 APG vNext Commercial Version 5.1