[go: up one dir, main page]

CN111880669B - Audio control method and device, audio equipment, computer-readable storage medium - Google Patents

Audio control method and device, audio equipment, computer-readable storage medium Download PDF

Info

Publication number
CN111880669B
CN111880669B CN202010207169.XA CN202010207169A CN111880669B CN 111880669 B CN111880669 B CN 111880669B CN 202010207169 A CN202010207169 A CN 202010207169A CN 111880669 B CN111880669 B CN 111880669B
Authority
CN
China
Prior art keywords
audio
rocker
rocker assembly
variable
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.)
Active
Application number
CN202010207169.XA
Other languages
Chinese (zh)
Other versions
CN111880669A (en
Inventor
张焕明
黄俊豪
洪振兵
许飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Jieli Technology Co Ltd
Original Assignee
Zhuhai Jieli Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhuhai Jieli Technology Co Ltd filed Critical Zhuhai Jieli Technology Co Ltd
Priority to CN202010207169.XA priority Critical patent/CN111880669B/en
Publication of CN111880669A publication Critical patent/CN111880669A/en
Application granted granted Critical
Publication of CN111880669B publication Critical patent/CN111880669B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0338Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of limited linear or angular displacement of an operating part of the device from a neutral position, e.g. isotonic or isometric joysticks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/10009Improvement or modification of read or write signals
    • G11B20/10018Improvement or modification of read or write signals analog processing for digital recording or reproduction
    • G11B20/10027Improvement or modification of read or write signals analog processing for digital recording or reproduction adjusting the signal strength during recording or reproduction, e.g. variable gain amplifiers
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K17/00Electronic switching or gating, i.e. not by contact-making and –breaking
    • H03K17/51Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the components used
    • H03K17/90Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the components used by the use, as active elements, of galvano-magnetic devices, e.g. Hall-effect devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Switches With Compound Operations (AREA)

Abstract

本发明提供了一种音频控制方法及装置、音频设备、计算机可读存储介质,该音频控制方法应用于音频设备,音频设备包括摇杆组件,该方法包括:步骤S1:获取第一变量x1和第二变量y1,其中,第一变量x1与摇杆组件的摇杆当前位置相对于摇杆组件的摇杆复位位置在第一方向的摇摆量成正比,第二变量y1与摇杆组件的摇杆当前位置相对于摇杆组件的摇杆复位位置在第二方向的摇摆量成正比;步骤S2:根据x1的绝对值与y1的绝对值之间的大小关系执行第一方向或第二方向控制的音频操作。本发明能够利用摇杆组件实现对音频设备的音频控制,通过摇杆组件能够满足用户的多种音频操控需求,有利于减少音频设备的控制开关的数量。

The invention provides an audio control method and device, audio equipment, and computer-readable storage media. The audio control method is applied to audio equipment. The audio equipment includes a rocker component. The method includes: Step S1: Obtaining the first variables x1 and The second variable y1, where the first variable x1 is proportional to the rocking amount of the rocker current position of the rocker assembly relative to the rocker reset position of the rocker assembly in the first direction, and the second variable y1 is proportional to the rocking amount of the rocker assembly. The current position of the rod is proportional to the amount of swing in the second direction relative to the rocker reset position of the rocker assembly; Step S2: Perform first or second direction control based on the relationship between the absolute value of x1 and the absolute value of y1 audio operations. The present invention can utilize the rocker assembly to realize audio control of the audio equipment, and can meet the user's various audio control needs through the rocker assembly, which is beneficial to reducing the number of control switches of the audio equipment.

Description

音频控制方法及装置、音频设备、计算机可读存储介质Audio control method and device, audio equipment, computer-readable storage medium

技术领域Technical field

本发明涉及音频技术领域,尤其涉及一种音频控制方法及装置、音频设备、计算机可读存储介质。The present invention relates to the field of audio technology, and in particular, to an audio control method and device, audio equipment, and computer-readable storage media.

背景技术Background technique

蓝牙音箱作为一款智能家居电子产品,现在已广泛普及在市场,为了方便用户操作,目前蓝牙音箱通常会配备较多的控制开关(如暂停播放按键、音量增加按键、音量减小按键等),通过不同的控制开关满足用户不同的操控需求。As a smart home electronic product, Bluetooth speakers are now widely popular in the market. In order to facilitate user operation, Bluetooth speakers are usually equipped with more control switches (such as pause playback button, volume increase button, volume decrease button, etc.). Different control switches are used to meet the different control needs of users.

发明内容Contents of the invention

基于上述现状,本发明的主要目的在于提供一种音频控制方法及装置、音频设备、计算机可读存储介质,能够满足用户的多种音频操控需求,有利于减少音频设备的控制开关的数量。Based on the above status quo, the main purpose of the present invention is to provide an audio control method and device, audio equipment, and a computer-readable storage medium that can meet the user's various audio control needs and help reduce the number of control switches of the audio equipment.

为实现上述目的,本发明的技术方案提供了一种音频控制方法,应用于音频设备,所述音频设备包括摇杆组件,所述方法包括:In order to achieve the above object, the technical solution of the present invention provides an audio control method, which is applied to audio equipment. The audio equipment includes a rocker assembly. The method includes:

步骤S1:获取第一变量x1和第二变量y1,其中,所述第一变量x1与所述摇杆组件的摇杆当前位置相对于所述摇杆组件的摇杆复位位置在第一方向的摇摆量成正比,所述第二变量y1与所述摇杆组件的摇杆当前位置相对于所述摇杆组件的摇杆复位位置在第二方向的摇摆量成正比,所述第一方向与所述第二方向垂直;Step S1: Obtain the first variable x1 and the second variable y1, wherein the first variable x1 and the current position of the rocker of the rocker assembly are in the first direction relative to the rocker reset position of the rocker assembly. The second variable y1 is proportional to the amount of swing in the second direction of the rocker current position of the rocker assembly relative to the rocker reset position of the rocker assembly, and the first direction is proportional to The second direction is vertical;

步骤S2:根据x1的绝对值与y1的绝对值之间的大小关系执行第一方向或第二方向控制的音频操作。Step S2: Perform an audio operation controlled by the first direction or the second direction according to the size relationship between the absolute value of x1 and the absolute value of y1.

进一步地,所述音频设备还包括与所述摇杆组件相关联的可移动机构;所述方法还包括:Further, the audio device further includes a movable mechanism associated with the rocker assembly; the method further includes:

步骤SS1:获取第三变量z1,所述第三变量z1随所述可移动机构的当前位置相对于其基准位置在第三方向上的偏移量的变化而发生变化;Step SS1: Obtain the third variable z1, which changes with the change of the offset of the current position of the movable mechanism relative to its reference position in the third direction;

步骤SS2:根据所述第三变量z1与阈值的大小关系执行第三方向控制的开关操作。Step SS2: Execute the switching operation of the third direction control according to the relationship between the third variable z1 and the threshold value.

进一步地,所述音频设备还包括霍尔开关,所述霍尔开关包括霍尔元件以及磁体,所述可移动机构包括所述霍尔元件或者所述磁体,所述摇杆组件在所述第三方向上的移动可改变所述可移动机构的当前位置相对于其基准位置在所述第三方向上的偏移量,进而改变所述霍尔元件的输出电压,所述第三方向与所述第一方向、所述第二方向均垂直;Further, the audio device further includes a Hall switch, the Hall switch includes a Hall element and a magnet, the movable mechanism includes the Hall element or the magnet, and the rocker assembly is in the third position. Movement in three directions can change the offset of the current position of the movable mechanism relative to its reference position in the third direction, thereby changing the output voltage of the Hall element. The third direction is related to the third direction. One direction and the second direction are both vertical;

其中,步骤SS1中,所述第三变量z1为所述霍尔元件的输出电压。Wherein, in step SS1, the third variable z1 is the output voltage of the Hall element.

进一步地,所述第一方向的控制为调节音量的操作,所述第二方向的控制为切换播放的音频资源的操作;Further, the control in the first direction is an operation to adjust the volume, and the control in the second direction is an operation to switch the audio resource played;

其中,步骤S2包括:Among them, step S2 includes:

步骤S21:判断x1的绝对值是否小于y1的绝对值,若否,执行步骤S22,若是,执行步骤S23;Step S21: Determine whether the absolute value of x1 is less than the absolute value of y1. If not, execute step S22. If yes, execute step S23;

步骤S22:根据x1的正负调节音量,其中,x1为正表示所述第一方向的正向,x1为负表示所述第一方向的反向;Step S22: Adjust the volume according to the positive or negative value of x1, where positive x1 indicates the positive direction of the first direction, and negative x1 indicates the reverse direction of the first direction;

步骤S23:根据y1的正负切换播放的音频资源,其中,y1为正表示所述第二方向的正向,y1为负表示所述第二方向的反向。Step S23: Switch the played audio resource according to the positive or negative value of y1, where positive y1 indicates the forward direction of the second direction, and negative y1 indicates the reverse direction of the second direction.

进一步地,步骤S22包括:Further, step S22 includes:

步骤S22a:判断x1的绝对值是否大于第一偏移阈值,若是,执行步骤S22b,若否,执行步骤S22c;Step S22a: Determine whether the absolute value of x1 is greater than the first offset threshold. If yes, execute step S22b. If not, execute step S22c;

步骤S22b:若x1为正,则增加设定值的音量,若x1为负,则减少设定值的音量;Step S22b: If x1 is positive, increase the volume of the set value; if x1 is negative, decrease the volume of the set value;

步骤S22c:保持当前音量不变。Step S22c: Keep the current volume unchanged.

进一步地,步骤S23包括:Further, step S23 includes:

步骤S23a:判断y1的绝对值是否大于第二偏移阈值,若是,执行步骤S23b,若否,执行步骤S23c;Step S23a: Determine whether the absolute value of y1 is greater than the second offset threshold. If yes, execute step S23b. If not, execute step S23c;

步骤S23b:若y1为正,则切换至播放目录中的下一个音频资源进行播放,若y1为负,则切换至播放目录中的上一个音频资源进行播放;Step S23b: If y1 is positive, switch to the next audio resource in the play directory for playback; if y1 is negative, switch to the previous audio resource in the play directory for playback;

步骤S23c:保持当前播放的音频资源不变。Step S23c: Keep the currently played audio resource unchanged.

进一步地,所述方法还包括:Further, the method also includes:

根据从当前时刻开始前的预设时间段内所述摇杆组件的摇杆位置变化轨迹,执行音频控制操作。The audio control operation is performed according to the rocker position change trajectory of the rocker assembly within a preset time period before the current time.

进一步地,所述根据从当前时刻开始前的预设时间段内所述摇杆组件的摇杆位置变化轨迹,执行音频控制操作包括:Further, performing the audio control operation based on the rocker position change trajectory of the rocker assembly within a preset time period before the current time includes:

若所述摇杆位置变化轨迹为绕所述摇杆复位位置旋转达到一周,则由当前的暂停播放状态切换为播放状态或者由当前的播放状态切换为暂停播放状态。If the change track of the rocker position is to rotate around the reset position of the rocker for one revolution, the current paused playback state is switched to the playback state or the current playback state is switched to the paused playback state.

为实现上述目的,本发明的技术方案还提供了一种音频控制装置,应用于音频设备,所述音频设备包括摇杆组件,所述音频控制装置包括:In order to achieve the above object, the technical solution of the present invention also provides an audio control device, which is applied to audio equipment. The audio equipment includes a rocker assembly, and the audio control device includes:

第一获取模块,用于获取第一变量x1和第二变量y1,其中,所述第一变量x1与所述摇杆组件的摇杆当前位置相对于所述摇杆组件的摇杆复位位置在第一方向的摇摆量成正比,所述第二变量y1与所述摇杆组件的摇杆当前位置相对于所述摇杆组件的摇杆复位位置在第二方向的摇摆量成正比,所述第一方向与所述第二方向垂直;The first acquisition module is used to acquire the first variable x1 and the second variable y1, wherein the first variable x1 and the current position of the rocker of the rocker assembly are relative to the rocker reset position of the rocker assembly. The second variable y1 is proportional to the amount of swing in the second direction relative to the current position of the rocker assembly relative to the rocker reset position of the rocker assembly. The first direction is perpendicular to the second direction;

第一控制模块,用于根据x1的绝对值与y1的绝对值之间的大小关系执行第一方向或第二方向控制的音频操作。The first control module is configured to perform an audio operation controlled by the first direction or the second direction according to the magnitude relationship between the absolute value of x1 and the absolute value of y1.

进一步地,所述音频设备还包括与所述摇杆组件相关联的可移动机构;所述音频控制装置还包括:Further, the audio equipment further includes a movable mechanism associated with the rocker assembly; the audio control device further includes:

第二获取模块,用于获取第三变量z1,所述第三变量z1随所述可移动机构的当前位置相对于其基准位置在第三方向上的偏移量的变化而发生变化;The second acquisition module is used to acquire the third variable z1, which changes with the change of the offset of the current position of the movable mechanism relative to its reference position in the third direction;

第二控制模块,用于根据所述第三变量z1与阈值的大小关系执行第三方向控制的开关操作。The second control module is configured to perform the switching operation of the third direction control according to the relationship between the third variable z1 and the threshold value.

进一步地,所述音频控制装置还包括:Further, the audio control device also includes:

第三控制模块,用于根据从当前时刻开始前的预设时间段内所述摇杆组件的摇杆位置变化轨迹,执行音频控制操作。The third control module is used to perform audio control operations according to the rocker position change trajectory of the rocker assembly within a preset time period before the current time.

为实现上述目的,本发明的技术方案还提供了一种音频设备,包括摇杆组件、处理器、与所述处理器耦合的存储器,其中,所述存储器中存储有指令,以供所述处理器执行,当所述处理器执行所述指令时,能实现上述的音频控制方法。In order to achieve the above object, the technical solution of the present invention also provides an audio device, including a rocker component, a processor, and a memory coupled to the processor, wherein instructions are stored in the memory for the processing. When the processor executes the instruction, the above audio control method can be implemented.

进一步地,所述音频设备为音箱、耳机、电视、投影仪、智能平板、笔记本电脑或台式电脑。Further, the audio device is a speaker, headphones, TV, projector, smart tablet, notebook computer or desktop computer.

为实现上述目的,本发明的技术方案还提供了一种计算机可读存储介质,其存储有计算机程序,该程序被处理器执行时实现上述的音频控制方法。In order to achieve the above object, the technical solution of the present invention also provides a computer-readable storage medium, which stores a computer program. When the program is executed by a processor, the above audio control method is implemented.

本发明提供的音频控制方法,能够利用摇杆组件实现对音频设备的音频控制,通过摇杆组件能够满足用户的多种音频操控需求,有利于减少音频设备的控制开关的数量。The audio control method provided by the present invention can realize the audio control of the audio equipment by using the rocker assembly, and can meet the user's various audio control needs through the rocker assembly, which is beneficial to reducing the number of control switches of the audio equipment.

附图说明Description of the drawings

通过以下参照附图对本发明实施例的描述,本发明的上述以及其它目的、特征和优点将更为清楚,在附图中:The above and other objects, features and advantages of the present invention will become more apparent from the following description of embodiments of the present invention with reference to the accompanying drawings, in which:

图1是本发明实施例提供的一种音频控制方法的流程图;Figure 1 is a flow chart of an audio control method provided by an embodiment of the present invention;

图2是本发明实施例提供的摇杆组件的摇杆当前位置示意图;Figure 2 is a schematic diagram of the current position of the rocker of the rocker assembly provided by the embodiment of the present invention;

图3和图4是本发明实施例提供的一种霍尔开关和摇杆组件的示意图;Figures 3 and 4 are schematic diagrams of a Hall switch and rocker assembly provided by an embodiment of the present invention;

图5是本发明实施例提供的一种磁体的示意图。Figure 5 is a schematic diagram of a magnet provided by an embodiment of the present invention.

具体实施方式Detailed ways

以下基于实施例对本发明进行描述,但是本发明并不仅仅限于这些实施例。在下文对本发明的细节描述中,详尽描述了一些特定的细节部分,为了避免混淆本发明的实质,公知的方法、过程、流程、元件并没有详细叙述。The present invention will be described below based on examples, but the present invention is not limited only to these examples. In the following detailed description of the present invention, some specific details are described in detail. In order to avoid confusing the essence of the present invention, well-known methods, processes, procedures, and components are not described in detail.

此外,本领域普通技术人员应当理解,在此提供的附图都是为了说明的目的,并且附图不一定是按比例绘制的。Furthermore, those of ordinary skill in the art will appreciate that the drawings provided herein are for illustrative purposes and that the drawings are not necessarily drawn to scale.

除非上下文明确要求,否则整个说明书和权利要求书中的“包括”、“包含”等类似词语应当解释为包含的含义而不是排他或穷举的含义;也就是说,是“包括但不限于”的含义。Unless the context clearly requires otherwise, throughout the specification and claims, the words “include,” “include,” and similar words shall be interpreted in an inclusive sense rather than in an exclusive or exhaustive sense; that is, as “including but not limited to” meaning.

在本发明的描述中,需要理解的是,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。此外,在本发明的描述中,除非另有说明,“多个”的含义是两个或两个以上。In the description of the present invention, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and shall not be understood as indicating or implying relative importance. Furthermore, in the description of the present invention, unless otherwise specified, "plurality" means two or more.

参见图1,图1是本发明实施例提供的一种音频控制方法的流程图,该方法应用于音频设备,所述音频设备包括摇杆组件,所述方法包括:Referring to Figure 1, Figure 1 is a flow chart of an audio control method provided by an embodiment of the present invention. The method is applied to audio equipment. The audio equipment includes a joystick assembly. The method includes:

步骤S1:获取第一变量x1和第二变量y1,其中,所述第一变量x1与所述摇杆组件的摇杆当前位置相对于所述摇杆组件的摇杆复位位置在第一方向的摇摆量成正比,所述第二变量y1与所述摇杆组件的摇杆当前位置相对于所述摇杆组件的摇杆复位位置在第二方向的摇摆量成正比,所述第一方向与所述第二方向垂直;Step S1: Obtain the first variable x1 and the second variable y1, wherein the first variable x1 and the current position of the rocker of the rocker assembly are in the first direction relative to the rocker reset position of the rocker assembly. The second variable y1 is proportional to the amount of swing in the second direction of the rocker current position of the rocker assembly relative to the rocker reset position of the rocker assembly, and the first direction is proportional to The second direction is vertical;

步骤S2:根据x1的绝对值与y1的绝对值之间的大小关系执行第一方向或第二方向控制的音频操作。Step S2: Perform an audio operation controlled by the first direction or the second direction according to the size relationship between the absolute value of x1 and the absolute value of y1.

本发明实施例提供的音频控制方法,能够利用摇杆组件实现对音频设备的音频控制,通过摇杆组件能够满足用户的多种音频操控需求,有利于减少音频设备的控制开关的数量。The audio control method provided by the embodiment of the present invention can use the joystick component to realize audio control of the audio device. The joystick component can meet the user's various audio control needs, which is beneficial to reducing the number of control switches of the audio device.

例如,在一实施例中,所述摇杆组件可以是二维摇杆组件,摇杆的摇摆包括在X轴方向的摇摆和在Y轴方向的摇摆,如图2所示,以X轴方向为第一方向,Y轴方向为第二方向,所述摇杆组件的摇杆复位位置为原点,(x,y)为摇杆当前位置,通过摇杆当前位置即可以得到第一变量x1和第二变量y1;For example, in one embodiment, the rocker assembly may be a two-dimensional rocker assembly. The rocking of the rocker includes rocking in the X-axis direction and rocking in the Y-axis direction. As shown in Figure 2, with the X-axis direction is the first direction, the Y-axis direction is the second direction, the rocker reset position of the rocker assembly is the origin, (x, y) is the current position of the rocker, and the first variables x1 and The second variable y1;

本发明实施例中,摇杆组件可以包括摇杆和摇杆电位器,当摇杆位置不同时(即在X轴和Y轴上的偏移量不同时),摇杆电位器的电阻不同,输出的电压信号也会变化,通过摇杆电位器当前输出的电压信号即可以得到摇杆当前位置;In the embodiment of the present invention, the rocker assembly may include a rocker and a rocker potentiometer. When the rocker positions are different (that is, when the offsets on the X-axis and the Y-axis are different), the resistance of the rocker potentiometer is different. The output voltage signal will also change. The current position of the joystick can be obtained through the voltage signal currently output by the joystick potentiometer;

优选地,在一实施例中,所述音频设备还包括与所述摇杆组件相关联的可移动机构,上述的音频控制方法还包括:Preferably, in one embodiment, the audio device further includes a movable mechanism associated with the rocker assembly, and the above audio control method further includes:

步骤SS1:获取第三变量z1,所述第三变量z1随所述可移动机构的当前位置相对于其基准位置在第三方向上的偏移量的变化而发生变化,例如,所述第三变量z1可以为所述可移动机构的当前位置相对于其基准位置在第三方向上的偏移量;Step SS1: Obtain the third variable z1. The third variable z1 changes with the change of the offset of the current position of the movable mechanism relative to its reference position in the third direction. For example, the third variable z1 z1 may be the offset in the third direction of the current position of the movable mechanism relative to its reference position;

步骤SS2:根据所述第三变量z1与阈值的大小关系执行第三方向控制的开关操作。Step SS2: Execute the switching operation of the third direction control according to the relationship between the third variable z1 and the threshold value.

例如,在一实施例中,所述音频设备还包括霍尔开关,所述霍尔开关包括霍尔元件以及磁体,所述可移动机构包括所述霍尔元件或者所述磁体,所述摇杆组件在所述第三方向上的移动可改变所述可移动机构的当前位置相对于其基准位置在所述第三方向上的偏移量,进而改变所述霍尔元件的输出电压,所述第三方向与所述第一方向、所述第二方向均垂直;其中,步骤SS1包括:获取所述霍尔元件的输出电压,即第三变量z1可以为霍尔元件的输出电压;For example, in one embodiment, the audio device further includes a Hall switch, the Hall switch includes a Hall element and a magnet, the movable mechanism includes the Hall element or the magnet, and the rocker The movement of the component in the third direction can change the offset of the current position of the movable mechanism relative to its reference position in the third direction, thereby changing the output voltage of the Hall element. The direction is perpendicular to both the first direction and the second direction; wherein step SS1 includes: obtaining the output voltage of the Hall element, that is, the third variable z1 can be the output voltage of the Hall element;

即在本实施例中,摇杆组件可在所述第三方向上移动,并且通过摇杆组件在第三方向上的移动可改变所述霍尔元件与所述磁体之间的相对位置,进而改变霍尔元件的输出电压,例如,在一实施例中,所述第三变量z1越大,则所述霍尔元件的输出电压越大,相应的,在步骤SS2中,可以根据所述霍尔元件的输出电压与预设的电压阈值的大小关系执行第三方向控制的开关操作,例如,若霍尔元件的输出电压大于第一阈值,则执行开启指令,若霍尔元件的输出电压小于第二阈值,则执行关闭指令,第一阈值大于第二阈值。That is, in this embodiment, the rocker assembly can move in the third direction, and the relative position between the Hall element and the magnet can be changed by moving the rocker assembly in the third direction, thereby changing the Hall element. The output voltage of the Hall element. For example, in one embodiment, the greater the third variable z1 is, the greater the output voltage of the Hall element is. Correspondingly, in step SS2, the Hall element can be The relationship between the output voltage and the preset voltage threshold is used to perform the switching operation controlled by the third direction. For example, if the output voltage of the Hall element is greater than the first threshold, the turn-on instruction is executed. If the output voltage of the Hall element is less than the second threshold, the turn-on instruction is executed. threshold, the shutdown instruction is executed, and the first threshold is greater than the second threshold.

例如,在一实施例中,在步骤S2中,若x1的绝对值小于y1的绝对值,则执行音量减少操作,例如,可以减少设定值的音量,若x1的绝对值大于等于y1的绝对值,则执行音量增加操作,例如,可以增加设定值的音量。For example, in one embodiment, in step S2, if the absolute value of x1 is less than the absolute value of y1, a volume reduction operation is performed. For example, the volume of the set value can be reduced. If the absolute value of value, perform a volume increase operation, for example, you can increase the volume of the set value.

优选地,为了能够满足更多的操控需求,还可以根据在第一方向的偏移量的方向(正向或反向)、在第二方向的偏移量的方向(正向或反向)执行不同的音频控制操作,例如,在一实施例中,所述第一方向的控制为调节音量的操作,所述第二方向的控制为切换播放的音频资源的操作,上述的步骤S2可以包括:Preferably, in order to meet more control requirements, the direction of the offset in the first direction (forward or reverse) and the direction of the offset in the second direction (forward or reverse) can also be used. Perform different audio control operations. For example, in one embodiment, the control in the first direction is the operation of adjusting the volume, and the control in the second direction is the operation of switching the played audio resource. The above step S2 may include :

步骤S21:判断x1的绝对值是否小于y1的绝对值,若否,执行步骤S22,若是,执行步骤S23;Step S21: Determine whether the absolute value of x1 is less than the absolute value of y1. If not, execute step S22. If yes, execute step S23;

步骤S22:进入音量调节模式,根据x1的正负调节音量,其中,x1为正表示所述第一方向的正向(即x1是朝X轴的正向偏移),x1为负表示所述第一方向的反向(即x1是朝X轴的反向偏移);Step S22: Enter the volume adjustment mode, and adjust the volume according to the positive or negative value of The reverse direction of the first direction (i.e. x1 is the reverse offset towards the X-axis);

步骤S23:进入音频资源调节模式,根据y1的正负切换播放的音频资源,其中,y1为正表示所述第二方向的正向(即y1是朝Y轴的正向偏移),y1为负表示所述第二方向的反向(即y1是朝Y轴的反向偏移),例如,音频资源的切换可以是收音频道的切换,也可以是音频文件的切换。Step S23: Enter the audio resource adjustment mode, and switch the played audio resources according to the positive or negative value of y1, where y1 is positive, indicating the positive direction of the second direction (that is, y1 is a positive offset toward the Y axis), and y1 is Negative indicates the reverse direction of the second direction (that is, y1 is the reverse offset toward the Y-axis). For example, switching audio resources may be switching of radio channels or audio files.

优选地,为了减少误触操作,在一实施例中,步骤S22可以包括:Preferably, in order to reduce accidental touch operations, in an embodiment, step S22 may include:

步骤S22a:判断x1的绝对值是否大于第一偏移阈值,若是,执行步骤S22b,若否,执行步骤S22c;Step S22a: Determine whether the absolute value of x1 is greater than the first offset threshold. If yes, execute step S22b. If not, execute step S22c;

其中,该第一偏移阈值可以根据具体情况进行预先设置;Wherein, the first offset threshold can be preset according to specific circumstances;

步骤S22b:若x1为正,则增加设定值的音量,若x1为负,则减少设定值的音量;Step S22b: If x1 is positive, increase the volume of the set value; if x1 is negative, decrease the volume of the set value;

步骤S22c:保持当前音量不变。Step S22c: Keep the current volume unchanged.

优选地,为了减少误触操作,在一实施例中,步骤S23包括:Preferably, in order to reduce accidental touch operations, in an embodiment, step S23 includes:

步骤S23a:判断y1的绝对值是否大于第二偏移阈值,若是,执行步骤S23b,若否,执行步骤S23c;Step S23a: Determine whether the absolute value of y1 is greater than the second offset threshold. If yes, execute step S23b. If not, execute step S23c;

其中,该第二偏移阈值可以根据具体情况进行预先设置;Wherein, the second offset threshold can be preset according to specific circumstances;

步骤S23b:若y1为正,则切换至播放目录中的下一个音频资源进行播放,若y1为负,则切换至播放目录中的上一个音频资源进行播放;Step S23b: If y1 is positive, switch to the next audio resource in the play directory for playback; if y1 is negative, switch to the previous audio resource in the play directory for playback;

步骤S23c:保持当前播放的音频资源不变。Step S23c: Keep the currently played audio resource unchanged.

例如,在一实施例中,可以预先建立音频控制指令列表并进行存储,该音频控制指令列表包括不同的音频控制指令,当处理器通过上述方法确定当前要执行的音频控制操作后,可以从音频控制指令列表中调取对应的音频控制指令并执行,实现相应的音频控制功能。For example, in one embodiment, an audio control instruction list can be established and stored in advance. The audio control instruction list includes different audio control instructions. After the processor determines the audio control operation currently to be performed through the above method, it can obtain the audio control instruction from the audio control instruction list. The corresponding audio control instruction is retrieved from the control instruction list and executed to implement the corresponding audio control function.

优选地,在一实施例中,为了能够满足更多的操控需求,上述的音频控制方法还可以包括:Preferably, in an embodiment, in order to meet more control requirements, the above audio control method may also include:

根据从当前时刻开始前的预设时间段内所述摇杆组件的摇杆位置变化轨迹,执行音频控制操作,例如,该步骤可以具体包括:若所述摇杆位置变化轨迹为绕所述摇杆复位位置旋转达到一周,则由当前的暂停播放状态切换为播放状态或者由当前的播放状态切换为暂停播放状态。Perform an audio control operation according to the rocker position change trajectory of the rocker assembly within a preset time period before the current time. For example, this step may specifically include: if the rocker position change trajectory is around the rocker When the lever reset position rotates for one revolution, the current paused playback state is switched to the playback state or the current playback state is switched to the paused playback state.

例如,在一实施例中,若判断从当前时刻开始前的预设时间段内,摇杆位置变化轨迹为绕摇杆复位位置顺时针旋转达到一周(顺时针旋转超过360度),则进行音频输出状态的切换(若当前音频设备为播放状态,则音频设备切换至暂停播放状态;若当前音频设备为暂停播放状态,则音频设备切换至播放状态)。For example, in one embodiment, if it is determined that within the preset time period before the current time, the rocker position change trajectory is a clockwise rotation around the rocker reset position (more than 360 degrees clockwise rotation), then the audio Switching of the output state (if the current audio device is in the playback state, the audio device switches to the paused playback state; if the current audio device is in the paused playback state, the audio device switches to the playback state).

本发明实施例提供的音频控制方法,能够利用摇杆组件实现对音频设备的音频控制,能够满足用户的多种操控需求,有利于减少音频设备的控制开关的数量,且操作方便。The audio control method provided by the embodiment of the present invention can use the joystick assembly to realize audio control of the audio equipment, can meet the user's various control needs, is conducive to reducing the number of control switches of the audio equipment, and is easy to operate.

本发明实施例还提供了一种音频控制装置,应用于音频设备,所述音频设备包括摇杆组件,所述音频控制装置包括:An embodiment of the present invention also provides an audio control device, which is applied to audio equipment. The audio equipment includes a rocker assembly, and the audio control device includes:

第一获取模块,用于获取第一变量x1和第二变量y1,其中,所述第一变量x1与所述摇杆组件的摇杆当前位置相对于所述摇杆组件的摇杆复位位置在第一方向的摇摆量成正比,所述第二变量y1与所述摇杆组件的摇杆当前位置相对于所述摇杆组件的摇杆复位位置在第二方向的摇摆量成正比,所述第一方向与所述第二方向垂直;The first acquisition module is used to acquire the first variable x1 and the second variable y1, wherein the first variable x1 and the current position of the rocker of the rocker assembly are relative to the rocker reset position of the rocker assembly. The second variable y1 is proportional to the amount of swing in the second direction relative to the current position of the rocker assembly relative to the rocker reset position of the rocker assembly. The first direction is perpendicular to the second direction;

第一控制模块,用于根据x1的绝对值与y1的绝对值之间的大小关系执行第一方向或第二方向控制的音频操作。The first control module is configured to perform an audio operation controlled by the first direction or the second direction according to the magnitude relationship between the absolute value of x1 and the absolute value of y1.

优选地,在一实施例中,所述音频设备还包括与所述摇杆组件相关联的可移动机构;所述音频控制装置还包括:Preferably, in one embodiment, the audio equipment further includes a movable mechanism associated with the rocker assembly; the audio control device further includes:

第二获取模块,用于获取第三变量z1,所述第三变量z1随所述可移动机构的当前位置相对于其基准位置在第三方向上的偏移量的变化而发生变化;The second acquisition module is used to acquire the third variable z1, which changes with the change of the offset of the current position of the movable mechanism relative to its reference position in the third direction;

第二控制模块,用于根据所述第三变量z1与阈值的大小关系执行第三方向控制的开关操作。The second control module is configured to perform the switching operation of the third direction control according to the relationship between the third variable z1 and the threshold value.

优选地,在一实施例中,所述音频控制装置还包括:Preferably, in one embodiment, the audio control device further includes:

第三控制模块,用于根据从当前时刻开始前的预设时间段内所述摇杆组件的摇杆位置变化轨迹,执行音频控制操作。The third control module is used to perform audio control operations according to the rocker position change trajectory of the rocker assembly within a preset time period before the current time.

本发明实施例还提供了一种音频设备,包括摇杆组件、处理器、与所述处理器耦合的存储器,其中,所述存储器中存储有指令,以供所述处理器执行,当所述处理器执行所述指令时,能实现如上述的音频控制方法。An embodiment of the present invention also provides an audio device, including a joystick component, a processor, and a memory coupled to the processor, wherein instructions are stored in the memory for execution by the processor, and when the When the processor executes the instructions, the above audio control method can be implemented.

例如,所述音频设备可以是音箱、耳机、电视、投影仪、智能平板、笔记本电脑或台式电脑。For example, the audio device may be a speaker, headphones, TV, projector, smart tablet, laptop or desktop computer.

优选地,在一实施例中,上述的音频设备还可以包括霍尔开关,所述摇杆组件以及所述霍尔开关分别与音频设备的处理器相连;Preferably, in an embodiment, the above-mentioned audio device may further include a Hall switch, and the rocker assembly and the Hall switch are respectively connected to the processor of the audio device;

其中,所述霍尔开关包括霍尔元件以及磁体;Wherein, the Hall switch includes a Hall element and a magnet;

所述摇杆组件在预设方向上可移动,且所述摇杆组件在所述预设方向上的移动可改变所述霍尔元件与所述磁体之间的相对位置,所述预设方向垂直所述摇杆组件的遥杆可摇动平面,即所述预设方向为摇杆组件在复位位置的遥杆长度方向。The rocker assembly is movable in a preset direction, and the movement of the rocker assembly in the preset direction can change the relative position between the Hall element and the magnet. The preset direction The rocking plane of the joystick is perpendicular to the rocker assembly, that is, the preset direction is the length direction of the joystick when the rocker assembly is in the reset position.

本实施例提供的音频设备包括霍尔开关以及在预设方向上可移动的摇杆组件,并且摇杆组件在预设方向上的移动可改变霍尔开关中霍尔元件与磁体之间的相对位置,在操控过程中,用户不但可以在遥杆可摇动平面上摇动摇杆组件的摇杆,实现摇杆组件的操控,还可以在预设方向上移动摇杆组件从而改变霍尔开关中霍尔元件与磁体之间的相对位置,实现对霍尔开关的操控,从而不但能够满足多种音频操控需求,有利于减少音频设备中控制开关的数量,还方便用户的操控。The audio device provided by this embodiment includes a Hall switch and a rocker assembly that is movable in a preset direction, and the movement of the rocker assembly in the preset direction can change the relative relationship between the Hall element and the magnet in the Hall switch. position, during the control process, the user can not only shake the rocker of the rocker assembly on the rockable plane of the joystick to control the rocker assembly, but also move the rocker assembly in the preset direction to change the Hall switch. The relative position between the Hall element and the magnet realizes the control of the Hall switch, which not only meets a variety of audio control needs, helps reduce the number of control switches in audio equipment, and also facilitates user control.

优选地,在一实施例中,所述摇杆组件通过联动部件与所述霍尔元件或者所述磁体相连,使得所述摇杆组件在所述预设方向上的移动可改变所述霍尔元件与所述磁铁之间的相对位置。Preferably, in one embodiment, the rocker assembly is connected to the Hall element or the magnet through a linkage component, so that the movement of the rocker assembly in the preset direction can change the Hall element. The relative position between the element and the magnet.

优选地,在一实施例中,所述磁体包括第一磁体和第二磁体,所述摇杆组件、所述第一磁体、所述霍尔元件、所述第二磁体在所述预设方向上依次排列,所述摇杆组件通过所述联动部件与所述霍尔元件相连。Preferably, in one embodiment, the magnets include a first magnet and a second magnet, and the rocker assembly, the first magnet, the Hall element, and the second magnet move in the preset direction. Arranged in sequence above, the rocker assembly is connected to the Hall element through the linkage component.

优选地,在一实施例中,所述第一磁体设置有过孔,所述联动部件贯穿所述过孔,所述联动部件的一端连接所述摇杆组件,所述联动部件的另一端连接所述霍尔元件。Preferably, in one embodiment, the first magnet is provided with a through hole, the linkage component passes through the through hole, one end of the linkage component is connected to the rocker assembly, and the other end of the linkage component is connected to The Hall element.

优选地,在一实施例中,所述第一磁体为圆环型,所述过孔为圆形过孔。Preferably, in one embodiment, the first magnet is annular, and the via hole is a circular via hole.

优选地,在一实施例中,所述联动部件包括联动杆,所述联动杆为绝缘的空心结构,所述联动杆内还设置有所述霍尔开关的信号线。Preferably, in one embodiment, the linkage component includes a linkage rod, the linkage rod is an insulated hollow structure, and the signal line of the Hall switch is also provided in the linkage rod.

优选地,在一实施例中,所述控制开关还包括筒状的外壳,所述霍尔元件以及所述磁体设置在所述外壳内,且所述外壳上设有供所述摇杆组件进出的开口。Preferably, in one embodiment, the control switch further includes a cylindrical casing, the Hall element and the magnet are arranged in the casing, and there is a hole on the casing for the rocker assembly to enter and exit. of opening.

例如,参见图3和图4,本实施例的音频设备(如音箱)的控制开关包括霍尔开关、摇杆组件220以及筒状的外壳240;For example, referring to Figures 3 and 4, the control switch of the audio device (such as a speaker) in this embodiment includes a Hall switch, a rocker assembly 220 and a cylindrical housing 240;

其中,该霍尔开关包括一霍尔元件213以及第一磁体211以及第二磁铁212,其中,第一磁体211以及第二磁铁212可以是磁铁,霍尔元件213用于感应环境磁场并产生相应的霍尔电压;Among them, the Hall switch includes a Hall element 213 and first magnet 211 and second magnet 212. The first magnet 211 and the second magnet 212 can be magnets. The Hall element 213 is used to sense the environmental magnetic field and generate a corresponding Hall voltage;

摇杆组件220在预设方向(即第三方向)上可移动,该预设方向垂直摇杆组件220的遥杆可摇动平面,且摇杆组件220、第一磁体211、霍尔元件213、第二磁体212在该预设方向上依次排列;The rocker assembly 220 is movable in a preset direction (ie, the third direction), which is perpendicular to the rocking plane of the rocker assembly 220, and the rocker assembly 220, the first magnet 211, the Hall element 213, The second magnets 212 are arranged sequentially in the preset direction;

霍尔元件213、第一磁体211以及第二磁铁212设置在外壳240内,且第一磁体211以及第二磁铁212通过固定器件241固定在外壳140内,外壳240上设有供摇杆组件220进出的开口,便于摇杆组件220推入外壳240内或者从外壳240内拉出,此外,通过第一磁体211以及第二磁铁212可以限制霍尔元件111在预设方向上可移动的范围;The Hall element 213, the first magnet 211 and the second magnet 212 are arranged in the housing 240, and the first magnet 211 and the second magnet 212 are fixed in the housing 140 through the fixing device 241. The housing 240 is provided with a rocker assembly 220 The entrance and exit opening facilitates the rocker assembly 220 to be pushed into or pulled out of the housing 240. In addition, the first magnet 211 and the second magnet 212 can limit the movable range of the Hall element 111 in the preset direction;

摇杆组件220通过联动部件与霍尔元件213相连,使得摇杆组件220在预设方向上的移动能够带动霍尔元件213在预设方向上的移动,进而改变霍尔元件111与第一磁体211以及第二磁铁212的相对位置,从而改变霍尔开关的输出状态;The rocker assembly 220 is connected to the Hall element 213 through a linkage component, so that the movement of the rocker assembly 220 in the preset direction can drive the movement of the Hall element 213 in the preset direction, thereby changing the relationship between the Hall element 111 and the first magnet. 211 and the relative position of the second magnet 212, thereby changing the output state of the Hall switch;

其中,摇杆组件220包括摇杆221和摇杆电位器222,用户可以在遥杆可摇动平面上摇动摇杆(即摇杆的摇摆可以包括在第一方向的摇摆和在第二方向的摇摆),摇杆电位器222输出不同的电信号;The rocker assembly 220 includes a rocker 221 and a rocker potentiometer 222. The user can rock the rocker on a rockable plane of the rocker (that is, the rocking of the rocker may include rocking in the first direction and rocking in the second direction). ), the rocker potentiometer 222 outputs different electrical signals;

