3D Plot

Wenn ich in einem Labview file zwei 3d Plot gleichzeitig benutze werden diese nicht mehr angeszeigt. Kann es sein das meine Systemresoursen zu gering sind ?
Hier meine Daten
Windows XP SP3
Intel Core 2 [email protected] 1,98 GB RAM

Hi,
habe mir dein vi mal angeschaut, wenn du den 3d Plot vorher in einer while schleife hattest, hast du dann alle Punkte einzeln gezeichnet? Du musst immer die komplette Grafik übergeben. Ausserdem wird in einer whileschleife bei jedem Aufruf der 3D Oberfläche diese neu gezeichnet. Ähnlich einer numerischen Anzeige die die Anzahl der Durchläufe ausgibt. Kannst du auch nicht mehr ablesen.
An deinem Programmierstil erkenne ich, dass diese whileschleife sehr schnell durchläuft, da du keine Timings verwendest. Du solltest in einer whileschleife immer! Timings verwenden, da diese Schleife deine Prozessorauslastung sonst auf 100% hoch treibt.
Du kannst dein Programm auch noch effektiver machen, indem du nicht so viele verschiedene Datentypen miteinander kombinierst. An vielen deiner mathematischen Operatoren und vi findest du so kleine rote Punkte, das sind implizite Typwandlungen. wenn du zum Beispiel einen U8 mit einem U32 Wert addierst, und dann in einen Anzeigeelement ausgibts, dass double anzeigt, dann müssen beide Werte konvertiert werden. Die implizite Typwandlung dauert sehr lange (relativ), besser ist hier die explizite, findest du unter numerisch>>umwandlung.
Wenn du das alles beherzigst, gewinnst du schonmal eine Menge Systemressourcen. Aber wie gesagt daran liegt es in deinem Fall nicht. So kleine Grafiken bemerkt das System wahrscheinlich nicht einmal.
Grüße
Tobias

