CN115116415A - Virtual musical instrument playing method, virtual musical instrument playing device and electronic equipment - Google Patents
Virtual musical instrument playing method, virtual musical instrument playing device and electronic equipment Download PDFInfo
- Publication number
- CN115116415A CN115116415A CN202210727002.5A CN202210727002A CN115116415A CN 115116415 A CN115116415 A CN 115116415A CN 202210727002 A CN202210727002 A CN 202210727002A CN 115116415 A CN115116415 A CN 115116415A
- Authority
- CN
- China
- Prior art keywords
- musical instrument
- target
- real
- controlled
- control
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 74
- 230000008859 change Effects 0.000 claims description 27
- 230000000875 corresponding effect Effects 0.000 description 82
- 230000006870 function Effects 0.000 description 46
- 230000008569 process Effects 0.000 description 21
- 238000012545 processing Methods 0.000 description 16
- 238000010586 diagram Methods 0.000 description 15
- 238000003384 imaging method Methods 0.000 description 14
- 230000003993 interaction Effects 0.000 description 14
- 238000006243 chemical reaction Methods 0.000 description 13
- 230000001960 triggered effect Effects 0.000 description 11
- 230000001276 controlling effect Effects 0.000 description 9
- 238000009527 percussion Methods 0.000 description 8
- 238000004891 communication Methods 0.000 description 5
- 238000002372 labelling Methods 0.000 description 5
- 230000001360 synchronised effect Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 239000000758 substrate Substances 0.000 description 4
- 230000003190 augmentative effect Effects 0.000 description 3
- 239000003990 capacitor Substances 0.000 description 3
- 230000007613 environmental effect Effects 0.000 description 3
- 210000000056 organ Anatomy 0.000 description 3
- 230000003068 static effect Effects 0.000 description 3
- 235000017166 Bambusa arundinacea Nutrition 0.000 description 2
- 235000017491 Bambusa tulda Nutrition 0.000 description 2
- 241001330002 Bambuseae Species 0.000 description 2
- 235000015334 Phyllostachys viridis Nutrition 0.000 description 2
- 230000003321 amplification Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 2
- 239000011425 bamboo Substances 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 230000002596 correlated effect Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000003199 nucleic acid amplification method Methods 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 229910000906 Bronze Inorganic materials 0.000 description 1
- 241000196324 Embryophyta Species 0.000 description 1
- 241000699670 Mus sp. Species 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 239000010974 bronze Substances 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- KUNSUQLRTQLHQQ-UHFFFAOYSA-N copper tin Chemical compound [Cu].[Sn] KUNSUQLRTQLHQQ-UHFFFAOYSA-N 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 230000005684 electric field Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000002184 metal Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 108091008695 photoreceptors Proteins 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10H—ELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
- G10H1/00—Details of electrophonic musical instruments
- G10H1/0008—Associated control or indicating means
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10H—ELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
- G10H1/00—Details of electrophonic musical instruments
- G10H1/32—Constructional details
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Acoustics & Sound (AREA)
- Multimedia (AREA)
- Electrophonic Musical Instruments (AREA)
Abstract
Description
技术领域technical field
本申请属于终端技术领域,具体涉及一种虚拟乐器演奏方法、虚拟乐器演奏装置及电子设备。The present application belongs to the technical field of terminals, and in particular relates to a method for playing a virtual musical instrument, a device for playing a virtual musical instrument, and an electronic device.
背景技术Background technique
音乐是人类灵魂的一部分,乐器则是音乐的载体。然而,对于一些体积较大的乐器,如钢琴、架子鼓等,用户无法随身携带,从而使得用户无法随时随地演奏乐器,给众多音乐爱好者造成很大的困扰。Music is a part of the human soul, and musical instruments are the carrier of music. However, for some large-sized musical instruments, such as pianos, drum sets, etc., users cannot carry them with them, so that users cannot play musical instruments anytime and anywhere, causing great trouble to many music lovers.
发明内容SUMMARY OF THE INVENTION
本申请实施例的目的是提供一种虚拟乐器演奏方法、虚拟乐器演奏装置及电子设备,能够实现电子设备的虚拟乐器功能,从而使得用户可以随时随地的演奏乐器。The purpose of the embodiments of the present application is to provide a method for playing a virtual musical instrument, a device for playing a virtual musical instrument, and an electronic device, which can realize the virtual musical instrument function of the electronic device, so that the user can play the musical instrument anytime and anywhere.
第一方面,本申请实施例提供了一种虚拟乐器演奏方法,应用于包括实感像素传感器的电子设备,该方法包括:通过实感像素传感器,获取目标界面中的主控对象相对于被控对象的运动信息;基于运动信息,播放目标音频;其中,不同的被控对象对应不同的乐器,或者,不同的被控对象对应同一个乐器的不同声部;目标音频包括至少一个乐器的至少一个乐音对应的音频。In a first aspect, an embodiment of the present application provides a method for playing a virtual musical instrument, which is applied to an electronic device including a RealSense pixel sensor. Motion information; based on the motion information, the target audio is played; wherein, different controlled objects correspond to different musical instruments, or different controlled objects correspond to different parts of the same musical instrument; the target audio includes at least one musical tone of at least one musical instrument corresponding to 's audio.
第二方面,本申请实施例提供了一种虚拟乐器演奏装置,应用于包括实感像素传感器的电子设备,该装置包括:获取单元,用于通过实感像素传感器,获取目标界面中的主控对象相对于被控对象的运动信息;播放单元,用于基于运动信息,播放目标音频;其中,不同的被控对象对应不同的乐器,或者,不同的被控对象对应同一个乐器的不同声部;目标音频包括至少一个乐器的至少一个乐音对应的音频。In a second aspect, an embodiment of the present application provides a virtual musical instrument performance device, which is applied to an electronic device including a real-sensing pixel sensor. The device includes: an acquisition unit configured to obtain, through the real-sensing pixel sensor, the relative relative value of a master control object in a target interface. the motion information of the controlled object; the playback unit is used to play the target audio based on the motion information; wherein, different controlled objects correspond to different musical instruments, or different controlled objects correspond to different parts of the same musical instrument; target The audio includes audio corresponding to at least one tone of at least one musical instrument.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器和存储器,存储器存储可在处理器上运行的程序或指令,程序或指令被处理器执行时实现如第一方面的虚拟乐器演奏方法的步骤。In a third aspect, an embodiment of the present application provides an electronic device, the electronic device includes a processor and a memory, the memory stores a program or an instruction that can be executed on the processor, and the program or instruction is executed by the processor to implement the first aspect The steps of the virtual instrument playing method.
第四方面,本申请实施例提供了一种可读存储介质,该可读存储介质上存储有程序或指令,程序或指令被处理器执行时实现如第一方面的虚拟乐器演奏方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored thereon, and when the program or instruction is executed by a processor, the steps of the virtual musical instrument performance method according to the first aspect are implemented.
第五方面,本申请实施例提供了一种芯片,该芯片包括处理器和通信接口,通信接口和处理器耦合,处理器用于运行程序或指令,实现如第一方面的虚拟乐器演奏方法的步骤。In a fifth aspect, an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run a program or an instruction to implement the steps of the virtual musical instrument performance method of the first aspect .
第六方面,本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如第一方面的虚拟乐器演奏方法的步骤。In a sixth aspect, an embodiment of the present application provides a computer program product, where the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the steps of the virtual musical instrument performance method of the first aspect.
在本申请实施例提供的虚拟乐器演奏方法中,对于包括实感像素传感器的电子设备,通过实感像素传感器获取电子设备的目标界面中的主控对象相对于被控对象的运动信息。其中,不同的被控对象对应不同的乐器,或者不同的被控对象对应同一个乐器的不同声部。在此基础上,根据主控对象相对于被控对象的运动信息,播放目标音频,该目标音频中包括至少一个乐器的至少一个乐音对应的音频。这样,增加了电子设备的人机交互模式,通过电子设备的目标界面中的主控对象相对于被控对象的运动信息,即可进行虚拟乐器演奏,从而实现了电子设备的虚拟乐器功能,从而使得用户可以随时随地演奏乐器。In the virtual musical instrument performance method provided by the embodiment of the present application, for the electronic device including the real-sensing pixel sensor, the motion information of the master object relative to the controlled object in the target interface of the electronic device is obtained through the real-sensing pixel sensor. Wherein, different controlled objects correspond to different musical instruments, or different controlled objects correspond to different parts of the same musical instrument. On this basis, the target audio is played according to the motion information of the master object relative to the controlled object, and the target audio includes audio corresponding to at least one musical tone of at least one musical instrument. In this way, the human-computer interaction mode of the electronic device is added, and the virtual musical instrument can be played through the motion information of the master object in the target interface of the electronic device relative to the controlled object, thereby realizing the virtual musical instrument function of the electronic device, thereby Allows users to play musical instruments anytime, anywhere.
附图说明Description of drawings
图1为本申请实施例提供的虚拟乐器演奏方法的流程示意图;1 is a schematic flowchart of a virtual musical instrument performance method provided by an embodiment of the present application;
图2为本申请实施例提供的架子鼓的结构示意图;Fig. 2 is the structural representation of the drum kit provided by the embodiment of this application;
图3为本申请实施例提供的被控对象的标记示意图;3 is a schematic diagram of marking a controlled object provided by an embodiment of the present application;
图4为本申请实施例提供的RGB像素的电路图;4 is a circuit diagram of an RGB pixel provided by an embodiment of the present application;
图5为本申请实施例提供的实感像素的电路图;FIG. 5 is a circuit diagram of a real-sensing pixel provided by an embodiment of the present application;
图6为本申请实施例提供的RGB像素和实感像素的对比示意图;6 is a schematic diagram of a comparison between RGB pixels and RealSense pixels provided by an embodiment of the present application;
图7为本申请实施例提供的实感像素传感器的像素布局示意图之一;7 is one of the schematic diagrams of the pixel layout of the RealSense pixel sensor provided by the embodiment of the present application;
图8为本申请实施例提供的实感像素传感器的像素布局示意图之二;FIG. 8 is the second schematic diagram of the pixel layout of the RealSense pixel sensor provided by the embodiment of the present application;
图9为本申请实施例提供的实感像素传感器的电路图;FIG. 9 is a circuit diagram of a real-sensing pixel sensor provided by an embodiment of the present application;
图10为本申请实施例提供的虚拟乐器演奏装置的结构框图;10 is a structural block diagram of a virtual musical instrument performance device provided by an embodiment of the application;
图11为本申请实施例提供的电子设备的结构框图;11 is a structural block diagram of an electronic device provided by an embodiment of the present application;
图12为本申请实施例提供的电子设备的硬件结构示意图。FIG. 12 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art fall within the protection scope of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between "first", "second", etc. The objects are usually of one type, and the number of objects is not limited. For example, the first object may be one or more than one. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the associated objects are in an "or" relationship.
本申请第一方面的实施例提出了一种虚拟乐器演奏方法,本申请实施例提供的虚拟乐器演奏方法的技术方案的执行主体可以为虚拟乐器演奏装置,具体可以根据实际使用需求确定,本申请实施例不作限定。为了更加清楚地描述本申请实施例提供的虚拟乐器演奏方法,下面方法实施例中以虚拟乐器演奏方法的执行主体为虚拟乐器演奏装置进行示例性地说明。The embodiment of the first aspect of the present application proposes a virtual musical instrument performance method. The execution subject of the technical solution of the virtual musical instrument performance method provided by the embodiment of the present application may be a virtual musical instrument performance device, which may be determined according to actual use requirements. The embodiment is not limited. In order to describe the virtual musical instrument performance method provided by the embodiments of the present application more clearly, in the following method embodiments, the execution subject of the virtual musical instrument performance method is exemplarily described as a virtual musical instrument performance apparatus.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的虚拟乐器演奏方法进行详细地说明。The virtual musical instrument performance method provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
如图1所示,本申请实施例提供一种虚拟乐器演奏方法,应用于包括实感像素传感器的电子设备,该方法可以包括下述步骤102和步骤104:As shown in FIG. 1 , an embodiment of the present application provides a method for playing a virtual musical instrument, which is applied to an electronic device including a RealSense pixel sensor. The method may include the
步骤102:通过实感像素传感器,获取目标界面中的主控对象相对于被控对象的运动信息。Step 102 : obtain motion information of the master object in the target interface relative to the controlled object through the real-sensing pixel sensor.
其中,上述电子设备可为智能手机、平板电脑等具备拍摄装置的智能设备,上述电子设备还可为具备AR(Augmented Reality,增强现实)功能的智能电子设备,如支持AR功能的智能手机、平板电脑、AR眼镜等智能设备。对于上述电子设备的具体形式,用户可根据实际情况进行设置,在此不作具体限制。Wherein, the above-mentioned electronic device may be a smart device with a camera, such as a smartphone and a tablet computer, and the above-mentioned electronic device may also be a smart electronic device with an AR (Augmented Reality, augmented reality) function, such as a smartphone, a tablet that supports the AR function Computers, AR glasses and other smart devices. The specific form of the above electronic device can be set by the user according to the actual situation, which is not specifically limited here.
进一步地,上述目标界面为现实场景在电子设备中的成像界面。具体地,在上述电子设备为具备拍摄装置的智能设备的情况下,上述目标界面为该电子设备的拍摄预览界面。在上述电子设备为具备AR功能的智能设备的情况下,上述目标界面则为该电子设备的虚拟显示界面,也即AR成像界面。对于上述目标界面的具体形式,可根据所使用的电子设备的具体情况进行限定,在此不作具体限制。Further, the above-mentioned target interface is an imaging interface of a real scene in an electronic device. Specifically, when the electronic device is a smart device with a photographing device, the target interface is a photographing preview interface of the electronic device. In the case where the electronic device is a smart device with AR function, the target interface is a virtual display interface of the electronic device, that is, an AR imaging interface. The specific form of the above target interface can be limited according to the specific situation of the electronic device used, and is not specifically limited here.
进一步地,上述主控对象为运动对象,上述被控对象为静止对象。在虚拟乐器演奏的过程中,上述主控对象为控制虚拟乐器进行发声的对象,上述被控对象则为与虚拟乐器相关联的对象,通过主控对象对被控对象的控制,实现虚拟乐器的发声。Further, the above-mentioned master object is a moving object, and the above-mentioned controlled object is a stationary object. During the performance of the virtual musical instrument, the above-mentioned master object is the object that controls the virtual musical instrument to sound, and the above-mentioned controlled object is the object associated with the virtual musical instrument. voice.
具体地,上述主控对象可包括用户可移动的物体,如筷子、金属条等,上述主控对象还可包括用户的手部。上述被控对象包括除了实体乐器之外的物体,如木块、木板、圆盘等,上述被控对象还可包括目标界面中的界面区域,如桌面或地面等平面在目标界面中的多个划分区域。Specifically, the above-mentioned main control object may include objects that the user can move, such as chopsticks, metal bars, etc., and the above-mentioned main control object may also include the user's hand. The above-mentioned controlled objects include objects other than physical musical instruments, such as wooden blocks, planks, discs, etc., and the above-mentioned controlled objects may also include interface areas in the target interface, such as multiple planes such as desktop or ground in the target interface. Divide the area.
其中,上述被控对象的数量可为多个,多个被控对象与上述目标界面中的多个界面区域或者多个物体一一对应。具体地,在上述电子设备为具备拍摄装置的智能设备的情况下,上述多个被控对象与电子设备拍摄到的多个物体或者多个界面区域一一对应。在上述电子设备为具备AR功能的智能设备的情况下,上述多个被控对象则与电子设备的AR成像界面中的多个物体或者多个界面区域一一对应。The number of the above-mentioned controlled objects may be multiple, and the multiple controlled objects correspond to multiple interface areas or multiple objects in the above-mentioned target interface one-to-one. Specifically, in the case where the electronic device is a smart device provided with a photographing device, the plurality of controlled objects correspond one-to-one with the plurality of objects or the plurality of interface areas photographed by the electronic device. In the case where the electronic device is a smart device with an AR function, the multiple controlled objects correspond to multiple objects or multiple interface areas in the AR imaging interface of the electronic device one-to-one.
在实际的应用过程中,用户可对上述主控对象以及被控对象进行标注,以建立被控对象与目标乐器之间的关联关系,以及建立主控对象与被控对象之间的控制关系,也即将主控对象设置为控制目标乐器进行发声的对象。In the actual application process, the user can mark the above-mentioned master object and the controlled object to establish the relationship between the controlled object and the target musical instrument, and to establish the control relationship between the master object and the controlled object, Also set the master object as the object that controls the sound of the target instrument.
具体地,在本申请实施例提出的虚拟乐器演奏方法中,用户可通过具备拍摄功能的电子设备对目标场景进行拍摄,或者通过具备AR功能的电子设备对目标场景进行AR成像。在此基础上,对电子设备的拍摄界面或AR成像界面中的多个物体或者多个界面区域进行识别确认,以确定多个被控对象。在此基础上,用户可对上述识别到的多个物体或者多个界面区域进行自定义标注,以建立实际场景中的多个物体或者多个界面区域与多个乐器之间的一一对应关系,或者建立实际场景中的多个物体或者多个界面区域与一个乐器中的多个声部之间的一一对应关系。Specifically, in the virtual musical instrument performance method proposed in the embodiments of the present application, the user can shoot the target scene through an electronic device with a shooting function, or perform AR imaging on the target scene through an electronic device with an AR function. On this basis, multiple objects or multiple interface areas in the photographing interface or AR imaging interface of the electronic device are identified and confirmed to determine multiple controlled objects. On this basis, the user can perform custom annotations on the identified multiple objects or multiple interface areas to establish a one-to-one correspondence between multiple objects or multiple interface areas in the actual scene and multiple musical instruments , or establish a one-to-one correspondence between multiple objects or multiple interface areas in the actual scene and multiple voices in an instrument.
其中,上述目标乐器可为架子鼓、编钟、排鼓、扬琴等自带敲击物体的乐器,上述目标乐器还可为钢琴、电子琴、二胡、古筝、口琴等不具备敲击物体,而需要按压、弹拨、吹奏等方式进行发音的乐器。对于上述目标乐器的具体类型,用户可根据实际情况进行选择,在此不作具体限制。Among them, the above-mentioned target musical instruments can be musical instruments with their own percussion objects such as drums, chimes, row drums, dulcimers, etc., and the above-mentioned target musical instruments can also be pianos, electronic organs, erhu, guzheng, harmonica, etc. that do not have percussion objects, but need to be pressed , plucked, played, etc. For the specific type of the above target musical instrument, the user can select it according to the actual situation, which is not specifically limited here.
可以理解的是,不同的乐器具备不同的乐音,相同的乐器也具备多个发声部位,且不同的发声部位对应不同的乐音。在演奏乐器时,通过不同乐音之间的相互配合,才能得到一首完整的音乐。因此,在对上述识别到的多个物体或者多个界面区域进行自定义标注时,也即对目标界面中的多个被控对象进行自定义标注时,具体可将上述多个被控对象自定义标注为不同的乐器,还可将上述多个被控对象组定义标注为同一乐器的不同声部,如钢琴的88个琴键、电子琴的各个琴键、编钟的各个青铜钟等。这样,通过对实际场景中的多个物体或者多个界面区域的虚拟弹奏,即可得到一首完整的音乐,从而实现电子设备的虚拟乐器功能,增加了电子设备的人机交互模式,以及使得用户可以随时随地演奏乐器。It can be understood that different musical instruments have different musical tones, and the same musical instrument also has multiple sounding parts, and different sounding parts correspond to different musical tones. When playing an instrument, a complete piece of music can only be obtained through the cooperation of different tones. Therefore, when custom labeling the above-identified multiple objects or multiple interface areas, that is, when custom labeling multiple controlled objects in the target interface, specifically, the above-mentioned multiple controlled objects can be automatically labeled. Different musical instruments can be defined and marked, and the above-mentioned multiple controlled object groups can also be defined and marked as different parts of the same musical instrument, such as the 88 keys of a piano, each key of an electronic organ, and each bronze bell of a chime. In this way, by virtually playing multiple objects or multiple interface areas in the actual scene, a complete piece of music can be obtained, thereby realizing the virtual musical instrument function of the electronic device, increasing the human-computer interaction mode of the electronic device, and Allows users to play musical instruments anytime, anywhere.
进一步地,对于架子鼓、编钟、排鼓、扬琴等自带敲击物体的乐器,可将实际场景中用户可移动的物体或者用户的手部自定义标注为上述乐器中的敲击物体,如鼓槌、敲击编钟的木槌、扬琴的琴竹等,以此增加用户进行虚拟弹奏时的真实性和交互性。Further, for musical instruments that have their own percussion objects, such as drums, chimes, row drums, and dulcimers, the movable objects of the user in the actual scene or the user's hands can be custom marked as the percussion objects in the above-mentioned musical instruments, such as Drumsticks, hammers for hitting chimes, bamboo for dulcimer, etc., in order to increase the authenticity and interactivity of users' virtual playing.
示例性地,如图2所示,实际的架子鼓可包括一个大鼓202、一个军鼓204、三个嗵鼓206至210、三个镲212至216这八个发声部,同时架子鼓还包括两个鼓槌。用户在通过具备摄像功能的智能设备模拟架子鼓进行虚拟弹奏时,可根据架子鼓的实际结构在电子设备的拍摄场景内放置多个物体,如图3中的物体302至320,进而对上述物体302至320进行自定义标注。具体地,如图3所示,将物体302定义为架子鼓中的大鼓202,将物体304定义为架子鼓中的军鼓204,将物体306、308以及310分别定义为架子鼓中的三个嗵鼓206、208以及210,将物体312、314以及316分别定义为架子鼓中的三个镲212、214以及216,以及将物体318和物体320分别定义为架子鼓的两个鼓槌。Illustratively, as shown in FIG. 2, an actual drum kit may include eight sounding parts, one
示例性地,用户在通过具备AR功能的智能设备模拟钢琴进行虚拟弹奏时,可根据钢琴的实际结构将电子设备的AR显示场景中的桌面划分为88个区域,并对上述88个区域进行自定义标注,以建立AR显示场景中的88个区域与实际的钢琴的88个琴键之间的一一对应关系,从而构建虚拟钢琴。具体地,上述88个区域分别记作区域1至区域88,钢琴的88个琴键分别记作琴键1至88,通过对88个区域进行自定义标注,建立AR显示场景中的区域1至区域88与钢琴的琴键1至88之间的一一对应关系。同时,建立用户双手与上述区域1至区域88之间的控制关系,也即将用户双手设置为控制虚拟钢琴进行发声的对象。Exemplarily, when a user simulates a piano through an AR-enabled smart device and performs virtual playing, the user can divide the desktop in the AR display scene of the electronic device into 88 areas according to the actual structure of the piano, and perform the above-mentioned 88 areas. Customize the annotations to establish a one-to-one correspondence between the 88 areas in the AR display scene and the 88 keys of the actual piano to build a virtual piano. Specifically, the above-mentioned 88 areas are respectively denoted as area 1 to area 88, and the 88 keys of the piano are respectively denoted as keys 1 to 88. By custom labeling the 88 areas, the area 1 to area 88 in the AR display scene are established One-to-one correspondence with piano keys 1 to 88. At the same time, a control relationship between the user's hands and the above-mentioned areas 1 to 88 is established, that is, the user's hands are set as objects for controlling the virtual piano to sound.
进一步地,上述被控对象为静止对象,上述主控对象为运动对象。在此基础上,上述运动信息为目标界面中的主控对象相对于各被控对象的运动信息,该运动信息具体可包括主控对象的实时位置信息、主控对象在每个位置的停留时长以及主控对象的实时运动速度。其中,上述实时运动速度具体为主控对象在每两个位置之间的实时运动速度,通过该实时运动速度来表征主控对象对于每个被控对象的敲击速度。进一步地,上述实时位置信息包括主控对象在目标界面中至少一个位置的位置坐标。Further, the above-mentioned controlled object is a stationary object, and the above-mentioned main control object is a moving object. On this basis, the above motion information is the motion information of the master object in the target interface relative to each controlled object, and the motion information may specifically include the real-time position information of the master object and the duration of the master object at each position. And the real-time movement speed of the master object. The above-mentioned real-time motion speed is specifically the real-time motion speed of the master object between every two positions, and the real-time motion speed is used to represent the tap speed of the master object to each controlled object. Further, the above-mentioned real-time location information includes the location coordinates of at least one location of the master object in the target interface.
另外,在实际的应用过程中,在通过上述电子设备进行虚拟弹奏时,上述多个被控对象还可被标注为多个乐器的多个声部。具体地,在通过上述电子设备进行虚拟弹奏时,用户可对电子设备的目标界面即拍摄预览界面或者AR成像界面中的多个物体或多个界面区域进行分区域标注,从而建立实际场景中的多个物体或者多个界面区域与多个乐器的不同声部之间的关联关系。In addition, in an actual application process, when virtual playing is performed by the electronic device, the plurality of controlled objects can also be marked as a plurality of parts of a plurality of musical instruments. Specifically, when performing virtual performance through the above-mentioned electronic device, the user can mark multiple objects or multiple interface areas in the target interface of the electronic device, that is, the shooting preview interface or the AR imaging interface, so as to establish the actual scene. The association between multiple objects or multiple interface areas and different parts of multiple instruments.
例如,用户可将电子设备的拍摄预览界面或者AR成像界面划分为左右两个区域,进而通过对左边区域中的多个物体或者多个界面区域的自定义标注,建立该部分实际场景中的多个物体或者多个界面区域与第一个乐器之间的关联关系,以及通过对右边区域中的多个物体或者多个界面区域的自定义标注,建立该部分实际场景中的多个物体或者多个界面区域与第二个乐器之间的关联关系,以此可同时实现多个乐器的多个声部的虚拟弹奏,进一步增加了电子设备的人机交互模式。For example, the user can divide the shooting preview interface or AR imaging interface of the electronic device into two areas, left and right, and then create multiple objects in the actual scene by custom annotations for multiple objects or multiple interface areas in the left area. The relationship between each object or multiple interface areas and the first instrument, and through the custom annotation of multiple objects or multiple interface areas in the right area, establish multiple objects or multiple objects in this part of the actual scene. The relationship between the first interface area and the second musical instrument can realize virtual playing of multiple parts of multiple musical instruments at the same time, which further increases the human-computer interaction mode of electronic equipment.
步骤104:基于运动信息,播放目标音频。Step 104: Based on the motion information, play the target audio.
其中,上述目标音频包括至少一个乐器的至少一个乐音对应的音频。Wherein, the above-mentioned target audio includes audio corresponding to at least one musical tone of at least one musical instrument.
进一步地,上述运动信息为电子设备的目标界面中的主控对象相对于多个被控对象的运动信息,该运动信息包括主控对象在目标界面中的实时位置信息、主控对象在每个位置的停留时长以及主控对象的实时运动速度。其中,上述实时运动速度具体为主控对象在每两个位置之间的实时运动速度,通过该实时运动速度来表征主控对象对于每个被控对象的敲击速度。上述实时位置信息包括主控对象在目标界面中至少一个位置的位置坐标。Further, the above-mentioned motion information is the motion information of the master object in the target interface of the electronic device relative to a plurality of controlled objects, and the motion information includes the real-time position information of the master object in the target interface, the master object in each The dwell time of the position and the real-time movement speed of the master object. The above-mentioned real-time motion speed is specifically the real-time motion speed of the master object between every two positions, and the real-time motion speed is used to represent the tap speed of the master object to each controlled object. The above-mentioned real-time position information includes the position coordinates of at least one position of the master object in the target interface.
在实际的应用过程中,上述运动信息可用于表征目标界面中的主控对象对多个被控对象的控制状态,也即上述运动信息用于表述实际场景中与主控对象相对应的目标物体,对与多个被控对象相对应的其他多个物体或多个界面区域的触碰情况。通过主控对象相对于多个被控对象的运动信息,来表征实际乐器的弹奏方式,从而实现虚拟弹奏的目的,得到目标音频。In the actual application process, the above motion information can be used to represent the control state of the main control object in the target interface to multiple controlled objects, that is, the above motion information is used to express the target object corresponding to the main control object in the actual scene , the touch situation of other multiple objects or multiple interface areas corresponding to multiple controlled objects. The playing mode of the actual musical instrument is represented by the motion information of the master object relative to the multiple controlled objects, so as to achieve the purpose of virtual playing and obtain the target audio.
具体地,在通过上述电子设备进行虚拟弹奏时,对电子设备的拍摄预览界面或虚拟显示界面中的多个物体或者多个界面区域进行标注,从而建立多个被控对象与多个乐器或者同一乐器的多个声部之间的一一对应关系。同时,对目标界面中的主控对象进行标注,以建立主控对象与被控对象之间的演奏控制关系。在此基础上,通过电子设备的实感像素传感器获取目标界面中主控对象相对于被控对象的运动信息,以确定实际场景中与主控对象相对应的目标物体,对与多个被控对象相对应的其他多个物体或多个界面区域的触碰情况,在确定主控对象触碰某一被控对象时,播放与该被控对象相对应的乐器音频,以此实现电子设备的虚拟乐器演奏功能,从而得到目标音频。Specifically, when performing virtual performance through the above-mentioned electronic device, multiple objects or multiple interface areas in the shooting preview interface or virtual display interface of the electronic device are marked, thereby establishing multiple controlled objects and multiple musical instruments or A one-to-one correspondence between multiple parts of the same instrument. At the same time, the master control object in the target interface is marked to establish a performance control relationship between the master control object and the controlled object. On this basis, the motion information of the master object relative to the controlled object in the target interface is obtained through the real-sensing pixel sensor of the electronic device to determine the target object corresponding to the master object in the actual scene. Corresponding to the touch situation of other objects or multiple interface areas, when it is determined that the master object touches a controlled object, the instrument audio corresponding to the controlled object is played, so as to realize the virtual Instrument performance function to get the target audio.
示例性地,用户在通过具备摄像功能的智能设备模拟架子鼓进行虚拟弹奏时,可根据架子鼓的实际结构在电子设备的拍摄场景内放置多个物体,如图3中的物体302至320,进而对上述物体302至320进行自定义标注。具体地,如图2和图3所示,将物体302定义为架子鼓中的大鼓202,将物体304定义为架子鼓中的军鼓204,将物体306、308以及310分别定义为架子鼓中的三个嗵鼓206、208以及210,将物体312、314以及316分别定义为架子鼓中的三个镲212、214以及216,以及将物体318和物体320分别定义为架子鼓的两个鼓槌。Exemplarily, when a user simulates a drum kit through a smart device with a camera function to perform virtual playing, he or she can place multiple objects in the shooting scene of the electronic device according to the actual structure of the drum kit, such as
在此基础上,通过实感像素实时获取物体318和物体320相对于物体302至316的运动信息,即获取物体302至316的固定位置坐标,以及获取物体318和物体320的实时位置坐标、运动速度以及物体318和物体320在每个位置处的停留时长。进一步地,根据物体302至316的固定位置坐标以及物体318和物体320的实时位置坐标,计算物体318和物体320分别与物体302至316之间的像素距离。在物体318或物体320与物体302至316中的任一物体之间的像素距离小于预设阈值时,确定物体318或物体320敲击该物体一次,同时获取物体318或物体320敲击该物体的时长,也即获取物体318或物体320与该物体之间的像素距离小于预设阈值的持续时长。在此基础上,电子设备根据物体318或物体320敲击该物体的具体次数以及每次敲击该物体的时长与速度,播放与该物体相对应的架子鼓发声部的音频。On this basis, the motion information of the
例如,在某一时间段内,电子设备检测到物体318分别以0.8米/秒、0.4米/秒、0.4米/秒的速度连续接近物体302三次,且三次物体318与物体302之间的像素距离小于预设阈值的持续时间分别为2秒、2秒、1秒。此时,电子设备便会连续三次播放鼓槌敲击架子鼓中的大鼓的音频。其中,第一次播放的大鼓音频的音量为80分贝,该分贝数与上述0.8米/秒相对应,且持续时间为2秒;第二次播放的大鼓音频的音量为40分贝,该分贝数与上述0.4米/秒相对应,且持续时间为2秒;第三次播放大鼓音频的音量为40分贝,该分贝数与上述0.4米/秒相对应,且持续时间为1秒。For example, within a certain period of time, the electronic device detects that the
示例性地,用户在通过具备AR功能的智能设备模拟钢琴进行虚拟弹奏时,可根据钢琴的实际结构将电子设备的AR显示场景中的桌面划分为88个区域,并对上述88个区域进行自定义标注,以建立AR显示场景中的88个区域与实际的钢琴的88个琴键之间的一一对应关系,构建虚拟钢琴。具体地,上述88个区域分别记作区域1至区域88,钢琴的88个琴键分别记作琴键1至88,通过对88个区域进行自定义标注,建立AR显示场景中的区域1至区域88与钢琴的琴键1至88之间的一一对应关系。同时,建立用户双手与上述区域1至区域88之间的控制关系,也即将用户双手设置为控制虚拟钢琴进行发声的对象。Exemplarily, when a user simulates a piano through an AR-enabled smart device and performs virtual playing, the user can divide the desktop in the AR display scene of the electronic device into 88 areas according to the actual structure of the piano, and perform the above-mentioned 88 areas. Customize the annotations to establish a one-to-one correspondence between the 88 areas in the AR display scene and the 88 keys of the actual piano to build a virtual piano. Specifically, the above-mentioned 88 areas are respectively denoted as area 1 to area 88, and the 88 keys of the piano are respectively denoted as keys 1 to 88. By custom labeling the 88 areas, the area 1 to area 88 in the AR display scene are established One-to-one correspondence with piano keys 1 to 88. At the same time, a control relationship between the user's hands and the above-mentioned areas 1 to 88 is established, that is, the user's hands are set as objects for controlling the virtual piano to sound.
在此基础上,通过实感像素实时获取用户双手相对于区域1至区域88的运动信息,即获取区域1至区域88的区域中心坐标,以及获取用户双手各手指头部的实时位置坐标、运动速度以及用户双手各手指头部在每个位置处的停留时长。进一步地,根据区域1至区域88的区域中心坐标以及用户双手各手指头部的实时位置坐标,计算用户双手各手指头部分别与区域1至区域88的区域中心之间的像素距离。在用户某一手指头部与区域1至区域88中的任一区域的区域中心之间的像素距离小于预设阈值时,确定该手指头部敲击该区域一次,同时获取该手指头部敲击该区域的时长,也即获取用户手指头部与该区域中心之间的像素距离小于预设阈值的持续时长。在此基础上,电子设备根据用户手指头部敲击该区域的具体次数以及每次敲击该区域的时长与速度,播放与该区域相对应的琴键音频。On this basis, the motion information of the user's hands relative to area 1 to area 88 is obtained in real time through the real-sense pixels, that is, the center coordinates of the area from area 1 to area 88 are obtained, and the real-time position coordinates and movement speed of the head of each finger of the user's hands are obtained. And the length of stay of the heads of the fingers of the user's hands at each position. Further, according to the area center coordinates of area 1 to area 88 and the real-time position coordinates of the head of each finger of the user's hands, the pixel distance between the head of each finger of the user's hands and the area center of area 1 to area 88 is calculated. When the pixel distance between the head of a finger of the user and the area center of any one of the areas 1 to 88 is smaller than the preset threshold, it is determined that the head of the finger taps the area once, and the head of the finger is obtained at the same time. The duration of hitting the area, that is, the duration in which the pixel distance between the head of the user's finger and the center of the area is less than a preset threshold is obtained. On this basis, the electronic device plays the key audio corresponding to the region according to the specific number of times the user's finger head taps the region and the duration and speed of each tap on the region.
例如,电子设备检测到用户右手食指以0.4米/秒的速度敲击区域56,在同一时刻,电子设备检测到用户左手中指以0.8米/秒的速度敲击区域18。其中,用户右手食指敲击区域56的持续时长为2秒,用户左手中指敲击区域18的持续时长为1秒。此时,电子设备便会同时开始播放区域56相对应的琴键56以及区域18相对应的琴键18的音频。其中,琴键56的音频播放音量为40分贝,该分贝数与上述0.4米/秒相对应,且持续时间为2秒;琴键18的音频播放音量则为80分贝,该分贝数与上述0.8米/秒相对应,且持续时间为1秒。For example, the electronic device detects that the user's right index finger taps the area 56 at a speed of 0.4 m/s, and at the same time, the electronic device detects that the user's left middle finger taps the area 18 at a speed of 0.8 m/s. The duration of the user's right index finger hitting the area 56 is 2 seconds, and the user's left middle finger hitting the area 18 is 1 second. At this time, the electronic device will start to play the audio of the keys 56 corresponding to the area 56 and the keys 18 corresponding to the area 18 at the same time. Among them, the audio playback volume of the key 56 is 40 decibels, and the decibel number corresponds to the above-mentioned 0.4 m/s, and the duration is 2 seconds; the audio playback volume of the key 18 is 80 decibels, and the decibel number is the same as the above-mentioned 0.8 m/s. corresponds to seconds and has a duration of 1 second.
通过本申请实施例提供的上述虚拟乐器演奏方法,对于包括实感像素传感器的电子设备,通过实感像素传感器获取电子设备的目标界面中的主控对象相对于被控对象的运动信息。其中,不同的被控对象对应不同的乐器,或者不同的被控对象对应同一个乐器的不同声部。在此基础上,根据主控对象相对于被控对象的运动信息,播放目标音频,该目标音频中包括至少一个乐器的至少一个乐音对应的音频。这样,增加了电子设备的人机交互模式,通过电子设备的目标界面中的主控对象相对于被控对象的运动信息,即可进行虚拟乐器演奏,从而实现了电子设备的虚拟乐器功能,使得用户可以随时随地演奏乐器。With the above-mentioned virtual musical instrument performance method provided by the embodiment of the present application, for an electronic device including a RealSense pixel sensor, the motion information of the master object relative to the controlled object in the target interface of the electronic device is obtained through the RealSense pixel sensor. Wherein, different controlled objects correspond to different musical instruments, or different controlled objects correspond to different parts of the same musical instrument. On this basis, the target audio is played according to the motion information of the master object relative to the controlled object, and the target audio includes audio corresponding to at least one musical tone of at least one musical instrument. In this way, the human-computer interaction mode of the electronic device is added, and the virtual musical instrument can be played through the motion information of the master object in the target interface of the electronic device relative to the controlled object, thereby realizing the virtual musical instrument function of the electronic device, making Users can play instruments anytime, anywhere.
在本申请实施例中,主控对象为运动对象,主控对象包括用户可移动的物体或者用户的手部;被控对象包括除了实体乐器之外的物体,或者目标界面中的界面区域;运动信息包括主控对象的实时位置信息、主控对象在每个位置的停留时长和主控对象的实时运动速度,其中,实时位置信息包括至少一个位置的位置坐标;目标界面包括电子设备的拍摄预览界面或者虚拟显示界面。In the embodiment of the present application, the main control object is a moving object, and the main control object includes a movable object of the user or the user's hand; the controlled object includes an object other than a physical musical instrument, or an interface area in a target interface; motion The information includes the real-time position information of the main control object, the staying time of the main control object at each position, and the real-time motion speed of the main control object, wherein the real-time position information includes the position coordinates of at least one position; the target interface includes the shooting preview of the electronic device interface or virtual display interface.
具体地,在通过电子设备进行虚拟弹奏时,对电子设备的拍摄预览界面或虚拟显示界面中除实体乐器之外的多个物体或者多个界面区域进行标注,也即对目标界面中的多个被控对象进行标注,从而建立多个被控对象与多个乐器或者同一乐器的多个声部之间的一一对应关系。同时,对目标界面中除被确定为被控对象之外的其他可移动物体或者用户的手部进行标注,也即对目标界面中的主控对象进行标注,以建立主控对象与被控对象之间的演奏控制关系。Specifically, when virtual playing is performed through an electronic device, multiple objects or multiple interface areas other than the physical musical instrument in the shooting preview interface or virtual display interface of the electronic device are marked, that is, multiple objects or multiple interface areas in the target interface are marked. Each controlled object is marked, thereby establishing a one-to-one correspondence between multiple controlled objects and multiple musical instruments or multiple parts of the same musical instrument. At the same time, mark other movable objects or the user's hand in the target interface other than the controlled object, that is, mark the main control object in the target interface, so as to establish the main control object and the controlled object. The performance control relationship between them.
在此基础上,通过电子设备的实感像素传感器获取目标界面中主控对象的实时位置坐标、主控对象在每个位置的停留时长以及主控对象在每两个位置之间的实时运动速度,以确定实际场景中与主控对象相对应的可移动物体或用户手部,对与多个被控对象相对应的其他多个物体或多个界面区域的触碰情况。在确定主控对象触碰某一被控对象时,播放与该被控对象相对应的乐器音频,以此实现电子设备的虚拟乐器演奏功能,得到目标音频。On this basis, the real-time position coordinates of the master object in the target interface, the staying time of the master object at each position, and the real-time movement speed of the master object between each two positions are obtained through the real-sensing pixel sensor of the electronic device. In order to determine the touch situation of the movable object or the user's hand corresponding to the master object in the actual scene to other objects or interface areas corresponding to the controlled objects. When it is determined that the master object touches a certain controlled object, the musical instrument audio corresponding to the controlled object is played, so as to realize the virtual musical instrument performance function of the electronic device and obtain the target audio.
本申请提供的上述实施例,通过电子设备的目标界面中的主控对象相对于被控对象的运动信息,即可模拟实际乐器进行演奏,增加了电子设备的人机交互模式,实现了电子设备的虚拟乐器功能,从而使得用户可以随时随地演奏乐器。In the above-mentioned embodiments provided in the present application, through the motion information of the master object in the target interface of the electronic device relative to the controlled object, the actual musical instrument can be simulated to perform, and the human-computer interaction mode of the electronic device is added, and the electronic device is realized. The virtual instrument function allows users to play instruments anytime, anywhere.
在本申请实施例中,上述步骤104具体可包括下述的步骤104a和步骤104b:In this embodiment of the present application, the foregoing
步骤104a:根据运动信息,确定主控对象控制被控对象的控制参数。Step 104a: According to the motion information, determine the control parameters for the master object to control the controlled object.
其中,上述运动信息为电子设备的目标界面中的主控对象相对于多个被控对象的运动信息,该运动信息包括主控对象在目标界面中的实时位置信息、主控对象在每个位置的停留时长以及主控对象的实时运动速度。The above motion information is the motion information of the master object in the target interface of the electronic device relative to a plurality of controlled objects, and the motion information includes the real-time position information of the master object in the target interface, the position of the master object at each position the duration of stay and the real-time movement speed of the master object.
其中,上述实时运动速度具体为主控对象在每两个位置之间的实时运动速度,通过该实时运动速度来表征主控对象对于每个被控对象的敲击速度。上述实时位置信息包括主控对象在目标界面中至少一个位置的位置坐标。The above-mentioned real-time motion speed is specifically the real-time motion speed of the master object between every two positions, and the real-time motion speed is used to represent the tap speed of the master object to each controlled object. The above-mentioned real-time position information includes the position coordinates of at least one position of the master object in the target interface.
进一步地,上述控制参数包括被触发的被控对象、控制时长、控制次数和控制速度。Further, the above-mentioned control parameters include the triggered controlled object, the control duration, the control times and the control speed.
在实际的应用过程中,上述运动信息可用于表征目标界面中的主控对象相对于多个被控对象的控制状态,通过主控对象相对于被控对象的运动信息,确定主控对象控制被控对象的控制参数。In the actual application process, the above motion information can be used to represent the control state of the master object in the target interface relative to multiple controlled objects. Through the motion information of the master object relative to the controlled objects, it is determined that the master object controls the controlled objects. Control parameters of the control object.
具体地,上述被控对象为静止物体,上述主控对象为运动物体。通过主控对象在目标界面中的实时位置坐标从多个被控对象中确定具体被触发的一个被控对象,也即确定与主控对象相对应的物体或用户手部,具体触碰的表示被控对象的某一物体或界面区域,并根据主控对象触碰被控对象的次数来确定上述控制次数。进一步地,根据主控对象在与被控对象相对应的位置的停留时长,确定主控对象对被控对象的控制时长,以及根据主控对象在与被控对象相对应的位置的实时运动速度,确定主控对象对被控对象的控制速度,也即确定主控对象对于被控对象的敲击速度。Specifically, the controlled object is a stationary object, and the main control object is a moving object. A controlled object that is specifically triggered is determined from the multiple controlled objects through the real-time position coordinates of the main control object in the target interface, that is, the object or the user's hand corresponding to the main control object is determined. A certain object or interface area of the controlled object, and the number of times of control is determined according to the number of times the master controlled object touches the controlled object. Further, according to the length of stay of the master object at the position corresponding to the controlled object, determine the control duration of the master object to the controlled object, and according to the real-time movement speed of the master object at the position corresponding to the controlled object , to determine the control speed of the master object to the controlled object, that is, to determine the tap speed of the master object to the controlled object.
步骤104b:按照控制参数,播放目标音频。Step 104b: Play the target audio according to the control parameters.
其中,上述控制参数表示主控对象对多个被控对象的控制状态,也即上述控制参数用于表述实际场景中与主控对象相对应的目标物体,对与多个被控对象相对应的其他多个物体或多个界面区域的触碰操作。Wherein, the above-mentioned control parameters represent the control state of the main control object on multiple controlled objects, that is, the above-mentioned control parameters are used to describe the target objects corresponding to the main controlled objects in the actual scene, and the control parameters corresponding to the multiple controlled objects are used to describe the target objects in the actual scene Touch operations for other multiple objects or multiple interface areas.
进一步地,上述控制参数包括被触发的被控对象、控制时长、控制次数和控制速度,上述目标音频包括至少一个乐器的至少一个乐音对应的音频。Further, the above-mentioned control parameters include the triggered controlled object, the control duration, the number of times of control, and the control speed, and the above-mentioned target audio includes audio corresponding to at least one musical tone of at least one musical instrument.
具体地,在根据主控对象相对于被控对象的运动信息,从多个被控对象中确定具体被触发的一个被控对象之后,再根据主控对象对该被控对象的控制次数、控制时长以及控制速度,播放与该被控对象相对应的乐器音频,以此实现电子设备的虚拟乐器演奏功能。在此基础上,通过用户控制主控对象对多个被控对象的连续操作,即可实现完整乐曲的演奏。Specifically, after determining a controlled object that is specifically triggered from a plurality of controlled objects according to the motion information of the master object relative to the controlled object, and then according to the number of times the master control object controls the controlled object, the control The duration and control speed are used to play the musical instrument audio corresponding to the controlled object, so as to realize the virtual musical instrument performance function of the electronic device. On this basis, through the continuous operation of multiple controlled objects by the user controlling the master control object, the performance of the complete music piece can be realized.
具体地,在根据主控对象对被控对象的控制次数、控制时长以及控制速度,播放与该被控对象相对应的乐器音频时,可以根据上述控制时长调整播放音频的时长,可以根据上述控制次数调整播放音频的次数,还可以根据上述控制速度调整播放音频的音量,以此得到符合用户要求的目标音频。Specifically, when playing the musical instrument audio corresponding to the controlled object according to the number of times, the control duration, and the control speed of the controlled object by the master control object, the duration of the audio playback can be adjusted according to the above-mentioned control duration, and the duration of the playback audio can be adjusted according to the above-mentioned control duration. The number of times to adjust the number of times to play the audio, and you can also adjust the volume of the played audio according to the above control speed, so as to obtain the target audio that meets the user's requirements.
本申请提供的上述实施例,在基于主控对象相对于被控对象的运动信息来播放目标音频时,具体根据主控对象相对于被控对象的运动信息,确定主控对象控制被控对象的控制参数,进而按照该控制参数,播放与被控对象相对应的目标音频。这样,根据主控对象对被控对象的具体控制参数,播放与被控对象相对应的目标音频,以此实现电子设备的虚拟乐器功能,从而使得用户可以随时随地演奏乐器。In the above-mentioned embodiment provided by the present application, when the target audio is played based on the motion information of the master object relative to the controlled object, it is specifically determined according to the motion information of the master object relative to the controlled object to determine the movement of the master object to control the controlled object. control parameters, and then play the target audio corresponding to the controlled object according to the control parameters. In this way, according to the specific control parameters of the master object to the controlled object, the target audio corresponding to the controlled object is played, so as to realize the virtual musical instrument function of the electronic device, so that the user can play the musical instrument anytime and anywhere.
在本申请实施例中,上述控制参数包括被控对象、控制时长、控制次数和控制速度,在此基础上,上述步骤104b具体可包括下述的步骤104b1:In the embodiment of the present application, the above-mentioned control parameters include the controlled object, the control duration, the number of times of control, and the control speed. On this basis, the above-mentioned step 104b may specifically include the following step 104b1:
步骤104b1:按照控制时长、控制次数和控制速度,播放与被控对象关联的乐器的至少一个乐音对应的音频。Step 104b1: Play audio corresponding to at least one musical tone of the musical instrument associated with the controlled object according to the control duration, the number of times of control, and the control speed.
具体地,在根据主控对象相对于被控对象的运动信息,从多个被控对象中确定具体被触发的一个被控对象之后,根据主控对象对该被控对象的控制次数、控制时长以及控制速度,播放与该被控对象关联的乐器的至少一个乐音对应的音频,以此实现电子设备的虚拟乐器演奏功能。在此基础上,通过用户控制主控对象对多个被控对象的连续操作,即可实现完整乐曲的演奏。Specifically, after determining a specifically triggered controlled object from a plurality of controlled objects according to the motion information of the master object relative to the controlled object, the controlled object is controlled according to the number of times and the control duration of the controlled object. And control the speed, play audio corresponding to at least one musical tone of the musical instrument associated with the controlled object, so as to realize the virtual musical instrument performance function of the electronic device. On this basis, through the continuous operation of multiple controlled objects by the user controlling the master control object, the performance of the complete music piece can be realized.
具体地,在上述多个被控对象与多个乐器相关联的情况下,在确定主控对象控制的某一被控对象之后,根据主控对象对该被控对象的控制次数、控制时长以及控制速度,播放与该被控对象关联的乐器音频。Specifically, in the case where the above-mentioned multiple controlled objects are associated with multiple musical instruments, after determining a controlled object controlled by the master control object, according to the number of times the master control object controls the controlled object, the control duration and the Controls the speed and plays the instrument audio associated with this plant.
进一步地,在上述多个被控对象与同一乐器的多个声部相关联的情况下,在确定主控对象控制的某一被控对象之后,根据主控对象对该被控对象的控制次数、控制时长以及控制速度,播放与该被控对象关联的乐器声部的音频。Further, in the case where the above-mentioned multiple controlled objects are associated with multiple parts of the same musical instrument, after determining a certain controlled object controlled by the master controlled object, the controlled object is controlled according to the number of times the controlled object is controlled by the master control object. , control the duration, and control the speed, and play the audio of the instrument part associated with the controlled object.
其中,在根据主控对象对被控对象的控制次数、控制时长以及控制速度,播放与该被控对象相对应的音频时,可以根据上述控制时长调整播放音频的时长,可以根据上述控制次数调整播放音频的次数,还可以根据上述控制速度调整播放音频的音量,以此得到符合用户要求的目标音频。Wherein, when the audio corresponding to the controlled object is played according to the control times, control duration and control speed of the controlled object by the master control object, the duration of the audio playback can be adjusted according to the above-mentioned control duration, and can be adjusted according to the above-mentioned control times. The number of times the audio is played, and the volume of the played audio can also be adjusted according to the above-mentioned control speed, so as to obtain the target audio that meets the user's requirements.
本申请提供的上述实施例,上述控制参数包括被控对象、控制时长、控制次数和控制速度,在此基础上,在按照控制参数播放目标音频时,具体按照控制时长、控制次数和控制速度,播放与被控对象关联的乐器的至少一个乐音对应的音频。这样,根据主控对象对被控对象的具体控制参数,按照相应的播放参数播放与被控对象相对应的乐器音频,能够灵活准确地控制虚拟乐器进行发声,从而得到符合用户要求的精准的目标音频,实现了电子设备的虚拟乐器功能,使得用户可以随时随地演奏乐器。In the above-mentioned embodiment provided by the present application, the above-mentioned control parameters include the controlled object, the control time, the number of times of control and the control speed. Audio corresponding to at least one tone of the musical instrument associated with the controlled object is played. In this way, according to the specific control parameters of the master object to the controlled object, the instrument audio corresponding to the controlled object is played according to the corresponding playback parameters, and the virtual musical instrument can be flexibly and accurately controlled to sound, so as to obtain an accurate target that meets the user's requirements. Audio, realizes the virtual musical instrument function of electronic devices, so that users can play musical instruments anytime and anywhere.
在本申请实施例中,在目标界面包括至少两个被控对象的情况下,上述步骤104a具体可包括下述的步骤104a1和步骤104a2:In this embodiment of the present application, when the target interface includes at least two controlled objects, the above step 104a may specifically include the following steps 104a1 and 104a2:
步骤104a1:根据运动信息,获取目标界面内主控对象与每个被控对象的实时像素距离。Step 104a1: Acquire the real-time pixel distance between the master object and each controlled object in the target interface according to the motion information.
其中,上述运动信息为电子设备的目标界面中的主控对象相对于多个被控对象的运动信息,该运动信息包括主控对象在目标界面中的实时位置信息,该实时位置信息包括主控对象在目标界面中至少一个位置的位置坐标。Wherein, the above-mentioned motion information is the motion information of the master object in the target interface of the electronic device relative to the plurality of controlled objects, the motion information includes real-time position information of the master object in the target interface, and the real-time position information includes the master object The position coordinates of at least one position of the object in the target interface.
进一步地,上述多个被控对象为目标界面中的静止对象,上述主控对象对目标界面中的运动对象。也就是说,在上述目标界面固定的情况下,上述被控对象在目标界面中的像素位置坐标是恒定不变的,上述主控对象在目标界面中的像素位置坐标则是实时变化的。在此基础上,可根据主控对象的实时像素位置坐标与每个被控对象的固定像素位置坐标,确定主控对象与每个被对象之间的实时像素距离,以便后续根据确定的实时像素距离对主控对象具体控制的被对象进行确定。Further, the above-mentioned multiple controlled objects are static objects in the target interface, and the above-mentioned master control objects are moving objects in the target interface. That is to say, when the target interface is fixed, the pixel position coordinates of the controlled object in the target interface are constant, and the pixel position coordinates of the master object in the target interface change in real time. On this basis, the real-time pixel distance between the master object and each controlled object can be determined according to the real-time pixel position coordinates of the master object and the fixed pixel position coordinates of each controlled object, so that the subsequent real-time pixel distance can be determined according to the determined real-time pixel position. The distance determines the controlled object specifically controlled by the master object.
示例性地,若目标界面中的第一被控对象的固定像素位置坐标为(x1,y1),主控对象在某一时刻的实时像素位置坐标为(x2,y2)。此时,主控对象与第一被控对象之间的实时像素距离则为 Exemplarily, if the fixed pixel position coordinates of the first controlled object in the target interface are (x 1 , y 1 ), the real-time pixel position coordinates of the master object at a certain moment are (x 2 , y 2 ). At this time, the real-time pixel distance between the master object and the first controlled object is
步骤104a2:将实时像素距离小于预设阈值的被控对象确定为可播放音频的被控对象。Step 104a2: Determine a controlled object whose real-time pixel distance is less than a preset threshold as a controlled object that can play audio.
其中,上述实时像素距离为主控对象在运动过程中与每个被控对象的像素距离,该实时像素距离可表征主控对象在运动过程中相对于每个被控对象接近状态,也即表征实际场景中与主控对象相对应的可移动物体或用户手部,对与多个被控对象相对应的其他多个物体或多个界面区域的触碰情况。Among them, the above real-time pixel distance is the pixel distance between the main control object and each controlled object during the movement process, and the real-time pixel distance can represent the proximity state of the main control object relative to each controlled object during the movement process, that is In the actual scene, the movable object corresponding to the master object or the user's hand touches other objects or interface areas corresponding to the controlled objects.
具体地,在根据主控对象在目标界面中的实时像素位置坐标,以及每个被控对象的固定像素位置坐标,对主控对象与每个被对象之间的实时像素距离进行确定之后,将主控对象与每个被对象之间的实时像素距离与预设阈值进行比较。在此基础上,在某一被控对象与主控对象之间的实时像素距离小于预设阈值的情况下,认为该被控对象为主控对象当前的控制对象,也即认为实际场景中与主控对象相对应的可移动物体或用户手部,成功触碰到与该被控对象所对应的物体或区域。此时,电子设备便会播放与该被控对象相对应的乐器音频。Specifically, according to the real-time pixel position coordinates of the master object in the target interface and the fixed pixel position coordinates of each controlled object, after the real-time pixel distance between the master object and each controlled object is determined, the The real-time pixel distance between the master object and each object is compared with a preset threshold. On this basis, when the real-time pixel distance between a controlled object and the main control object is less than the preset threshold, the controlled object is considered to be the current control object of the main control object, that is, the actual scene is considered to be the same as the control object. The movable object or the user's hand corresponding to the master object successfully touches the object or area corresponding to the controlled object. At this time, the electronic device will play the musical instrument audio corresponding to the controlled object.
其中,对于上述预设阈值的具体数值,用户可根据设备屏幕大小、实际物体之间的距离等实际情况进行设置,在此不作具体限制。The specific value of the above-mentioned preset threshold value can be set by the user according to the actual situation such as the screen size of the device, the distance between actual objects, etc., which is not specifically limited here.
本申请提供的上述实施例,在目标界面包括至少两个被控对象的情况下,根据主控对象相对于每个被控对象的运动信息,获取目标界面内主控对象与每个被控对象的实时像素距离,进而将实时像素距离小于预设阈值的被控对象确定为可播放音频的被控对象。这样,根据主控对象与每个被控对象的实时像素距离确定可播放音频的被控对象,保证了被控对象确定的准确性和实时性,进而保证了目标音频播放的准确度和流畅度,提升了电子设备虚拟演奏功能的可靠性。In the above-mentioned embodiment provided by this application, in the case that the target interface includes at least two controlled objects, the main control object and each controlled object in the target interface are obtained according to the motion information of the main control object relative to each controlled object. The real-time pixel distance is determined, and the controlled object whose real-time pixel distance is less than the preset threshold is determined as the controlled object that can play audio. In this way, the controlled object that can play audio is determined according to the real-time pixel distance between the main control object and each controlled object, which ensures the accuracy and real-time performance of the controlled object determination, thereby ensuring the accuracy and fluency of the target audio playback. , which improves the reliability of the virtual performance function of electronic devices.
在本申请实施例中,上述步骤104b1具体可包括下述的步骤104b11至步骤104b14:In this embodiment of the present application, the foregoing step 104b1 may specifically include the following steps 104b11 to 104b14:
步骤104b11:根据控制时长,调整目标音频的播放时长。Step 104b11: Adjust the playback duration of the target audio according to the control duration.
其中,上述运动信息包括主控对象在目标界面中的每个位置的停留时长,在此基础上,根据主控对象在与被控对象相对应的位置的停留时长,确定主控对象对被控对象的控制时长。Wherein, the above motion information includes the staying time of the master object at each position in the target interface. The duration of the object's control.
进一步地,在确定主控对象对被控对象的控制时长之后,根据该控制时长调整将要播放的与被控对象相对应的目标音频的播放时长。Further, after the control duration of the controlled object by the master object is determined, the playback duration of the target audio to be played corresponding to the controlled object is adjusted according to the control duration.
步骤104b12:根据控制次数,调整目标音频的播放频次。Step 104b12: Adjust the playback frequency of the target audio according to the control times.
其中,上述运动信息包括主控对象在目标界面中的实时位置信息,该实时位置信息包括主控对象在目标界面中至少一个位置的位置坐标。在此基础上,通过主控对象在目标界面中的实时位置坐标从多个被控对象中确定具体被控制的一个被控对象,也即确定与主控对象相对应的物体或用户手部,具体触碰的表示被控对象的某一物体或界面区域。在此基础上,根据主控对象触碰被控对象的次数来确定上述控制次数。The above motion information includes real-time position information of the master object in the target interface, and the real-time position information includes the position coordinates of at least one position of the master object in the target interface. On this basis, a specific controlled object is determined from the multiple controlled objects through the real-time position coordinates of the main control object in the target interface, that is, the object or the user's hand corresponding to the main control object is determined. The specific touch represents a certain object or interface area of the controlled object. On this basis, the number of times of control is determined according to the number of times the master object touches the controlled object.
进一步地,在确定主控对象对被控对象的控制次数之后,根据该控制次数调整将要播放的与被控对象相对应的目标音频的播放频次。Further, after determining the number of times the master control object controls the controlled object, the playing frequency of the target audio to be played corresponding to the controlled object is adjusted according to the number of times of control.
步骤104b13:根据控制速度,调整目标音频的播放音量。Step 104b13: Adjust the playback volume of the target audio according to the control speed.
其中,上述运动信息包括主控对象在目标界面中的实时运动速度,在此基础上,根据主控对象在与被控对象相对应的位置处的实时运动速度,确定主控对象对被控对象的控制速度,也即确定主控对象对于被控对象的敲击速度。Wherein, the above motion information includes the real-time motion speed of the master object in the target interface. The control speed, that is, to determine the tap speed of the master object to the controlled object.
进一步地,在确定主控对象对被控对象的控制速度之后,根据该控制速度调整将要播放的与被控对象相对应的目标音频的播放音量。Further, after determining the control speed of the master object to the controlled object, the playback volume of the target audio to be played corresponding to the controlled object is adjusted according to the control speed.
步骤104b14:按照播放时长、播放频次和播放音量,播放与被控对象关联的乐器的至少一个乐音对应的音频。Step 104b14: Play audio corresponding to at least one musical tone of the musical instrument associated with the controlled object according to the playing duration, the playing frequency and the playing volume.
具体地,在根据主控对象对被控对象的控制时长、控制次数以及控制速度分别调整目标音频的播放时长、播放频次以及播放音量之后,按照调整好的播放时长、播放频次以及播放音量,播放与被控对象关联的乐器的至少一个乐音对应的音频,以此实现电子设备的虚拟乐器演奏功能。在此基础上,通过用户控制主控对象对多个被控对象的连续操作,即可实现完整乐曲的演奏。Specifically, after adjusting the playback duration, playback frequency, and playback volume of the target audio according to the control duration, number of times, and control speed of the controlled object by the master control object, the playback duration, playback frequency, and playback volume are adjusted according to the adjusted playback duration, playback frequency, and playback volume. Audio corresponding to at least one musical tone of the musical instrument associated with the controlled object, thereby realizing the virtual musical instrument performance function of the electronic device. On this basis, through the continuous operation of multiple controlled objects by the user controlling the master control object, the performance of the complete music piece can be realized.
其中,在上述多个被控对象与多个乐器相关联的情况下,在确定主控对象控制的某一被控对象之后,按照调整好的播放时长、播放频次以及播放音量,播放与该被控对象关联的乐器音频。Wherein, in the case where the above-mentioned multiple controlled objects are associated with multiple musical instruments, after determining a controlled object controlled by the master control object, according to the adjusted playback duration, playback frequency and playback volume, the playback and The instrument audio associated with the control object.
进一步地,在上述多个被控对象与同一乐器的多个声部相关联的情况下,在确定主控对象控制的某一被控对象之后,按照调整好的播放时长、播放频次以及播放音量,播放与该被控对象关联的乐器声部的音频。Further, in the case where the above-mentioned multiple controlled objects are associated with multiple voice parts of the same musical instrument, after determining a certain controlled object controlled by the master control object, according to the adjusted playback duration, playback frequency and playback volume , which plays the audio of the instrument part associated with the controlled object.
示例性地,用户在通过具备摄像功能的智能设备模拟架子鼓进行虚拟弹奏时,可根据架子鼓的实际结构在电子设备的拍摄场景内放置多个物体,如图3中的物体302至320,进而对上述物体302至320进行自定义标注。具体地,如图2和图3所示,将物体302定义为架子鼓中的大鼓202,将物体304定义为架子鼓中的军鼓204,将物体306、308以及310分别定义为架子鼓中的三个嗵鼓206、208以及210,将物体312、314以及316分别定义为架子鼓中的三个镲212、214以及216,以及将物体318和物体320分别定义为架子鼓的两个鼓槌。Exemplarily, when a user simulates a drum kit through a smart device with a camera function to perform virtual playing, he or she can place multiple objects in the shooting scene of the electronic device according to the actual structure of the drum kit, such as
在此基础上,若在某一时间段内,电子设备检测到物体318分别以0.8米/秒、0.4米/秒、0.4米/秒的速度连续接近物体302三次,且三次物体318与物体302之间的像素距离小于预设阈值的持续时间分别为2秒、2秒、1秒。此时,电子设备便会连续三次播放鼓槌敲击架子鼓中的大鼓的音频。其中,第一次播放的大鼓音频的音量为80分贝,该分贝数与上述0.8米/秒相对应,且持续时间为2秒;第二次播放的大鼓音频的音量为40分贝,该分贝数与上述0.4米/秒相对应,且持续时间为2秒,第三次播放大鼓音频的音量为40分贝,该分贝数与上述0.4米/秒相对应,且持续时间为1秒。On this basis, if within a certain period of time, the electronic device detects that the
示例性地,用户在通过具备AR功能的智能设备模拟钢琴进行虚拟弹奏时,可根据钢琴的实际结构将电子设备的AR显示场景中的桌面划分为88个区域,并对上述88个区域进行自定义标注,以建立AR显示场景中的88个区域与实际的钢琴的88个琴键之间的一一对应关系,构建虚拟钢琴。具体地,上述88个区域分别记作区域1至区域88,钢琴的88个琴键分别记作琴键1至88,通过对88个区域进行自定义标注,建立AR显示场景中的区域1至区域88与钢琴的琴键1至88之间的一一对应关系。同时,建立用户双手与上述区域1至区域88之间的控制关系,也即将用户双手设置为控制虚拟钢琴进行发声的对象。Exemplarily, when a user simulates a piano through an AR-enabled smart device and performs virtual playing, the user can divide the desktop in the AR display scene of the electronic device into 88 areas according to the actual structure of the piano, and perform the above-mentioned 88 areas. Customize the annotations to establish a one-to-one correspondence between the 88 areas in the AR display scene and the 88 keys of the actual piano to build a virtual piano. Specifically, the above-mentioned 88 areas are respectively denoted as area 1 to area 88, and the 88 keys of the piano are respectively denoted as keys 1 to 88. By custom labeling the 88 areas, the area 1 to area 88 in the AR display scene are established One-to-one correspondence with piano keys 1 to 88. At the same time, a control relationship between the user's hands and the above-mentioned areas 1 to 88 is established, that is, the user's hands are set as objects for controlling the virtual piano to sound.
在此基础上,若电子设备检测到用户右手食指以0.4米/秒的速度敲击区域56,在同一时刻,电子设备检测到用户左手中指以0.8米/秒的速度敲击区域18。其中,用户右手食指敲击区域56的持续时长为2秒,用户左手中指敲击区域18的持续时长为1秒。此时,电子设备便会同时开始播放区域56相对应的琴键56以及区域18相对应的琴键18的音频。其中,琴键56的音频播放音量为40分贝,该分贝数与上述0.4米/秒相对应,且持续时间为2秒;琴键18的音频播放音量则为80分贝,该分贝数与上述0.8米/秒相对应,且持续时间为1秒。On this basis, if the electronic device detects that the user's right index finger taps the area 56 at a speed of 0.4 m/s, at the same time, the electronic device detects that the user's left middle finger taps the area 18 at a speed of 0.8 m/s. The duration of the user's right index finger hitting the area 56 is 2 seconds, and the user's left middle finger hitting the area 18 is 1 second. At this time, the electronic device will start to play the audio of the keys 56 corresponding to the area 56 and the keys 18 corresponding to the area 18 at the same time. Among them, the audio playback volume of the key 56 is 40 decibels, and the decibel number corresponds to the above-mentioned 0.4 m/s, and the duration is 2 seconds; the audio playback volume of the key 18 is 80 decibels, and the decibel number is the same as the above-mentioned 0.8 m/s. corresponds to seconds and has a duration of 1 second.
本申请提供的上述实施例,在根据主控对象相对于被控对象的运动信息,确定被触发的被控对象以及主控对象对该被控对象的控制时长、控制次数以及控制速度之后,根据确定的控制时长、控制次数以及控制速度分别调整目标音频的播放时长、播放频次以及播放音量,进而按照调整好的播放时长、播放频次以及播放音量,播放与被触发的被控对象关联的乐器的至少一个乐音对应的音频。这样,根据主控对象对被控对象的具体控制参数,按照相应的播放参数播放与被控对象相对应的乐器音频,能够灵活准确地控制虚拟乐器进行发声,从而得到符合用户要求的目标音频,实现了电子设备的虚拟乐器功能。In the above-mentioned embodiment provided by the present application, after determining the triggered controlled object and the control duration, control times and control speed of the controlled object by the main control object according to the motion information of the main control object relative to the controlled object, according to The determined control duration, control times and control speed adjust the playback duration, playback frequency and playback volume of the target audio respectively, and then play the instrument associated with the triggered controlled object according to the adjusted playback duration, playback frequency and playback volume. Audio corresponding to at least one tone. In this way, according to the specific control parameters of the master object to the controlled object, and play the musical instrument audio corresponding to the controlled object according to the corresponding playback parameters, the virtual musical instrument can be flexibly and accurately controlled to sound, so as to obtain the target audio that meets the user's requirements. The virtual instrument function of electronic equipment is realized.
在本申请实施例中,上述实感像素传感器包括多个实感像素,在此基础上,上述步骤102具体可包括下述的步骤102a至步骤102c:In the embodiment of the present application, the above-mentioned real-sensing pixel sensor includes a plurality of real-sensing pixels. On this basis, the above-mentioned
步骤102a:实时获取多个实感像素的像素变化值。Step 102a: Acquire pixel change values of a plurality of real-time pixels in real time.
其中,上述实感像素传感器上还设置有多个RGB(Red-Green-Blue,三原色)像素。在实际的应用过程中,上述实感像素传感器可按照预设密度将多个实感像素插入由RGB像素组成的图像传感器中得到,以此图像传感器的高速抓取运动物体轮廓的能力。Wherein, a plurality of RGB (Red-Green-Blue, three primary colors) pixels are further arranged on the above-mentioned RealSense pixel sensor. In the actual application process, the above-mentioned real-sensing pixel sensor can be obtained by inserting a plurality of real-sensing pixels into an image sensor composed of RGB pixels according to a preset density, so that the image sensor has the ability to capture the outline of a moving object at a high speed.
其中,上述预设密度具体可取2.5%、3%、3.5%等数值,在实际的应用过程中,用户可根据实际需求对上述预设密度的具体取值进行设置,在此不作具体限制。Wherein, the above-mentioned preset density can take values such as 2.5%, 3%, 3.5%, etc. In actual application, the user can set the specific value of the above-mentioned preset density according to actual needs, which is not specifically limited here.
具体地,如图7中的(a)所示,在将多个实感像素702插入由RGB像素704组成的图像传感器中时,可将上述多个实感像素702内嵌在多个RGB像素704之间,以此构成相应的像素阵列。其中,每个像素阵列均由32×32个像素点组成。Specifically, as shown in (a) of FIG. 7 , when a plurality of
进一步地,由于整个像素阵列铺设于衬底的中间部位,为了便于像素阵列的安装和固定,可在衬底上预留有空白部位。具体地,如图7中的(b)所示,像素阵列708和衬底706均为长方形结构,衬底706的上部预留的空白部位的宽度为L1,两侧的空白部位的宽度为L2,下部预留的空白部位的宽度为L3。Further, since the entire pixel array is laid on the middle part of the substrate, in order to facilitate the installation and fixation of the pixel array, a blank part may be reserved on the substrate. Specifically, as shown in (b) of FIG. 7 , the
在实际的应用过程中,上述L1具体可为72μm,L2具体可为88μm,L3具体可为96μm,对于上述L1、L2、L3的具体取值,用户可根据实际情况进行设置,在此不作具体限制。In the actual application process, the above-mentioned L 1 can be 72 μm, the L 2 can be 88 μm, and the L 3 can be 96 μm. For the above-mentioned specific values of L 1 , L 2 , and L 3 , the user can choose according to the actual situation. settings, which are not specifically limited here.
进一步地,如图8所示,在将多个实感像素802插入由RGB像素804组成的图像传感器中时,还可将上述多个实感像素802安插在多个RGB像素804的上方,如RGB像素804上方插入两行实感像素802,以此构成相应的像素阵列。Further, as shown in FIG. 8, when a plurality of real-
在此基础上,上述图像传感器的电路图便可如图9所示,在多行RGB像素的上方插入两行实感像素C。其中,RGB像素包括R像素、B像素、Gr像素以及Gb像素,该RGB像素用于对实际场景进行感光,并通过第一信号放大器904对RGB像素采集到的光线信号进行放大,得到第一电压信号,进而通过第一模数转换器906将第一电压信号转换为第一数字像素值,以此输出高清彩图。而实感像素则会使用固定曝光和更高的频率对环境亮度进行采集,并通过第二信号放大器902对实感像素采集到的光线信号进行放大,得到第二电压信号,进而通过第二模数转换器908将第二电压信号转换为第二数字像素值,并输出给图像处理器进行计算,从而获取视场内的运动状态信息,以为后续处理做参考。On this basis, the circuit diagram of the above-mentioned image sensor can be shown in FIG. 9 , and two rows of real-sensing pixels C are inserted above the multiple rows of RGB pixels. Among them, the RGB pixels include R pixels, B pixels, Gr pixels and Gb pixels. The RGB pixels are used to photosensitive the actual scene, and the light signals collected by the RGB pixels are amplified by the
在实际的应用过程中,对于上述多个实感像素的在RGB像素中的安插方式,用户可根据实际情况进行设置,在此不作具体限制。In the actual application process, the user can set the arrangement of the above-mentioned multiple RealSense pixels in the RGB pixels according to the actual situation, which is not specifically limited here.
进一步地,RGB像素的内部电路结构如图4所示。如图4所示,RGB像素的内部电路结构为PPD(Pinned Photodiode Pixel,钉扎光电二极管像素)结构。该PPD结构包括一个PD1的感光区,即感光二极管,以及4个晶体管,即一个复位三极管RST、一个浮置开关TX1、一个行选择器SET以及一个信号放大器SF。Further, the internal circuit structure of the RGB pixel is shown in FIG. 4 . As shown in FIG. 4 , the internal circuit structure of the RGB pixel is a PPD (Pinned Photodiode Pixel, pinned photodiode pixel) structure. The PPD structure includes a photosensitive area of PD1, ie, a photosensitive diode, and 4 transistors, ie, a reset transistor RST, a floating switch TX1, a row selector SET, and a signal amplifier SF.
可以理解的是,PPD结构允许CDS(Correlated Double Sampling,相关双采样)电路的引入,从而可以消除复位引入的KTC噪声,以及MOS管引入的1/f噪声和offset噪声。其中,1/f噪声又叫闪烁噪声或低频噪声,上述PPD结构的工作过程具体可包括下述的步骤202至步骤210:It can be understood that the PPD structure allows the introduction of a CDS (Correlated Double Sampling, correlated double sampling) circuit, so that the KTC noise introduced by the reset, and the 1/f noise and the offset noise introduced by the MOS transistor can be eliminated. The 1/f noise is also called flicker noise or low-frequency noise. The working process of the above-mentioned PPD structure may specifically include the following
步骤202:曝光。RST和TX1同时打开,以清空PD1,然后两者断开开始曝光,光照射产生的“电子-空穴对”会因PD1电场的存在而分开,使得电子移向N区,空穴则移向P区。Step 202: Exposure. RST and TX1 are turned on at the same time to empty PD1, and then the two are disconnected to start exposure. The "electron-hole pairs" generated by light irradiation will be separated by the presence of the PD1 electric field, so that electrons move to the N region, and holes move to the Area P.
步骤204:复位。在曝光结束时,激活RST,将FD1复位到高电平。Step 204: Reset. At the end of the exposure, RST is activated, resetting FD1 to high.
步骤206:复位电平读出。复位完成后,读出FD1复位电平,其中包含MOS管的offset噪声、1/f噪声以及复位引入的KTC噪声,并将读出的复位电平信号存储在第一个电容中。Step 206: read out the reset level. After the reset is completed, read out the reset level of FD1, which includes the offset noise of the MOS transistor, the 1/f noise and the KTC noise introduced by the reset, and store the read-out reset level signal in the first capacitor.
步骤208:电荷转移。激活TX1,将电荷从感光区PD1完全转移到FD1。Step 208: Charge transfer. Activation of TX1 completely transfers charge from photoreceptor PD1 to FD1.
信号电平读出:将FD1的电压信号读出到第二个电容,该电压信号包括光电转换产生的信号以及运放产生的offset噪声、1/f噪声、复位引入的KTC噪声。Signal level readout: read out the voltage signal of FD1 to the second capacitor, the voltage signal includes the signal generated by photoelectric conversion and the offset noise, 1/f noise, and KTC noise introduced by reset.
步骤210:信号输出。将存储在两个电容中的信号相减,如采用CDS电路,即可消除像素中的主要噪声,消除噪声后的信号再经过信号放大器SF模拟放大,以及经过模数转换采样,即可实现数字化信号输出。Step 210: Signal output. Subtract the signals stored in the two capacitors. If the CDS circuit is used, the main noise in the pixel can be eliminated. After the noise is eliminated, the signal is then analog amplified by the signal amplifier SF, and then sampled by analog-to-digital conversion, which can be digitized. signal output.
进一步地,实感像素的内部电路结构如图5所示。如图5所示,实感像素的内部电路包括第一电流放大单元502、模数转换单元503、逻辑判断单元504、控制单元505、开关单元506及第二电流放大单元507。Further, the internal circuit structure of the RealSense pixel is shown in FIG. 5 . As shown in FIG. 5 , the internal circuit of the RealSense pixel includes a first
其中,第一电流放大单元502的输出端与模数转换单元503的输入端连接,模数转换单元503的输出端与逻辑判断单元504的输入端连接,逻辑判断单元504的输出端与控制单元505的输入端连接。进一步地,开关单元506设置在第一电流放大单元502、第二电流放大单元507以及控制单元505之间。The output end of the first
具体地,在实感像素电路的工作过程中,参见图5示出的电路图,光电二极管PD1采集到的光线经过第一电流放大单元502放大之后进入模数转换单元503,由模数转换单元503将放大的电信号转换为数字信号,该数字信号被继续输送至逻辑判断单元504,当逻辑判断单元504判断该数字信号的变化量超过预设的一个阈值范围时,也即当逻辑判断单元504判断该数字信号的变化量大于预设的最大阈值VH或小于最小阈值VL时,则由控制单元505根据逻辑判断单元504的逻辑判断结果生成相应的控制信号,并将该控制信号传输至开关单元506,以控制开关单元506打开开关,并由开关单元506的第二端输出模拟信号。Specifically, in the working process of the real-sensing pixel circuit, referring to the circuit diagram shown in FIG. 5 , the light collected by the photodiode PD1 is amplified by the first
其中,VH和VL分别是根据上一时钟频率该实感像素的数字信号值与预设阈值确定,VH为上一时钟频率该实感像素的数字信号值加上预设阈值,VL为上一时钟频率该实感像素的数字信号值减去预设阈值。Wherein, VH and VL are respectively determined according to the digital signal value of the real-sensing pixel at the last clock frequency and the preset threshold, VH is the digital signal value of the real-sensing pixel at the last clock frequency plus the preset threshold, and VL is the last clock frequency. The digital signal value of the photorealistic pixel is subtracted by a preset threshold.
进一步地,上述开关单元506具体可为多路复用开关,以从所有实感像素所获取的模拟或数字输入信号中选择某个或多个信号并将其转发至实感像素传感器内部的信号处理系统,从而供信号处理系统读出。Further, the above-mentioned
另外,第二电流放大单元507和开关单元506形成了另一条电路结构,而该条电路结构与第一电流放大单元502、模数转换单元503、逻辑判断单元504、控制单元505及开关单元506组成的电路结构相互配合以实现相位对焦功能。In addition, the second current amplifying
由此可见,实感像素和RGB像素的差异在于,RGB像素要在一个时间段内对光信息做积分后按照顺序逐个读出,且上述时间段的长短与帧率相关。而实感像素可以分别独立地随着像素时钟频率实时感知外界环境亮度变化,并将环境亮度的变换转化成像素值的变化。如果某个实感像素的像素值的变化量超过预设的阈值,则会上报系统要求读出,并且输出带有坐标信息、亮度信息、时间信息的数据包。因此,相较于RGB像素,实感像素可更加清楚地捕捉到运动中的物体的运动信息,如图6所示,序号602是人眼看到的图像,序号604是RGB像素记录的图像,序号606则是实感像素记录的图像。It can be seen that the difference between RealSense pixels and RGB pixels is that RGB pixels need to integrate light information in a period of time and then read them out one by one in sequence, and the length of the above period is related to the frame rate. The real-sensing pixels can independently perceive the change of the brightness of the external environment in real time with the pixel clock frequency, and convert the change of the brightness of the environment into the change of the pixel value. If the change of the pixel value of a certain RealSense pixel exceeds the preset threshold, the system will be reported to the system for reading, and a data packet with coordinate information, brightness information, and time information will be output. Therefore, compared with RGB pixels, RealSense pixels can more clearly capture the motion information of objects in motion. As shown in FIG. 6 ,
步骤102b:在多个实感像素中目标实感像素的像素变化值位于预设阈值范围之外的情况下,输出目标信息。Step 102b: In the case where the pixel change value of the target real-sensing pixel is outside the preset threshold range among the plurality of real-sensing pixels, output the target information.
其中,上述目标信息包括:目标实感像素的位置信息、环境亮度信息、时间信息。如图5所示,相较于RGB像素的电路图,实感像素的电路图增加了逻辑判断单元504,逻辑判断单元504用于判断当前时刻的像素值和前一时刻的像素值的差值是否大于预设阈值,并可在差值大于预设阈值时,输出当前时刻的像素值。Wherein, the above target information includes: position information, ambient brightness information, and time information of the target real-sensing pixel. As shown in FIG. 5, compared with the circuit diagram of the RGB pixel, the circuit diagram of the real-sensing pixel adds a
具体地,实感像素用于实时感知外界环境亮度变化,将环境亮度的变换转化成电流的变化。如图5所示,光电二极管PD1采集到的光线经过第一电流放大单元502放大之后进入模数转换单元503,由模数转换单元503将放大的电信号转换为数字信号,该数字信号被继续输送至逻辑判断单元504。当逻辑判断单元504判断该数字信号超出预设的阈值范围时,也即当逻辑判断单元504判断该数字信号大于预设的最大阈值VH或小于最小阈值VL时,利用模拟信号输出模块对放大后的电压信号进行数模转化,以获取由实感像素检测的读出结果,该读出结果包括实感像素的位置信息、环境亮度信息、时间信息。Specifically, the real-sensing pixels are used to sense changes in the brightness of the external environment in real time, and convert the changes of the brightness of the environment into changes in current. As shown in FIG. 5 , the light collected by the photodiode PD1 is amplified by the first
其中,VH和VL分别是根据上一时钟频率该实感像素的数字信号值与预设阈值确定,VH为上一时钟频率该实感像素的数字信号值加上预设阈值,VL为上一时钟频率该实感像素的数字信号值减去预设阈值。Wherein, VH and VL are respectively determined according to the digital signal value of the real-sensing pixel at the last clock frequency and the preset threshold, VH is the digital signal value of the real-sensing pixel at the last clock frequency plus the preset threshold, and VL is the last clock frequency. The digital signal value of the photorealistic pixel is subtracted by a preset threshold.
步骤102c:根据目标信息,确定运动信息。Step 102c: Determine motion information according to the target information.
其中,运动信息的获取频率与多个实感像素的像素变化值的获取频率相关。Wherein, the acquisition frequency of motion information is related to the acquisition frequency of pixel change values of a plurality of real-sensing pixels.
进一步地,上述目标信息包括实感像素的位置信息、环境亮度信息、时间信息。在输出上述位置信息、环境亮度信息、时间信息之后,可将上述多个信息转发至实感像素传感器内部的信号处理系统,以根据上述位置信息、环境亮度信息、时间信息确定主控对象相对于多个被控对象的运动信息。Further, the above-mentioned target information includes position information, ambient brightness information, and time information of the real-sensing pixels. After outputting the above-mentioned position information, environmental brightness information, and time information, the above-mentioned multiple pieces of information can be forwarded to the signal processing system inside the RealSense pixel sensor, so as to determine, according to the above-mentioned position information, environmental brightness information, and time information, that the main control object is relative to the many motion information of a controlled object.
可以理解的是,实感像素的实时性较高,因此由实感像素得到的图像表现出来的位置信息较准确,从而可以迅速、准确地在图像中找到运动物体的具体位置,实现精准定位。同时,通过至少一帧预览图像能够记录运动物体的细微位置变化,因此通过电子设备中的实感像素,能够精准捕捉运动物体的位置变化,保证对运动物体的运动信息确定的准确性。It can be understood that the real-time performance of the real-sensing pixels is high, so the position information displayed by the images obtained by the real-sensing pixels is more accurate, so that the specific position of the moving object can be quickly and accurately found in the image, and accurate positioning can be achieved. At the same time, the subtle position changes of the moving objects can be recorded through at least one frame of preview image. Therefore, the real-sensing pixels in the electronic device can accurately capture the position changes of the moving objects and ensure the accuracy of the determination of the motion information of the moving objects.
示例性地,在通过实感像素传感器获取上述主控对象相对于被控对象的运动信息时,如图5所示,通过实感像素传感器中与各实感像素相对应的PD1采集环境光线亮度,环境光线亮度经过第一电流放大单元502放大之后转换为电压信号,进而将该电压信号输入模数转换单元503,并由模数转换单元503将放大的电压信号转换为数字信号,并将该数字信号继续输送至逻辑判断单元504。此时,若实感像素传感器中某一实感像素的预设的VH为12,VL为8,而该实感像素所采集到的环境光线亮度转换得到的数字信号为14,逻辑判断单元504便会判定该数字信号超出该实感像素的预设阈值范围,也即认为该实感像素对应的检测对象出现了动作。此时,逻辑判断单元504便会将逻辑判断结果发送至控制单元505,控制单元505进而根据逻辑判断单元504的逻辑判断结果生成相应的控制信号,并将该控制信号传输至开关单元506,以控制开关单元506打开开关,以输出该实感像素的位置信息、环境亮度信息、时间信息。Exemplarily, when the motion information of the above-mentioned master control object relative to the controlled object is obtained through the real-sensing pixel sensor, as shown in FIG. 5 , the ambient light brightness is collected through the PD1 corresponding to each real-sensing pixel in the real-sensing pixel sensor, The brightness is converted into a voltage signal after being amplified by the first
本申请提供的上述实施例,上述实感像素传感器上设置有多个实感像素,在确定主控对象相对于多个被控对象的运动信息时,实时获取多个实感像素的像素变化值,进而在多个实感像素中的目标实感像素的像素变化值大于等于预设阈值的情况下,输出目标实感像素的位置信息、环境亮度信息以及时间信息,并根据输出的信息确定主控对象相对于多个被控对象的运动信息。这样,由于实感像素的实时性较高,通过电子设备中的实感像素进行成像,可以迅速、准确地确定主控对象在目标界面中的具体位置,实现精准定位,从而能够精准捕捉主控对象的位置变化情况,保证了对主控对象相对于被控对象的运动信息确定的准确性,从而保证了音频播放的准确度。In the above-mentioned embodiment provided by this application, the above-mentioned real-sensing pixel sensor is provided with a plurality of real-sensing pixels, and when determining the motion information of the master object relative to the multiple controlled objects, the pixel change values of the multiple real-sensing pixels are acquired in real time, and then the pixel change values of the multiple real-sensing pixels are obtained in real time, and then When the pixel change value of the target real-sensing pixel in the multiple real-sensing pixels is greater than or equal to the preset threshold, output the position information, ambient brightness information and time information of the target real-sensing pixel, and determine the relative position of the main control object relative to the multiple real-sensing pixels according to the output information. The motion information of the controlled object. In this way, due to the high real-time performance of real-sensing pixels, imaging through real-sensing pixels in electronic devices can quickly and accurately determine the specific position of the main control object in the target interface, and achieve precise positioning, so that the main control object can be accurately captured. The position change ensures the accuracy of determining the motion information of the master object relative to the controlled object, thereby ensuring the accuracy of audio playback.
在本申请实施例中,在上述步骤102之前,上述虚拟演奏方法还可包括下述的步骤100和步骤101:In this embodiment of the present application, before the
步骤100:在接收到用户对目标物体或者目标界面的目标界面区域的第一输入的情况下,将目标物体或者目标界面的目标界面区域设置为被控对象,并建立被控对象与目标乐器之间的关联关系。Step 100: in the case of receiving the first input from the user to the target object or the target interface area of the target interface, set the target object or the target interface area of the target interface as the controlled object, and establish a relationship between the controlled object and the target musical instrument. relationship between.
其中,上述第一输入为用户对电子设备的目标界面的触控输入,该触控输入用于对目标界面中的多个物体或者多个界面区域进行标注,以将相应的物体或者界面区域确定为被控对象,并建立该被控对象与目标乐器之间的关联关系。也即,上述第一输入用于标记被控对象。The above-mentioned first input is a user's touch input to the target interface of the electronic device, and the touch input is used to mark multiple objects or multiple interface areas in the target interface, so as to determine the corresponding objects or interface areas. is the controlled object, and establishes an association relationship between the controlled object and the target musical instrument. That is, the above-mentioned first input is used to mark the controlled object.
进一步地,上述目标界面为现实场景在电子设备中的成像界面。具体地,在上述电子设备为具备拍摄装置的智能设备的情况下,上述目标界面为该电子设备的拍摄预览界面。在上述电子设备为具备AR功能的智能设备的情况下,上述目标界面则为该电子设备的虚拟显示界面,也即AR成像界面。Further, the above-mentioned target interface is an imaging interface of a real scene in an electronic device. Specifically, when the electronic device is a smart device with a photographing device, the target interface is a photographing preview interface of the electronic device. In the case where the electronic device is a smart device with AR function, the target interface is a virtual display interface of the electronic device, that is, an AR imaging interface.
具体地,在本申请实施例提出的虚拟乐器演奏方法中,用户可通过具备拍摄功能的电子设备对目标场景进行拍摄,或者通过具备AR功能的电子设备对目标场景进行AR成像。在此基础上,对电子设备的拍摄界面中的多个物体或者多个界面区域进行识别确认,或者对电子设备的AR成像界面中的多个物体或者多个界面区域进行识别确认。在此基础上,用户可通过对目标界面的触控输入,对上述识别到的多个物体或者多个界面区域进行自定义标注,以将相应的物体或者界面区域确定为被控对象,并建立该被控对象与目标乐器之间的关联关系。Specifically, in the virtual musical instrument performance method proposed in the embodiments of the present application, the user can shoot the target scene through an electronic device with a shooting function, or perform AR imaging on the target scene through an electronic device with an AR function. On this basis, identify and confirm multiple objects or multiple interface areas in the photographing interface of the electronic device, or identify and confirm multiple objects or multiple interface areas in the AR imaging interface of the electronic device. On this basis, the user can customize the identified multiple objects or multiple interface areas through touch input on the target interface, so as to determine the corresponding object or interface area as the controlled object, and establish The association between the controlled object and the target instrument.
其中,上述目标乐器可为架子鼓、编钟、排鼓、扬琴等自带敲击物体的乐器,上述目标乐器还可为钢琴、电子琴、二胡、古筝、口琴等不具备敲击物体,而需要按压、弹拨、吹奏等方式进行发音的乐器。对于上述目标乐器的具体类型,用户可根据实际情况进行选择,在此不作具体限制。Among them, the above-mentioned target musical instruments can be musical instruments with their own percussion objects such as drums, chimes, row drums, dulcimers, etc., and the above-mentioned target musical instruments can also be pianos, electronic organs, erhu, guzheng, harmonica, etc. that do not have percussion objects, but need to be pressed , plucked, played, etc. For the specific type of the above target musical instrument, the user can select it according to the actual situation, which is not specifically limited here.
可以理解的是,不同的乐器具备不同的乐音,相同的乐器也具备多个发声部位,且不同的发声部位对应不同的乐音。在演奏乐器时,通过不同乐音之间的相互配合,才能得到一首完整的音乐。因此,在对上述对识别到的多个物体或者多个界面区域进行自定义标注时,具体可将上述多个物体或者多个界面区域自定义标注为不同的乐器,还可将上述多个物体或者多个界面区域自定义标注为上述目标乐器的不同的发声部。这样,通过对实际场景中的多个物体或者多个界面区域的虚拟弹奏,即可得到一首完整的音乐,从而实现电子设备的虚拟乐器功能,增加了电子设备的人机交互模式。It can be understood that different musical instruments have different musical tones, and the same musical instrument also has multiple sounding parts, and different sounding parts correspond to different musical tones. When playing an instrument, a complete piece of music can only be obtained through the cooperation of different tones. Therefore, when the above-mentioned identified multiple objects or multiple interface areas are custom-marked, the above-mentioned multiple objects or multiple interface areas can be custom-marked as different musical instruments, and the above-mentioned multiple objects can also be customized. Or multiple interface areas can be custom-labeled as different voices of the above target instruments. In this way, a complete piece of music can be obtained by virtually playing multiple objects or multiple interface areas in the actual scene, thereby realizing the virtual musical instrument function of the electronic device and increasing the human-computer interaction mode of the electronic device.
示例性地,如图2所示,实际的架子鼓可包括一个大鼓202、一个军鼓204、三个嗵鼓206至210、三个镲212至216这八个发声部。用户在通过具备摄像功能的智能设备进行虚拟弹奏时,可根据架子鼓的发声部的实际数量和具体排列在电子设备的拍摄场景内放置多个物体,如图3中的物体302至316。在此基础上,对上述物体302至316进行自定义标注,具体地,如图2和图3所示,将物体302定义为架子鼓中的大鼓202,将物体304定义为架子鼓中的军鼓204,将物体306、308以及310分别定义为架子鼓中的三个嗵鼓206、208以及210,以及将物体312、314以及316分别定义为架子鼓中的三个镲212、214以及216。Illustratively, as shown in FIG. 2 , an actual drum kit may include eight sounding parts, one
步骤101:在接收到用户对主控对象的第二输入的情况下,将主控对象设置为用于控制目标乐器进行发声的对象。Step 101: In the case of receiving the second input from the user to the master control object, set the master control object as an object for controlling the target musical instrument to sound.
其中,上述第二输入为用户对电子设备的目标界面中的主控对象的触控输入,该触控输入用于将主控对象设置为用于控制目标乐器进行发声的对象。也即,上述第二输入用于标记主控对象。Wherein, the above-mentioned second input is a user's touch input to the master control object in the target interface of the electronic device, and the touch input is used to set the master control object as an object for controlling the target musical instrument to sound. That is, the above-mentioned second input is used to mark the master object.
进一步地,上述主控对象为运动对象,该主控对象包括用户可移动的物体或者用户的手部。在实际的应用过程中,通过用户对目标界面中的主控对象的触控输入,将主控对象设置为用于控制目标乐器进行发声的对象,以建立主控对象与被控对象之间的控制关系。Further, the above-mentioned main control object is a moving object, and the main control object includes a user movable object or a user's hand. In the actual application process, through the user's touch input to the master object in the target interface, the master object is set as the object used to control the target musical instrument to sound, so as to establish the relationship between the master object and the controlled object. control relationship.
其中,对于架子鼓、编钟、排鼓、扬琴等自带敲击物体的乐器,可将实际场景中用户可移动的物体或者用户的手部自定义标注为上述乐器中的敲击物体,如鼓槌、敲击编钟的木槌、扬琴的琴竹等,以此增加用户进行虚拟弹奏时的真实性和交互性。Among them, for drums, chimes, row drums, dulcimers and other musical instruments that have their own percussion objects, the objects that the user can move in the actual scene or the user's hands can be customized as percussion objects in the above instruments, such as drums. mallet, hammer for hitting chimes, bamboo for dulcimer, etc., so as to increase the authenticity and interactivity of users when they play virtual playing.
示例性地,如图3所示,在用户模拟架子鼓进行虚拟弹奏时,还可在电子设备的拍摄场景内放置物体318和物体320,并将物体318和物体320分别定义为架子鼓的两个鼓槌。Exemplarily, as shown in FIG. 3 , when the user simulates a drum set to perform virtual playing,
本申请提供的上述实施例,用户可通过对目标界面的触控输入,将目标界面中的多个物体或者多个界面区域设置为被控对象,并建立被控对象与目标乐器之间的关联关系,以及将目标界面中的主控对象,如用户手部或其他可移动物体,设置为用于控制目标乐器进行发声的对象。这样,通过对实际场景中的多个物体或者多个界面区域的虚拟弹奏,即可得到一首完整的音乐,从而实现电子设备的虚拟乐器功能,增加了电子设备的人机交互模式。In the above-mentioned embodiments provided in this application, the user can set multiple objects or multiple interface areas in the target interface as controlled objects through touch input on the target interface, and establish an association between the controlled object and the target musical instrument relationship, and set the master object in the target interface, such as the user's hand or other movable objects, as the object used to control the sound of the target instrument. In this way, a complete piece of music can be obtained by virtually playing multiple objects or multiple interface areas in the actual scene, thereby realizing the virtual musical instrument function of the electronic device and increasing the human-computer interaction mode of the electronic device.
综上所述,本申请第一方面实施例提出的虚拟乐器演奏方法,通过实感像素传感器实时抓取高精度动态物体的能力,实现对运动物体的速度和位移信息的精确提取。在此基础上,结合AR应用,实现电子设备的虚拟乐器演奏功能,从而为用户提供更多功能和更流畅的人机交互方式,提升了电子设备的整体性能。To sum up, the virtual musical instrument performance method proposed in the embodiment of the first aspect of the present application realizes the accurate extraction of the speed and displacement information of the moving object through the ability of real-time pixel sensor to grasp high-precision dynamic objects in real time. On this basis, combined with AR applications, the virtual instrument performance function of electronic devices is realized, thereby providing users with more functions and a smoother human-computer interaction method, and improving the overall performance of electronic devices.
本申请第一方面的实施例提供的虚拟乐器演奏方法,执行主体可以为虚拟乐器演奏装置。本申请实施例中以虚拟乐器演奏装置执行上述虚拟乐器演奏方法为例,说明本申请第二方面实施例提供的虚拟乐器演奏装置。In the virtual musical instrument performance method provided by the embodiments of the first aspect of the present application, the execution body may be a virtual musical instrument performance apparatus. In the embodiment of the present application, the virtual musical instrument performance device provided by the embodiment of the second aspect of the present application is described by taking the virtual musical instrument playing device performing the above-mentioned virtual musical instrument playing method as an example.
如图10所示,本申请实施例提供一种虚拟乐器演奏装置1000,应用于包括实感像素传感器的电子设备,该装置可以包括下述的获取单元1002和播放单元1004。As shown in FIG. 10 , an embodiment of the present application provides an
获取单元1002,用于通过实感像素传感器,获取目标界面中的主控对象相对于被控对象的运动信息;The acquiring
播放单元1004,用于基于运动信息,播放目标音频;Playing
其中,不同的被控对象对应不同的乐器,或者,不同的被控对象对应同一个乐器的不同声部;目标音频包括至少一个乐器的至少一个乐音对应的音频。Wherein, different controlled objects correspond to different musical instruments, or different controlled objects correspond to different parts of the same musical instrument; the target audio includes audio corresponding to at least one musical tone of at least one musical instrument.
通过本申请实施例提供的上述虚拟乐器演奏装置1000,对于包括实感像素传感器的电子设备,获取单元1002通过实感像素传感器获取电子设备的目标界面中的主控对象相对于被控对象的运动信息。其中,不同的被控对象对应不同的乐器,或者不同的被控对象对应同一个乐器的不同声部。在此基础上,播放单元1004根据主控对象相对于被控对象的运动信息播放目标音频,该目标音频中包括至少一个乐器的至少一个乐音对应的音频。这样,增加了电子设备的人机交互模式,通过电子设备的目标界面中的主控对象相对于被控对象的运动信息,即可进行虚拟乐器演奏,从而实现了电子设备的虚拟乐器功能,使得用户可以随时随地演奏乐器。With the above-mentioned virtual musical
在本申请实施例中,主控对象为运动对象,主控对象包括用户可移动的物体或者用户的手部;被控对象包括除了实体乐器之外的物体,或者目标界面中的界面区域;运动信息包括主控对象的实时位置信息、主控对象在每个位置的停留时长和主控对象的实时运动速度,其中,实时位置信息包括至少一个位置的位置坐标;目标界面包括电子设备的拍摄预览界面或者虚拟显示界面。In the embodiment of the present application, the main control object is a moving object, and the main control object includes a movable object of the user or the user's hand; the controlled object includes an object other than a physical musical instrument, or an interface area in a target interface; motion The information includes the real-time position information of the main control object, the staying time of the main control object at each position, and the real-time motion speed of the main control object, wherein the real-time position information includes the position coordinates of at least one position; the target interface includes the shooting preview of the electronic device interface or virtual display interface.
本申请提供的上述实施例,通过电子设备的目标界面中的主控对象相对于被控对象的运动信息,即可模拟实际乐器进行演奏,增加了电子设备的人机交互模式,实现了电子设备的虚拟乐器功能,从而使得用户可以随时随地演奏乐器。In the above-mentioned embodiments provided in the present application, through the motion information of the master object in the target interface of the electronic device relative to the controlled object, the actual musical instrument can be simulated to perform, and the human-computer interaction mode of the electronic device is added, and the electronic device is realized. The virtual instrument function allows users to play instruments anytime, anywhere.
在本申请实施例中,虚拟乐器演奏装置1000还包括:处理单元1006,用于根据运动信息,确定主控对象控制被控对象的控制参数;播放单元1004具体用于:按照控制参数,播放目标音频。In the embodiment of the present application, the virtual musical
本申请提供的上述实施例,虚拟乐器演奏装置1000还包括处理单元1006,在基于主控对象相对于被控对象的运动信息来播放目标音频时,处理单元1006根据主控对象相对于被控对象的运动信息,确定主控对象控制被控对象的控制参数,播放单元1004进而按照该控制参数,播放与被控对象相对应的目标音频。这样,根据主控对象对被控对象的具体控制参数,播放与被控对象相对应的目标音频,以此实现电子设备的虚拟乐器功能,使得用户可以随时随地演奏乐器。In the above-mentioned embodiment provided by this application, the virtual musical
在本申请实施例中,控制参数包括被控对象、控制时长、控制次数和控制速度,播放单元1004具体用于:按照控制时长、控制次数和控制速度,播放与被控对象关联的乐器的至少一个乐音对应的音频。In the embodiment of the present application, the control parameters include the controlled object, the control duration, the number of times of control, and the control speed, and the
本申请提供的上述实施例,上述控制参数包括被控对象、控制时长、控制次数和控制速度,在此基础上,在播放单元1004按照控制参数播放目标音频时,具体按照控制时长、控制次数和控制速度,播放与被控对象关联的乐器的至少一个乐音对应的音频。这样,根据主控对象对被控对象的具体控制参数,按照相应的播放参数播放与被控对象相对应的乐器音频,能够灵活准确地控制虚拟乐器进行发声,从而得到符合用户要求的精准的目标音频,实现了电子设备的虚拟乐器功能,使得用户可以随时随地演奏乐器。In the above-mentioned embodiment provided by the present application, the above-mentioned control parameters include the controlled object, the control duration, the control times and the control speed. The speed is controlled, and the audio corresponding to at least one musical tone of the musical instrument associated with the controlled object is played. In this way, according to the specific control parameters of the master object to the controlled object, the instrument audio corresponding to the controlled object is played according to the corresponding playback parameters, and the virtual musical instrument can be flexibly and accurately controlled to sound, so as to obtain an accurate target that meets the user's requirements. Audio, realizes the virtual musical instrument function of electronic devices, so that users can play musical instruments anytime and anywhere.
在本申请实施例中,在目标界面包括至少两个被控对象的情况下,处理单元1006具体用于:根据运动信息,获取目标界面内主控对象与每个被控对象的实时像素距离;将实时像素距离小于预设阈值的被控对象确定为可播放音频的被控对象。In the embodiment of the present application, when the target interface includes at least two controlled objects, the
本申请提供的上述实施例,在目标界面包括至少两个被控对象的情况下,处理单元1006根据主控对象相对于每个被控对象的运动信息,获取目标界面内主控对象与每个被控对象的实时像素距离,进而将实时像素距离小于预设阈值的被控对象确定为可播放音频的被控对象。这样,根据主控对象与每个被控对象的实时像素距离确定可播放音频的被控对象,保证了被控对象确定的准确性和实时性,进而保证了目标音频播放的准确度和流畅度,提升了电子设备虚拟演奏功能的可靠性。In the above-mentioned embodiment provided by this application, in the case that the target interface includes at least two controlled objects, the
在本申请实施例中,播放单元1004具体用于:根据控制时长,调整目标音频的播放时长;根据控制次数,调整目标音频的播放频次;根据控制速度,调整目标音频的播放音量;按照播放时长、播放频次和播放音量,播放与被控对象关联的乐器的至少一个乐音对应的音频。In the embodiment of the present application, the
本申请提供的上述实施例,在处理单元1006根据主控对象相对于被控对象的运动信息,确定被触发的被控对象以及主控对象对该被控对象的控制时长、控制次数以及控制速度之后,播放单元1004根据确定的控制时长、控制次数以及控制速度分别调整目标音频的播放时长、播放频次以及播放音量,进而按照调整好的播放时长、播放频次以及播放音量,播放与被触发的被控对象关联的乐器的至少一个乐音对应的音频。这样,根据主控对象对被控对象的具体控制参数,按照相应的播放参数播放与被控对象相对应的乐器音频,能够灵活准确地控制虚拟乐器进行发声,从而得到符合用户要求的目标音频,实现了电子设备的虚拟乐器功能,使得用户可以随时随地演奏乐器。In the above-mentioned embodiment provided in this application, the
在本申请实施例中,实感像素传感器包括多个实感像素;获取单元1002具体用于:实时获取多个实感像素的像素变化值;处理单元1006具体用于:在多个实感像素中目标实感像素的像素变化值位于预设阈值范围之外的情况下,输出目标信息,其中,目标信息包括以下至少一项:目标实感像素的位置信息、环境亮度信息、时间信息;根据目标信息,确定运动信息;其中,运动信息的获取频率与多个实感像素的像素变化值的获取频率相关。In the embodiment of the present application, the real-sensing pixel sensor includes a plurality of real-sensing pixels; the acquiring
本申请提供的上述实施例,上述实感像素传感器上设置有多个实感像素,获取单元1002实时获取多个实感像素的像素变化值,处理单元1006在多个实感像素中的目标实感像素的像素变化值大于等于预设阈值的情况下,输出目标实感像素的位置信息、环境亮度信息以及时间信息,并根据输出的信息确定主控对象相对于多个被控对象的运动信息。这样,由于实感像素的实时性较高,通过电子设备中的实感像素进行成像,可以迅速、准确地确定主控对象在目标界面中的具体位置,实现精准定位,从而能够精准捕捉主控对象的位置变化情况,保证了对主控对象相对于被控对象的运动信息确定的准确性,从而保证了音频播放的准确度。In the above-mentioned embodiment provided by the present application, the above-mentioned real-sensing pixel sensor is provided with a plurality of real-sensing pixels, the
在本申请实施例中,处理单元1006还用于:在接收到用户对目标物体或者目标界面的目标界面区域的第一输入的情况下,将目标物体或者目标界面的目标界面区域设置为被控对象,并建立被控对象与目标乐器之间的关联关系,其中,第一输入用于标记被控对象;在接收到用户对主控对象的第二输入的情况下,将主控对象设置为用于控制目标乐器进行发声的对象,其中,第二输入用于标记主控对象。In this embodiment of the present application, the
本申请提供的上述实施例,处理单元1006根据用户对目标界面的触控输入,将目标界面中的多个物体或者多个界面区域设置为被控对象,并建立被控对象与目标乐器之间的关联关系,以及将目标界面中的主控对象,如用户手部或其他可移动物体,设置为用于控制目标乐器进行发声的对象。这样,通过对实际场景中的多个物体或者多个界面区域的虚拟弹奏,即可得到一首完整的音乐,从而实现电子设备的虚拟乐器功能,增加了电子设备的人机交互模式。In the above-mentioned embodiments provided by this application, the
本申请实施例中的虚拟乐器演奏装置1000可以是电子设备,也可以是电子设备中的部件,例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、移动上网装置(Mobile Internet Device,MID)、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、机器人、可穿戴设备、超级移动个人计算机(ultra-mobilepersonal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,还可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The virtual musical
本申请实施例中的虚拟乐器演奏装置1000可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为iOS操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The virtual musical
本申请第二方面实施例提供的虚拟乐器演奏装置1000能够实现图1的方法实施例实现的各个过程,为避免重复,这里不再赘述。The virtual musical
可选地,如图11所示,本申请实施例还提供一种电子设备1100,包括处理器1102和存储器1104,存储器1104上存储有可在处理器1102上运行的程序或指令,该程序或指令被处理器1102执行时实现上述第一方面的虚拟乐器演奏方法实施例的各个步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in FIG. 11 , an embodiment of the present application further provides an
需要说明的是,本申请实施例中的电子设备包括上述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
图12为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 12 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备1200包括但不限于:射频单元1201、网络模块1202、音频输出单元1203、输入单元1204、传感器1205、显示单元1206、用户输入单元1207、接口单元1208、存储器1209以及处理器1210等部件。The
本领域技术人员可以理解,电子设备1200还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1210逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图12中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the
本申请实施例的电子设备1200可用于实现上述第一方面虚拟乐器演奏方法实施例的各个步骤。The
其中,处理器1210,用于通过实感像素传感器,获取目标界面中的主控对象相对于被控对象的运动信息。The
音频输出单元1203,用于基于运动信息,播放目标音频。The
其中,不同的被控对象对应不同的乐器,或者,不同的被控对象对应同一个乐器的不同声部;目标音频包括至少一个乐器的至少一个乐音对应的音频。Wherein, different controlled objects correspond to different musical instruments, or different controlled objects correspond to different parts of the same musical instrument; the target audio includes audio corresponding to at least one musical tone of at least one musical instrument.
在本申请实施例中,对于包括实感像素传感器的电子设备1200,其上的处理器1210通过实感像素传感器获取电子设备的目标界面中的主控对象相对于被控对象的运动信息。其中,不同的被控对象对应不同的乐器,或者不同的被控对象对应同一个乐器的不同声部。在此基础上,音频输出单元1203根据主控对象相对于被控对象的运动信息播放目标音频,该目标音频中包括至少一个乐器的至少一个乐音对应的音频。这样,增加了电子设备的人机交互模式,通过电子设备的目标界面中的主控对象相对于被控对象的运动信息,即可进行虚拟乐器演奏,从而实现了电子设备的虚拟乐器功能,使得用户可以随时随地演奏乐器。In the embodiment of the present application, for the
可选地,主控对象为运动对象,主控对象包括用户可移动的物体或者用户的手部;被控对象包括除了实体乐器之外的物体,或者目标界面中的界面区域;运动信息包括主控对象的实时位置信息、主控对象在每个位置的停留时长和主控对象的实时运动速度,其中,实时位置信息包括至少一个位置的位置坐标;目标界面包括电子设备的拍摄预览界面或者虚拟显示界面。Optionally, the master object is a moving object, and the master object includes a movable object of the user or the user's hand; the controlled object includes an object other than the physical musical instrument, or an interface area in the target interface; the motion information includes the main object. The real-time position information of the control object, the stay time of the main control object at each position, and the real-time movement speed of the main control object, wherein the real-time position information includes the position coordinates of at least one position; the target interface includes the shooting preview interface of the electronic device or the virtual UI.
本申请提供的上述实施例,通过电子设备的目标界面中的主控对象相对于被控对象的运动信息,即可模拟实际乐器进行演奏,增加了电子设备的人机交互模式,实现了电子设备的虚拟乐器功能,从而使得用户可以随时随地演奏乐器。In the above-mentioned embodiments provided in the present application, through the motion information of the master object in the target interface of the electronic device relative to the controlled object, the actual musical instrument can be simulated to perform, and the human-computer interaction mode of the electronic device is added, and the electronic device is realized. The virtual instrument function allows users to play instruments anytime, anywhere.
可选地,处理器1210还用于:根据运动信息,确定主控对象控制被控对象的控制参数;音频输出单元1203具体用于:按照控制参数,播放目标音频。Optionally, the
本申请提供的上述实施例,在基于主控对象相对于被控对象的运动信息来播放目标音频时,处理器1210根据主控对象相对于被控对象的运动信息,确定主控对象控制被控对象的控制参数,音频输出单元1203进而按照该控制参数,播放与被控对象相对应的目标音频。这样,根据主控对象对被控对象的具体控制参数,播放与被控对象相对应的目标音频,以此实现电子设备的虚拟乐器功能,使得用户可以随时随地演奏乐器。In the above-mentioned embodiments provided in this application, when the target audio is played based on the motion information of the master object relative to the controlled object, the
可选地,控制参数包括被控对象、控制时长、控制次数和控制速度,音频输出单元1203具体用于:按照控制时长、控制次数和控制速度,播放与被控对象关联的乐器的至少一个乐音对应的音频。Optionally, the control parameters include the controlled object, the control duration, the number of times of control, and the control speed, and the
本申请提供的上述实施例,上述控制参数包括被控对象、控制时长、控制次数和控制速度,在此基础上,在音频输出单元1203按照控制参数播放目标音频时,具体按照控制时长、控制次数和控制速度,播放与被控对象关联的乐器的至少一个乐音对应的音频。这样,根据主控对象对被控对象的具体控制参数,按照相应的播放参数播放与被控对象相对应的乐器音频,能够灵活准确地控制虚拟乐器进行发声,从而得到符合用户要求的目标音频,实现了电子设备的虚拟乐器功能,使得用户可以随时随地演奏乐器。In the above-mentioned embodiment provided by this application, the above-mentioned control parameters include the controlled object, the control duration, the control times and the control speed. and control speed, and play audio corresponding to at least one tone of the musical instrument associated with the controlled object. In this way, according to the specific control parameters of the master object to the controlled object, and play the musical instrument audio corresponding to the controlled object according to the corresponding playback parameters, the virtual musical instrument can be flexibly and accurately controlled to sound, so as to obtain the target audio that meets the user's requirements. The virtual instrument function of the electronic device is realized, so that the user can play the instrument anytime and anywhere.
可选地,在目标界面包括至少两个被控对象的情况下,处理器1210具体用于:根据运动信息,获取目标界面内主控对象与每个被控对象的实时像素距离;将实时像素距离小于预设阈值的被控对象确定为可播放音频的被控对象。Optionally, when the target interface includes at least two controlled objects, the
本申请提供的上述实施例,在目标界面包括至少两个被控对象的情况下,处理器1210根据主控对象相对于每个被控对象的运动信息,获取目标界面内主控对象与每个被控对象的实时像素距离,进而将实时像素距离小于预设阈值的被控对象确定为可播放音频的被控对象。这样,根据主控对象与每个被控对象的实时像素距离确定可播放音频的被控对象,保证了被控对象确定的准确性和实时性,进而保证了目标音频播放的准确度和流畅度,提升了电子设备虚拟演奏功能的可靠性。In the above-mentioned embodiment provided by the present application, in the case that the target interface includes at least two controlled objects, the
可选地,音频输出单元1203具体用于:根据控制时长,调整目标音频的播放时长;根据控制次数,调整目标音频的播放频次;根据控制速度,调整目标音频的播放音量;按照播放时长、播放频次和播放音量,播放与被控对象关联的乐器的至少一个乐音对应的音频。Optionally, the
本申请提供的上述实施例,在处理器1210根据主控对象相对于被控对象的运动信息,确定被触发的被控对象以及主控对象对该被控对象的控制时长、控制次数以及控制速度之后,音频输出单元1203根据确定的控制时长、控制次数以及控制速度分别调整目标音频的播放时长、播放频次以及播放音量,进而按照调整好的播放时长、播放频次以及播放音量,播放与被触发的被控对象关联的乐器的至少一个乐音对应的音频。这样,根据主控对象对被控对象的具体控制参数,按照相应的播放参数播放与被控对象相对应的乐器音频,能够灵活准确地控制虚拟乐器进行发声,从而得到符合用户要求的目标音频,实现了电子设备的虚拟乐器功能,使得用户可以随时随地演奏乐器。In the above-mentioned embodiment provided in this application, the
可选地,实感像素传感器包括多个实感像素;处理器1210具体用于:实时获取多个实感像素的像素变化值;在多个实感像素中目标实感像素的像素变化值位于预设阈值范围之外的情况下,输出目标信息,其中,目标信息包括以下至少一项:目标实感像素的位置信息、环境亮度信息、时间信息;根据目标信息,确定运动信息;其中,运动信息的获取频率与多个实感像素的像素变化值的获取频率相关。Optionally, the real-sensing pixel sensor includes a plurality of real-sensing pixels; the
本申请提供的上述实施例,上述实感像素传感器上设置有多个实感像素,处理器1210实时获取多个实感像素的像素变化值,并在多个实感像素中的目标实感像素的像素变化值大于等于预设阈值的情况下,输出目标实感像素的位置信息、环境亮度信息以及时间信息,并根据输出的信息确定主控对象相对于多个被控对象的运动信息。这样,由于实感像素的实时性较高,通过电子设备中的实感像素进行成像,可以迅速、准确地确定主控对象在目标界面中的具体位置,实现精准定位,从而能够精准捕捉主控对象的位置变化情况,保证了对主控对象相对于被控对象的运动信息确定的准确性,从而保证了音频播放的准确度。In the above-mentioned embodiment provided in this application, the above-mentioned real-sensing pixel sensor is provided with a plurality of real-sensing pixels, the
可选地,处理器1210还用于:在接收到用户对目标物体或者目标界面的目标界面区域的第一输入的情况下,将目标物体或者目标界面的目标界面区域设置为被控对象,并建立被控对象与目标乐器之间的关联关系,其中,第一输入用于标记被控对象;在接收到用户对主控对象的第二输入的情况下,将主控对象设置为用于控制目标乐器进行发声的对象,其中,第二输入用于标记主控对象。Optionally, the
本申请提供的上述实施例,处理器1210根据用户对目标界面的触控输入,将目标界面中的多个物体或者多个界面区域设置为被控对象,并建立被控对象与目标乐器之间的关联关系,以及将目标界面中的主控对象,如用户手部或其他可移动物体,设置为用于控制目标乐器进行发声的对象。这样,通过对实际场景中的多个物体或者多个界面区域的虚拟弹奏,即可得到一首完整的音乐,从而实现电子设备的虚拟乐器功能,增加了电子设备的人机交互模式。In the above-mentioned embodiments provided in this application, the
应理解的是,本申请实施例中,输入单元1204可以包括图形处理器(GraphicsProcessing Unit,GPU)12041和麦克风12042,图形处理器12041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1206可包括显示面板12061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板12061。用户输入单元1207包括触控面板12071以及其他输入设备12072中的至少一种。触控面板12071,也称为触摸屏。触控面板12071可包括触摸检测装置和触摸控制器两个部分。其他输入设备12072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。It should be understood that, in this embodiment of the present application, the
存储器1209可用于存储软件程序以及各种数据。存储器1209可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器1209可以包括易失性存储器或非易失性存储器,或者,存储器1209可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器1209包括但不限于这些和任意其它适合类型的存储器。The
处理器1210可包括一个或多个处理单元;可选的,处理器1210集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器1210中。The
本申请实施例还提供一种可读存储介质,可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述第一方面虚拟乐器演奏方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, each process of the above-mentioned first aspect of the virtual musical instrument performance method embodiment is implemented, and can To achieve the same technical effect, in order to avoid repetition, details are not repeated here.
其中,处理器为上述实施例中的电子设备中的处理器。可读存储介质,包括计算机可读存储介质,如计算机只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等。The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as computer read-only memory ROM, random access memory RAM, magnetic disk or optical disk, and the like.
本申请实施例另提供了一种芯片,芯片包括处理器和通信接口,通信接口和处理器耦合,处理器用于运行程序或指令,实现上述第一方面虚拟乐器演奏方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the first aspect of the virtual musical instrument performance method embodiment, and The same technical effect can be achieved, and in order to avoid repetition, details are not repeated here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.
本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如上述第一方面虚拟乐器演奏方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiments of the present application provide a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the various processes of the above-mentioned first aspect virtual musical instrument performance method embodiment, and can achieve The same technical effect, in order to avoid repetition, will not be repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in the reverse order depending on the functions involved. To perform functions, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to some examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present application can be embodied in the form of computer software products that are essentially or contribute to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk , CD-ROM), including several instructions to enable a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of the various embodiments of the present application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210727002.5A CN115116415A (en) | 2022-06-24 | 2022-06-24 | Virtual musical instrument playing method, virtual musical instrument playing device and electronic equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210727002.5A CN115116415A (en) | 2022-06-24 | 2022-06-24 | Virtual musical instrument playing method, virtual musical instrument playing device and electronic equipment |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN115116415A true CN115116415A (en) | 2022-09-27 |
Family
ID=83327809
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210727002.5A Pending CN115116415A (en) | 2022-06-24 | 2022-06-24 | Virtual musical instrument playing method, virtual musical instrument playing device and electronic equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115116415A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119376682A (en) * | 2024-12-27 | 2025-01-28 | 佛山指向智能科技有限公司 | An intelligent air instrument based on motion capture and virtual reality technology |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2004252149A (en) * | 2003-02-20 | 2004-09-09 | Yamaha Corp | Virtual percussion instrument playing system |
| CN103310769A (en) * | 2012-03-14 | 2013-09-18 | 卡西欧计算机株式会社 | Musical performance device,and method for controlling musical performance device |
| CN103310767A (en) * | 2012-03-15 | 2013-09-18 | 卡西欧计算机株式会社 | Musical performance device,and method for controlling musical performance device |
| US20150143976A1 (en) * | 2013-03-04 | 2015-05-28 | Empire Technology Development Llc | Virtual instrument playing scheme |
| CN109166565A (en) * | 2018-08-23 | 2019-01-08 | 百度在线网络技术(北京)有限公司 | Virtual musical instrument processing method, device, virtual musical instrument equipment and storage medium |
| CN111103983A (en) * | 2019-12-31 | 2020-05-05 | 维沃移动通信有限公司 | AR musical instrument playing method and electronic equipment |
| CN114390209A (en) * | 2022-02-23 | 2022-04-22 | 维沃移动通信有限公司 | Photographing method, photographing apparatus, electronic device, and readable storage medium |
-
2022
- 2022-06-24 CN CN202210727002.5A patent/CN115116415A/en active Pending
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2004252149A (en) * | 2003-02-20 | 2004-09-09 | Yamaha Corp | Virtual percussion instrument playing system |
| CN103310769A (en) * | 2012-03-14 | 2013-09-18 | 卡西欧计算机株式会社 | Musical performance device,and method for controlling musical performance device |
| CN103310767A (en) * | 2012-03-15 | 2013-09-18 | 卡西欧计算机株式会社 | Musical performance device,and method for controlling musical performance device |
| US20150143976A1 (en) * | 2013-03-04 | 2015-05-28 | Empire Technology Development Llc | Virtual instrument playing scheme |
| CN109166565A (en) * | 2018-08-23 | 2019-01-08 | 百度在线网络技术(北京)有限公司 | Virtual musical instrument processing method, device, virtual musical instrument equipment and storage medium |
| CN111103983A (en) * | 2019-12-31 | 2020-05-05 | 维沃移动通信有限公司 | AR musical instrument playing method and electronic equipment |
| CN114390209A (en) * | 2022-02-23 | 2022-04-22 | 维沃移动通信有限公司 | Photographing method, photographing apparatus, electronic device, and readable storage medium |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119376682A (en) * | 2024-12-27 | 2025-01-28 | 佛山指向智能科技有限公司 | An intelligent air instrument based on motion capture and virtual reality technology |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8866846B2 (en) | Apparatus and method for playing musical instrument using augmented reality technique in mobile terminal | |
| KR102614048B1 (en) | Electronic device and method for displaying object for augmented reality | |
| CN113014983A (en) | Video playing method and device, storage medium and electronic equipment | |
| US20160125861A1 (en) | Performance recording apparatus | |
| WO2021129628A1 (en) | Video special effects processing method and apparatus | |
| US20200020310A1 (en) | Method and system for musical synthesis using hand-drawn patterns/text on digital and non-digital surfaces | |
| CN113538223B (en) | Noise image generation method, device, electronic equipment and storage medium | |
| CN111933098B (en) | Method, device and computer-readable storage medium for generating accompaniment music | |
| TW201029345A (en) | Remote controller and function-setting and operating method of the same | |
| CN107610550A (en) | The implementation method and device of Online class | |
| WO2019156091A1 (en) | Information processing method | |
| CN112437336A (en) | Audio and video playing method and device, electronic equipment and storage medium | |
| CN115116415A (en) | Virtual musical instrument playing method, virtual musical instrument playing device and electronic equipment | |
| CN117011124A (en) | Gain map generation method and device, electronic equipment and medium | |
| JP2007121355A (en) | Performance system | |
| CN106951457A (en) | The processing method and processing device of the music score of Chinese operas | |
| CN115278097A (en) | Image generation method, image generation device, electronic device, and medium | |
| WO2019087331A1 (en) | Reference position detection device and reference position detection method | |
| JP2022149157A (en) | Performance analyzing method, performance analyzing system, and program | |
| JP2007256502A (en) | Performance data remote communication system, and program for implementing control method thereof | |
| JP5929535B2 (en) | Effect control device, effect control method, and program | |
| CN114630179B (en) | Audio extraction method and electronic equipment | |
| US20130106689A1 (en) | Methods of operating systems having optical input devices | |
| JP7651901B2 (en) | IMAGE PROCESSING METHOD, IMAGE PROCESSING SYSTEM, AND PROGRAM | |
| US20230071892A1 (en) | Automatic triggering of a gameplay recording using visual and acoustic fingerprints |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |