Method, apparatus and electronic device for generating three-dimensional spatial audio track
By generating time length bars and Z-axis reference bars on the XOZ and YOZ planes, and combining them with audio to generate a three-dimensional audio trajectory, the problem of low accuracy in three-dimensional trajectory drawing is solved, and more accurate and efficient three-dimensional spatial trajectory drawing is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MIGU CO LTD
- Filing Date
- 2022-11-07
- Publication Date
- 2026-04-14
AI Technical Summary
Existing technologies have low accuracy in 3D trajectory rendering, especially in the case of multi-valued function curves where the overlapping area of the projection cannot be accurately rendered.
By obtaining a first baseline on the XOZ plane, a time length bar and a Z-axis reference bar are generated. A second baseline is drawn on the YOZ plane. A three-dimensional audio trajectory is generated by combining preset audio. The time length bar is used to limit the coordinate duration, and the Z-axis reference bar is used to limit the trajectory direction.
It achieves accurate and efficient drawing of three-dimensional spatial trajectories, and can more naturally and vividly simulate the motion trajectory of a moving body in three-dimensional space.
Smart Images

Figure CN115761084B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of data processing technology, specifically to a method, apparatus, electronic device, and computer-readable storage medium for generating three-dimensional spatial audio trajectories. Background Technology
[0002] Currently, for 3D trajectory drawing, the view theory is generally used, and the combination of top view and left (right) view is used to meet the need to draw 3D trajectories on a 2D plane.
[0003] The inventors of this application discovered during the implementation of the embodiments of the present invention that: in the prior art, a trajectory is generally drawn once in a plane (such as XOZ), and then two more trajectories are drawn in the XOY plane (or YOZ plane) to complete the combination of trajectories in three-dimensional space. Because it is drawn using a projection method, the two drawings only support curves of single-valued functions. If the curve is a curve of a multi-valued function, there is an overlapping area of projection. That is, a curve drawn in the XOZ plane may have multiple Z or X values corresponding to one X or Z value. This makes it impossible to accurately draw three-dimensional trajectories. Summary of the Invention
[0004] In view of the above problems, embodiments of the present invention provide a method, apparatus, electronic device and computer-readable storage medium for generating three-dimensional spatial audio trajectories, to solve the technical problem of low accuracy of three-dimensional trajectory drawing in the prior art.
[0005] According to one aspect of the present invention, a method for generating a three-dimensional spatial audio trajectory is provided, the method comprising:
[0006] Obtain the first baseline plotted on the XOZ plane;
[0007] Based on the coordinate value array corresponding to each coordinate point on the first baseline, a time length bar and a Z-axis reference bar are generated on the YOZ plane; the coordinate value array includes X-axis coordinate values, Z-axis coordinate values, and the duration of the first coordinate; the time length bar is used to limit the duration of each coordinate in the second baseline; the Z-axis reference bar is used to limit the direction of trajectory change of the second baseline;
[0008] Receive the second baseline drawn on the YOZ plane;
[0009] A three-dimensional trajectory is generated based on the first baseline and the second baseline;
[0010] A three-dimensional audio trajectory is generated based on the three-dimensional trajectory and the preset audio; the three-dimensional audio trajectory represents the motion trajectory of sound when a moving body moves in three-dimensional space.
[0011] In one optional approach, obtaining the first baseline drawn on the XOZ plane includes: recording the coordinate values of each coordinate point drawn on the XOZ plane and the corresponding coordinate duration; the XOZ plane is provided with a granular grid; one coordinate point corresponds to one granular grid; and generating the first baseline based on the coordinate values of each coordinate point drawn on the XOZ plane.
[0012] In an alternative approach, after obtaining the first baseline drawn on the XOZ plane, the method further includes: redrawing the first baseline to form a redrawn baseline; wherein the redrawn baseline carries the coordinate duration of each coordinate point in the first baseline.
[0013] In one alternative approach, color variations are used to represent the duration of coordinates at different points in the redrawn baseline.
[0014] In one optional approach, generating time length bars and Z-axis reference bars on the YOZ plane based on the coordinate value arrays corresponding to each coordinate point on the first baseline includes: generating time length bars based on the first coordinate duration in each coordinate value array corresponding to the first baseline and the order of the coordinate value arrays; and generating Z-axis reference bars indicating the direction of trajectory change according to the generation order of the coordinate value arrays corresponding to the first baseline.
[0015] In one alternative approach, before receiving the second baseline drawn on the YOZ plane, the method includes: limiting the direction of trajectory change when drawing the second baseline on the YOZ plane using the Z-axis reference bar; and limiting the duration of the second coordinate corresponding to the Y-axis coordinate value using the time length bar.
[0016] In one optional approach, generating a three-dimensional trajectory based on the first baseline and the second baseline includes: determining the Y-axis coordinate values corresponding to each of the coordinate value arrays based on the second baseline; and generating a three-dimensional trajectory based on the Y-axis coordinate values corresponding to each of the coordinate value arrays.
[0017] According to another aspect of the present invention, a device for drawing three-dimensional spatial audio trajectories is provided, comprising:
[0018] The acquisition module is used to acquire the first baseline drawn on the XOZ plane;
[0019] The dual-column generation module is used to generate a time length column and a Z-axis reference column on the YOZ plane based on the coordinate value array corresponding to each coordinate point on the first baseline. The coordinate value array includes X-axis coordinate values, Z-axis coordinate values, and the duration of the first coordinate. The time length column is used to limit the duration of each coordinate in the second baseline. The Z-axis reference column is used to limit the direction of trajectory change of the second baseline.
[0020] A receiving module is used to receive a second baseline drawn on the YOZ plane;
[0021] The trajectory generation module is used to generate a three-dimensional trajectory based on the first baseline and the second baseline;
[0022] The audio trajectory generation module is used to generate a three-dimensional audio trajectory based on the three-dimensional trajectory and the preset audio; the three-dimensional audio trajectory represents the motion trajectory of sound when a moving body moves in three-dimensional space.
[0023] According to another aspect of the present invention, an electronic device is provided, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus;
[0024] The memory is used to store at least one executable instruction that causes the processor to perform the operation of the method for generating the three-dimensional spatial audio trajectory.
[0025] According to another aspect of the present invention, a computer-readable storage medium is provided, the storage medium storing at least one executable instruction, which, when executed on an electronic device, causes the electronic device to perform the operation of the method for generating the three-dimensional spatial audio trajectory.
[0026] This invention provides an embodiment of a second baseline drawn on the XOZ plane. Based on the coordinate value array corresponding to each coordinate point on the first baseline, a time length bar and a Z-axis reference bar are generated on the YOZ plane. The coordinate value array includes X-axis coordinate values, Z-axis coordinate values, and a first coordinate duration. The time length bar is used to limit the duration of each coordinate in the second baseline. The Z-axis reference bar is used to limit the direction of trajectory change of the second baseline. The second baseline drawn on the YOZ plane is received. Based on the first and second baselines, a three-dimensional trajectory is generated. Based on the three-dimensional trajectory and a preset audio, a three-dimensional audio trajectory is generated. The three-dimensional audio trajectory represents the sound trajectory of a moving object in three-dimensional space, enabling the drawing of a three-dimensional spatial trajectory from a two-dimensional plane, thus achieving more accurate and efficient trajectory drawing.
[0027] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0028] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0029] Figure 1 A flowchart illustrating the method for generating three-dimensional spatial audio trajectories provided in an embodiment of the present invention is shown.
[0030] Figure 2 A schematic diagram of the granular mesh in the method for generating three-dimensional spatial audio trajectories provided in an embodiment of the present invention is shown;
[0031] Figure 3 This diagram illustrates the first baseline drawn in the XOZ plane in the method for generating three-dimensional spatial audio trajectories provided in an embodiment of the present invention.
[0032] Figure 4 A schematic diagram of the YOZ plane in the method for generating three-dimensional spatial audio trajectories provided in an embodiment of the present invention is shown;
[0033] Figure 5 A schematic diagram of the structure of the three-dimensional spatial audio trajectory drawing device provided in an embodiment of the present invention is shown;
[0034] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present invention is shown. Detailed Implementation
[0035] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0036] Figure 1A flowchart of a method for generating a three-dimensional spatial audio trajectory according to an embodiment of the present invention is shown. This method is executed by an electronic device. The electronic device can be a device with an interface display function, such as a personal computer, tablet computer, or terminal device. The method for generating a three-dimensional spatial audio trajectory is applied to the display interface of the electronic device. In one application scenario of this embodiment, the method for generating a three-dimensional spatial audio trajectory can be applied to the generation of sound source trajectories, such as the trajectory of the sound source of a flying bird. Because the sound source position changes as the bird flies to different locations, the sound source trajectory is largely consistent with the flight trajectory. Users can simulate the sound source of a bird using the method for generating a three-dimensional spatial audio trajectory according to this embodiment, and then draw it to generate the sound source trajectory of the bird. Figure 1 As shown, the method includes the following steps:
[0037] Step 110: Obtain the first baseline drawn on the XOZ plane.
[0038] In this embodiment of the invention, the first baseline can be a curve drawn by machine or manually; no specific limitation is made in this embodiment. In one implementation, multiple planes are first displayed to the user through an interface. These planes include an XOZ plane, a YOZ plane, and an XOY plane. The plane selected by the user corresponds to the screen plane of the device. Assuming the user selects the XOZ plane, a coordinate axis for the XOZ plane is established at the center of the device screen plane. The direction of the coordinate axis maintains the projection of the RHS coordinate system onto the plane. The user's baseline is then drawn. Maintaining the RHS coordinate system is to ensure consistency with the coordinate system used for simulating spatial audio effects. For example, in this step, the XOZ plane is selected, with the positive X-axis pointing horizontally to the right and the positive Z-axis pointing vertically downwards. The device plane can be the screen of a mobile phone or tablet, or a web display interface. The first baseline drawn by the user can be obtained by acquiring user input behaviors such as touch, swipe, or mouse click / drag operations on the touchscreen.
[0039] In embodiments of the present invention, such as Figure 2As shown in (a), this embodiment of the invention sets a granular grid on the XOZ plane, thereby granulating the screen based on the coordinate system to facilitate the discretization of the baseline as continuous data. The discretization process is as follows: if the effective value of the touch point coordinates is preset to two decimal places, only the integer part is retained during recording, discarding the effective value after the decimal point. For example, if the preset step size is 1 display unit (such as ps, dp, etc., the unit of front-end resolution, pixel or dot density), then the granular step size is twice 1 display unit to facilitate the collection and storage of time information. Assuming the width of the user-interacting interface is W display units and the height is H display units, if a W*H grid is constructed, the area of the granular grid is (W / 2)*(H / 2). The two types of grids are not equivalent; one cell of the granular grid consists of four ordinary 1*1 display unit grids. Figure 2 As shown in (a), the grid with the dark background is a granular grid.
[0040] In this embodiment of the invention, the coordinate values of each coordinate point drawn by the user on the XOZ plane and the corresponding coordinate duration are recorded; each coordinate point corresponds to a granular grid; a first baseline is generated based on the coordinate values of each coordinate point drawn by the user on the XOZ plane. The coordinate values of each coordinate point drawn by the user on the XOZ plane can be the coordinate values of the center point of the granular grid, and the corresponding coordinate duration is the duration of the user's trajectory within the granular grid. Specifically, in this embodiment of the invention, a two-dimensional array is defined, with a size equal to the size of the granular grid, and all its values are initialized to 0. When the user's touch point on the interface first falls into the granular grid, the corresponding two-dimensional array value is set to the initial value 0. As the user's touch point on the interface continues to fall into the granular grid, the corresponding two-dimensional array value is incremented by 1, thereby determining the duration based on the magnitude of the value and storing and updating the associated information of the coordinate values. For example... Figure 2 The trajectory shown in (b) has four segments that continuously fall into the granular grid. The duration within this granular grid is equal to the duration of each of its four constituent grids, so it needs to be rewritten (modified), i.e., represented as [X = x, Z = z, T = n]. In this way, the coordinate values of each point drawn by the user on the XOZ plane and the corresponding coordinate duration can be obtained. In simulating spatial audio, the dwell time of a sound source at a point in space can be a relative concept, i.e., the speed of motion is relative. Therefore, the T data of all points in the first baseline trajectory is normalized and compressed proportionally, so that the minimum value (assuming the number of granular grids n = 50 recorded in step 110) is reduced to 1, and other values are compressed proportionally.
[0041] like Figure 3As shown, after drawing, the initial trajectory, i.e., the first baseline, can be obtained. From Figure 3 As can be seen, since the user's trajectory is not regular, one Z value may correspond to multiple X values. The process of generating the first baseline based on the coordinate values of each coordinate point drawn by the user on the XOZ plane in this embodiment of the invention is as follows: the coordinate values of each coordinate point drawn by the user on the XOZ plane and the corresponding coordinate duration are arranged and stored sequentially according to the drawing order, generating multiple sequentially arranged arrays, thereby obtaining the first baseline. Each array includes the corresponding X coordinate value, Z coordinate value, and corresponding first coordinate duration. This method can effectively determine the order in which the user drew the first baseline.
[0042] In this embodiment of the invention, after obtaining the user's first baseline, the user-drawn first baseline is redrawn according to the sequentially arranged arrays in the first baseline to form a redrawn baseline. This is to confirm with the user whether the recorded data (i.e., the trajectory) is the data the user wants. The redrawn baseline carries the coordinate duration of each coordinate point in the first baseline. Color changes are used to represent the first coordinate duration of each different coordinate point in the redrawn baseline. Specifically, when performing the external redrawing of the first baseline, the first coordinate duration of each coordinate point is carried. In this embodiment of the invention, the duration data is processed using the ARGB format, with different colors on the color band representing different durations. RGB values are calculated based on the first coordinate duration in the array recorded by the granular grid; the longer the duration, the darker the color.
[0043] Step 120: Based on the array of coordinate values corresponding to each coordinate point on the first baseline, generate time length bars and Z-axis reference bars on the YOZ plane.
[0044] The coordinate value array includes X-axis coordinate values, Z-axis coordinate values, and the duration of the first coordinate. The time length column is used to limit the duration of each coordinate in the second baseline; the Z-axis reference column is used to limit the direction of trajectory change of the second baseline.
[0045] In this embodiment of the invention, before executing step 120, the method further includes: recording the coordinate values of each coordinate point drawn on the XOZ plane and the corresponding coordinate duration; a granular grid is provided on the XOZ plane; one coordinate point corresponds to one granular grid; and a first baseline is generated based on the coordinate values of each coordinate point drawn on the XOZ plane. Specifically, this may involve displaying the YOZ plane to the user; limiting the direction of trajectory change when the user draws on the YOZ plane using the Z-axis reference column; and limiting the second coordinate duration corresponding to the Y-axis coordinate value using the time length column.
[0046] Among them, such as Figure 3 As shown, since user trajectories are irregular, one Z value may correspond to multiple X values, meaning X is a multivalued function. When a multivalued function exists, there's a problem with the correspondence of the third dimension (Y-axis) data when projecting the coordinate data of the first baseline in the XOZ plane onto the YOZ plane. If the user selects the YOZ plane as the plane perpendicular to the XOZ plane containing the first baseline, then the area the user can draw next is... Figure 4 The rectangular strip in the image. For example... Figure 4 As shown, this is the trajectory when the first baseline is projected onto the YOZ plane. It can be seen that the projection is a line segment from A to B. Assume that when the user draws the baseline in the first step, the trajectory drawn is as follows... Figure 3 As shown, the projections from A to B onto the Z-axis overlap in multiple places. In the YOZ plane, the Z-axis represents the interval from A to B, and the Y-axis represents negative infinity to positive infinity (theoretically, but practically limited by the screen). This means the user can draw within the Z-value range from A to B, thus determining the corresponding Y-coordinate. Since the first baseline is a curve in the XOZ plane, using the Z-axis as a reference, determining the Z-value effectively locks the X-axis (due to the existence of multivalued functions, it cannot be directly determined, but the finite possible values of X can be locked). Similarly, in the YOZ plane, with the Z-value determined, the Y-value is determined, thus completing the three-dimensional coordinates of a spatial location point. When drawing the baseline, the user is the primary agent. When drawing the second baseline, i.e., the third dimension, on the YOZ plane, guidance and assistance are needed to help the user complete the drawing correctly. Therefore, the two columns refer to the Z-axis coordinates and the time length after normalization and compression in the second step. Therefore, this embodiment of the invention generates a Z-axis reference column indicating the direction of trajectory change according to the generation order of the coordinate value arrays corresponding to the first baseline. Based on the duration of the first coordinate in the coordinate value array [X=x, Z=z, T=n] corresponding to the first baseline and the order of the coordinate value arrays, a time length column is generated.
[0047] In one possible implementation, there are multiple Z-axis reference bars and multiple time length bars. That is, multiple Z-axis reference bars indicating the direction of trajectory change are generated sequentially according to the order of the coordinate value arrays corresponding to the first baseline, and multiple time length bars are generated sequentially according to the order of the coordinate value arrays corresponding to the first baseline and the first coordinate duration in each coordinate value array. Each Z-axis reference bar passes through the coordinate point corresponding to the Z-coordinate value in the coordinate value array corresponding to the first baseline and is parallel to the Y-axis. In other words, each Z-axis reference bar passes through a point on line segment AB and is parallel to the Y-axis. Each time length bar corresponds to the first coordinate duration in each coordinate value array, indicating the second coordinate duration corresponding to the Y-axis coordinate value. That is, the Y-axis coordinate value corresponding to a certain Z-coordinate value in the YOZ plane corresponds to the first coordinate duration of each XZ coordinate value array in the first baseline on the XOZ plane; that is, the second coordinate duration of the Y-axis coordinate value corresponding to a certain Z-coordinate value in the YOZ plane is consistent with the first coordinate duration of each XZ coordinate value array in the first baseline on the XOZ plane. In this embodiment of the invention, different durations can be represented by different colors; therefore, each time length bar has a different color due to the different durations. As can be seen from the baseline drawing process, different durations have different colors, so the color of the Z-axis varies in shade.
[0048] Step 130: Receive the second baseline drawn on the YOZ plane.
[0049] In one embodiment of the present invention, after the YOZ plane is set, the YOZ plane can be displayed to the user; the direction of trajectory change when the user draws on the YOZ plane is limited by the Z-axis reference column; and the duration of the second coordinate corresponding to the Y-axis coordinate value is limited by the time length column.
[0050] Specifically, at the initial stage of drawing the second baseline, a first Z-axis reference bar and a first time length bar are displayed. The first Z-axis reference bar corresponds to the first set of coordinate value arrays [X = x1, Z = z1, T = n1] in the first baseline; the first Z-axis reference bar passes through point Z1 of line segment AB on the YOZ plane and is parallel to the Y-axis. The time length of the first time length bar is n1. The user slides up and down along the first Z-axis reference bar to draw y1 within the time length of n1. As the user draws y1, the first time length bar gradually shortens until it disappears, at which point the drawing of y1 is complete, and the various values of y1 and their order of change within the time period n1 are recorded. Taking Z = z1 as an example, the user can slide back and forth on this axis to draw the trajectory. Due to the back-and-forth sliding, the trajectories overlap. The practical meaning is that, within the time period n1, with the X and Z values of the trajectory points determined, the Y value changes continuously over time. After drawing y1, the second Z-axis reference bar and the second time length bar are displayed, and the drawing operation continues. The specific process is the same as the drawing process of y1 described above, and will not be repeated. This continues until all the coordinate value arrays of the first baseline projected onto the AB line segment are traversed and drawn, resulting in the second baseline. The second baseline includes the y values corresponding to each coordinate value array. Due to the influence of multivalued functions, one z coordinate value in the first baseline corresponds to multiple x coordinate values. Therefore, the AB line segment projection on the YOZ plane has overlapping XOZ coordinates. In this embodiment of the invention, the directionality is determined by the storage order of each coordinate axis array in the first baseline (Z-axis reference bar), and supplemented by the time dimension (time length bar), to distinguish the overlapping area of the AB line segment. Specifically, let the Z value of the baseline trajectory be z1, z2, z3, ..., zi, zj, ..., zn. When z i-1 <z i <z i+1 When the difference between points i and i-1 is equal, it indicates that the trajectory direction of point i has not changed compared to i-1 (i.e., the difference between adjacent points has the same sign). When the difference between adjacent points has the same sign, it indicates that the trajectory direction of point i has changed, resulting in an overlapping area. Therefore, in this embodiment of the invention, the trajectory direction of the first baseline can be determined based on the z-coordinate values of each coordinate array in the first baseline, thereby determining the drawing trajectory direction of the second baseline.
[0051] Step 140: Generate a three-dimensional trajectory based on the first baseline and the second baseline.
[0052] Specifically, based on the second baseline, the Y-axis coordinate values corresponding to each of the coordinate value arrays in the first baseline are determined. Each of the coordinate value arrays is associated with and stored with its corresponding Y-axis coordinate value to generate a three-dimensional trajectory array, which includes [X = x, Z = z, Y = y, T = n']. A three-dimensional trajectory is generated based on the three-dimensional trajectory array.
[0053] The relationship between T=n in the first baseline and T=n' in the three-dimensional trajectory array is as follows:
[0054]
[0055] Here, T represents the duration. If the unit time is t (e.g., 1 second), then T = n * t, which is n times the unit time. Therefore, [X = x, Z = z, T = n] represents the duration along the straight line formed by X = x and Z = z, and [X = x, Y = y, Z = z, T = n'] represents the duration at the point X = x, Y = y, Z = z. There is also another form (which can be called the uncompressed mode), which expands T = n into n repeating points [X = x, Y = y, Z = z]. Both forms are equivalent and effectively depict a spatial trajectory with temporal attributes.
[0056] Step 150: Generate a three-dimensional audio trajectory based on the three-dimensional trajectory and the preset audio; the three-dimensional audio trajectory represents the motion trajectory of sound when the moving body moves in three-dimensional space.
[0057] In the scenario of simulating the trajectory of a moving object in three-dimensional space, after obtaining the three-dimensional trajectory, since the three-dimensional trajectory carries time information, a corresponding three-dimensional audio trajectory can be generated based on the preset audio and the three-dimensional trajectory. Then, the three-dimensional motion trajectory of the moving object can be simulated based on this three-dimensional audio trajectory. The moving object can be a flying animal, such as a bird, or an airplane, etc., and this embodiment of the invention does not impose specific limitations. It is understood that the audio and call volume of birds are generally within a preset audio volume range, and the position or trajectory of their audio reflects the position or trajectory of the bird in space. Therefore, the bird's motion trajectory can be generated based on this three-dimensional audio trajectory.
[0058] This invention introduces a fourth dimension of data—time—into three-dimensional space. This makes the spatial trajectory not only a change in position but also incorporates changes in time, resulting in a more nuanced simulation. This setting effectively solves the problem of drawing three-dimensional spatial trajectories on a two-dimensional plane, making the changes in three-dimensional trajectory more natural and fluid, and resulting in a more vivid and realistic spatial simulation. Adding the dimension of time allows the points on the trajectory to be both static and dynamic, enriching the simulated space.
[0059] This invention provides an embodiment of a second baseline drawn on the XOZ plane. Based on the coordinate value array corresponding to each coordinate point on the first baseline, a time length bar and a Z-axis reference bar are generated on the YOZ plane. The coordinate value array includes X-axis coordinate values, Z-axis coordinate values, and a first coordinate duration. The time length bar is used to limit the duration of each coordinate in the second baseline. The Z-axis reference bar is used to limit the direction of trajectory change of the second baseline. The second baseline drawn on the YOZ plane is received. Based on the first and second baselines, a three-dimensional trajectory is generated. Based on the three-dimensional trajectory and a preset audio, a three-dimensional audio trajectory is generated. The three-dimensional audio trajectory represents the sound trajectory of a moving object in three-dimensional space, enabling the drawing of a three-dimensional spatial trajectory from a two-dimensional plane, thus achieving more accurate and efficient trajectory drawing.
[0060] Figure 5 A schematic diagram of the structure of a three-dimensional spatial audio trajectory drawing device provided in an embodiment of the present invention is shown. Figure 5 As shown, the device 300 includes:
[0061] Acquisition module 310 is used to acquire the first baseline drawn on the XOZ plane;
[0062] The dual-column generation module 320 is used to generate a time length column and a Z-axis reference column on the YOZ plane based on the coordinate value array corresponding to each coordinate point on the first baseline; the coordinate value array includes X-axis coordinate values, Z-axis coordinate values, and the duration of the first coordinate; the time length column is used to limit the duration of each coordinate in the second baseline; the Z-axis reference column is used to limit the trajectory change direction of the second baseline;
[0063] Receiver module 330 is used to receive a second baseline drawn on the YOZ plane;
[0064] The trajectory generation module 340 is used to generate a three-dimensional trajectory based on the first baseline and the second baseline;
[0065] The audio trajectory generation module 350 is used to generate a three-dimensional audio trajectory based on the three-dimensional trajectory and the preset audio; the three-dimensional audio trajectory represents the motion trajectory of sound when a moving body moves in three-dimensional space.
[0066] In one optional approach, obtaining the first baseline drawn on the XOZ plane includes: recording the coordinate values of each coordinate point drawn on the XOZ plane and the corresponding coordinate duration; the XOZ plane is provided with a granular grid; one coordinate point corresponds to one granular grid; and generating the first baseline based on the coordinate values of each coordinate point drawn on the XOZ plane.
[0067] In an alternative approach, after obtaining the first baseline drawn on the XOZ plane, the method further includes: redrawing the first baseline to form a redrawn baseline; wherein the redrawn baseline carries the coordinate duration of each coordinate point in the first baseline.
[0068] In one alternative approach, color variations are used to represent the duration of coordinates at different points in the redrawn baseline.
[0069] In one optional approach, generating time length bars and Z-axis reference bars on the YOZ plane based on the coordinate value arrays corresponding to each coordinate point on the first baseline includes: generating time length bars based on the first coordinate duration in each coordinate value array corresponding to the first baseline and the order of the coordinate value arrays; and generating Z-axis reference bars indicating the direction of trajectory change according to the generation order of the coordinate value arrays corresponding to the first baseline.
[0070] In one alternative approach, before receiving the second baseline drawn on the YOZ plane, the method includes: limiting the direction of trajectory change when drawing the second baseline on the YOZ plane using the Z-axis reference bar; and limiting the duration of the second coordinate corresponding to the Y-axis coordinate value using the time length bar.
[0071] In one optional approach, generating a three-dimensional trajectory based on the first baseline and the second baseline includes: determining the Y-axis coordinate values corresponding to each of the coordinate value arrays based on the second baseline; and generating a three-dimensional trajectory based on the Y-axis coordinate values corresponding to each of the coordinate value arrays.
[0072] The specific working process of the three-dimensional spatial audio trajectory drawing device in this embodiment of the invention is largely the same as the specific process steps of the above method embodiment, and will not be repeated here.
[0073] This invention provides an embodiment of a second baseline drawn on the XOZ plane. Based on the coordinate value array corresponding to each coordinate point on the first baseline, a time length bar and a Z-axis reference bar are generated on the YOZ plane. The coordinate value array includes X-axis coordinate values, Z-axis coordinate values, and a first coordinate duration. The time length bar is used to limit the duration of each coordinate in the second baseline. The Z-axis reference bar is used to limit the direction of trajectory change of the second baseline. The second baseline drawn on the YOZ plane is received. Based on the first and second baselines, a three-dimensional trajectory is generated. Based on the three-dimensional trajectory and a preset audio, a three-dimensional audio trajectory is generated. The three-dimensional audio trajectory represents the sound trajectory of a moving object in three-dimensional space, enabling the drawing of a three-dimensional spatial trajectory from a two-dimensional plane, thus achieving more accurate and efficient trajectory drawing.
[0074] Figure 6The diagram shows a structural schematic of an electronic device provided in an embodiment of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the electronic device.
[0075] like Figure 6 As shown, the electronic device may include: a processor 402, a communications interface 404, a memory 406, and a communications bus 408.
[0076] The processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408. Communication interface 404 is used to communicate with other network elements such as clients or other servers. The processor 402 executes program 410, specifically performing the relevant steps described in the embodiment of the method for generating three-dimensional spatial audio trajectories.
[0077] Specifically, program 410 may include program code, which includes computer-executable instructions. Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The electronic device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or they may be processors of different types, such as one or more CPUs and one or more ASICs. Memory 406 is used to store program 410. Memory 406 may include high-speed RAM and may also include non-volatile memory, such as at least one disk storage device.
[0078] Specifically, program 410 can be called by processor 402 to cause the electronic device to perform the following operations:
[0079] Obtain the first baseline plotted on the XOZ plane;
[0080] Based on the coordinate value array corresponding to each coordinate point on the first baseline, a time length bar and a Z-axis reference bar are generated on the YOZ plane; the coordinate value array includes X-axis coordinate values, Z-axis coordinate values, and the duration of the first coordinate; the time length bar is used to limit the duration of each coordinate in the second baseline; the Z-axis reference bar is used to limit the direction of trajectory change of the second baseline;
[0081] Receive the second baseline drawn on the YOZ plane;
[0082] A three-dimensional trajectory is generated based on the first baseline and the second baseline;
[0083] A three-dimensional audio trajectory is generated based on the three-dimensional trajectory and the preset audio; the three-dimensional audio trajectory represents the motion trajectory of sound when a moving body moves in three-dimensional space.
[0084] In one optional approach, obtaining the first baseline drawn on the XOZ plane includes: recording the coordinate values of each coordinate point drawn on the XOZ plane and the corresponding coordinate duration; the XOZ plane is provided with a granular grid; one coordinate point corresponds to one granular grid; and generating the first baseline based on the coordinate values of each coordinate point drawn on the XOZ plane.
[0085] In an alternative approach, after obtaining the first baseline drawn on the XOZ plane, the method further includes: redrawing the first baseline to form a redrawn baseline; wherein the redrawn baseline carries the coordinate duration of each coordinate point in the first baseline.
[0086] In one alternative approach, color variations are used to represent the duration of coordinates at different points in the redrawn baseline.
[0087] In one optional approach, generating time length bars and Z-axis reference bars on the YOZ plane based on the coordinate value arrays corresponding to each coordinate point on the first baseline includes: generating time length bars based on the first coordinate duration in each coordinate value array corresponding to the first baseline and the order of the coordinate value arrays; and generating Z-axis reference bars indicating the direction of trajectory change according to the generation order of the coordinate value arrays corresponding to the first baseline.
[0088] In one alternative approach, before receiving the second baseline drawn on the YOZ plane, the method includes: limiting the direction of trajectory change when drawing the second baseline on the YOZ plane using the Z-axis reference bar; and limiting the duration of the second coordinate corresponding to the Y-axis coordinate value using the time length bar.
[0089] In one optional approach, generating a three-dimensional trajectory based on the first baseline and the second baseline includes: determining the Y-axis coordinate values corresponding to each of the coordinate value arrays based on the second baseline; and generating a three-dimensional trajectory based on the Y-axis coordinate values corresponding to each of the coordinate value arrays.
[0090] The specific working process of the electronic device in this embodiment of the invention is largely the same as the specific process steps of the above method embodiment, and will not be repeated here.
[0091] This invention provides an embodiment of a second baseline drawn on the XOZ plane. Based on the coordinate value array corresponding to each coordinate point on the first baseline, a time length bar and a Z-axis reference bar are generated on the YOZ plane. The coordinate value array includes X-axis coordinate values, Z-axis coordinate values, and a first coordinate duration. The time length bar is used to limit the duration of each coordinate in the second baseline. The Z-axis reference bar is used to limit the trajectory change direction of the second baseline. The second baseline drawn on the YOZ plane is received. Based on the first and second baselines, a three-dimensional trajectory is generated. Based on the three-dimensional trajectory and a preset audio, a three-dimensional audio trajectory is generated. The three-dimensional audio trajectory represents the sound trajectory of a moving object in three-dimensional space, enabling the drawing of a three-dimensional spatial trajectory from a two-dimensional plane, thus achieving more accurate and efficient trajectory drawing.
[0092] This invention provides a computer-readable storage medium storing at least one executable instruction that, when executed on an electronic device, causes the electronic device to perform the method for generating a three-dimensional spatial audio trajectory in any of the above method embodiments.
[0093] Executable instructions can be used to cause an electronic device to perform the following operations:
[0094] Obtain the first baseline plotted on the XOZ plane;
[0095] Based on the coordinate value array corresponding to each coordinate point on the first baseline, a time length bar and a Z-axis reference bar are generated on the YOZ plane; the coordinate value array includes X-axis coordinate values, Z-axis coordinate values, and the duration of the first coordinate; the time length bar is used to limit the duration of each coordinate in the second baseline; the Z-axis reference bar is used to limit the direction of trajectory change of the second baseline;
[0096] Receive the second baseline drawn on the YOZ plane;
[0097] A three-dimensional trajectory is generated based on the first baseline and the second baseline;
[0098] A three-dimensional audio trajectory is generated based on the three-dimensional trajectory and the preset audio; the three-dimensional audio trajectory represents the motion trajectory of sound when a moving body moves in three-dimensional space.
[0099] In one optional approach, obtaining the first baseline drawn on the XOZ plane includes: recording the coordinate values of each coordinate point drawn on the XOZ plane and the corresponding coordinate duration; the XOZ plane is provided with a granular grid; one coordinate point corresponds to one granular grid; and generating the first baseline based on the coordinate values of each coordinate point drawn on the XOZ plane.
[0100] In an alternative approach, after obtaining the first baseline drawn on the XOZ plane, the method further includes: redrawing the first baseline to form a redrawn baseline; wherein the redrawn baseline carries the coordinate duration of each coordinate point in the first baseline.
[0101] In one alternative approach, color variations are used to represent the duration of coordinates at different points in the redrawn baseline.
[0102] In one optional approach, generating time length bars and Z-axis reference bars on the YOZ plane based on the coordinate value arrays corresponding to each coordinate point on the first baseline includes: generating time length bars based on the first coordinate duration in each coordinate value array corresponding to the first baseline and the order of the coordinate value arrays; and generating Z-axis reference bars indicating the direction of trajectory change according to the generation order of the coordinate value arrays corresponding to the first baseline.
[0103] In one alternative approach, before receiving the second baseline drawn on the YOZ plane, the method includes: limiting the direction of trajectory change when drawing the second baseline on the YOZ plane using the Z-axis reference bar; and limiting the duration of the second coordinate corresponding to the Y-axis coordinate value using the time length bar.
[0104] In one optional approach, generating a three-dimensional trajectory based on the first baseline and the second baseline includes: determining the Y-axis coordinate values corresponding to each of the coordinate value arrays based on the second baseline; and generating a three-dimensional trajectory based on the Y-axis coordinate values corresponding to each of the coordinate value arrays.
[0105] This invention provides an embodiment of a second baseline drawn on the XOZ plane. Based on the coordinate value array corresponding to each coordinate point on the first baseline, a time length bar and a Z-axis reference bar are generated on the YOZ plane. The coordinate value array includes X-axis coordinate values, Z-axis coordinate values, and a first coordinate duration. The time length bar is used to limit the duration of each coordinate in the second baseline. The Z-axis reference bar is used to limit the direction of trajectory change of the second baseline. The second baseline drawn on the YOZ plane is received. Based on the first and second baselines, a three-dimensional trajectory is generated. Based on the three-dimensional trajectory and a preset audio, a three-dimensional audio trajectory is generated. The three-dimensional audio trajectory represents the sound trajectory of a moving object in three-dimensional space, enabling the drawing of a three-dimensional spatial trajectory from a two-dimensional plane, thus achieving more accurate and efficient trajectory drawing.
[0106] This invention provides a device for drawing three-dimensional spatial audio trajectories, used to execute the above-described method for generating three-dimensional spatial audio trajectories.
[0107] This invention provides a computer program that can be called by a processor to enable an electronic device to execute the method for generating a three-dimensional spatial audio trajectory in any of the above method embodiments.
[0108] This invention provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions that, when executed on a computer, cause the computer to perform the method for generating a three-dimensional spatial audio trajectory as described in any of the above method embodiments.
[0109] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the content of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0110] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0111] Similarly, it should be understood that, in order to streamline the invention and aid in understanding one or more of the various aspects of the invention, features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.
[0112] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0113] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. A method for generating a three-dimensional spatial audio trajectory, characterized in that, The method includes: Obtain the first baseline plotted on the XOZ plane; Based on the coordinate value array corresponding to each coordinate point on the first baseline, a time length bar and a Z-axis reference bar are generated on the YOZ plane; the coordinate value array includes X-axis coordinate values, Z-axis coordinate values, and the duration of the first coordinate; the time length bar is used to limit the duration of each coordinate in the second baseline; the Z-axis reference bar is used to limit the direction of trajectory change of the second baseline; Receive a second baseline drawn on the YOZ plane based on a Z-axis reference column and a time length column; wherein, the second baseline is obtained by traversing each set of coordinate value arrays of the first baseline projected onto the AB line segment, and sliding up and down along the Z-axis reference column corresponding to each set of coordinate value arrays to draw the Y-axis coordinate values within the time length of the time length column; the AB line segment is the trajectory formed when the first baseline is projected onto the YOZ plane; A three-dimensional trajectory is generated based on the first baseline and the second baseline; A three-dimensional audio trajectory is generated based on the three-dimensional trajectory and the preset audio; the three-dimensional audio trajectory represents the motion trajectory of sound when a moving body moves in three-dimensional space; The step of generating a three-dimensional trajectory based on the first baseline and the second baseline includes: Based on the second baseline, determine the Y-axis coordinate values corresponding to each of the coordinate value arrays; A three-dimensional trajectory is generated based on the Y-axis coordinate values corresponding to each of the aforementioned coordinate value arrays.
2. The method according to claim 1, characterized in that, The acquisition of the first baseline plotted on the XOZ plane includes: The coordinate values of each coordinate point drawn on the XOZ plane and the corresponding coordinate duration are recorded; a granular grid is set on the XOZ plane; one coordinate point corresponds to one granular grid; A first baseline is generated based on the coordinate values of each coordinate point drawn on the XOZ plane.
3. The method according to claim 1, characterized in that, After obtaining the first baseline plotted on the XOZ plane, the method further includes: The first baseline is redrawn to form a redrawn baseline; wherein the redrawn baseline carries the coordinate duration of each coordinate point in the first baseline.
4. The method according to claim 3, characterized in that, Color changes are used to represent the duration of coordinates at different points in the redrawn baseline.
5. The method according to any one of claims 1-4, characterized in that, The step of generating a time length bar and a Z-axis reference bar on the YOZ plane based on the coordinate value array corresponding to each coordinate point on the first baseline includes: Based on the duration of the first coordinate in each coordinate value array corresponding to the first baseline and the order of the coordinate value arrays, a time length column is generated; Generate a Z-axis reference column indicating the direction of trajectory change according to the generation order of each coordinate value array corresponding to the first baseline.
6. The method according to any one of claims 1-4, characterized in that, Before receiving the second baseline drawn on the YOZ plane based on the Z-axis reference column and the time length column, the method includes: The Z-axis reference column restricts the direction of trajectory change when drawing the second baseline on the YOZ plane; The time length bar limits the duration of the second coordinate corresponding to the Y-axis coordinate value.
7. A device for generating three-dimensional spatial audio trajectories, characterized in that, The device includes: The acquisition module is used to acquire the first baseline drawn on the XOZ plane; The dual-column generation module is used to generate a time length column and a Z-axis reference column on the YOZ plane based on the coordinate value array corresponding to each coordinate point on the first baseline. The coordinate value array includes X-axis coordinate values, Z-axis coordinate values, and the duration of the first coordinate. The time length column is used to limit the duration of each coordinate in the second baseline. The Z-axis reference column is used to limit the direction of trajectory change of the second baseline. The receiving module is used to receive a second baseline drawn on the YOZ plane based on a Z-axis reference column and a time length column; wherein, the second baseline is obtained by traversing each set of coordinate value arrays of the first baseline projected onto the AB line segment, and sliding up and down along the Z-axis reference column corresponding to each set of coordinate value arrays to draw the Y-axis coordinate values within the time length of the time length column; the AB line segment is the trajectory formed when the first baseline is projected onto the YOZ plane; The trajectory generation module is used to generate a three-dimensional trajectory based on the first baseline and the second baseline; An audio trajectory generation module is used to generate a three-dimensional audio trajectory based on the three-dimensional trajectory and a preset audio; the three-dimensional audio trajectory represents the motion trajectory of sound when a moving body moves in three-dimensional space; The trajectory generation module is further configured to: determine the Y-axis coordinate values corresponding to each of the coordinate value arrays based on the second baseline; and generate a three-dimensional trajectory based on the Y-axis coordinate values corresponding to each of the coordinate value arrays.
8. An electronic device, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation of the method for generating a three-dimensional spatial audio trajectory as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The storage medium stores at least one executable instruction, which, when executed on an electronic device, causes the electronic device to perform the operation of the method for generating a three-dimensional spatial audio trajectory as described in any one of claims 1-6.
Citation Information
Patent Citations
Audio making and decoding method and device
CN106448687A
Method and equipment for three-dimensional visualized movement of track data
CN106683037A