Beginner question regarding 32-bit mixing and mixdown workflow

Hello
I have a beginner question regarding 32-bit mixing and mixdown.
If I edit some 16Bit, 44.1kHz Stereo WAV Files and put them into multi-track view to do crossfades, how should I do the mixdown?
Audition shows me in multi-track view, that it is doing 32-Bit mixing.
Can I just mixdown to 16Bit, 44.1kHz Stereo without any dithering (as the files are 16Bit, 44.1kHz Stereo to begin with), or will I lose quality that way?
I will be performing a normalization to 96% to the mixdown and then split to tracks in Audition, as in the end I want to to have an audio CD.
I guess I could mixdown to 32Bit, then normalize and in the end save back to 16Bit, 44.1kHz Stereo WAV (with dithering, I suppose?), but I want to avoid any unnecessary converting steps.
Greetings

Any time you do any processing on a 16bit file in 16 bit only it will degrade the audio slightly due to rounding of the calculations. Working in 32 bit floating point (Audition's default) takes account of all bits generated due to processing.
So it is always best to work in 32 bit, even if your originals were 16, all the way through until the last stage of saving the files for CD burning. Any losses due to conversion will be insignificant against those due to working 16 bit.

Similar Messages

  • Thanks for the reply to my question regarding sound in iMovie and sending me the online links.  however the online links are impossible to play as they upload too slowly with the result that the playing keeps stopping waiting for the content to catch up

    Thanks for your reply to my question regarding sound in iMovie.  However I cannot follow the links you sent as they upload too slowly and therefore the instructional movie keeps stopping waiting for the content toload.  Surely theremust be a solution for this??
    Thanks in advance
    lolly

    Please continue posting in your original thread.
    With the amount of traffic on these forums it is impossible to chase around finding this.

  • Question Regarding Mesh with 3702 and non AC ap´s

    Hello! 
    quick question regarding MESH deployments with 2 different sorts of AP´s: AC and non-AC modells: If my 3702i is my root AP´s, and 3602i my MAP - will AC still work in 80Mhz, or will I have to switch to 40mhz (and thus crippling (???) AC performance?) 
    Not 100% sure on this... I *think* it should still work for the normal 802.11n connection, but I´m not sure if the 80mhz channel width (needed??) for AC, will cause the non-ac 3602i to be stranded? 
    Thanks alot for your insight! 

    Currently, my network DHCP server is a software based DHCP server. In reading over your post if I understood correctly it sounds like the managed switch would have its own hardware based DHCP server to assign IP addresses to those clients identified on the "external" VLAN. Did I understand that correctly or did misread something?
    DHCP server will be software based, even though you defined it on your switch, it is DHCP service running on its OS.
    I am configuring this setup for a small business application and will need to purchase a managed switch with 16 or 24 ports. Do you have any recommendations on a particular managed switch that will handle the VLAN configuration and include POE while keeping costs in mind.
    In this forum, most of us discussed about Cisco enterprise grade wireless. Here is 2960X series switch detail, if you are interested
    http://www.cisco.com/c/en/us/products/switches/catalyst-2960-x-series-switches/index.html
    You may need to check the pricing with your Cisco account manager or from a Cisco partner.
    HTH
    Rasika
    **** Pls rate all useful responses ****

  • I have a question regarding the iPod Touch and iPhone batteries.

    Hello,
    I started asking myself questions lately about my iPod Touch 5th generation battery. A few months ago, when a friend of mine asked me to plug her iPhone 5S in the wall (the battery depleted), I noticed that her phone was at 1% of battery power. Then I compared my iPod Touch battery with her phone's battery, and discovered that my iPod Touch stops working when the battery is close to 10% battery power. This is concerning to me because I feel like I only have about 85-90% of battery power available when I use my iPod Touch, while my friend has over 99% of battery available. It's a huge gap, I can't use this 10% that I wish i had. I'm wondering why iPods can't stop functioning when the battery is close to 1% instead of 10%? Can you imagine not being able to use 10% of your battery! And it was like this since iOS 6.1.3. My iPod Touch would shut down automatically when the battery would be depleted, but in reality, it still had 10, maybe 15% left. Why is that?
    Thank you.

    Hey Lil'fighter, First, stop comparing an iPod with an iPhone. They may look a like on the outside, share the same iOS, and some of the components, but that is as far as it goes! The biggest reason your friends iPhone out last the iPod is a bigger battery, greater capacity. Secondly, the phone is configured a bit differently and uses power a little more effectively. Third, it is impossible to completely drain the battery in either device. A safety circuit prevents you from doing that. With Li-ion batteries if you completely drain one, it will de-ionize and become useless; never charge again. I suspect the threshold is set higher for an iPod then on an iPhone. But if you feel your iPod is not performing as it should, and a reset or restore does not improve function, then by all means take it to Apple and have it evaluated. Hope this helps. Cheers.

  • Beginner question about RAW/DNG files and Aperture + Adove

    I used to use Microsoft Expression Media. When I would edit a .DNG file in Photoshop and update the sidecar or JPEG preview, EM would show the .DNG with the new adjusted preview in its catalog.
    I noticed Aperture 3.0 doesn't read these adjustments from my .DNG files. Is there a way to get Aperture to properly read my .DNG files?
    Conversely, when I make RAW edits in Aperture, can I view these on the .DNG master in Photoshop? How?

    Adrian:
    I have been using DxO Optics Pro in conjunction with Aperture. The easiest workflow that I have found is to run the images through DxO before bringing them into Aperture. I have DxO export the converted images as 8-bit TIFFs. (Sixteen-bit TIFFs are really big.) I, then, import the TIFFs into Aperture. There are two disadvantages to this approach: I do not get to bring the original RAW file into Aperture and using DxO on all images, even those that turn out to be rejects, takes a lot of time.
    I have also played around with adding images to Aperture, exporting masters before doing any Aperture image manipulation, running the exported images through DxO, exporting the converted images as 8-bit TIFFs and reimporting the TIFFs into Aperture. This can be done without Catapult. I think the advantage of Catapult is that it will automatically stack your processed TIFFs with the original RAW files in Aperture. The advantage of this approach is that I can use Aperture to decide which images I want to process in DxO. Remember that DxO will not see any work that you have done on the image in Aperture; this is why I do my DxO work before doing any Aperture manipulations.

  • Question Regarding Inspire t 6200 and PCIE XFI Titanium Fatality Pro series.

    LQuestion Regarding Inspire t 6200 and PCIE XFI Titanium Fatality Pro series.0 Hello All,
    I need help on this.
    I have PCIE X-FI Titanium Fatality Pro Series. and I just bought 5. Speakers Inspire t 6200.
    However, I have some problems.
    . In Mass Effect or Other game Or dvd I cant make the center work. It means you can hear the music and background sound clearly but no Voice at all that ussualy come from center channel.
    2I Tested over audio controler from the disk. When I put 5. speaker configuration, the sound is coming from center and left channel for left channel and same thing for the other side. However, When the test is trying to test the center and rear speake, the sound are muffled.
    3. Is X FI only for Headset only or you can use Pc Speaker ? And how to configuration for Inspire t6200 with my sound card.
    Thank You

    AnyOne?

  • A question regarding database table partitioning and table indexes in 10g

    We are considering partitioning a large table in our 10g database, in order to improve response time. I believe I understand the various partitioning options, but am wondering about the indexes built over the table. When the table is partitioned, will the indexes also be partitioned "automatically"? Or do I need to also partition the indexes as well?
    Thank you in advance to any and all who respond to this question.

    Hello,
    When you build your partiton table you just need to create indexes locally and they will be partitioned automatically, see following example
    CREATE TABLE YY_EVENT
      PART_KEY       DATE                              NOT NULL,
      SUBPART_VALUE  NUMBER                             NULL,
      EVENT_NAME     VARCHAR2(30 BYTE)                  NULL,
      EVENT_VALUE    NUMBER                             NULL
    TABLESPACE TEST_DATA
    PARTITION BY RANGE (PART_KEY)
      PARTITION Y_EVENT_200901 VALUES LESS THAN (TO_DATE(' 2009-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        TABLESPACE TEST_DATA, 
      PARTITION Y_EVENT_200902 VALUES LESS THAN (TO_DATE(' 2009-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        TABLESPACE TEST_DATA
    -- This will create paritioned indexes automatically
    CREATE INDEX MY_IDX ON YY_EVENT
    (EVENT_NAME)
      TABLESPACE TEST_DATA
    LOGGING
    LOCAL;Regards
    Edited by: OrionNet on Feb 25, 2009 12:05 PM

  • Questions regarding sequence settings, render, and export

    Just a couple of questions:
    1. Will my sequence settings and render quality affect my final output? I am thinking it does, and it may seem elementary to most of you, but it would be nice to get a definite answer. If so, then should I be rendering @ the best quality possible? In turn, should I too be switching my codec? Which correlates with my next question....
    2. What codec should I be using? As it is I've been just getting footage off of mini dv. For best possible quality what should my workflow look like? Should I change my sequence settings codec to uncompressed? Which one? Uncompressed-8bit or 10 or animation? Or is okay to leave that setting at DC NTSC PRO?
    Then, most importantly, when exporting what is my best possible output with the least amount of quality loss? For mediocore quality i've been exporting through h.264 or sorenson 3 - for a bit higher DV NTSC PRO, for max uncompressed 8 bit.... how about the other settings? deinterlace? cbr or vbr? etc..
    Much thanks - I'm a lot confused concerning the technical usage of the program. B)

    Hi David, thank you for the reply and welcome.
    Just to clarify my workflow a bit more - I'm importing mini dv footage, but i'm altering that pretty much extensively with many overlays, in program effects, and various exterior plugins such as boris red, magic bullet, twixtor, etc.. Would mantaining a sequence suited for dv ntsc make sense if mantaining those effect's and overlay's vibrancy, motion, and color is key? Or should I then change my sequence settings to animation or uncompressed 8 or something other?
    What I want for final output is a pristine master (basically I want what I see is what I get) that I can then downcompress for either internet (h264?) or dvd without too much headache. I think Animation only plays on computers? Would it hurt quality badly moving it to a dvd that is playable on dvd players? Or is another setting that I don't know the solution?
    Does it hurt quality if I render it at lower draft settings and dv ntsc and then when i'm done change my sequence settings to higher settings and change it to, say, animation, AND THEN re-render and export to my sequence codec? I'm assuming no, because I'm still working with my original capture source, but just checking.
    thanks again David, and to anyone that may be able to help! B)
    Message was edited by: eric sanpablo

  • Question regarding material for Forms and Reports

    Hi, I'm good at SQL, now that i would like to learn Forms and Reports in Database. But i dont know like where to start and how to start. Could someone please help me out like what i need to do to learn them. As i said i'm very much new to these concepts.
    Thanks in advance

    Hello,
    if buying abook is an option for you and you are speaking german I would advise you to get
    Perry Pakull, Stefan Jüssen, Walter H. Müller:
    "Praktische Anwendungsentwicklung mit Oracle Forms", HANSER Verlag ISBN-10: 3-446-41098-8. Have a look at
    [http://www.hanser.de/buch.asp?isbn=978-3-446-41098-5&area=Computer|http://www.hanser.de/buch.asp?isbn=978-3-446-41098-5&area=Computer]
    Regards
    Mario

  • 11gR2 Post-Upgrade Questions Regarding tnsnames, listener, pwd, and init

    Hello.
    Am planning on upgrading a significant # of RHEL5 10gR2 RAC and non-RAC DBs to 11gR2 (11.2.0.3.1, specifically). The servers are still not available to me, but I have been poring on the install and upgrade documents as well as referencing several blogs of users who have done them. I have almost literally read the guides verbatim. I will be using the DBUS - not doing a manual upgrade. Since I cannot test of the upgrade yet, I have a few questions related to POST_UPGRADE actions in terms of the listener, tnsnames, password, and init files.
    1.) The upgrade document indicates on p 3-24, "DBUA then proceeds to create new configuration files (parameter and listener files) in the new Oracle home." Will the init file (assuming spfile will be copied as we are using one everywhere now) have deprecated parameters REMOVED after it is copied over to the NEW/TARGET home?
    2.) While the install/upgrade guides do not call for it, several blogs indicate that the tnsnames and password files should be copied over from the old/source DB network/admin location ($TNSNAMES/admin) to the new/target DB /network/admin location. Do I need to do this or with the DBUA also copy them over? If all 4 files (tnsnames/listener/spfile/password) are copied over, I am not sure why the document doesn't indicate this.
    3.) Other than the spfile being copied over and modified, I don't see any difference between the old/source and new/destination copies of the listener, tnsnames, and password file. Do you agree?
    I am just trying to figure out what really need to be copied over and what doesn't in lieu of the DBUA doing it for me.
    Thank you all for your help. If I had HW to test this out, I would do it. In the meantime, I am writing the procedures to do the actual upgrade.
    Matt

    page 3-24 corresponds to following
    http://docs.oracle.com/cd/E11882_01/server.112/e23633/upgrade.htm#CHDDCBHG
    which states
    You must run the Oracle Net Configuration Assistant before running DBUA. See "Configuring the Listener When Upgrading from Oracle9i".
    If you are upgrading an existing Oracle Enterprise Manager Database Control or if you are configuring a new Oracle Enterprise Manager Database Control for the new Oracle Database 11g release, then the listener must be running before upgrading Oracle Enterprise Manager. If DBUA detects that an Oracle Enterprise Manager upgrade or configuration is requested, and DBUA does not see a listener running, then it prompts you and starts the default listener in either of these cases.
    running netca from new home results in creating a new listener.ora file, this could complain that listener is already used if the old listener is running with the same name or port (default 1521) taken.
    I think the "+DBUA reloads the listener.ora file in both the old and new Oracle Database environments.+" which point c in that list has to be taken in context with the two previous points a, b, where the usecase is shown how services , entries are removed from one listener.ora file and added to another. So to make sure those services are started from the "now" correct home those listener.ora are reloaded.
    If you look in the 11.1 upgrade guide this text is written as "DBUA removes the entry of the upgraded database from the old listener.ora file and reloads the listener of the old database." http://docs.oracle.com/cd/B28359_01/server.111/b28300/upgrade.htm#i1011982
    If after the upgrade old oracle home is not used anymore (no database is running out of that) you can ignore the listener.ora on the old home.

  • Silly question regarding sol 8 containers and disk sizes

    I've got what is probably just about the silliest question, but I can't seem to find an answer whilst searching around for the past couple of hours. Say I have 2 boxen, one is a sol 8 server and the other is a brand new install of sol 10/8. They have the exact same hardware, including disk size. If I want to turn the first box into a solaris 8 container running under the second, how do I reconcile the fact that the disk sizes are the same? The sol 8 box is only using, say, 25-30GB of the 72GB on the disk. Do I have to resize the slice into something smaller to enable it fit into a container on the second server? It would seem that is the case, but I didn't know if there was some magic I was not aware of. I've not done a ufsdump or flash archive before so I don't know if the 'empty' space on the disc will be disregarded, possibly allowing me to squeeze it onto my sol 10 server and allow me to resize it smaller in zfs. This topic isn't touched in all the tutorials I've read, so I assume it's either a completely retarded/braindead concern, or everyone always migrates these boxen onto servers with much more in the way of resources.
    Sorry if I offended anyone with my ignorance ; P

    No. Solaris8/9 containers make use the "branded zones" technology. But it's still the same thing and there's no "disk image", at least not like you might think of for VMware or Xen.
    Now if you want to call a ufsdump or flash archive an "image", then that's fine. But you can see in either case, the free space or minor changes is size are irrelevant. You're just copying files. It's a system image, not a "disk image".
                      Installer Options :
                            Option          Description
                            -a filepath     Location of archive from which to copy system image.
                                            Full flash archive and cpio, gzip compressed cpio,
                                            bzip compressed cpio, and level 0 ufsdump are
                                            supported. Refer to the gzip man page available in the
                                            SUNWsfman package.--
    Darren

  • Two questions regarding versions 1.5 and 2.0

    I am going back a few years I know, but can any subject matter expert coach me on two questions related to version 1.5 or 2.0?
    First, may I use these versions to place subtitles/captions into videos?
    Second, may I also either import prerecorded voiceovers (say as .wav files or other formats) and put them into my videos or record voiceovers natively within 1.5 or 2.0 into my videos?
    Many thanks.

    Premiere 1.5/2 does not do captions but yes you can use the Titler to add subtitles or even Encore.
    Yes you can import wave or record your own voice over.
    You probably need to read this first.
    Error: Activation Server Unavailable | CS2, Acrobat 7, Audition 3 

  • Beginner question regarding Events

    Hello, I`m just starting developing Xlets with the org.havi & javaTv packages. As I don`t have an DVB interoperable device I test them with the XletView-emulator. Guess like most people I started to create a simple scene including 2 HTextButtons. Now my question is what causes the sending of an HActionEvent ? If I press the arrow-buttons or the ok-button of the XletViewer`s remotecontroll there are sent KeyEvents only ?
    Thanks for any help,
    oliver

    Hi Oliver!
    The remotecontrol fires KeyEvents and UserEvents. In the latest release of XleTView HTextButton is not yet implemented, so it won't work using it. I'm working on it and will probably include it in the next release. I know it would be nice to know what's implemented and not before you go crazy on trying to do something. I will try to keep an updated list, there is a list here http://xletview.sourceforge.net/implemented.html but it's far from complete. Having a tool that automatically extract the status of the implementation from source code comments would be preferrable, unfortunately I'm split between priorities so I haven't been able to make it yet. If someone know of a good tool for this please tell me, I'm finding it hard to believe that a tool like that doesn't exist already.
    // beiker

  • 3 questions regarding alignment, rectangle drawing, and a error I get

    3 Questions:
    ========================================
    1. Why does the DOS window in Code Warrior show this error in it, but it doesn't affect the operation of the applet?
    Exception occurred during event dispatching:
    java.lang.NullPointerException
    at PianoApplet.paint(PianoApplet.java)
    at sun.awt.RepaintArea.paint(RepaintArea.java:293)
    at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:191)
    at java.awt.Component.dispatchEventImpl(Component.java:2658)
    at java.awt.Container.dispatchEventImpl(Container.java:1208)
    at java.awt.Component.dispatchEvent(Component.java:2492)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:334)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:126)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:93)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:80)
    Exception occurred during event dispatching:
    java.lang.NullPointerException
    at PianoApplet.paint(PianoApplet.java)
    at java.awt.Container.update(Container.java:976)
    at sun.awt.RepaintArea.update(RepaintArea.java:332)
    at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:195)
    at java.awt.Component.dispatchEventImpl(Component.java:2658)
    at java.awt.Container.dispatchEventImpl(Container.java:1208)
    at java.awt.Component.dispatchEvent(Component.java:2492)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:334)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:126)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:93)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:80)
    ===========================================
    Second Question
    How do I align this so that it is is on the right on the applet, cause it overlaps my keyboard when I just place it.
    private TextArea intro = new TextArea("Welcome to the PianoApplet! \nHere you will be able to play a full sized octave of keys. \nClick a key to play the key. \nYou can also drag your mouse across the keyboard \nand play multiple notes at once.", 5, 40);
    ===========================================
    Third Question
    When I do this:
    if(state.equals("duh")){
    g.setColor(Color.green);
    g.fillRect(150,50,40,90);
    g.drawImage(iduh,100, 200, this);
    It colors everything green, not just the duh key, it also colors the duh sharp, reh, and half the reh sharp. Why is that?
    =========================================
    Please answer any of my questions.
    Thanks.
    ==========
    My Code
    ==========
    import java.awt.*;
    import java.applet.Applet;
    import javax.swing.*;
    import java.awt.event.*;
    import java.applet.AudioClip;
    public class PianoApplet extends Applet implements MouseListener, MouseMotionListener {
    private Point mouse = new Point();
    //private TextField output=new TextField(30);
    //private TextArea intro = new TextArea("Welcome to the PianoApplet! \nHere you will be able to play a full sized octave of keys. \nClick a key to play the key. \nYou can also drag your mouse across the keyboard \nand play multiple notes at once.", 5, 40);
    private String state = null;
    //The images
    private Image iduh, ire, ime, ifa, isol, ila, isi, iduh2, iduhsharp, iemptynotes, ifasharp, ilasharp, iresharp, isolsharp;
    //The sounds
    AudioClip duh;
    AudioClip re;
    AudioClip me;
    AudioClip fa;
    AudioClip sol;
    AudioClip la;
    AudioClip si;
    AudioClip duh2;
    AudioClip b0;
    AudioClip b1;
    AudioClip b2;
    AudioClip b3;
    AudioClip b4;
    public void init(){
    //load images of notes here
    iduh = getImage(getCodeBase(), "duh.jpg");
    ire = getImage(getCodeBase(), "re.jpg");
    ime = getImage(getCodeBase(), "me.jpg");
    ifa = getImage(getCodeBase(), "fa.jpg");
    isol = getImage(getCodeBase(), "sol.jpg");
    ila = getImage(getCodeBase(), "la.jpg");
    isi = getImage(getCodeBase(), "si.jpg");
    iduh2 = getImage(getCodeBase(), "duh2.jpg");
    iduhsharp = getImage(getCodeBase(), "duhsharp.jpg");
    iemptynotes = getImage(getCodeBase(), "emptynotes.jpg");
    ifasharp = getImage(getCodeBase(), "fasharp.jpg");
    ilasharp = getImage(getCodeBase(), "lasharp.jpg");
    iresharp = getImage(getCodeBase(), "resharp.jpg");
    isolsharp = getImage(getCodeBase(), "solsharp.jpg");
    //load sounds of piano here
    duh = getAudioClip(getCodeBase(),"duh.au");
    re = getAudioClip(getCodeBase(),"re.au");
    me = getAudioClip(getCodeBase(),"me.au");
    fa = getAudioClip(getCodeBase(),"fa.au");
    sol = getAudioClip(getCodeBase(),"sol.au");
    la = getAudioClip(getCodeBase(),"la.au");
    si = getAudioClip(getCodeBase(),"si.au");
    duh2 = getAudioClip(getCodeBase(),"duh2.au");
    b0 = getAudioClip(getCodeBase(),"b0.au");
    b1 = getAudioClip(getCodeBase(),"b1.au");
    b2 = getAudioClip(getCodeBase(),"b2.au");
    b3 = getAudioClip(getCodeBase(),"b3.au");
    b4 = getAudioClip(getCodeBase(),"b4.au");
    addMouseListener(this);
    addMouseMotionListener(this);
    //add(output);
    setSize(750,300);
    //add(intro);
    public void paint(Graphics g) {
    g.setColor(Color.black);
    g.drawRect(150,50,40,90); g.fillRect(165,50,12,60);
    g.drawRect(170,50,40,90);
    g.fillRect(185,50,12,60);
    g.drawRect(190,50,40,90);
    g.drawRect(210,50,40,90);
    g.fillRect(225,50,12,60);
    g.drawRect(230,50,40,90);
    g.fillRect(245,50,12,60);
    g.drawRect(250,50,40,90);
    g.fillRect(265,50,12,60);
    g.drawRect(270,50,40,90);
    g.drawImage(iemptynotes,100, 200, this);
    if(state.equals("duh")){
    g.setColor(Color.green);
    g.fillRect(150,50,40,90);
    g.drawImage(iduh,100, 200, this);
    if(state.equals("re")){
    g.drawImage(ire,100, 200, this);
    if(state.equals("me")){
    g.drawImage(ime,100, 200, this);
    if(state.equals("fa")){
    g.drawImage(ifa,100, 200, this);
    if(state.equals("sol")){
    g.drawImage(isol,100, 200, this);
    if(state.equals("la")){
    g.drawImage(ila,100, 200, this);
    if(state.equals("si")){
    g.drawImage(isi,100, 200, this);
    if(state.equals("duh2")){
    g.drawImage(iduh2,100, 200, this);
    if(state.equals("b0")){
    g.drawImage(iduhsharp,100, 200, this);
    if(state.equals("b2")){
    g.drawImage(ifasharp,100, 200, this);
    if(state.equals("b4")){
    g.drawImage(ilasharp,100, 200, this);
    if(state.equals("b1")){
    g.drawImage(iresharp,100, 200, this);
    if(state.equals("b3")){
    g.drawImage(isolsharp,100, 200, this);
    public void mouseClicked(MouseEvent e){
    mouse = e.getPoint();
    //output.setText("x: " + mouse.x + " y: " + mouse.y);
    repaint();
    if (((50<mouse.y && mouse.y<110) && (150<mouse.x && mouse.x<165)) || ((110<mouse.y && mouse.y<140) && (150<mouse.x && mouse.x<170)))
    //setBackground(Color.green);
    duh.play();
    state = "duh";
    repaint();
    System.out.println("Duh");
    else if (((50<mouse.y && mouse.y<110) && (165<mouse.x && mouse.x<175)))
    b0.play();
    state = "b0";
    repaint();
    System.out.println("b0");
    else if (((50<mouse.y && mouse.y<110) && (175<mouse.x && mouse.x<185)) || ((110<mouse.y && mouse.y<140) && (170<mouse.x && mouse.x<190)))
    re.play();
    state = "re";
    repaint();
    System.out.println("reh");
    else if (((50<mouse.y && mouse.y<110) && (185<mouse.x && mouse.x<195)))
    b1.play();
    state = "b1";
    repaint();
    System.out.println("b1");
    else if (((50<mouse.y && mouse.y<110) && (195<mouse.x && mouse.x<210)) || ((110<mouse.y && mouse.y<140) && (190<mouse.x && mouse.x<210)))
    me.play();
    state = "me";
    repaint();
    System.out.println("me");
    else if (((50<mouse.y && mouse.y<110) && (210<mouse.x && mouse.x<225)) || ((110<mouse.y && mouse.y<140) && (210<mouse.x && mouse.x<230)))
    fa.play();
    state = "fa";
    repaint();
    System.out.println("fa");
    else if (((50<mouse.y && mouse.y<110) && (225<mouse.x && mouse.x<235)))
    b2.play();
    state = "b2";
    repaint();
    System.out.println("b2");
    else if (((50<mouse.y && mouse.y<110) && (235<mouse.x && mouse.x<245)) || ((110<mouse.y && mouse.y<140) && (235<mouse.x && mouse.x<250)))
    sol.play();
    state = "sol";
    repaint();
    System.out.println("sol");
    else if (((50<mouse.y && mouse.y<110) && (245<mouse.x && mouse.x<255)))
    b3.play();
    state = "b3";
    repaint();
    System.out.println("b3");
    else if (((50<mouse.y && mouse.y<110) && (255<mouse.x && mouse.x<265)) || ((110<mouse.y && mouse.y<140) && (255<mouse.x && mouse.x<270)))
    la.play();
    state = "la";
    repaint();
    System.out.println("la");
    else if (((50<mouse.y && mouse.y<110) && (265<mouse.x && mouse.x<275)))
    b4.play();
    state = "b4";
    repaint();
    System.out.println("b4");
    else if (((50<mouse.y && mouse.y<110) && (275<mouse.x && mouse.x<290)) || ((110<mouse.y && mouse.y<140) && (270<mouse.x && mouse.x<290)))
    si.play();
    state = "si";
    repaint();
    System.out.println("si");
    else if (((50<mouse.y && mouse.y<140) && (290<mouse.x && mouse.x<310)))
    duh2.play();
    state = "duh2";
    repaint();
    System.out.println("duh");
    public void mouseDragged(MouseEvent e) {
    //output.setText("x: " + mouse.x + " y: " + mouse.y);
    mouse = e.getPoint();
    repaint();
    if (((50<mouse.y && mouse.y<110) && (150<mouse.x && mouse.x<165)) || ((110<mouse.y && mouse.y<140) && (150<mouse.x && mouse.x<170)))
    //setBackground(Color.green);
    duh.play();
    state = "duh";
    repaint();
    System.out.println("Duh");
    else if (((50<mouse.y && mouse.y<110) && (165<mouse.x && mouse.x<175)))
    b0.play();
    state = "b0";
    repaint();
    System.out.println("b0");
    else if (((50<mouse.y && mouse.y<110) && (175<mouse.x && mouse.x<185)) || ((110<mouse.y && mouse.y<140) && (170<mouse.x && mouse.x<190)))
    re.play();
    state = "re";
    repaint();
    System.out.println("reh");
    else if (((50<mouse.y && mouse.y<110) && (185<mouse.x && mouse.x<195)))
    b1.play();
    state = "b1";
    repaint();
    System.out.println("b1");
    else if (((50<mouse.y && mouse.y<110) && (195<mouse.x && mouse.x<210)) || ((110<mouse.y && mouse.y<140) && (190<mouse.x && mouse.x<210)))
    me.play();
    state = "me";
    repaint();
    System.out.println("me");
    else if (((50<mouse.y && mouse.y<110) && (210<mouse.x && mouse.x<225)) || ((110<mouse.y && mouse.y<140) && (210<mouse.x && mouse.x<230)))
    fa.play();
    state = "fa";
    repaint();
    System.out.println("fa");
    else if (((50<mouse.y && mouse.y<110) && (225<mouse.x && mouse.x<235)))
    b2.play();
    state = "b2";
    repaint();
    System.out.println("b2");
    else if (((50<mouse.y && mouse.y<110) && (235<mouse.x && mouse.x<245)) || ((110<mouse.y && mouse.y<140) && (235<mouse.x && mouse.x<250)))
    sol.play();
    state = "sol";
    repaint();
    System.out.println("sol");
    else if (((50<mouse.y && mouse.y<110) && (245<mouse.x && mouse.x<255)))
    b3.play();
    state = "b3";
    repaint();
    System.out.println("b3");
    else if (((50<mouse.y && mouse.y<110) && (255<mouse.x && mouse.x<265)) || ((110<mouse.y && mouse.y<140) && (255<mouse.x && mouse.x<270)))
    la.play();
    state = "la";
    repaint();
    System.out.println("la");
    else if (((50<mouse.y && mouse.y<110) && (265<mouse.x && mouse.x<275)))
    b4.play();
    state = "b4";
    repaint();
    System.out.println("b4");
    else if (((50<mouse.y && mouse.y<110) && (275<mouse.x && mouse.x<290)) || ((110<mouse.y && mouse.y<140) && (270<mouse.x && mouse.x<290)))
    si.play();
    state = "si";
    repaint();
    System.out.println("si");
    else if (((50<mouse.y && mouse.y<140) && (290<mouse.x && mouse.x<310)))
    duh2.play();
    state = "duh2";
    repaint();
    System.out.println("duh");
    public void mouseEntered(MouseEvent e){ }
    public void mouseExited(MouseEvent e){ }
    public void mousePressed(MouseEvent e){ }
    public void mouseReleased(MouseEvent e){ }
    public void mouseMoved(MouseEvent e){ }
    }

    question 2:
    BFI answer:
    put everything you have in a panel
    put your text area beside it.
    question 1:
    something about painting a .java file just seems wrong.
    question 3:
    because you told it to.

  • Beginner question regarding switch statements with arrays....

    Doing a little project for my beginner's object oriented programming course. I've written the following code, but the switch statement won't recognize my array values....I'm required to use a switch statement in my program, which will count various character types in an external file....any insight is appreciated.
    import java.io.*;
    public class MyProg
      public static BufferedReader inFile;
      public static void main(String[] args)
        throws IOException, StringIndexOutOfBoundsException
        String line;
        inFile = new BufferedReader(new FileReader("TME5Part1.dat3"));
          char UpperCase[]= {'A','B','C','D','E','F','G','H','I','J','K','L','M',
                                          'N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};          
          char LowerCase[]=     {'a','b','c','d','e','f','g','h','i','j','k','l','m',
                                          'n','o','p','q','r','s','t','u','v','w','x','y','z'};
          char Digit[]= {'0','1','2','3','4','5','6','7','8','9'};
          char EndMark[]= {'!','.','?'};
          char MidMark[]= {',',':',';'};
        char symbol;                                                            
        int upperCaseCt = 0;                                             
        int lowerCaseCt = 0;
        int digitCt = 0;
        int endMarkCt = 0;
        int midMarkCt = 0;
          int spaceCt = 0;
          int otherCharCt = 0;
        line = inFile.readLine();          //read first line (priming read)
        while (line != null)               // Loop until end of data (empty line)
          for (int count = 0; count < line.length(); count++)  // Loop until end of line
            symbol = line.charAt(count);                    
                for (int i=0; i<=25;i++)                              
                        char uppercase=UpperCase;               //get array values for i
                        char lowercase=LowerCase[i];
                        if (i<=9) {char digit=Digit[i];}               
                        if (i<=2) {     char endmark=EndMark[i];     
                                            char midmark=MidMark[i];
                        switch(symbol)                                             
                                  case uppercase : upperCaseCt++;
                                            break;
                                  case lowercase : lowerCaseCt++;
                                                 break;
                                  case digit          : digitCt++;
                                                 break;
                                  case endmark     : endMarkCt++;
                                                 break;
                                  case midmark     : midMarkCt++;
                                                 break;
                                  case ' '          : spaceCt++;
                                                 break;
                                  default          : otherCharCt++;
                                                 break;
              line = inFile.readLine();                                   
         System.out.println("Number of uppercase letters = "+upperCaseCt);               
         System.out.println("Number of lowercase letters = "+lowerCaseCt);
         System.out.println("Nubmer of digits = "+digitCt);
         System.out.println("Number of end punctuation marks = "+endMarkCt);
         System.out.println("Number of mid punctuation marks = "+midMarkCt);
         System.out.println("Number of spaces = "+spaceCt);
         System.out.println("Number of other characters = "+otherCharCt);
    I was trying to do it this way rather than "case 'A':
    case 'B':
    case 'Z:" for each type of 'symbol'.
    Unfortunately, the switch statement is required or this would be easier with arrays and for loops...I'm not sure if my code is even possible. Thanks in advance =)
    Edited by: RiTarDid

    RiTarDid wrote:
    For sure it is the most straightforward way, but my curiosity is getting the better of me....I will most likely submit the program with the longer (value-by-value) switch method, as I haven't found anyone who can tell me how to properly reference an array value in a 'case'.Well, you can do this (basically):
    switch(some_array[some_index]) {
        case 'a':  blahblah
        case 'z':  blahblah
    }What you can't do is this:
    switch(some_scalar_value) {
      case a_whole_array:  blahblah
      case a_whole_another_array: blahblah
    }Because the latter isn't what "case" means.
    If you want to do something like the latter, use if/else statements. Here's a dirty little industry secret: people seldom use switch/case. if/else is a lot more common.
    Actually that dirty little secret isn't really particular dirty or particularly secret. It is, however, little.
    I just recall a suggestion to use arrays for any group that is more than 10 values in size;Well...sort of...
    You should use the expression of data that's appropriate for what the data is. If it's a collection of data of the same kind and an ordering, then an array or a java.util.List makes sense. If it's data that is of the same kind but no ordering and no duplicates are allowed, use a java.util.Set. (Etc. on this front.) If it's a collection of un-alike data, but which belongs in associated groups (e.g., a user's name, age, height, and whether s/he's married) then you should create a class that represents that logical grouping. Etc. If you have more than 10 individual data that can't be grouped or collected somehow, then chances are you need to rethink what's happening.
    so I wanted to see if an array could be employed for comparisons with the 'switch' statement. The program is simple enough, I'm just trying to flex my problem-solving muscle in different ways. :)
    thanks for replying, hope I can get a definite "yes, it can be done this way" or "no it can't" if there's anyone out there who knows.....The problem is that your example is contrived. So you can do a variety of things that fit into the contrivance, but they'd be weird things.
    In practice, you'd want to use the character classification methods in Character, if you wanted to characterize a bunch of characters. Or maybe a regular expression. There's no need to keep an array of characters to match against if you want to determine whether a particular character is upper case. In fact, that's the wrong way of doing things, because Character.isUpperCase is more likely to tell whether any character (not just stuff that's also an element of ASCII) qualifies as upper case.

Maybe you are looking for