其中,联动部件包括联动杆231,优选地,联动部件还可以包括可拆卸的连接器232,通过连接器232连接遥感开关220和联动杆231,从而方便遥感开关220的安装和拆卸;The linkage component includes a linkage rod 231. Preferably, the linkage component may also include a detachable connector 232, through which the remote sensing switch 220 and the linkage rod 231 are connected, thereby facilitating the installation and removal of the remote sensing switch 220;

例如,如图5所示,可以在第一磁体211上设置过孔211a,联动部件贯穿第一磁体211的过孔211,联动部件的一端连接摇杆组件220,联动部件的另一端连接霍尔元件213,优选地,在一实施例中,如图5所示,第一磁体211可以是圆环型的磁体,过孔211a为圆形过孔,从而不但便于磁体的制作,而且使磁体具有较为均匀的磁场,第二磁体212可以是圆柱型,其两底面中一个为N极,另一个为S极;For example, as shown in Figure 5, a through hole 211a can be provided on the first magnet 211, the linkage component penetrates the through hole 211 of the first magnet 211, one end of the linkage component is connected to the rocker assembly 220, and the other end of the linkage component is connected to the Hall Component 213, preferably, in one embodiment, as shown in Figure 5, the first magnet 211 can be a ring-shaped magnet, and the via hole 211a is a circular via hole, which not only facilitates the production of the magnet, but also makes the magnet have For a relatively uniform magnetic field, the second magnet 212 can be cylindrical, with one of its two bottom surfaces being an N pole and the other being an S pole;

优选地,联动杆231为绝缘的空心结构,联动杆231内还设置有与霍尔开关的信号线,例如,可以将霍尔元件213的供电线、接地线、输出信号线设置在联动杆231内,达到节省空间的技术效果。Preferably, the linkage rod 231 is an insulated hollow structure, and the linkage rod 231 is also provided with signal lines for the Hall switch. For example, the power supply line, grounding line, and output signal line of the Hall element 213 can be provided on the linkage rod 231 within, achieving the technical effect of saving space.

在本实施例中,第一磁体211朝向所述第二磁体212的一侧与所述第二磁体212朝向所述第一磁体211的一侧极性相同,例如,所述第一磁体朝向所述第二磁体的一侧以及所述第二磁体朝向所述第一磁体的一侧均为N极,所述第一磁体背向所述第二磁体的一侧以及所述第二磁体背向所述第一磁体的一侧均为S极;In this embodiment, the side of the first magnet 211 facing the second magnet 212 and the side of the second magnet 212 facing the first magnet 211 have the same polarity. For example, the side of the first magnet facing the first magnet 212 has the same polarity. One side of the second magnet and the side of the second magnet facing the first magnet are both N poles, and the side of the first magnet facing away from the second magnet and the side of the second magnet facing away from One side of the first magnet is S pole;

例如,在一实施例中,可以获取第三变量z1,所述第三变量z1随所述可移动机构的当前位置相对于其基准位置在第三方向上的偏移量的变化而发生变化,之后根据所述第三变量z1与阈值的大小关系执行第三方向控制的开关操作,如图3和图4所示,霍尔元件213越远离第二磁体212,则相对于其基准位置在第三方向上的偏移量越大,霍尔元件213输出的电压越大,霍尔元件213越靠近第二磁体212,则其在第三方向上的偏移量越小,霍尔元件213输出的电压越小,因此,音频设备的处理器可以通过检测霍尔元件213输出的电压确定是否执行开关操作,例如,若处理器判断霍尔元件的输出电压大于第一阈值,执行开启指令,若判断霍尔元件的输出电压小于第二阈值,则执行关闭指令,第一阈值大于第二阈值。For example, in one embodiment, the third variable z1 may be obtained, and the third variable z1 changes with the change of the offset of the current position of the movable mechanism relative to its reference position in the third direction, and then The switching operation of the third direction control is performed according to the relationship between the third variable z1 and the threshold value. As shown in FIG. 3 and FIG. 4 , the further the Hall element 213 is away from the second magnet 212 , the greater the distance between the Hall element 213 and the second magnet 212 relative to its reference position. The greater the upward offset, the greater the voltage output by the Hall element 213. The closer the Hall element 213 is to the second magnet 212, the smaller the offset in the third direction, and the greater the voltage output by the Hall element 213. Small, therefore, the processor of the audio device can determine whether to perform the switching operation by detecting the voltage output by the Hall element 213. For example, if the processor determines that the output voltage of the Hall element is greater than the first threshold, it executes the turn-on instruction. If the output voltage of the component is less than the second threshold, the shutdown instruction is executed, and the first threshold is greater than the second threshold.

此外,在另一实施例中,霍尔开关除包括霍尔元件213以及第一磁体211以及第二磁铁212,还可以包括放大采样电路和判断单元,霍尔元件连接放大采样电路,放大采样电路用于对霍尔元件213的霍尔电压进行采样放大,判断单元对放大采样电路的输出(即采样放大后的信号)进行判断,根据判断的结果输出高电平或低电平;In addition, in another embodiment, in addition to the Hall element 213, the first magnet 211 and the second magnet 212, the Hall switch may also include an amplification sampling circuit and a judgment unit. The Hall element is connected to the amplification sampling circuit, and the amplification sampling circuit Used to sample and amplify the Hall voltage of the Hall element 213, the judgment unit judges the output of the amplification sampling circuit (i.e., the sampled amplified signal), and outputs a high level or a low level according to the judgment result;

例如,判断单元可以先将放大采样电路的输出电压与预设的第一电压阈值进行比较,若判断单元判断放大采样电路的输出电压大于第一电压阈值,则输出高电平信号,否则,将放大采样电路的输出电压与预设的第二电压阈值进行比较,若判断单元判断放大采样电路的输出电压小于第二电压阈值,则输出低电平信号,其中,第二电压阈值小于第一电压阈值,例如,第一电压阈值可以位于3.3v~5v,第二电压阈值可以位于0.1v~0.5v。For example, the judgment unit can first compare the output voltage of the amplification sampling circuit with a preset first voltage threshold. If the judgment unit judges that the output voltage of the amplification sampling circuit is greater than the first voltage threshold, it will output a high level signal; otherwise, it will The output voltage of the amplifying sampling circuit is compared with the preset second voltage threshold. If the judgment unit determines that the output voltage of the amplifying sampling circuit is less than the second voltage threshold, a low-level signal is output, wherein the second voltage threshold is less than the first voltage. Thresholds, for example, the first voltage threshold may be located between 3.3v and 5v, and the second voltage threshold may be located between 0.1v and 0.5v.

在本实施例中,当霍尔元件213移动至靠近第一磁铁211的位置时(如图4所示的位置),霍尔开关输出高电平,当霍尔元件213移动至靠近第二磁铁212的位置时(如图3所示的位置),霍尔开关输出低电平。In this embodiment, when the Hall element 213 moves to a position close to the first magnet 211 (the position shown in Figure 4), the Hall switch outputs a high level, and when the Hall element 213 moves to a position close to the second magnet When the position is 212 (the position shown in Figure 3), the Hall switch outputs low level.

霍尔开关的输出端、摇杆组件的输出端分别与音频设备的处理器相连,当用户将摇杆组件220推入外壳240内时(如图3所示),霍尔元件输出低电平信号,音频设备的处理器执行关闭指令,控制音频设备处于关闭状态,当用户将摇杆组件220从外壳240内拉出时(如图4所示),霍尔元件213输出高电平信号,音频设备的处理器执行开启指令,控制音频设备处于开启状态,之后,用户可以通过在遥杆可摇动平面上摇动摇杆组件220的摇杆对音频设备进行音频控制,音频设备的处理器实时获取摇杆组件的输出信号,并采用上述的音频控制方法实现音频控制功能。The output end of the Hall switch and the output end of the rocker assembly are respectively connected to the processor of the audio device. When the user pushes the rocker assembly 220 into the housing 240 (as shown in Figure 3), the Hall element outputs a low level. signal, the processor of the audio device executes the shutdown command and controls the audio device to be in a closed state. When the user pulls the rocker assembly 220 out of the housing 240 (as shown in Figure 4), the Hall element 213 outputs a high-level signal, The processor of the audio device executes the opening command and controls the audio device to be in the on state. After that, the user can perform audio control on the audio device by shaking the joystick of the joystick assembly 220 on the rockable plane of the joystick, and the processor of the audio device obtains the information in real time. The output signal of the joystick component is used to realize the audio control function using the above audio control method.

本实施例提供的音频设备,不但能够满足多种音频操控需求,还方便用户的操控,此外,霍尔开关为外拉式开关,有利于延长开关的寿命。The audio equipment provided in this embodiment can not only meet various audio control requirements, but also facilitate user control. In addition, the Hall switch is an external pull-type switch, which is beneficial to extending the life of the switch.

此外,本发明实施例还提供了一种计算机可读存储介质,其存储有计算机程序,该程序被处理器执行时实现如上述的音频控制方法。In addition, embodiments of the present invention also provide a computer-readable storage medium that stores a computer program. When the program is executed by a processor, the above audio control method is implemented.

本领域的技术人员能够理解的是,在不冲突的前提下,上述各优选方案可以自由地组合、叠加。Those skilled in the art can understand that, provided there is no conflict, the above-mentioned preferred solutions can be freely combined and superimposed.

应当理解,上述的实施方式仅是示例性的,而非限制性的,在不偏离本发明的基本原理的情况下,本领域的技术人员可以针对上述细节做出的各种明显的或等同的修改或替换,都将包含于本发明的权利要求范围内。It should be understood that the above-described embodiments are only exemplary and not restrictive. Without departing from the basic principles of the present invention, those skilled in the art can make various obvious or equivalent modifications to the above-described details. Modifications or substitutions will be included in the scope of the claims of the present invention.

Claims (13)

1.一种音频控制方法,应用于音频设备,其特征在于,所述音频设备包括摇杆组件,所述方法包括:1. An audio control method, applied to audio equipment, characterized in that the audio equipment includes a rocker assembly, and the method includes: 步骤S1:获取第一变量x1和第二变量y1,其中,所述第一变量x1与所述摇杆组件的摇杆当前位置相对于所述摇杆组件的摇杆复位位置在第一方向的摇摆量成正比,所述第二变量y1与所述摇杆组件的摇杆当前位置相对于所述摇杆组件的摇杆复位位置在第二方向的摇摆量成正比,所述第一方向与所述第二方向垂直;Step S1: Obtain the first variable x1 and the second variable y1, wherein the first variable x1 and the current position of the rocker of the rocker assembly are in the first direction relative to the rocker reset position of the rocker assembly. The second variable y1 is proportional to the amount of swing in the second direction of the rocker current position of the rocker assembly relative to the rocker reset position of the rocker assembly, and the first direction is proportional to The second direction is vertical; 步骤S2:根据x1的绝对值与y1的绝对值之间的大小关系执行第一方向或第二方向控制的音频操作,所述第一方向的控制为调节音量的操作,所述第二方向的控制为切换播放的音频资源的操作;Step S2: Perform an audio operation controlled in the first direction or the second direction according to the relationship between the absolute value of x1 and the absolute value of y1. The control in the first direction is an operation of adjusting the volume, and the control in the second direction Control the operation of switching audio resources for playback; 其中,步骤S2包括:Among them, step S2 includes: 步骤S21:判断x1的绝对值是否小于y1的绝对值,若否,执行步骤S22,若是,执行步骤S23;Step S21: Determine whether the absolute value of x1 is less than the absolute value of y1. If not, execute step S22. If yes, execute step S23; 步骤S22:根据x1的正负调节音量,其中,x1为正表示所述第一方向的正向,x1为负表示所述第一方向的反向;Step S22: Adjust the volume according to the positive or negative value of x1, where positive x1 indicates the positive direction of the first direction, and negative x1 indicates the reverse direction of the first direction; 步骤S23:根据y1的正负切换播放的音频资源,其中,y1为正表示所述第二方向的正向,y1为负表示所述第二方向的反向。Step S23: Switch the played audio resource according to the positive or negative value of y1, where positive y1 indicates the forward direction of the second direction, and negative y1 indicates the reverse direction of the second direction. 2.根据权利要求1所述的方法,其特征在于,所述音频设备还包括与所述摇杆组件相关联的可移动机构;所述方法还包括:2. The method of claim 1, wherein the audio device further includes a movable mechanism associated with the rocker assembly; the method further includes: 步骤SS1:获取第三变量z1,所述第三变量z1随所述可移动机构的当前位置相对于其基准位置在第三方向上的偏移量的变化而发生变化;Step SS1: Obtain the third variable z1, which changes with the change of the offset of the current position of the movable mechanism relative to its reference position in the third direction; 步骤SS2:根据所述第三变量z1与阈值的大小关系执行第三方向控制的开关操作。Step SS2: Execute the switching operation of the third direction control according to the relationship between the third variable z1 and the threshold value. 3.根据权利要求2所述的方法,其特征在于,所述音频设备还包括霍尔开关,所述霍尔开关包括霍尔元件以及磁体,所述可移动机构包括所述霍尔元件或者所述磁体,所述摇杆组件在所述第三方向上的移动可改变所述可移动机构的当前位置相对于其基准位置在所述第三方向上的偏移量,进而改变所述霍尔元件的输出电压,所述第三方向与所述第一方向、所述第二方向均垂直;3. The method of claim 2, wherein the audio device further includes a Hall switch, the Hall switch includes a Hall element and a magnet, and the movable mechanism includes the Hall element or the magnet. The magnet, the movement of the rocker assembly in the third direction can change the offset of the current position of the movable mechanism relative to its reference position in the third direction, thereby changing the movement of the Hall element. Output voltage, the third direction is perpendicular to both the first direction and the second direction; 其中,步骤SS1中,所述第三变量z1为所述霍尔元件的输出电压。Wherein, in step SS1, the third variable z1 is the output voltage of the Hall element. 4.根据权利要求1所述的方法,其特征在于,步骤S22包括:4. The method according to claim 1, characterized in that step S22 includes: 步骤S22a:判断x1的绝对值是否大于第一偏移阈值,若是,执行步骤S22b,若否,执行步骤S22c;Step S22a: Determine whether the absolute value of x1 is greater than the first offset threshold. If yes, execute step S22b. If not, execute step S22c; 步骤S22b:若x1为正,则增加设定值的音量,若x1为负,则减少设定值的音量;Step S22b: If x1 is positive, increase the volume of the set value; if x1 is negative, decrease the volume of the set value; 步骤S22c:保持当前音量不变。Step S22c: Keep the current volume unchanged. 5.根据权利要求1所述的方法,其特征在于,步骤S23包括:5. The method according to claim 1, characterized in that step S23 includes: 步骤S23a:判断y1的绝对值是否大于第二偏移阈值,若是,执行步骤S23b,若否,执行步骤S23c;Step S23a: Determine whether the absolute value of y1 is greater than the second offset threshold. If yes, execute step S23b. If not, execute step S23c; 步骤S23b:若y1为正,则切换至播放目录中的下一个音频资源进行播放,若y1为负,则切换至播放目录中的上一个音频资源进行播放;Step S23b: If y1 is positive, switch to the next audio resource in the play directory for playback; if y1 is negative, switch to the previous audio resource in the play directory for playback; 步骤S23c:保持当前播放的音频资源不变。Step S23c: Keep the currently played audio resource unchanged. 6.根据权利要求1-5任一项所述的方法,其特征在于,所述方法还包括:6. The method according to any one of claims 1-5, characterized in that the method further includes: 根据从当前时刻开始前的预设时间段内所述摇杆组件的摇杆位置变化轨迹,执行音频控制操作。The audio control operation is performed according to the rocker position change trajectory of the rocker assembly within a preset time period before the current time. 7.根据权利要求6所述的方法,其特征在于,所述根据从当前时刻开始前的预设时间段内所述摇杆组件的摇杆位置变化轨迹,执行音频控制操作包括:7. The method according to claim 6, wherein performing the audio control operation according to the rocker position change trajectory of the rocker assembly within a preset time period before the current time includes: 若所述摇杆位置变化轨迹为绕所述摇杆复位位置旋转达到一周,则由当前的暂停播放状态切换为播放状态或者由当前的播放状态切换为暂停播放状态。If the change track of the rocker position is to rotate around the reset position of the rocker for one revolution, the current paused playback state is switched to the playback state or the current playback state is switched to the paused playback state. 8.一种音频控制装置,应用于音频设备,其特征在于,所述音频设备包括摇杆组件,所述音频控制装置包括:8. An audio control device, applied to audio equipment, characterized in that the audio equipment includes a rocker assembly, and the audio control device includes: 第一获取模块,用于获取第一变量x1和第二变量y1,其中,所述第一变量x1与所述摇杆组件的摇杆当前位置相对于所述摇杆组件的摇杆复位位置在第一方向的摇摆量成正比,所述第二变量y1与所述摇杆组件的摇杆当前位置相对于所述摇杆组件的摇杆复位位置在第二方向的摇摆量成正比,所述第一方向与所述第二方向垂直;The first acquisition module is used to acquire the first variable x1 and the second variable y1, wherein the first variable x1 and the current position of the rocker of the rocker assembly are relative to the rocker reset position of the rocker assembly. The second variable y1 is proportional to the amount of swing in the second direction relative to the current position of the rocker assembly relative to the rocker reset position of the rocker assembly. The first direction is perpendicular to the second direction; 第一控制模块,用于根据x1的绝对值与y1的绝对值之间的大小关系执行第一方向或第二方向控制的音频操作,包括:判断x1的绝对值是否小于y1的绝对值,若否,根据x1的正负调节音量,其中,x1为正表示所述第一方向的正向,x1为负表示所述第一方向的反向,若是,根据y1的正负切换播放的音频资源,其中,y1为正表示所述第二方向的正向,y1为负表示所述第二方向的反向,所述第一方向的控制为调节音量的操作,所述第二方向的控制为切换播放的音频资源的操作。The first control module is used to perform audio operations controlled in the first direction or the second direction according to the size relationship between the absolute value of x1 and the absolute value of y1, including: determining whether the absolute value of x1 is less than the absolute value of y1, and if No, adjust the volume according to the positive or negative value of x1, where positive x1 indicates the positive direction of the first direction, and negative x1 indicates the reverse direction of the first direction. If yes, switch the played audio resource according to the positive or negative value of y1. , where y1 is positive, indicating the forward direction of the second direction, y1 is negative, indicating the reverse direction of the second direction, the control in the first direction is the operation of adjusting the volume, and the control in the second direction is The operation of switching the played audio resource. 9.根据权利要求8所述的音频控制装置,其特征在于,所述音频设备还包括与所述摇杆组件相关联的可移动机构;所述音频控制装置还包括:9. The audio control device according to claim 8, wherein the audio device further includes a movable mechanism associated with the rocker assembly; the audio control device further includes: 第二获取模块,用于获取第三变量z1,所述第三变量z1随所述可移动机构的当前位置相对于其基准位置在第三方向上的偏移量的变化而发生变化;The second acquisition module is used to acquire the third variable z1, which changes with the change of the offset of the current position of the movable mechanism relative to its reference position in the third direction; 第二控制模块,用于根据所述第三变量z1与阈值的大小关系执行第三方向控制的开关操作。The second control module is configured to perform the switching operation of the third direction control according to the relationship between the third variable z1 and the threshold value. 10.根据权利要求8所述的音频控制装置,其特征在于,所述音频控制装置还包括:10. The audio control device according to claim 8, characterized in that the audio control device further includes: 第三控制模块,用于根据从当前时刻开始前的预设时间段内所述摇杆组件的摇杆位置变化轨迹,执行音频控制操作。The third control module is used to perform audio control operations according to the rocker position change trajectory of the rocker assembly within a preset time period before the current time. 11.一种音频设备,其特征在于,包括摇杆组件、处理器、与所述处理器耦合的存储器,其中,所述存储器中存储有指令,以供所述处理器执行,当所述处理器执行所述指令时,能实现如权利要求1-7任一项所述的方法。11. An audio device, characterized by comprising a rocker assembly, a processor, and a memory coupled to the processor, wherein instructions are stored in the memory for execution by the processor. When the processing When the processor executes the instructions, the method as described in any one of claims 1-7 can be implemented. 12.根据权利要求11所述的音频设备,其特征在于,所述音频设备为音箱、耳机、电视、投影仪、智能平板、笔记本电脑或台式电脑。12. The audio device according to claim 11, characterized in that the audio device is a speaker, headphones, TV, projector, smart tablet, notebook computer or desktop computer. 13.一种计算机可读存储介质,其存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-7任一项所述的方法。13. A computer-readable storage medium storing a computer program, characterized in that when the program is executed by a processor, the method according to any one of claims 1-7 is implemented.
CN202010207169.XA 2020-03-23 2020-03-23 Audio control method and device, audio equipment, computer-readable storage medium Active CN111880669B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010207169.XA CN111880669B (en) 2020-03-23 2020-03-23 Audio control method and device, audio equipment, computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010207169.XA CN111880669B (en) 2020-03-23 2020-03-23 Audio control method and device, audio equipment, computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN111880669A CN111880669A (en) 2020-11-03
CN111880669B true CN111880669B (en) 2023-11-28