Similar Messages

  • How can I represent more than one plot in an only one chart?

    Hello everyone,
    i got a code where I don't understand how to represent more than two plots, with different scales each, in the same waveform chart.
    As brief review:
    * 2 adquisition data wired to Bundle
    * wire from Bundle to waveform chart.
    * options of th chart: stack plots.
    I've tried to expand the Bundle but the problem is that I'm wiring a 3 element cluster to a 2element cluster chart. I don't understand how to upgrade the chart...
    (there's the two plots in each chart)
    (there's the code, where I've already tried expanding any bundle and wiring other signals, then wiring the bundle's output to the chart)
    I think if I could add more scales, it will be possible to plot three plots on the same chart.
    Thank you for your time
    Marcelo A J

    Since you are dealing with waveforms already, I think you actually want to have an array of waveforms to go into your chart.  You also need to map the plots to the scale that you want to use.  You can do that in the plot tab of the properties window.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to get lab view to display my plot in DB

    hi guys
    i desigED n an operational amplifier to determine the gain product band width using a 741 chip and the gain of the circuit is 1000, meaning that the gain bandwidth PRODUCT  will occur at a frequency of 100hz. but i have a problem, when i start the frequency sweep from the function generator from 10 hz to 100Khz which  IS the final frequency value i have set for the program. when the lab view program stops and i export the data to excel sheet i will be getting the DB axis value in a SMALL VALUES AND IN DIFFERENT  UNITES  WHEN I PLOT THE GRAPH USING EXCEL,  while the frequency is in log10.
           pls can any one tell me how to solve this problem to start getting the right cut off  frquency on the graph. find aattched my vi and the excel data from the vi that is in a different unit not in DB
    Attachments:
    GAIN BAND WIDTH PRODUCT.vi ‏116 KB
    FREQUENCY VALUE .xls ‏26 KB

    Ahhh.....
    emeho wrote:
    thanks Jeff Bohrer  for your reply, what i mean is the y-axs of the plot is in DB aleady, but when i export the data to excel i will be seeing the gain in 0.8, 0.7,0.4 which is not normal,  which will not give me the -3db point of the gainband width product of the circuit
    What you want to do is plot the Log(10) of the frequency on a linear axis!!!!!!!  The export - exports the values not the axis scale.  exporting a log(10) of the Y axis will export the log of the axis- (of couse, you could change the graph axis scale in Excel too...... but)
    Jeff

  • How to Plot number and string in one row (data logger counter via MODBUS) ?

    hi all i made data log quantity using Digital Counter via modbus (RS-485) to monitoring quantity and reject that has and Name Operator, Machine and Part Number.
    i have problem about plot the number & string in one row, as shown on the picture below :
    how to move that string on one row ? i attach my vi.
    Thanks~
    Solved!
    Go to Solution.
    Attachments:
    MODBUS LIB Counter.vi ‏39 KB

    Hi rhiesnand,
    right now you add 2 new rows to your array.
    The solution is to concatenate both row parts to one bigger 1D array before adding that array as new row to your 2D array!
    Like this:
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to Plot number and string in one row (data logger counter) ?

    hi all i made data log quantity using Digital Counter via modbus to monitoring quantity and reject that has and Name Operator, Machine and Part Number.
    i have problem about plot the number & string in one row, as shown on the picture below :
    how to move that string on one row ? i attach my vi.
    Thanks~
    Attachments:
    MODBUS LIB Counter.vi ‏39 KB

    Duplicate and answered - http://forums.ni.com/t5/LabVIEW/How-to-Plot-number-and-string-in-one-row-data-logger-counter-via/m-p...

  • How to let the user define the colors for each plots in the graph (I use LabVIEW 7)?

    How to let the user define the colors for each plots in the graph (I
    use LabVIEW 7)?

    Hi,
    Take a look at this example, it uses property nodes to select tha
    active plot and then changes the color of that plot.
    If you want to make the number of plots dynamic you could use a for
    loop and an array of color boxes.
    I hope this helps.
    Regards,
    Juan Carlos
    N.I.
    Attachments:
    Changing_plot_color.vi ‏38 KB

  • Plot a chart dynamically based on the values selected

    Hi All,
    I have some requirement like this i want to plot a chart . The chart should change dynamically based on target_name and date. What type of UI should I use ? I tried using multiselect or shuttle for choosing the target_name and date picker tool for date once i choose all this the chart should appear. Can I have a custom button called submit so once all the values are entered it plots chart ? Please help me out with our ideas.
    Thanks in Advance

    Hi,
    Using the dependent value sets you can govern the values which can be selected based on a specific value selected in a particular segment. Example if Country name is selected in segment 1 then specific states names as per the country selected can be displayed in segment 2.
    As per the requirement described you want to enable different fields based on the value selected in segment1, currently there is no standard mechanism available to enable/disable fields based on a value and you will have to do an extension/customization to meet this requirement.
    Thanks,
    Sanjay

  • Line width on plot and on plot legend not matching

    Hello,
    I wrote a program that "highlights" (changes the linewidth to 4) one of two plots using a boolean switch.  However, the corresponding linewidth in the legend does not always show the same width as the plots value.  For example, if plot 0 is thick, and its legend is thick, and plot 1 and its legend are thin, then I select plot 1 to become the highlighted one, plot 1 in the graph will become thick, but either its legend will not become thick, or plot 0s will remain thick, while plot 0 on the actual graph will be switched to thin.
    Thank you for any help you may be able to provide.
    Attachments:
    Testing LineWidth.vi ‏16 KB

    Hi  M.Bobby,
    I can see the same behavior on my machine as well. This was reported to R&D (238303 CAR ID) for further investigation. R&D is currently investigating this issue. A possible workaround is to hover over the legend to make it update.  We are sorry for the inconvenience, and appreciate your feedback!
    Thanks and have a great day.
    Esmail Hamdan | Applications Engineering | National Instruments

  • Display real time data on a plot in a sub VI and main VI

    I am building a program to measure and plot real time data. Program has several steps so I build few Sub VIs to make it simple. My problem is I am plotting real time data in my SUB VI(it works fine), but in my main program when I try to get the same plot its not real time data plot. Plots appear at the end of the program.  All tips and help would be greatly appreciated. Thanks
    I have attached my main VI and Sub VI
    Solved!
    Go to Solution.
    Attachments:
    main VI.jpg ‏116 KB
    Sub VI.jpg ‏242 KB

    LabVIEW program is based on DATA FLOW, now, until the subVI will finish execution (while loop will be stopped), the execution in Main VI will not proceed any further.
    If you can pass the reference of 'XY Graph' inside the subVI, you'll be able to update the plot (placed on MAIN VI) from within subVI.
    Find attached example for your reference.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Attachments:
    Example [LV 90].zip ‏26 KB

  • Creating a plot on a java Frame when a button is clicked

    hi
    I want to create a plot in a java application in a frame when a button is clicked.I mean to say a
    a plot between two single dimensional arrays one as x-axis and the other as y-axis. Can u please suggest me with an example
    Thank u

    JFreeChart

  • Data acquisition and waveform graph plot

    Dear All
    My signal is out put of current transformer which is 2v dc. I succesfully configure usb 1208fs with labview8.2. Now I want to plot my input signal on the waveform graph in frequency vs amplitude(db). Can any one guide me how can i plot my data?

    Hi,
    Could you strip the VISA stuff and re-post your VI so I could run it and see where is the difference coming from. A few observations though
    1. Always try to wire from left to right and top to bottom so that your block diagram code is readable.
     2. A waveform graph gets completely redrawn everytime you give it soem data ao it is typically used outside any loops. If you want to display a waveform inside a loop, it is better to use waveform chart.
    Regards,
    Ankita

  • How can I update single plot in multi plot xy graph?

    Hi all,
    I'm working on an HMI "front" for a larger acquisition/analysis system, that includes continuous performance monitoring of a turbine. The results of the measurements are stored arrays of contour lines, that represents turbine efficiency and guide vane openings. This analysis is all performed in the background. In the HMI, the performance data is loaded from file when the specific "report" is requested, and is plotted in an XY graph. I would like to indicate the current operation point of the machine by using a plot that is a single point. Thus, that point's position among the contour lines indicates the current performance of the turbine. This point is updated once every second, while the performance data remains the same for considerable amounts of time between recalculations (days to weeks). 
    Is there any way of updating the value of a single plot in a multiple plot XY Graph without having to redraw all the plots?
    I've tried using the "Active Plot" property, which doesn't work. 
    My current solution is to keep all the data as input to the executing while loop and replace a subset of the plot array, but that of course requires the entire rewrite every time the operation point plot is updated.
    Best regards,
    Jarle Ekanger, MSc, CLD
    Flow Design Bureau AS
    Solved!
    Go to Solution.

    You cannot redraw a single plot. If you want to update a single plot, you need to retain all plots in a shift regsiter and replace the data of the desired plot. However, your problem seems much simpler than that. To show a single point on a nearly static plot you have several options.
    You can use a cursor that is controlled programmatically (the style can be a point, don't allow drag).
    You can use annotations.
    You can use the "plot images" feature that allows you to use image commands to draw anything on top of a graph.
    None of these ideas require a redraw of any data.
    I think the cursor idea is probably the easiest and most appropriate. Just use a property node with the following properties:
    active cursor
    cursor position x
    cursor position y
    LabVIEW Champion . Do more with less code and in less time .

  • Plotting of graph with more than 4000 data points in Excel

    Hi All,
    I am fairly new to labview world. I am trying to plot out line graphs of the results from my program into Excel worksheet. I have huge set of data points(10000) stored in each of 10 different worksheets in MS Excel workbook. I am trying to compile results into last sheet as graphical representation of all the various dataset into 10 different graphs.
    My problem is that I am getting error because MS Graph does not allow me to plot more than 4000 rows or datapoints. Is there better and cleaner way of programming this? Or if some one can provide an example of how to handle such case. I'll appreciate any help.
    My goal is to able to plot one set of data 1st then I will be able to run through various worksheets to compile into standalone results.
     ERROR MESSAGE: "Report Generation Toolkit: Graphs you create or edit in Microsoft Graph cannot contain more than 4,000 rows or columns, including row and column headers. "
    Also for example if we run Line Graph example and change the # of data points from 100 to 4000, we get same message.
    Error -41114 occurred at NI_ReportGenerationToolkit.lvlib:Excel_Insert_Chart.vi -> NI_Excel.lvclass:Excel Insert Graph.vi -> Line Graph (Excel).vi
    Thanks,
    Saurabh

    Hi Dennis,
    I am collecting waveform data from oscilloscope using labview in both data & graph format. So my program collects data for a particular operating condition & then saves the data on a worksheet. After it loads new operating condition & goes over same cycle. I have to save all the data points in excel for different use cases, which I am saving in different worksheet for each specific operating condition.
    Since I already have data saved in excel at the end of test, I am trying plot each use case in the same report for study & presentaion after tests are finished. I have not been able to do so. I read the post which you have mentioned, seems like newer excel or labview version have same issue. I am using LV 9.0
    I will try using decimation but if you have any better way of handling this problem, I'll appreciate if you can share that.
    Thanks for your help.

  • Using LabVIEW to Generate an XY Graph of Multiple, Indexed Plots?

    Hello,
    I have written a LabVIEW Program (using 8.2.1) to characterize FETs using GPIB instruments. At it's most basic level, the program sets a voltage across the Gate-Source terminals of the FET, sets a voltage across the Drain-Source terminals of the FET, reads this second voltage, and then reads the Drain-Source current. The Drain-Source voltage is then increased, the current read, and so on. In this manner, the Drain-Source voltage is swept from 0V to some defined maximum (dependent on the FET being tested) and an array of data (I_{DS} vs. V_{DS}) is generated. The Drain-Source is then reset to 0, the Gate-Source voltage is increased, and the entire process is repeated.
    My problem is this: I need to generate a single Graph  (I think it should be XY, but not entirely certain), that plots all of these IV curves (each curve for each Gate-Source voltage) and indicates the Gate-Source voltage for each curve (in an indexed legend of some sort). Does anyone have any suggestions about how I should do this? My program is entirely based on For Loops and Sequence Structures. If you need a screen shot or want me to upload the program, please let me know. Fair warning, though: I am a LabVIEW novice so while the program functions correctly, it is not the prettiest in the world.
    Thanks for any help you can provide.
    Michael
    P.S. I searched the forums and didn't find this question already posted. If, however, it was and I just missed it, could someone direct me to it? Thanks.

    Vincent, Jon, and Andrew:
    I still need some help. I used the 3524.vi Example for the XY Graph: x-array, y-array definition to generate the kind of multiple plot xy graph that I needed. My problem now is I would like to re-index the plots so that they are labeled according to the Gate-Source voltage I am applying. Each curve has its own, distinct Gate-Source voltage and I would like to label each curve with its Gate-Source voltage. Currently, the plots are labeled in the legend: Plot 0, Plot 1, Plot 2, ... Plot n.
    How should I go about doing this (is there even a way to do this)?
    Again, any help would be greatly appreciated.
    Michael
    P.S. I have attached a copy of my program to this message. As I said, it isn't pretty, but it works so far. Hopefully this will help you in forming your suggestions.
    Attachments:
    FET Characterization Program (V2).vi ‏100 KB

  • Mathematica crashes when trying to plot 3D graphics.

    Regardless to version 8 or 7 and to the command line option -mesa, mathematica crashes when trying to plot 3D graphics.
    The resulting errors, after launching mathematica and trying to execute a Plot3D in the examples, are:
    X Error of failed request: GLXBadContext
    Major opcode of failed request: 153 (GLX)
    Minor opcode of failed request: 6 (X_GLXIsDirect)
    Serial number of failed request: 111091
    Current serial number in output stream: 111090
    X Error of failed request: BadAlloc (insufficient resources for operation)
    Major opcode of failed request: 153 (GLX)
    Minor opcode of failed request: 3 (X_GLXCreateContext)
    Serial number of failed request: 111086
    Current serial number in output stream: 111091
    X Error of failed request: GLXBadContext
    Major opcode of failed request: 153 (GLX)
    Minor opcode of failed request: 5 (X_GLXMakeCurrent)
    Serial number of failed request: 111092
    Current serial number in output stream: 111092
    Mathematica has received the signal: SIGSEGV and has exited.
    If possible, please report this problem to [email protected]
    describing in as much detail as possible what you were doing
    when the problem occurred.
    The fact is that
    $ glxgears
    works fine while the output of glxinfo is
    name of display: :0.0
    display: :0 screen: 0
    direct rendering: Yes
    server glx vendor string: SGI
    server glx version string: 1.4
    server glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile,
    GLX_ARB_multisample, GLX_EXT_create_context_es2_profile,
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, GLX_OML_swap_method,
    GLX_SGI_swap_control, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
    GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_INTEL_swap_event
    client glx vendor string: Mesa Project and SGI
    client glx version string: 1.4
    client glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile,
    GLX_ARB_create_context_robustness, GLX_ARB_get_proc_address,
    GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_EXT_framebuffer_sRGB,
    GLX_EXT_create_context_es2_profile, GLX_MESA_copy_sub_buffer,
    GLX_MESA_multithread_makecurrent, GLX_MESA_swap_control,
    GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGI_make_current_read,
    GLX_SGI_swap_control, GLX_SGI_video_sync, GLX_SGIS_multisample,
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
    GLX_EXT_texture_from_pixmap, GLX_INTEL_swap_event
    GLX version: 1.4
    GLX extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile,
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
    GLX_EXT_visual_info, GLX_EXT_visual_rating,
    GLX_EXT_create_context_es2_profile, GLX_MESA_copy_sub_buffer,
    GLX_MESA_multithread_makecurrent, GLX_MESA_swap_control,
    GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGI_make_current_read,
    GLX_SGI_swap_control, GLX_SGI_video_sync, GLX_SGIS_multisample,
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
    GLX_EXT_texture_from_pixmap, GLX_INTEL_swap_event
    OpenGL vendor string: Intel Open Source Technology Center
    OpenGL renderer string: Mesa DRI Mobile Intel® GM45 Express Chipset
    OpenGL version string: 2.1 Mesa 9.0.1
    OpenGL shading language version string: 1.20
    OpenGL extensions:
    GL_ARB_multisample, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color,
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_copy_texture,
    GL_EXT_polygon_offset, GL_EXT_subtexture, GL_EXT_texture_object,
    GL_EXT_vertex_array, GL_EXT_compiled_vertex_array, GL_EXT_texture,
    GL_EXT_texture3D, GL_IBM_rasterpos_clip, GL_ARB_point_parameters,
    GL_EXT_draw_range_elements, GL_EXT_packed_pixels, GL_EXT_point_parameters,
    GL_EXT_rescale_normal, GL_EXT_separate_specular_color,
    GL_EXT_texture_edge_clamp, GL_SGIS_generate_mipmap,
    GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp,
    GL_SGIS_texture_lod, GL_ARB_framebuffer_sRGB, GL_ARB_multitexture,
    GL_EXT_framebuffer_sRGB, GL_IBM_multimode_draw_arrays,
    GL_IBM_texture_mirrored_repeat, GL_3DFX_texture_compression_FXT1,
    GL_ARB_texture_cube_map, GL_ARB_texture_env_add, GL_ARB_transpose_matrix,
    GL_EXT_blend_func_separate, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays,
    GL_EXT_secondary_color, GL_EXT_texture_env_add,
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_lod_bias,
    GL_INGR_blend_func_separate, GL_NV_blend_square, GL_NV_light_max_exponent,
    GL_NV_texgen_reflection, GL_NV_texture_env_combine4,
    GL_SUN_multi_draw_arrays, GL_ARB_texture_border_clamp,
    GL_ARB_texture_compression, GL_EXT_framebuffer_object,
    GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3, GL_MESA_window_pos,
    GL_NV_packed_depth_stencil, GL_NV_texture_rectangle, GL_NV_vertex_program,
    GL_ARB_depth_texture, GL_ARB_occlusion_query, GL_ARB_shadow,
    GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar,
    GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat,
    GL_ARB_window_pos, GL_ATI_envmap_bumpmap, GL_EXT_stencil_two_side,
    GL_EXT_texture_cube_map, GL_NV_depth_clamp, GL_NV_vertex_program1_1,
    GL_APPLE_packed_pixels, GL_APPLE_vertex_array_object, GL_ARB_draw_buffers,
    GL_ARB_fragment_program, GL_ARB_fragment_shader, GL_ARB_shader_objects,
    GL_ARB_vertex_program, GL_ARB_vertex_shader, GL_ATI_draw_buffers,
    GL_ATI_texture_env_combine3, GL_ATI_texture_float, GL_EXT_shadow_funcs,
    GL_EXT_stencil_wrap, GL_MESA_pack_invert, GL_MESA_ycbcr_texture,
    GL_NV_primitive_restart, GL_ARB_depth_clamp,
    GL_ARB_fragment_program_shadow, GL_ARB_half_float_pixel,
    GL_ARB_occlusion_query2, GL_ARB_point_sprite, GL_ARB_shading_language_100,
    GL_ARB_sync, GL_ARB_texture_non_power_of_two, GL_ARB_vertex_buffer_object,
    GL_ATI_blend_equation_separate, GL_EXT_blend_equation_separate,
    GL_OES_read_format, GL_ARB_color_buffer_float, GL_ARB_pixel_buffer_object,
    GL_ARB_texture_compression_rgtc, GL_ARB_texture_float,
    GL_ARB_texture_rectangle, GL_EXT_packed_float, GL_EXT_pixel_buffer_object,
    GL_EXT_texture_compression_rgtc, GL_EXT_texture_rectangle,
    GL_EXT_texture_sRGB, GL_EXT_texture_shared_exponent,
    GL_ARB_framebuffer_object, GL_EXT_framebuffer_blit,
    GL_EXT_framebuffer_multisample, GL_EXT_packed_depth_stencil,
    GL_APPLE_object_purgeable, GL_ARB_vertex_array_object,
    GL_ATI_separate_stencil, GL_EXT_draw_buffers2, GL_EXT_draw_instanced,
    GL_EXT_gpu_program_parameters, GL_EXT_texture_array,
    GL_EXT_texture_integer, GL_EXT_texture_sRGB_decode, GL_OES_EGL_image,
    GL_MESA_texture_array, GL_ARB_copy_buffer, GL_ARB_depth_buffer_float,
    GL_ARB_draw_instanced, GL_ARB_half_float_vertex, GL_ARB_instanced_arrays,
    GL_ARB_map_buffer_range, GL_ARB_texture_rg, GL_ARB_texture_swizzle,
    GL_ARB_vertex_array_bgra, GL_EXT_separate_shader_objects,
    GL_EXT_texture_swizzle, GL_EXT_vertex_array_bgra,
    GL_NV_conditional_render, GL_ARB_ES2_compatibility, GL_ARB_debug_output,
    GL_ARB_draw_elements_base_vertex, GL_ARB_explicit_attrib_location,
    GL_ARB_fragment_coord_conventions, GL_ARB_provoking_vertex,
    GL_ARB_sampler_objects, GL_ARB_seamless_cube_map,
    GL_ARB_shader_texture_lod, GL_ARB_texture_rgb10_a2ui,
    GL_EXT_provoking_vertex, GL_EXT_texture_snorm,
    GL_MESA_texture_signed_rgba, GL_ARB_robustness,
    GL_ARB_shader_bit_encoding, GL_ARB_texture_storage,
    GL_ARB_invalidate_subdata
    32 GLX Visuals
    visual x bf lv rg d st colorbuffer sr ax dp st accumbuffer ms cav
    id dep cl sp sz l ci b ro r g b a F gb bf th cl r g b a ns b eat
    0x020 24 tc 0 32 0 r y . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None
    0x021 24 dc 0 32 0 r y . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None
    0x07e 24 tc 0 24 0 r . . 8 8 8 0 . . 0 0 0 0 0 0 0 0 0 None
    0x07f 24 tc 0 24 0 r y . 8 8 8 0 . . 0 0 0 0 0 0 0 0 0 None
    0x080 24 tc 0 24 0 r y . 8 8 8 0 . . 0 0 0 0 0 0 0 0 0 None
    0x081 24 tc 0 24 0 r . . 8 8 8 0 . . 0 24 8 0 0 0 0 0 0 None
    0x082 24 tc 0 24 0 r y . 8 8 8 0 . . 0 24 8 0 0 0 0 0 0 None
    0x083 24 tc 0 24 0 r y . 8 8 8 0 . . 0 24 8 0 0 0 0 0 0 None
    0x084 24 tc 0 32 0 r . . 8 8 8 8 . . 0 0 0 0 0 0 0 0 0 None
    0x085 24 tc 0 32 0 r y . 8 8 8 8 . . 0 0 0 0 0 0 0 0 0 None
    0x086 24 tc 0 32 0 r y . 8 8 8 8 . . 0 0 0 0 0 0 0 0 0 None
    0x087 24 tc 0 32 0 r . . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None
    0x088 24 tc 0 24 0 r y . 8 8 8 0 . . 0 24 8 0 0 0 0 0 0 None
    0x089 24 tc 0 24 0 r y . 8 8 8 0 . . 0 24 8 16 16 16 0 0 0 Slow
    0x08a 24 tc 0 32 0 r y . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None
    0x08b 24 tc 0 32 0 r y . 8 8 8 8 . . 0 24 8 16 16 16 16 0 0 Slow
    0x08c 24 dc 0 24 0 r . . 8 8 8 0 . . 0 0 0 0 0 0 0 0 0 None
    0x08d 24 dc 0 24 0 r y . 8 8 8 0 . . 0 0 0 0 0 0 0 0 0 None
    0x08e 24 dc 0 24 0 r y . 8 8 8 0 . . 0 0 0 0 0 0 0 0 0 None
    0x08f 24 dc 0 24 0 r . . 8 8 8 0 . . 0 24 8 0 0 0 0 0 0 None
    0x090 24 dc 0 24 0 r y . 8 8 8 0 . . 0 24 8 0 0 0 0 0 0 None
    0x091 24 dc 0 24 0 r y . 8 8 8 0 . . 0 24 8 0 0 0 0 0 0 None
    0x092 24 dc 0 32 0 r . . 8 8 8 8 . . 0 0 0 0 0 0 0 0 0 None
    0x093 24 dc 0 32 0 r y . 8 8 8 8 . . 0 0 0 0 0 0 0 0 0 None
    0x094 24 dc 0 32 0 r y . 8 8 8 8 . . 0 0 0 0 0 0 0 0 0 None
    0x095 24 dc 0 32 0 r . . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None
    0x096 24 dc 0 32 0 r y . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None
    0x097 24 dc 0 24 0 r y . 8 8 8 0 . . 0 24 8 0 0 0 0 0 0 None
    0x098 24 dc 0 24 0 r y . 8 8 8 0 . . 0 24 8 16 16 16 0 0 0 Slow
    0x099 24 dc 0 32 0 r y . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None
    0x09a 24 dc 0 32 0 r y . 8 8 8 8 . . 0 24 8 16 16 16 16 0 0 Slow
    0x04d 32 tc 0 32 0 r y . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None
    48 GLXFBConfigs:
    visual x bf lv rg d st colorbuffer sr ax dp st accumbuffer ms cav
    id dep cl sp sz l ci b ro r g b a F gb bf th cl r g b a ns b eat
    0x04e 0 tc 0 16 0 r . . 5 6 5 0 . . 0 0 0 0 0 0 0 0 0 None
    0x04f 0 tc 0 16 0 r y . 5 6 5 0 . . 0 0 0 0 0 0 0 0 0 None
    0x050 0 tc 0 16 0 r y . 5 6 5 0 . . 0 0 0 0 0 0 0 0 0 None
    0x051 0 tc 0 16 0 r . . 5 6 5 0 . . 0 16 0 0 0 0 0 0 0 None
    0x052 0 tc 0 16 0 r y . 5 6 5 0 . . 0 16 0 0 0 0 0 0 0 None
    0x053 0 tc 0 16 0 r y . 5 6 5 0 . . 0 16 0 0 0 0 0 0 0 None
    0x054 24 tc 0 24 0 r . . 8 8 8 0 . . 0 0 0 0 0 0 0 0 0 None
    0x055 24 tc 0 24 0 r y . 8 8 8 0 . . 0 0 0 0 0 0 0 0 0 None
    0x056 24 tc 0 24 0 r y . 8 8 8 0 . . 0 0 0 0 0 0 0 0 0 None
    0x057 24 tc 0 24 0 r . . 8 8 8 0 . . 0 24 8 0 0 0 0 0 0 None
    0x058 24 tc 0 24 0 r y . 8 8 8 0 . . 0 24 8 0 0 0 0 0 0 None
    0x059 24 tc 0 24 0 r y . 8 8 8 0 . . 0 24 8 0 0 0 0 0 0 None
    0x05a 24 tc 0 32 0 r . . 8 8 8 8 . . 0 0 0 0 0 0 0 0 0 None
    0x05b 24 tc 0 32 0 r y . 8 8 8 8 . . 0 0 0 0 0 0 0 0 0 None
    0x05c 24 tc 0 32 0 r y . 8 8 8 8 . . 0 0 0 0 0 0 0 0 0 None
    0x05d 24 tc 0 32 0 r . . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None
    0x05e 24 tc 0 32 0 r y . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None
    0x05f 32 tc 0 32 0 r y . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None
    0x060 0 tc 0 16 0 r y . 5 6 5 0 . . 0 16 0 0 0 0 0 0 0 None
    0x061 0 tc 0 16 0 r y . 5 6 5 0 . . 0 16 0 16 16 16 0 0 0 Slow
    0x062 24 tc 0 24 0 r y . 8 8 8 0 . . 0 24 8 0 0 0 0 0 0 None
    0x063 24 tc 0 24 0 r y . 8 8 8 0 . . 0 24 8 16 16 16 0 0 0 Slow
    0x064 24 tc 0 32 0 r y . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None
    0x065 24 tc 0 32 0 r y . 8 8 8 8 . . 0 24 8 16 16 16 16 0 0 Slow
    0x066 0 dc 0 16 0 r . . 5 6 5 0 . . 0 0 0 0 0 0 0 0 0 None
    0x067 0 dc 0 16 0 r y . 5 6 5 0 . . 0 0 0 0 0 0 0 0 0 None
    0x068 0 dc 0 16 0 r y . 5 6 5 0 . . 0 0 0 0 0 0 0 0 0 None
    0x069 0 dc 0 16 0 r . . 5 6 5 0 . . 0 16 0 0 0 0 0 0 0 None
    0x06a 0 dc 0 16 0 r y . 5 6 5 0 . . 0 16 0 0 0 0 0 0 0 None
    0x06b 0 dc 0 16 0 r y . 5 6 5 0 . . 0 16 0 0 0 0 0 0 0 None
    0x06c 24 dc 0 24 0 r . . 8 8 8 0 . . 0 0 0 0 0 0 0 0 0 None
    0x06d 24 dc 0 24 0 r y . 8 8 8 0 . . 0 0 0 0 0 0 0 0 0 None
    0x06e 24 dc 0 24 0 r y . 8 8 8 0 . . 0 0 0 0 0 0 0 0 0 None
    0x06f 24 dc 0 24 0 r . . 8 8 8 0 . . 0 24 8 0 0 0 0 0 0 None
    0x070 24 dc 0 24 0 r y . 8 8 8 0 . . 0 24 8 0 0 0 0 0 0 None
    0x071 24 dc 0 24 0 r y . 8 8 8 0 . . 0 24 8 0 0 0 0 0 0 None
    0x072 24 dc 0 32 0 r . . 8 8 8 8 . . 0 0 0 0 0 0 0 0 0 None
    0x073 24 dc 0 32 0 r y . 8 8 8 8 . . 0 0 0 0 0 0 0 0 0 None
    0x074 24 dc 0 32 0 r y . 8 8 8 8 . . 0 0 0 0 0 0 0 0 0 None
    0x075 24 dc 0 32 0 r . . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None
    0x076 24 dc 0 32 0 r y . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None
    0x077 24 dc 0 32 0 r y . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None
    0x078 0 dc 0 16 0 r y . 5 6 5 0 . . 0 16 0 0 0 0 0 0 0 None
    0x079 0 dc 0 16 0 r y . 5 6 5 0 . . 0 16 0 16 16 16 0 0 0 Slow
    0x07a 24 dc 0 24 0 r y . 8 8 8 0 . . 0 24 8 0 0 0 0 0 0 None
    0x07b 24 dc 0 24 0 r y . 8 8 8 0 . . 0 24 8 16 16 16 0 0 0 Slow
    0x07c 24 dc 0 32 0 r y . 8 8 8 8 . . 0 24 8 0 0 0 0 0 0 None
    0x07d 24 dc 0 32 0 r y . 8 8 8 8 . . 0 24 8 16 16 16 16 0 0 Slow
    I've tried in /etc/X11/xorg.conf under Section "Device" different options like:
    Option "AccelMethod" "uxa"
    or
    Option "AccelMethod" "sna"
    or
    Option "NoAccel" "true"
    without success.
    Here are informations about the graphics card:
    $ lspci -v -s `lspci | awk '/VGA/{print $1}'`
    00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07) (prog-if 00 [VGA controller])
    Subsystem: Acer Incorporated [ALI] Device 0207
    Flags: bus master, fast devsel, latency 0, IRQ 44
    Memory at f4000000 (64-bit, non-prefetchable) [size=4M]
    Memory at d0000000 (64-bit, prefetchable) [size=256M]
    I/O ports at 1800 [size=8]
    Expansion ROM at <unassigned> [disabled]
    Capabilities: <access denied>
    Kernel driver in use: i915
    while my /etc/X11/xorg.conf file looks like
    Section "ServerLayout"
    Identifier "X.org Configured"
    Screen 0 "Screen0" 0 0
    InputDevice "Mouse0" "CorePointer"
    InputDevice "Keyboard0" "CoreKeyboard"
    EndSection
    Section "Files"
    ModulePath "/usr/lib/xorg/modules"
    FontPath "/usr/share/fonts/misc"
    FontPath "/usr/share/fonts/100dpi:unscaled"
    FontPath "/usr/share/fonts/75dpi:unscaled"
    FontPath "/usr/share/fonts/TTF"
    FontPath "/usr/share/fonts/Type1"
    EndSection
    Section "ServerFlags"
    Option "DontZap" "False"
    #ho aggiunto quanto segue il 22.06.2010 dopo che non riuscivo a cambiare la tastiera DISATTIVA L HOTPLUGIN
    #Option "AutoAddDevices" "False"
    EndSection
    Section "Module"
    Load "glx"
    Load "dri"
    Load "record"
    Load "dbe"
    Load "extmod"
    Load "dri2"
    EndSection
    Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    EndSection
    Section "InputDevice"
    Identifier "Mouse0"
    Driver "mouse"
    Option "Protocol" "auto"
    Option "Device" "/dev/input/mice"
    Option "ZAxisMapping" "4 5 6 7"
    EndSection
    Section "Monitor"
    Identifier "Monitor0"
    VendorName "Monitor Vendor"
    ModelName "Monitor Model"
    EndSection
    Section "Device"
    ### Available Driver options are:-
    ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
    ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
    ### [arg]: arg optional
    #Option "NoAccel" "true" # [<bool>]
    #Option "SWcursor" # [<bool>]
    #Option "ColorKey" # <i>
    #Option "CacheLines" # <i>
    #Option "Dac6Bit" # [<bool>]
    #Option "DRI" # [<bool>]
    #Option "NoDDC" # [<bool>]
    #Option "ShowCache" # [<bool>]
    #Option "XvMCSurfaces" # <i>
    #Option "PageFlip" # [<bool>]
    #Option "AccelMethod" "uxa"
    #Option "AccelMethod" "sna"
    Identifier "Card0"
    Driver "intel"
    VendorName "Intel Corporation"
    BoardName "Mobile 4 Series Chipset Integrated Graphics Controller"
    BusID "PCI:0:2:0"
    EndSection
    Section "Screen"
    Identifier "Screen0"
    Device "Card0"
    Monitor "Monitor0"
    SubSection "Display"
    Viewport 0 0
    Depth 1
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 4
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 8
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 15
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 16
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 24
    EndSubSection
    EndSection
    I'm running a full updated Arch x86_64 release.
    Any suggestions?
    Thanks in advance,
    Roberto

    Hello BajaBoy,
    I think it would be easiest to figure this out if I had the data to look at. If you can send this too me (I will treat this confidientially and it will be deleted after we got it to plot) please sned to me me directly at National Instruments.
    My email address is my:   first name DOT last name AT ni DOT com       (no middle initial!).
    We'll get back to you with an answer the same day unless we run into the Thanksgiving holiday before we get this.
    Hope that helps,
    Otmar D. Foehner
    Business Development Manager
    DIAdem and Test Data Management
    National Instruments
    Austin, TX - USA
    "For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary."

  • How can I change  oval shape applet to (plot)

    Hi this is not my code so, the orignal code is freeware to www.neuralsemantics.com and is Copyright 1989 by Rich Gopstein and Harris Corporation.
    The site allows permission to play with the code or ammend it.
    how could I modify the applet to display (plot) several cycles of the audio signal instead of the elliptical shape. The amplitude and period of the waveform should change in accordance with the moving sliders
    Here is the code from www.neuralsemantics.com /applets/jazz.html
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class JazzMachine extends Applet
                 implements Runnable, AdjustmentListener, MouseListener {
      // program name
      final static String TITLE = "The jazz machine";
      // Line separator char
      final static String LSEP = System.getProperty("line.separator");
      // Value range
      final static int MIN_FREQ = 1;   // min value for barFreq
      final static int MAX_FREQ = 200; // max value for barFreq
      final static int MIN_AMPL = 0;   // min value for barVolume
      final static int MAX_AMPL = 100; // max value for barVolume
      // Sun's mu-law audio rate = 8KHz
      private double rate = 8000d;      
      private boolean audioOn = false;     // state of audio switch (on/off)
      private boolean changed = true;      // change flag
      private int freqValue = 1;           // def value of frequency scrollbar
      private int amplValue = 70;          // def value of volume scrollbar
      private int amplMultiplier = 100;    // volume multiplier coeff
      private int frequency, amplitude;    // the requested values
      private int soundFrequency;          // the actual output frequency
      // the mu-law encoded sound samples
      private byte[] mu;
      // the audio stream
      private java.io.InputStream soundStream;
      // graphic components
      private Scrollbar barVolume, barFreq;
      private Label labelValueFreq;
      private Canvas canvas;   
      // flag for frequency value display
      private boolean showFreq = true;
      // width and height of canvas area
      private int cw, ch;
      // offscreen Image and Graphics objects
      private Image img;
      private Graphics graph;
      // dimensions of the graphic ball
      private int ovalX, ovalY, ovalW, ovalH;
      // color of the graphic ball
      private Color ovalColor;
      // default font size
      private int fontSize = 12;
      // hyperlink objects
      private Panel linkPanel;
      private Label labelNS;
      private Color inactiveLinkColor = Color.yellow;
      private Color activeLinkColor = Color.white;
      private Font inactiveLinkFont = new Font("Dialog", Font.PLAIN, fontSize);
      private Font activeLinkFont = new Font("Dialog", Font.ITALIC, fontSize);
      // standard font for the labels
      private Font ctrlFont;
      // standard foreground color for the labels
      private Color fgColor = Color.white;
      // standard background color for the control area
      private Color ctrlColor = Color.darkGray;
      // standard background color for the graphic ball area
      private Color bgColor = Color.black;
      // start value for the time counter
      private long startTime;
      // maximum life time for an unchanged sound (10 seconds)
      private long fixedTime = 10000;
      // animation thread
      Thread runner;
    //                             Constructors
      public JazzMachine() {
    //                                Methods
      public void init() {
        // read applet <PARAM> tags
        setAppletParams();
        // font for the labels
        ctrlFont = new Font("Dialog", Font.PLAIN, fontSize);
        // convert scrollbar values to real values (see below for details)
        amplitude = (MAX_AMPL - amplValue) * amplMultiplier;
        frequency = (int)Math.pow(1.2d, (double)(freqValue + 250) / 10.0);
        setLayout(new BorderLayout());
        setBackground(ctrlColor);
        setForeground(fgColor);
        Label labelVolume = new Label(" Volume ");
        labelVolume.setForeground(fgColor);
        labelVolume.setAlignment(Label.CENTER);
        labelVolume.setFont(ctrlFont);
        barVolume = new Scrollbar(Scrollbar.VERTICAL, amplValue, 1,
                         MIN_AMPL, MAX_AMPL + 1);
        barVolume.addAdjustmentListener(this);
        // assign fixed size to the scrollbar
        Panel pVolume = new Panel();
        pVolume.setLayout(null);
        pVolume.add(barVolume);
        barVolume.setSize(16, 90);
        pVolume.setSize(16, 90);
        Label labelFreq = new Label("Frequency");
        labelFreq.setForeground(fgColor);
        labelFreq.setAlignment(Label.RIGHT);
        labelFreq.setFont(ctrlFont);
        barFreq = new Scrollbar(Scrollbar.HORIZONTAL, freqValue, 1,
                      MIN_FREQ, MAX_FREQ);
        barFreq.addAdjustmentListener(this);
        // assign fixed size to the scrollbar
        Panel pFreq = new Panel();
        pFreq.setLayout(null);
        pFreq.add(barFreq);
        barFreq.setSize(140, 18);
        pFreq.setSize(140, 18);
        // show initial frequency value
        labelValueFreq = new Label();
        if (showFreq) {
          labelValueFreq.setText("0000000 Hz");
          labelValueFreq.setForeground(fgColor);
          labelValueFreq.setAlignment(Label.LEFT);
          labelValueFreq.setFont(ctrlFont);
        Panel east = new Panel();
        east.setLayout(new BorderLayout(10, 10));
        east.add("North", labelVolume);
        Panel pEast = new Panel();
        pEast.add(pVolume);
        east.add("Center", pEast);
        Panel south = new Panel();
        Panel pSouth = new Panel();
        pSouth.setLayout(new FlowLayout(FlowLayout.CENTER));
        pSouth.add(labelFreq);
        pSouth.add(pFreq);
        pSouth.add(labelValueFreq);
        south.add("South", pSouth);
        linkPanel = new Panel();
        this.composeLink();
        Panel west = new Panel();
        // dummy label to enlarge the panel
        west.add(new Label("      "));
        add("North", linkPanel);
        add("South", south);
        add("East", east);
        add("West", west);
        add("Center", canvas = new Canvas());
      private void composeLink() {
        linkPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 5));
        linkPanel.setFont(inactiveLinkFont);
        linkPanel.setForeground(Color.yellow);
        Label labelName = new Label(TITLE + " \u00a9");
          labelName.setForeground(inactiveLinkColor);
          labelName.setAlignment(Label.RIGHT);
        labelNS = new Label(" Neural Semantics   ");
          labelNS.setForeground(inactiveLinkColor);
          labelNS.setFont(inactiveLinkFont);
          labelNS.setAlignment(Label.LEFT);
        linkPanel.add(labelName);
        linkPanel.add(labelNS);
        // link to Neural Semantics website
        String h = getDocumentBase().getHost();
        if ((h.length() > 4) && (h.substring(0, 4).equals("www.")))
          h = h.substring(4);
        if ((h != null) && (! h.startsWith("neuralsemantics.com"))) {
          // create a hand cursor for the hyperlink area
          Cursor linkCursor = new Cursor(Cursor.HAND_CURSOR);
          linkPanel.setCursor(linkCursor);
          labelName.addMouseListener(this);
          labelNS.addMouseListener(this);
      private void switchAudio(boolean b) {
        // switch audio to ON if b=true and audio is OFF
        if ((b) && (! audioOn)) {
          try {
            sun.audio.AudioPlayer.player.start(soundStream);
          catch(Exception e) { }
          audioOn = true;
        // switch audio to OFF if b=false and audio is ON
        if ((! b) && (audioOn)) {
          try {
            sun.audio.AudioPlayer.player.stop(soundStream);
          catch(Exception e) { }
          audioOn = false;
      private void getChanges() {
        // create new sound wave
        mu = getWave(frequency, amplitude);
        // show new frequency value
        if (showFreq)
          labelValueFreq.setText((new Integer(soundFrequency)).toString() + " Hz");
        // shut up !
        switchAudio(false);
        // switch audio stream to new sound sample
        try {
          soundStream = new sun.audio.ContinuousAudioDataStream(new
                            sun.audio.AudioData(mu));
        catch(Exception e) { }
        // listen
        switchAudio(true);
        // Adapt animation settings
        double prop = (double)freqValue / (double)MAX_FREQ;
        ovalW = (int)(prop * cw);
        ovalH = (int)(prop * ch);
        ovalX = (int)((cw - ovalW) / 2);
        ovalY = (int)((ch - ovalH) / 2);
        int r = (int)(255 * prop);
        int b = (int)(255 * (1.0 - prop));
        int g = (int)(511 * (.5d - Math.abs(.5d - prop)));
        ovalColor = new Color(r, g, b);
        // start the timer
        startTime = System.currentTimeMillis();
        // things are fixed
        changed = false;
    //                               Thread
      public void start() {
        // create thread
        if (runner == null) {
          runner = new Thread(this);
          runner.start();
      public void run() {
        // infinite loop
        while (true) {
          // Volume or Frequency has changed ?
          if (changed)
            this.getChanges();
          // a touch of hallucination
          repaint();
          // let the children sleep. Shut up if inactive during more
          // than the fixed time.
          if (System.currentTimeMillis() - startTime > fixedTime)
            switchAudio(false);
          // let the computer breath
          try { Thread.sleep(100); }
          catch (InterruptedException e) { }
      public void stop() {
        this.cleanup();
      public void destroy() {
        this.cleanup();
      private synchronized void cleanup() {
        // shut up !
        switchAudio(false);
        // kill the runner thread
        if (runner != null) {
          try {
            runner.stop();
            runner.join();
            runner = null;
          catch(Exception e) { }
    //                     AdjustmentListener Interface
      public void adjustmentValueChanged(AdjustmentEvent e) {
        Object source = e.getSource();
        // Volume range : 0 - 10000
        // ! Scrollbar value range is inverted.
        // ! 100 = multiplier coefficient.
        if (source == barVolume) {
          amplitude = (MAX_AMPL - barVolume.getValue()) * amplMultiplier;
          changed = true;
        // Frequency range : 97 - 3591 Hz
        // ! Scrollbar value range represents a logarithmic function.
        //   The purpose is to assign more room for low frequency values.
        else if (source == barFreq) {
          freqValue = barFreq.getValue();
          frequency = (int)Math.pow(1.2d, (double)(freqValue + 250) / 10.0);
          changed = true;
    //                     MouseListener Interface
      public void mouseClicked(MouseEvent e) {
      public void mouseEntered(MouseEvent e) {
        // text color rollover
        labelNS.setForeground(activeLinkColor);
        labelNS.setFont(activeLinkFont);
        showStatus("Visit Neural Semantics");
      public void mouseExited(MouseEvent e) {
        // text color rollover
        labelNS.setForeground(inactiveLinkColor);
        labelNS.setFont(inactiveLinkFont);
        showStatus("");
      public void mousePressed(MouseEvent e) {
        try {
          java.net.URL url = new java.net.URL("http://www.neuralsemantics.com/");
          AppletContext ac = getAppletContext();
          if (ac != null)
            ac.showDocument(url);
        catch(Exception ex){ }
      public void mouseReleased(MouseEvent e) {
    //                              Painting
      public void update(Graphics g) {
        Graphics canvasGraph = canvas.getGraphics();
        if (img == null) {
          // get canvas dimensions
          cw = canvas.getSize().width;
          ch = canvas.getSize().height;
          // initialize offscreen image
          img = createImage(cw, ch);
          graph = img.getGraphics();
        // offscreen painting
        graph.setColor(bgColor);
        graph.fillRect(0, 0, cw, ch);
        graph.setColor(ovalColor);
        graph.fillOval(ovalX, ovalY, ovalW, ovalH);
        // canvas painting
        if (canvasGraph != null) {
          canvasGraph.drawImage(img, 0, 0, canvas);
          canvasGraph.dispose();
    //                          Sound processing
      // Creates a sound wave from scratch, using predefined frequency
      // and amplitude.
      private byte[] getWave(int freq, int ampl) {
        int lin;
        // calculate the number of samples in one sinewave period
        // !! change this to multiple periods if you need more precision !!
        int nSample = (int)(rate / freq);
        // calculate output wave frequency
        soundFrequency = (int)(rate / nSample);
        // create array of samples
        byte[] wave = new byte[nSample];
        // pre-calculate time interval & constant stuff
        double timebase = 2.0 * Math.PI * freq / rate;
        // Calculate samples for a single period of the sinewave.
        // Using a single period is no big precision, but enough
        // for this applet anyway !
        for (int i=0; i<nSample; i++) {
          // calculate PCM sample value
          lin = (int)(Math.sin(timebase * i) * ampl);
          // convert it to mu-law
          wave[i] = linToMu(lin);
        return wave;
      private static byte linToMu(int lin) {
        int mask;
        if (lin < 0) {
          lin = -lin;
          mask = 0x7F;
        else  {
          mask = 0xFF;
        if (lin < 32)
          lin = 0xF0 | 15 - (lin / 2);
        else if (lin < 96)
          lin = 0xE0 | 15 - (lin-32) / 4;
        else if (lin < 224)
          lin = 0xD0 | 15 - (lin-96) / 8;
        else if (lin < 480)
          lin = 0xC0 | 15 - (lin-224) / 16;
        else if (lin < 992)
          lin = 0xB0 | 15 - (lin-480) / 32;
        else if (lin < 2016)
          lin = 0xA0 | 15 - (lin-992) / 64;
        else if (lin < 4064)
          lin = 0x90 | 15 - (lin-2016) / 128;
        else if (lin < 8160)
          lin = 0x80 | 15 - (lin-4064) / 256;
        else
          lin = 0x80;
        return (byte)(mask & lin);
    //                             Applet info
      public String getAppletInfo() {
        String s = "The jazz machine" + LSEP + LSEP +
                   "A music synthetizer applet" + LSEP +
                   "Copyright (c) Neural Semantics, 2000-2002" + LSEP + LSEP +
                   "Home page : http://www.neuralsemantics.com/";
        return s;
      private void setAppletParams() {
        // read the HTML showfreq parameter
        String param = getParameter("showfreq");
        if (param != null)
          if (param.toUpperCase().equals("OFF"))
            showFreq = false;
        // read the HTML backcolor parameter
        bgColor = changeColor(bgColor, getParameter("backcolor"));
        // read the HTML controlcolor parameter
        ctrlColor = changeColor(ctrlColor, getParameter("controlcolor"));
        // read the HTML textcolor parameter
        fgColor = changeColor(fgColor, getParameter("textcolor"));
        // read the HTML fontsize parameter
        param = getParameter("fontsize");
        if (param != null) {
          try {
            fontSize = Integer.valueOf(param).intValue();
          catch (NumberFormatException e) { }
      private Color changeColor(Color c, String s) {
        if (s != null) {
          try {
            if (s.charAt(0) == '#')
              c = new Color(Integer.valueOf(s.substring(1), 16).intValue());
            else
              c = new Color(Integer.valueOf(s).intValue());
          catch (NumberFormatException e) { e.printStackTrace(); }
        return c;
    }thanks LIZ
    PS If you can help how do I Give the Duke dollers to you

    http://www.google.ca/search?q=java+oval+shape+to+plot&hl=en&lr=&ie=UTF-8&oe=UTF-8&start=10&sa=N
    Ask the guy who made it for more help

Maybe you are looking for

  • CL_SALV_HIERSEQ_TABLE - Multiple level heirachial sequential list

    Class CL_SALV_HIERSEQ_TABLE  -  Can this class be used for multiple level heirarchial sequential list ? It works perfect for 2 level heirarchial list u2013 Thanks to Rich Heilman. Say for Eg, SCARR and SFLIGHT. My requirement has more levels. I looke

  • Reading a session variable from a dynamic action

    I have a select list on a page and a button next to the select list. The button calls a dynamic action which opens a page and sends the value in the select list. The page is not submitted. The DA has a step with a dummy PL/SQL block that submits the

  • Firelite Firewire external not mounting

    I am running OS 10.4.7 and my external hard drive will not mount. I went back to the install CD and tried that but it says that it needs a system folder in order to complete the installation. Where can I find this sort of folder? Do I need to downloa

  • Multiple macs showing under Shared in Finder

    Hi, Running Yosemite 10.10 on an iMac 27". Noticed that I have 19 Pete's iMac (#) showing under Shared in the Finder as per screen shot below.  I recall this happening a few OS X versions ago but what's the cause.  Is it anything to do with my ISP as

  • Help,I am trying to get function calls from a flash file within an embedded SMIL file to work with Netscape.

    Basically, the functions are on the html document in which the SMIL file is embedded and the flash file within the SMIL file calls the function from a button. The code on the html doc determines whether the browser is Netscape or IE and then executes