A design of laser array harp based on multi-dimensional wavelet transform and audio signal reconstruction

This paper introduces a design scheme of laser array harp based on multi-dimensional wavelet transform and audio signal reconstruction. The green light beams from multiple high-power lasers simulate harp strings, use photoresistors as the signal receiving end, and use a signal conditioning system composed of analog circuits and LM393 comparators to collect and adjust the resistance signal of the laser sensor[1], and finally it is adjusted to a level signal that can be recognized by the CPU. After receiving the signal, the CPU core board analyzes the string signal, and sends control commands to the audio processing system through the industrial bus according to the analyzed digital signal. After receiving the control command, the audio processing system uses the audio signal reconstruction technology composed of multi-dimensional wavelet packets, deep learning and other algorithms to simulate the audio signals of various string music, so as to achieve the purposes of using the lasers as virtual strings and imitating musical instruments for musical performance.[2]


Introduction
The traditional harp is a plucked string instrument with rich connotation and beautiful sound quality, while the laser harp uses laser to simulate the string, processes the collected signals, and sends out the corresponding sound, and can choose different timbres according to the music. The most important thing in the laser harp is the signal acquisition, processing and timbre restoration. In this paper, the acquisition and processing circuit of laser string signal is designed, and the corresponding audio signal is decoded and restored by multi-dimensional wavelet transform [3] [4] and reconstruction.

Hardware circuit
The stm32f407 processor is used as the CPU of this system. The resistance value of the photoresistor is adjusted to the high and low level that the single-chip microcomputer can recognize through the signal conditioning board, and then the single-chip microcomputer is used to conduct real-time inspections on the signal conditioning board to determine which photoresistor changes, and then the single-chip microcomputer sends control commands to the voice chip. After receiving the signal, the CPU core board analyzes the string signal, and sends control commands to the audio processing system through the industrial bus according to the analyzed digital signal. After receiving the control command, the audio processing system uses the audio signal reconstruction technology composed of multi-dimensional wavelet packets, deep learning and other algorithms to simulate the audio signals of various string music, so as to achieve the purposes that using the lasers as virtual strings and imitating musical instruments for musical performance.
The hardware circuit mainly includes a sensor composed of a photoresistor array, a signal 2 acquisition and conditioning circuit composed of an LM393 comparator, a potentiometer, etc., and a signal processing and control circuit composed of a CPU and an audio processing chip. Fig. 1 is the overall block diagram of the design hardware: Figure 1. Overall block diagram of hardware

Selection of laser head and sensor
This design uses a green laser head with a wavelength of 532nm. The power supply of the laser head is 3.3V and the power is 200mW. In this design, a 10KΩ photoresistor is selected as the sensor. Considering that the laser spot and the area of the photoresistor are relatively small, for more precise positioning, two photoresistors in parallel are used as a sensor, which enlarges the area of the photoresistor receiving the light source. The resistance of the photoresistor after parallel connection is about 9KΩ to 11KΩ under normal indoor lighting, and about 1KΩ under laser beam irradiation.

Design of string signal acquisition and conditioning system
The signal acquisition circuit is composed of 4 comparators, a photoresistor sensor array and peripheral circuits, as shown in Fig. 2 below. Among them, the comparator uses the LM393 chip produced by Texas Instruments. LM393 is a dual-voltage comparator integrated circuit. There are two internal comparators with low current consumption and a TTL level signal output.
The photoresistor is connected to the in-phase input terminal of LM393. When the light is blocked between the laser head and the photoresistor, the resistance of the photoresistor will decrease. LM393 compares the voltage at the in-phase input terminal with the reference voltage, and outputs signals of different levels to the I/O port of the microcontroller. When the laser irradiates the photoresistor, the output port of the comparator will output low level; when the light between the laser head and the photoresistor is blocked, the output port will output high level. The 8 output ports corresponding to the 8 photoresistors are connected to the P0 port on the single-chip microcomputer. The state value of the P0 port is read to determine which laser string is being played, and the corresponding sound is emitted.

Audio reconstruction system
This design selects stm32f407 processor as the core board. It contains the IO ports and resources required by the laser harp, and its performance can also meet the system requirements.
This module is mainly composed of audio processing chip WT588D-U and external SPI Flash two circuits. WT588D-U requires external SPI bus Flash module to store the tone color sample library. In order to enable the laser harp to play a variety of musical instruments, different sound libraries can be created in advance, so that the laser harp can control the sound of a variety of musical instruments by pressing the keys, such as piano, violin, harp, etc., so as the function can be enabled Richer.
The audio module circuit diagram is shown in Fig.3 In the figure, U6 is a 32M external SPI Flash GD25Q32SIP, which is used to build a sample library of deep learning algorithms, and U7 is an audio chip WT588D, which is used to reconstruct audio signals of various musical instruments.

Multi-dimensional wavelet analytic transform
A wave composed of multiple frequencies is decomposed by a multi-dimensional wavelet, and all frequencies are decomposed, and then these sub-frequencies are weighted and reconstructed through the inverse operation to obtain the final result of restoring the timbre. In the discrete wavelet transform (DWT), the space Vj=Vj-1+Wj-1 represents the audio signal, and each audio signal X(t) represented on Vj can be represented by the basis functions in the above two spaces.
When we decompose the coefficient A0(k) in the scale metric space J, two coefficients D1(k) and A1(k) can be obtained in the scale metric space, and we can also reconstruct the two coefficients A1(k) and D1(k) to get the coefficient A0(k). (2) The specific coefficient calculation process is as follows:  Fig.5 shows the laser harp prototype. Through experimental analysis, the effectiveness of the system is verified. The debugging experiment of hardware and software is carried out on MATLAB platform. The operating system is Microsoft's windows 10 system, and the running memory of the system environment is 8GB.

Result
The experimental results are realized in the laser harp. The experiment reconstructs the timbre information of the three frequency bands respectively. With the change of the number of wavelet packet iterations, the error of the system to the three audio processing shows a downward trend. Among them, the processing error of piano timbre is the lowest, up to about 0.1%, while the lowest errors of the other two kinds of audio are about 1.3% and 1.8% respectively. In contrast, the processing error of the proposed system is reduced by about 1.2% and 1.7% respectively. This is because the internal circuit of the chip designed by the proposed system has Zener regulated reference voltage, which can ensure that the output voltage is constant at 3.3 V and the output accuracy error is less than 1%, so as to improve the processing accuracy of the proposed system. The experimental results show that the multi-dimensional wavelet transform has good restoration characteristics for low, medium and high frequency bands of various timbres, and the mean square value of error is less than 0.97, especially in medium and high frequency bands, the mean square value of error can reach 0.99.

Conclusion
In this paper, stm32f407 processor is used as the core, and the signal acquisition system is composed of signal processing module composed of high-power laser head, photoresist array and LM393. Many technologies are applied, such as signal acquisition, signal processing, data storage and transmission, SPI communication, audio decoding, audio output and so on. Through the patrol inspection of the signal end, the state of the signal end can be judged in real time. When a signal end is triggered, the processor analyzes the audio signal by using the methods of multi-dimensional small transformation and audio signal reconstruction, and uses the signal reconstruction technology to restore the real timbre.