Family

ID=73154287

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010207169.XA Active CN111880669B (en) 2020-03-23 2020-03-23 Audio control method and device, audio equipment, computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN111880669B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114661174A (en) * 2022-03-21 2022-06-24 广州彩熠灯光股份有限公司 Combined rocker instruction processing method, device, storage medium and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR19990030704U (en) * 1997-12-30 1999-07-26 김영환 Adjustable length lever lever
JP2000348574A (en) * 1999-06-04 2000-12-15 Alps Electric Co Ltd Input device for game machine
JP2004327382A (en) * 2003-04-28 2004-11-18 Sony Corp Switching device
TW201108570A (en) * 2009-06-24 2011-03-01 Victor Iannello System, devices, and/or methods for managing magnetic bearings
WO2015119354A1 (en) * 2014-02-07 2015-08-13 Samsung Electronics Co., Ltd. Wearable electronic system
CN204707225U (en) * 2015-07-03 2015-10-14 刘红英 Radio intercommunication system
CN109155889A (en) * 2016-04-11 2019-01-04 恩里克·盖斯图特 Audio amplifier electronics with independent treble and bass response adjustment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR19990030704U (en) * 1997-12-30 1999-07-26 김영환 Adjustable length lever lever
JP2000348574A (en) * 1999-06-04 2000-12-15 Alps Electric Co Ltd Input device for game machine
JP2004327382A (en) * 2003-04-28 2004-11-18 Sony Corp Switching device
TW201108570A (en) * 2009-06-24 2011-03-01 Victor Iannello System, devices, and/or methods for managing magnetic bearings
WO2015119354A1 (en) * 2014-02-07 2015-08-13 Samsung Electronics Co., Ltd. Wearable electronic system
CN204707225U (en) * 2015-07-03 2015-10-14 刘红英 Radio intercommunication system
CN109155889A (en) * 2016-04-11 2019-01-04 恩里克·盖斯图特 Audio amplifier electronics with independent treble and bass response adjustment

Also Published As

Publication number Publication date
CN111880669A (en) 2020-11-03

Similar Documents

Publication Publication Date Title
JP5777731B2 (en) Environment-dependent dynamic range control for gesture recognition
CN101495947B (en) Pointing device with movable magnetic disc and method
JP6023780B2 (en) Method and apparatus for performing voice control operations on a terminal
WO2016177296A1 (en) Video generation method and apparatus
CN105045489B (en) A kind of button control method and device
WO2017032123A1 (en) Video playback control method and device
CN103513767A (en) Haptic feedback control system
CN106998521B (en) Loudspeaker control method and device and terminal equipment
CN108052261A (en) Record screen method, apparatus and terminal
CN105573522A (en) Operation method of mobile terminal and mobile terminal
CN107071541B (en) Method and apparatus for peripheral context management
TW201224849A (en) Mobile devices and methods for controlling mobile devices
CN111880669B (en) Audio control method and device, audio equipment, computer-readable storage medium
CN110830063B (en) A kind of interference control method of audio service and terminal
CN105137819A (en) Music playing method and intelligent watch
CN110691016B (en) Interactive method realized based on audio equipment and audio equipment
CN211630320U (en) Control switches and electrical appliances
JP2010278918A (en) Sound data processing apparatus
KR101305704B1 (en) Open-user type electronic board system having embedded os capable of supporting other computing apparatus with different os
CN105704533A (en) Application control method and terminal
CN105117118B (en) A kind of method and smartwatch controlling video playing
CN108650554A (en) A kind of multimedia file broadcasting control method and mobile terminal
CN105100723B (en) Video monitoring method and device
WO2023273144A1 (en) Rotation control component, method and apparatus, and electronic device
CN104902076B (en) Control the method and system of audio and video playing

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 519075 No. 333, Kexing Road, Xiangzhou District, Zhuhai City, Guangdong Province

Applicant after: ZHUHAI JIELI TECHNOLOGY Co.,Ltd.

Address before: Floor 1-107, building 904, ShiJiHua Road, Zhuhai City, Guangdong Province

Applicant before: ZHUHAI JIELI TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant