CN108847204A - The vocal cores production method and music box of music box - Google Patents

The vocal cores production method and music box of music box Download PDF

Info

Publication number
CN108847204A
CN108847204A CN201810427687.5A CN201810427687A CN108847204A CN 108847204 A CN108847204 A CN 108847204A CN 201810427687 A CN201810427687 A CN 201810427687A CN 108847204 A CN108847204 A CN 108847204A
Authority
CN
China
Prior art keywords
point
articulation
image
grid
vocal cores
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.)
Granted
Application number
CN201810427687.5A
Other languages
Chinese (zh)
Other versions
CN108847204B (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.)
Guangdong Phase Intelligent Technology Co Ltd
Original Assignee
Guangdong Phase Intelligent 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 Guangdong Phase Intelligent Technology Co Ltd filed Critical Guangdong Phase Intelligent Technology Co Ltd
Priority to CN201810427687.5A priority Critical patent/CN108847204B/en
Publication of CN108847204A publication Critical patent/CN108847204A/en
Application granted granted Critical
Publication of CN108847204B publication Critical patent/CN108847204B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10FAUTOMATIC MUSICAL INSTRUMENTS
    • G10F5/00Details or accessories
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10FAUTOMATIC MUSICAL INSTRUMENTS
    • G10F1/00Automatic musical instruments
    • G10F1/06Musical boxes with plucked teeth, blades, or the like

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Auxiliary Devices For Music (AREA)

Abstract

The present invention provides the vocal cores production method and music box of a kind of music box, the vocal cores production method of the music box, including:The HSB value of each pixel in target image is obtained, and color cluster processing is carried out according to each pixel of the HSB value to the target image, obtains the corresponding color cluster image of the target image;Each color lump in the color cluster image is normalized, the corresponding pronunciation point image of the target image is obtained;Point of articulation in the pronunciation point image is mapped in preset line spectrum figure, point of articulation punch position figure is generated;Control punch device punches on the corresponding position of vocal cores according to the punch position in the point of articulation punch position figure.By the vocal cores production method of above-mentioned music box, one section of specific melody can be converted the image into, realizes and uses image automatic music composing on vocal cores, meet user to the customization demand of music box melody, while reducing punching error.

Description

The vocal cores production method and music box of music box
Technical field
The present invention relates to music box manufacture technology fields, and in particular to a kind of the vocal cores production method and music of music box Box.
Background technique
Music box is also known as music box (Music Box, Musical box), is mechanical pronunciation musical instrument, the chain in rotation box Ring, can automatically playing music.Currently, existing music box is broadly divided into two types, one is sound cartridge type music boxes;One is Vocal cores formula music box;And sound cartridge type music box, which is by sound cylinder, to be made rotating motion to Infinite Cyclic in music box, to dial Dynamic soundboard gives out music, and therefore, sound cartridge type music box can only generate a first specific music, and music is single;And vocal cores In machine core of the formula music box using vocal cores insertion music box, vocal cores is read using machine core and is given out music, due to vocal cores and music box It is independent from each other, music box can be made to generate different music by replacing different vocal cores, music playback function is abundant.But It is that existing vocal cores can only make hollow out point of articulation by way of manual punching hole on vocal cores, there are punching errors;Secondly, existing The vocal cores production of self-control melody, system can only can not be provided according to punching of the melody that music box configures on vocal cores by having in product The melody for making vocal cores is single, the customization requirement it is impossible to meet user to music box melody.
Summary of the invention
The object of the present invention is to provide the vocal cores production methods and music box of a kind of music box, can convert the image into one The specific melody of section, realizes and uses image automatic music composing on vocal cores, meet user to the customization demand of music box melody, together When reduce punching error.
The embodiment of the invention provides a kind of vocal cores production methods of music box, including:
The HSB value of each pixel in target image is obtained, and according to the HSB value to each pixel of the target image Color cluster processing is carried out, the corresponding color cluster image of the target image is obtained;
Each color lump in the color cluster image is normalized, the corresponding pronunciation of the target image is obtained Point image;
Point of articulation in the pronunciation point image is mapped in preset line spectrum figure, point of articulation punch position figure is generated;
Control punch device is beaten on the corresponding position of vocal cores according to the punch position in the point of articulation punch position figure Hole.
Preferably, the point of articulation by the pronunciation point image is mapped in preset line spectrum figure, generates point of articulation Punch position figure, specifically includes:
The pronunciation point image is mapped in the grid pre-established, establish in the pronunciation point image each point of articulation with The mapping relations of each scale in the grid;Wherein, the corresponding scale of every a line of the grid, each column of the grid A corresponding time point;
According to the mapping relations, it is corresponding that point of articulation in the pronunciation point image is extracted along the direction initialization of the grid Scale generates the corresponding melody of the target image;
The point of articulation of the corresponding pronunciation point image of the melody is mapped in preset line spectrum figure, the point of articulation is generated Punch position figure.
Preferably, described according to the mapping relations, the direction initialization along the grid extracts in the pronunciation point image The corresponding scale of point of articulation generates the corresponding melody of the target image, further includes later:
The corresponding scale of the every a line of the grid is adjusted, each point of articulation and the net in the pronunciation point image are re-established The mapping relations of each scale and the corresponding melody of the target image is regenerated in lattice, it is corresponding to obtain the target image altogether N head melody;
The corresponding N head melody of the target image is converted into waveform diagram respectively, obtains N number of waveform diagram altogether;
The multiple template waveform diagram for calculating separately any one of waveform diagram and being pre-stored in waveform diagram template database Similarity, and extract maximum value of any one of waveform diagram relative to the similarity of the multiple template waveforms figure, make For the reference value of any one of waveform diagram;
The corresponding waveform diagram of maximum reference value is extracted from N number of waveform diagram;
Extract target melody of the corresponding melody of the corresponding waveform diagram of the maximum reference value as the target image;
The point of articulation by the corresponding pronunciation point image of the melody is mapped in preset line spectrum figure, generates the hair Point of articulation punch position figure, specifically includes:
The point of articulation of the corresponding pronunciation point image of the target melody is mapped in preset line spectrum figure, the hair is generated Point of articulation punch position figure.
Preferably, each color lump in the color cluster image is normalized, and obtains the target figure As corresponding pronunciation point image, specifically include:
The smallest color lump of area in the color cluster image is obtained, and sets one for the smallest color lump of the area Point of articulation;
Other color lumps in the color cluster image are adjusted to the integral multiple of the point of articulation;
According to the corresponding point of articulation of color lump each in the color cluster image, the pronunciation point image is generated.
Preferably, described that the pronunciation point image is mapped in the grid pre-established, establish the pronunciation point image In in each point of articulation and the grid each scale mapping relations, specifically include:
According to the area and preset ratio of the point of articulation, grid area is set and establishes the grid;
Each point of articulation in the pronunciation point image is mapped in the grid;
When point of articulation is distributed on the grid lines of the grid, calculates separately the point of articulation and be connected on the grid Area accounting in the adjacent square of line, and by the point of articulation be assigned to the point of articulation in adjacent square area accounting compared with In a big grid;
According to each point of articulation in the pronunciation point image in the grid position and the grid in every row it is corresponding Scale, establish the mapping relations of each scale in each point of articulation and the grid in the pronunciation point image.
Preferably, described according to the mapping relations, the direction initialization along the grid extracts in the pronunciation point image The corresponding scale of point of articulation generates the corresponding melody of the target image, specifically includes:
The direction initialization is the time-axis direction formed at the grid each column corresponding time point;
According to the mapping relations, extract in the pronunciation point image according to the corresponding time-axis direction of the grid The corresponding scale of point;
When in the adjacent grid of any a line that multiple point of articulation are located in the grid, by the multiple point of articulation tune Whole is the long of the corresponding scale of described any a line;
According to the time-axis direction, point of articulation corresponding time point in the pronunciation point image is extracted;
According to the corresponding scale of point of articulation and time point in the pronunciation point image, it is corresponding to generate the target image Melody.
Preferably, the HSB value for obtaining each pixel in target image, and according to the HSB value to the target figure Each pixel of picture carries out color cluster processing, obtains the corresponding color cluster image of the target image, specifically includes:
Obtain the HSB value of each pixel in target image;
According to the HSB value of pixel each in the target image, form and aspect distance is obtained in the target image more than first The pixel of threshold value, and obtain multiple color change regions;
The form and aspect for the neighbor pixel that the difference for calculating HSB value in the color change region is less than second threshold are average Value, and the neighbor pixel is aggregated into the color lump corresponding to the form and aspect average value;
When the form and aspect distance of neighbor pixel in the color change region is zero, according to the color lump after polymerization, generate The color cluster image.
Preferably, the vocal cores production method of the music box further includes:
Acquisition module melody;
The template melody is converted into template waveforms figure, and is stored in the waveform diagram template database.
Preferably, it is described control punch device according to the punch position in the point of articulation punch position figure vocal cores pair It answers and is punched on position, specifically included:
Coordinate system is established on the point of articulation punch position figure using the current location of the punch device as origin, is obtained Coordinate of the punch position of the point of articulation punch position figure on the coordinate system;
With the origin of the coordinate system for initial punch position, adjacent two are calculated separately according to the coordinate of the punch position The displacement vector of a punch position;Wherein, the initial punch position does not punch;
The laser boring that the punch device is clamped on the mechanical arm by mechanical arm control is on the vocal cores It punches according to institute's displacement vector movement and on the corresponding final position of institute's displacement vector.
The embodiment of the invention also provides a kind of music boxs, including:Shell, machine core and the vocal cores using above-mentioned music box The vocal cores of production method production, the shell are equipped with through-hole, vocal cores entrance and vocal cores outlet, and the machine core includes machine core master Body, the pin sensing component being arranged on movement main body, sound tooth, soundboard and rocker assembly;The movement main body is mounted on described outer Inside shell;The vocal cores is movably disposed on the movement main body by the vocal cores entrance;The rocker assembly passes through The through-hole is connect with the movement main body;The movement main body drives the vocal cores along the sound under the driving of the rocking bar With export direction movement and drive the pin sensing component rotation to detect the hollow out point of the vocal cores, the movement main body is for working as The sound tooth, which is controlled, when detecting the hollow out point of the vocal cores stirs the soundboard.
Compared with the existing technology, a kind of beneficial effect of the vocal cores production method of music box provided in an embodiment of the present invention exists In:The vocal cores production method of the music box, including:The HSB value of each pixel in target image is obtained, and according to the HSB It is worth and color cluster processing is carried out to each pixel of the target image, obtains the corresponding color cluster figure of the target image Picture;Each color lump in the color cluster image is normalized, the corresponding pronunciation point diagram of the target image is obtained Picture;Point of articulation in the pronunciation point image is mapped in preset line spectrum figure, point of articulation punch position figure is generated;Control is beaten Hole equipment is punched on the corresponding position of vocal cores according to the punch position in the point of articulation punch position figure.Pass through above-mentioned music The vocal cores production method of box can convert the image into one section of specific melody, realize and use image automatic music composing on vocal cores, Meet user to the customization demand of music box melody, while reducing punching error.
Detailed description of the invention
Fig. 1 is a kind of flow chart of the vocal cores production method of music box provided in an embodiment of the present invention;
Fig. 2 is point of articulation punch position figure described in the embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Fig. 1 and Fig. 2 are please referred to, Fig. 1 is a kind of process of the vocal cores production method of music box provided in an embodiment of the present invention Figure, Fig. 2 is point of articulation punch position figure described in the embodiment of the present invention;The vocal cores production method of the music box, including:
S100:The HSB value of each pixel in target image is obtained, and according to the HSB value to each of the target image Pixel carries out color cluster processing, obtains the corresponding color cluster image of the target image;
S200:Each color lump in the color cluster image is normalized, it is corresponding to obtain the target image Pronunciation point image;
S300:Point of articulation in the pronunciation point image is mapped in preset line spectrum figure, point of articulation is generated and punches position Set figure;
S400:Control punch device according to the punch position in the point of articulation punch position figure vocal cores corresponding position Upper punching.
In the present embodiment, after carrying out color cluster, normalized to target image by the system of setting a song to music, pronounced Point image, and the pronunciation point image is mapped in preset line spectrum figure, point of articulation punch position figure is generated, by using punching Equipment is punched on the corresponding position of vocal cores according to the punch position in the point of articulation punch position figure, reduces punching error, Target image can be converted to one section of specific melody when colluding, realize and use target image automatic music composing on vocal cores, it is full Customization demand of the sufficient user to music box melody;The present invention can be according to the different automatic art music melody of image, and lead to It crosses equipment analysis and picks out melody close to Popular Aesthetics, solve the complexity of musical composition, reduce the study door of composed melody Sill quickly create a large amount of music rhythms, and are automatically performed vocal cores punching, apply in music box performance.So that the above method It is with a wide range of applications in music box field.
In an alternative embodiment, S300:Point of articulation in the pronunciation point image is mapped to preset line spectrum In figure, point of articulation punch position figure is generated, is specifically included:
The pronunciation point image is mapped in the grid pre-established, establish in the pronunciation point image each point of articulation with The mapping relations of each scale in the grid;Wherein, the corresponding scale of every a line of the grid, each column of the grid A corresponding time point;
According to the mapping relations, it is corresponding that point of articulation in the pronunciation point image is extracted along the direction initialization of the grid Scale generates the corresponding melody of the target image;
The point of articulation of the corresponding pronunciation point image of the melody is mapped in preset line spectrum figure, the point of articulation is generated Punch position figure.
In the present embodiment, after system of setting a song to music is by carrying out color cluster, normalized for target image, the hair of acquisition Point of articulation image is mapped in preset grid, establishes the mapping relations of point of articulation and scale, by the mapping relations according to grid Time-axis direction target image can be converted to one section of specific music rhythm, and the melody created is supplied to user Audition confirmation, and the corresponding point of articulation punch position figure of melody after user is confirmed is sent to punch device, while user It can choose downloading and save the melody created;The mistake that system of setting a song to music can simplify the production of music rhythm by establishing grid Journey, greatly reduces the duration and cost of music rhythm production, while reducing the difficulty of music making.
In an alternative embodiment, described according to the mapping relations, the direction initialization along the grid extracts institute The corresponding scale of point of articulation in pronunciation point image is stated, the corresponding melody of the target image is generated, further includes later:
The corresponding scale of the every a line of the grid is adjusted, each point of articulation and the net in the pronunciation point image are re-established The mapping relations of each scale and the corresponding melody of the target image is regenerated in lattice, it is corresponding to obtain the target image altogether N head melody;
The corresponding N head melody of the target image is converted into waveform diagram respectively, obtains N number of waveform diagram altogether;
The multiple template waveform diagram for calculating separately any one of waveform diagram and being pre-stored in waveform diagram template database Similarity, and extract maximum value of any one of waveform diagram relative to the similarity of the multiple template waveforms figure, make For the reference value of any one of waveform diagram;
The corresponding waveform diagram of maximum reference value is extracted from N number of waveform diagram;
Extract target melody of the corresponding melody of the corresponding waveform diagram of the maximum reference value as the target image;
The point of articulation by the corresponding pronunciation point image of the melody is mapped in preset line spectrum figure, generates the hair Point of articulation punch position figure, specifically includes:
The point of articulation of the corresponding pronunciation point image of the target melody is mapped in preset line spectrum figure, the hair is generated Point of articulation punch position figure.
In the present embodiment, the system of setting a song to music can also adjust the corresponding scale of the every a line of the grid, re-establish described Each point of articulation and the mapping relations of each scale in the grid and to regenerate the target image corresponding in pronunciation point image Melody, so that generating multiple melody according to grid.Every kind of music style has unique scale to combine, according to these uniquenesses Scale combination in scale create come melody be just bound to have the national music characteristic, therefore, according to creation Style needs to be arranged the scale of every row in the grid, so that making the melody of creation has specific music style.In for example, State's five-tone scale, the sound for including are:123561;Japanese hexatone, the sound for including are:6712346;The small tuning of Romania Rank, the sound for including are:671#234#56.By changing the scale combination of every row in grid, different styles can be createed Music rhythm.Thus, it is possible to obtain the corresponding N head melody of the target image, then by N head melody be converted to waveform diagram and with Multiple template waveform diagram is matched, extract each waveform diagram relative to the multiple template waveforms figure similarity most Big value, the reference value as each waveform diagram respectively correspond a reference value to get to each waveform diagram;Compare each wave The size of the reference value of shape figure obtains target of the corresponding melody of the corresponding waveform diagram of maximum reference value as the target image Melody can effectively screen the N head melody of generation by the above method, to obtain closest to existing music rhythm The melody of style is created, the quality of melody creation is improved.
Further, the quality done is created in order to improve melody, the vocal cores production method of the music box further includes:
Acquire the corresponding cover image of multiple musical works to play an instrument;
The HSB value of each pixel in any one of cover image is extracted, and according to the HSB value to any one institute Each pixel for stating cover image carries out color cluster processing, and it is poly- to obtain the corresponding template colors of any one of cover image Class image obtains N number of template colors cluster image altogether;
The area accounting for calculating each color lump in the template colors cluster image obtains the template colors cluster image pair The dominant hue and dominant hue area accounting answered, the distribution of color as template colors cluster image;
To the distribution of color and the corresponding performance of template colors cluster image of N number of template colors cluster image Musical instrument is for statistical analysis, and the distribution of color for establishing the template colors cluster image is corresponding with template colors cluster image The mapping relations to play an instrument, generate the tone musical instrument table of comparisons;
According to the color cluster image, the dominant hue of the target image is extracted;
According to the dominant hue of the target image and the preset tone musical instrument table of comparisons, the type to play an instrument is determined;
According to the mapping relations, it is corresponding that point of articulation in the pronunciation point image is extracted along the direction initialization of the grid Scale, and use virtual musical instrument corresponding with the type to play an instrument by the corresponding sound of point of articulation in the pronunciation point image Rank is converted to audio, generates the corresponding melody of the target image.
Specifically, the dominant hue and the preset tone musical instrument table of comparisons according to the target image is determined and is played The type of musical instrument, specifically includes:
The area accounting for calculating each color lump in the corresponding color cluster image of the target image, obtains the target image The corresponding dominant hue area accounting of dominant hue;
By the dominant hue of the target image and dominant hue area accounting with it is multiple in the tone musical instrument table of comparisons Distribution of color ratio is compared, determine in the tone musical instrument table of comparisons with the dominant hue of the target image and dominant hue face The smallest distribution of color of difference of product accounting is corresponding to play an instrument, and drills as dominant hue is corresponding in the color cluster image It plays music the type of device;
According to the dominant hue of the target image and the dominant hue area accounting, determine in the color cluster image The corresponding volume accounting to play an instrument of each color lump.
In the present embodiment, color cluster image is carried out by color cluster using clustering algorithm, specially by dominant hue point Block is polymerized to same color lump by being constantly averaged the close point of adjacent HSB value color difference, target image is processed into respectively The color lump combination of kind dominant hue, such as the combination of triangle, circle, rectangle figure, obtain the color lump group of the dominant hue of target image It closes.The color value for extracting each color lump is the dominant hue of target image, and calculates separately each color lump in the target image Area accounting.Further, the color lump that the area accounting of color lump in the color cluster image is greater than given threshold is determined as The dominant hue of the target image.
In the same manner, to acquisition largely play an instrument musical works (such as the music such as CD, DVD, digital tone source make Product) corresponding cover image, the HSB value of the cover image is extracted, constantly by HSB value color difference adjacent in the cover image Close point is averaged polymerization, carries out color cluster to the cover image of acquisition respectively, cover image is processed into not homochromy Block combination zone extracts the color value of each color lump and calculates area accounting of each color lump in cover image, obtains surface plot The dominant hue and area accounting of picture.By statistics law-analysing, obtain it is different play an instrument with the dominant hue of cover image and The rule of area accounting, the statistics of the dominant hue for the corresponding cover image that largely played an instrument, each dominant hue area accounting Data, i.e., the distribution of color of the described cover image.
Because the COLOR COMPOSITION THROUGH DISTRIBUTION situation of each picture is different, the content of some expression is more, distribution of color is relatively abundanter, has The content of expression is few, COLOR COMPOSITION THROUGH DISTRIBUTION is relatively simple, therefore sets a threshold values to determine the quantity of the dominant hue of target image, and It is determined to be used alone or in combination according to the area accounting of each dominant hue and be played an instrument.By the dominant hue of obtained target image and Dominant hue area accounting compares the various corresponding relationship numbers to play an instrument with distribution of color for counting and being stored in advance server According to that is, described tone musical instrument table of comparisons finds out and drills corresponding to combining immediate distribution of color with target image dominant hue It plays music device, obtains the combination that plays an instrument of melody to be generated.For example, the target image includes M kind dominant hue, according to This M kind dominant hue and this corresponding dominant hue area accounting of M kind dominant hue, can determine that corresponding M kind plays an instrument, and It is played an instrument using this M kind to merge generation melody.
For example, being played when the area accounting of color lump a certain in target image reaches 80% or more using single instrument.Again For example, when the corresponding dominant hue of target image and dominant hue distribution accounting are:The blue 40% of sky portion, snow mountain mountain range portion Blackish green the 10% of purplish grey 30%, withered grass slope part orange 20% and the tree stone part divided, compares according to the tone musical instrument Table can learn the various mapping relations to play an instrument with distribution of color, to obtain in target image that each dominant hue is corresponding to drill Instrument type is played, at this point, marking simultaneously using 40%, 30%, 20%, 10% corresponding plays an instrument of dominant hue in grid Scale instrumental ensembled, in corresponding volume also according to dominant hue area accounting carry out volume distribution.
In an alternative embodiment, S200:Each color lump in the color cluster image is normalized, The corresponding pronunciation point image of the target image is obtained, is specifically included:
The smallest color lump of area in the color cluster image is obtained, and sets one for the smallest color lump of the area Point of articulation;
Other color lumps in the color cluster image are adjusted to the integral multiple of the point of articulation;
According to the corresponding point of articulation of color lump each in the color cluster image, the pronunciation point image is generated.
In an alternative embodiment, described that the pronunciation point image is mapped in the grid pre-established, it establishes The mapping relations of each point of articulation and each scale in the grid, specifically include in the pronunciation point image:
According to the area and preset ratio of the point of articulation, grid area is set and establishes the grid;Wherein, described The corresponding scale of every a line of grid, each column of the grid corresponding time point;
Each point of articulation in the pronunciation point image is mapped in the grid;
When point of articulation is distributed on the grid lines of the grid, calculates separately the point of articulation and be connected on the grid Area accounting in the adjacent square of line, and by the point of articulation be assigned to the point of articulation in adjacent square area accounting compared with In a big grid;
According to each point of articulation in the pronunciation point image in the grid position and the grid in every row it is corresponding Scale, establish the mapping relations of each scale in each point of articulation and the grid in the pronunciation point image.
In an alternative embodiment, described according to the mapping relations, the direction initialization along the grid extracts institute The corresponding scale of point of articulation in pronunciation point image is stated, the corresponding melody of the target image is generated, specifically includes:
The direction initialization is the time-axis direction formed at the grid each column corresponding time point;
According to the mapping relations, extract in the pronunciation point image according to the corresponding time-axis direction of the grid The corresponding scale of point;
When in the adjacent grid of any a line that multiple point of articulation are located in the grid, by the multiple point of articulation tune Whole is the long of the corresponding scale of described any a line;
According to the time-axis direction, point of articulation corresponding time point in the pronunciation point image is extracted;
According to the corresponding scale of point of articulation and time point in the pronunciation point image, it is corresponding to generate the target image Melody.
In an alternative embodiment, S100:The HSB value of each pixel in target image is obtained, and according to the HSB It is worth and color cluster processing is carried out to each pixel of the target image, obtains the corresponding color cluster figure of the target image Picture specifically includes:
Obtain the HSB value of each pixel in target image;
According to the HSB value of pixel each in the target image, form and aspect distance is obtained in the target image more than first The pixel of threshold value, and obtain multiple color change regions;
The form and aspect for the neighbor pixel that the difference for calculating HSB value in the color change region is less than second threshold are average Value, and the neighbor pixel is aggregated into the color lump corresponding to the form and aspect average value;
When the form and aspect distance of neighbor pixel in the color change region is zero, according to the color lump after polymerization, generate The color cluster image.
In the present embodiment, the range of the first threshold is between 60 degree to 130 degree, it is preferable that the first threshold It is 60 degree.The second threshold is 15 degree.Such as when the form and aspect distance of two pixels in the target image is more than 60 degree, It is determined as color change region.After finding out color change region, pixel adjacent in target image is constantly analyzed, HSB It is worth close neighbor pixel and is averaged and be polymerized to a color lump, such as the HSB value of neighbor pixel A, B is respectively:A point HSB value is H42 °, S43%, B21%, and the HSB value of B point is H38 °, S42%, B25%, due to the H value of two points is A42 °, B38 °, form and aspect distance is polymerized to a hue value within 15 degree after being averaged the hue value of pixel A and pixel B For H40 ° of color lump, the HSB value that different adjacent pixels is chosen in repetition carries out analysis and seeks form and aspect average value, until will be adjacent The close pixel of HSB value color difference take form and aspect average value to polymerize, target image is finally processed into multiple a different color blocks, it is raw At the color cluster image.
In an alternative embodiment, the vocal cores production method of the music box further includes:
Acquisition module melody;
The template melody is converted into template waveforms figure, and is stored in the waveform diagram template database.
In an alternative embodiment, the control punch device is according to the punching in the point of articulation punch position figure Position is punched on the corresponding position of vocal cores, is specifically included:
Coordinate system is established on the point of articulation punch position figure using the current location of the punch device as origin, is obtained Coordinate of the punch position of the point of articulation punch position figure on the coordinate system;
With the origin of the coordinate system for initial punch position, adjacent two are calculated separately according to the coordinate of the punch position The displacement vector of a punch position;Wherein, the initial punch position does not punch;
The laser boring that the punch device is clamped on the mechanical arm by mechanical arm control is on the vocal cores It punches according to institute's displacement vector movement and on the corresponding final position of institute's displacement vector.
In the present embodiment, by taking 15 sound vocal cores as an example, vocal cores specification and punching limitation:When vocal cores length can be according to melody Long setting, width are set as 44 millimeters according to the width of 15 sound machine cores, and 0.3 millimeter of thickness, range 50 is clapped or 100 half bats, sound Lateral band is pitch, is incremented by from left to right, and longitudinal direction is beat, and two solid lines are a bat, and solid line to adjacent dotted line is partly to clap.15 sounds The machine core of vocal cores has 15 scales, is corresponding in turn to the middle pitch 1 for numbered musical notation~times high pitch 1 from bottom to up.Point of articulation punching position need to be beaten The online horizontal line of spectrogram and the infall of vertical line, as shown in Fig. 2, the several points of bdefghij be corresponding in turn to the middle pitch 1 for numbered musical notation~ The point of articulation of high pitch 1 punches position;Since the machine core of 15 sound vocal cores is the thin axis rotation reading by one with 15 pin sensing needles Note (the punching point of articulation on vocal cores) and (vocal cores machine core is as 15 sound machine cores) that soundboard sounding is stirred with sound tooth, at this In one circle of thin axis rotation, if the sound on certain pitch occurred more than once, (corresponding numbered musical notation was such as adjacent as 1,1 Two close sounds correspond on adjacent solid line and dotted line on vocal cores while the hole of C sound occur) when first sound occurs Afterwards, this identical sound will be ignored and can not read behind, i.e., adjacent 1/4 clap in the sound of identical pitch, vocal cores machine core without Method is read, and is had adjacent 1/4 limitation for clapping fast pace semitone, cannot be connected on two adjacent cross spiders of the same sound (same to a line) It is continuous point of articulation occur;As shown in Fig. 2, next point of articulation could must normally be sent out in c point if 1 occurs once in b point Sound, and h point cannot be appeared in.
The vertical and horizontal line of one of the line spectrum figure that the point of articulation that each sub-grid represents in grid corresponds to vocal cores intersects pronunciation Point of articulation in music score of Chinese operas grid is converted to the point of articulation of vocal cores according to above-mentioned corresponding relationship by point, generate punch position information and Vocal cores point of articulation punches image.When continuously occurring 2 or more point of articulation (longs) within a grid for a sound, on vocal cores only There is a point of articulation, and the crosspoint (beat duration) of lasting enough corresponding numbers of pausing.
Punch device punches principle:Punch device receive set a song to music system transmission point of articulation punch position figure after, Establish coordinate system and extract point of articulation punch position information and mechanical arm clamping laser boring on the line spectrum figure of vocal cores Current location information, i.e. coordinate calculates since current location and reaches motor when each point of articulation is punched in x, y-axis Moving distance, i.e., the displacement vector of two neighboring punch position, the laser boring clamped using mechanical arm is according to corresponding pronunciation Point size and the power preset, complete punching on vocal cores.
The embodiment of the invention also provides a kind of music boxs, including:Shell, machine core and the vocal cores using above-mentioned music box The vocal cores of production method production, the shell are equipped with through-hole, vocal cores entrance and vocal cores outlet, and the machine core includes machine core master Body, the pin sensing component being arranged on movement main body, sound tooth, soundboard and rocker assembly;The movement main body is mounted on described outer Inside shell;The vocal cores is movably disposed on the movement main body by the vocal cores entrance;The rocker assembly passes through The through-hole is connect with the movement main body;The movement main body drives the vocal cores along the sound under the driving of the rocking bar With export direction movement and drive the pin sensing component rotation to detect the hollow out point of the vocal cores, the movement main body is for working as The sound tooth, which is controlled, when detecting the hollow out point of the vocal cores stirs the soundboard.
Compared with the existing technology, a kind of beneficial effect of the vocal cores production method of music box provided in an embodiment of the present invention exists In:The vocal cores production method of the music box, including:The HSB value of each pixel in target image is obtained, and according to the HSB It is worth and color cluster processing is carried out to each pixel of the target image, obtains the corresponding color cluster figure of the target image Picture;Each color lump in the color cluster image is normalized, the corresponding pronunciation point diagram of the target image is obtained Picture;Point of articulation in the pronunciation point image is mapped in preset line spectrum figure, point of articulation punch position figure is generated;Control is beaten Hole equipment is punched on the corresponding position of vocal cores according to the punch position in the point of articulation punch position figure.Pass through above-mentioned music The vocal cores production method of box can convert the image into one section of specific melody, realize and use image automatic music composing on vocal cores, Meet user to the customization demand of music box melody, while reducing punching error.The embodiment of the invention also provides a kind of sounds Happy box.
The above is a preferred embodiment of the present invention, it is noted that for those skilled in the art For, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also considered as Protection scope of the present invention.

Claims (10)

1. a kind of vocal cores production method of music box, which is characterized in that including:
The HSB value of each pixel in target image is obtained, and is carried out according to each pixel of the HSB value to the target image Color cluster processing, obtains the corresponding color cluster image of the target image;
Each color lump in the color cluster image is normalized, the corresponding pronunciation point diagram of the target image is obtained Picture;
Point of articulation in the pronunciation point image is mapped in preset line spectrum figure, point of articulation punch position figure is generated;
Control punch device punches on the corresponding position of vocal cores according to the punch position in the point of articulation punch position figure.
2. the vocal cores production method of music box as described in claim 1, the point of articulation by the pronunciation point image reflects It is mapped in preset line spectrum figure, generates point of articulation punch position figure, specifically include:
The pronunciation point image is mapped in the grid pre-established, establish in the pronunciation point image each point of articulation with it is described The mapping relations of each scale in grid;Wherein, each column of the corresponding scale of every a line of the grid, the grid are corresponding One time point;
According to the mapping relations, the direction initialization along the grid extracts the corresponding sound of point of articulation in the pronunciation point image Rank generates the corresponding melody of the target image;
The point of articulation of the corresponding pronunciation point image of the melody is mapped in preset line spectrum figure, the point of articulation punching is generated The location drawing.
3. the vocal cores production method of music box as claimed in claim 2, described according to the mapping relations, along the grid Direction initialization extracts the corresponding scale of point of articulation in the pronunciation point image, generates the corresponding melody of the target image, later Further include:
The corresponding scale of the every a line of the grid is adjusted, is re-established in the pronunciation point image in each point of articulation and the grid The mapping relations of each scale simultaneously regenerate the corresponding melody of the target image, and it is first to obtain the corresponding N of the target image altogether Melody;
The corresponding N head melody of the target image is converted into waveform diagram respectively, obtains N number of waveform diagram altogether;
Calculate separately the phase of any one of waveform diagram with the multiple template waveform diagram being pre-stored in waveform diagram template database Like degree, and extract maximum value of any one of waveform diagram relative to the similarity of the multiple template waveforms figure, as appoint The reference value for a waveform diagram of anticipating;
The corresponding waveform diagram of maximum reference value is extracted from N number of waveform diagram;
Extract target melody of the corresponding melody of the corresponding waveform diagram of the maximum reference value as the target image;
The point of articulation by the corresponding pronunciation point image of the melody is mapped in preset line spectrum figure, generates the point of articulation Punch position figure, specifically includes:
The point of articulation of the corresponding pronunciation point image of the target melody is mapped in preset line spectrum figure, the point of articulation is generated Punch position figure.
4. the vocal cores production method of music box as described in claim 1, which is characterized in that described to the color cluster image In each color lump be normalized, obtain the corresponding pronunciation point image of the target image, specifically include:
The smallest color lump of area in the color cluster image is obtained, and sets a pronunciation for the smallest color lump of the area Point;
Other color lumps in the color cluster image are adjusted to the integral multiple of the point of articulation;
According to the corresponding point of articulation of color lump each in the color cluster image, the pronunciation point image is generated.
5. the vocal cores production method of music box as claimed in claim 2, which is characterized in that described to reflect the pronunciation point image It is mapped in the grid pre-established, the mapping for establishing each point of articulation and each scale in the grid in the pronunciation point image is closed System, specifically includes:
According to the area and preset ratio of the point of articulation, grid area is set and establishes the grid;
Each point of articulation in the pronunciation point image is mapped in the grid;
When point of articulation is distributed on the grid lines of the grid, calculates separately the point of articulation and be connected on the grid lines Area accounting in adjacent square, and it is biggish that the point of articulation is assigned to point of articulation area accounting in adjacent square In one grid;
According to each point of articulation in the pronunciation point image in the grid position and the grid in the corresponding sound of every row Rank establishes the mapping relations of each point of articulation and each scale in the grid in the pronunciation point image.
6. the vocal cores production method of music box as claimed in claim 2, which is characterized in that it is described according to the mapping relations, Direction initialization along the grid extracts the corresponding scale of point of articulation in the pronunciation point image, and it is corresponding to generate the target image Melody, specifically include:
The direction initialization is the time-axis direction formed at the grid each column corresponding time point;
According to the mapping relations, point of articulation pair in the pronunciation point image is extracted according to the corresponding time-axis direction of the grid The scale answered;
When in the adjacent grid of any a line that multiple point of articulation are located in the grid, the multiple point of articulation is adjusted to The long of the corresponding scale of described any a line;
According to the time-axis direction, point of articulation corresponding time point in the pronunciation point image is extracted;
According to the corresponding scale of point of articulation and time point in the pronunciation point image, the corresponding rotation of the target image is generated Rule.
7. the vocal cores production method of music box as described in claim 1, which is characterized in that each picture in the acquisition target image The HSB value of vegetarian refreshments, and color cluster processing is carried out to each pixel of the target image according to the HSB value, described in acquisition The corresponding color cluster image of target image, specifically includes:
Obtain the HSB value of each pixel in target image;
According to the HSB value of pixel each in the target image, obtaining form and aspect distance in the target image is more than first threshold Pixel, and obtain multiple color change regions;
Calculate HSB value in the color change region difference be less than second threshold neighbor pixel form and aspect average value, and The neighbor pixel is aggregated into the color lump corresponding to the form and aspect average value;
When the form and aspect distance of neighbor pixel in the color change region is zero, according to the color lump after polymerization, described in generation Color cluster image.
8. the vocal cores production method of music box as claimed in claim 3, which is characterized in that the vocal cores production side of the music box Method further includes:
Acquisition module melody;
The template melody is converted into template waveforms figure, and is stored in the waveform diagram template database.
9. the vocal cores production method of music box as described in claim 1, which is characterized in that the control punch device is according to institute The punch position stated in point of articulation punch position figure punches on the corresponding position of vocal cores, specifically includes:
Coordinate system is established on the point of articulation punch position figure using the current location of the punch device as origin, described in acquisition Coordinate of the punch position of point of articulation punch position figure on the coordinate system;
With the origin of the coordinate system for initial punch position, two neighboring beat is calculated separately according to the coordinate of the punch position The displacement vector of hole site;Wherein, the initial punch position does not punch;
The punch device by the laser boring that is clamped on the mechanical arm of mechanical arm control on the vocal cores according to Institute's displacement vector is mobile and punches on the corresponding final position of institute's displacement vector.
10. a kind of music box, which is characterized in that including:Shell, machine core and the use sound as described in any one of claim 1 to 9 The vocal cores of the vocal cores production method production of happy box, the shell are equipped with through-hole, vocal cores entrance and vocal cores outlet, the machine core packet Pin sensing component, sound tooth, soundboard and the rocker assembly for including movement main body, being arranged on movement main body;The movement main body installation In the interior of shell;The vocal cores is movably disposed on the movement main body by the vocal cores entrance;The rocking bar Component is connect by the through-hole with the movement main body;The movement main body drives the vocal cores under the driving of the rocking bar It is moved along the vocal cores export direction and drives the pin sensing component rotation to detect the hollow out point of the vocal cores, the machine core master Body stirs the soundboard for controlling the sound tooth when detecting the hollow out point of the vocal cores.
CN201810427687.5A 2018-05-07 2018-05-07 Music box and method for manufacturing sound tape of music box Active CN108847204B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810427687.5A CN108847204B (en) 2018-05-07 2018-05-07 Music box and method for manufacturing sound tape of music box

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810427687.5A CN108847204B (en) 2018-05-07 2018-05-07 Music box and method for manufacturing sound tape of music box

Publications (2)

Publication Number Publication Date
CN108847204A true CN108847204A (en) 2018-11-20
CN108847204B CN108847204B (en) 2020-05-22

Family

ID=64212717

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810427687.5A Active CN108847204B (en) 2018-05-07 2018-05-07 Music box and method for manufacturing sound tape of music box

Country Status (1)

Country Link
CN (1) CN108847204B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3602879A1 (en) * 1986-01-31 1987-08-06 Herbert Dr Ing Juettemann Sliding-block attachment for mechanical musical instruments
JPH08234782A (en) * 1995-02-28 1996-09-13 Victor Co Of Japan Ltd Music reproducing device
CN1185617A (en) * 1996-12-19 1998-06-24 田景华 Method for using modulated colour dispersion spectrum to represent multiple digital signal and application thereof
JP2005165194A (en) * 2003-12-05 2005-06-23 Nippon Hoso Kyokai <Nhk> Music data converter and music data conversion program
CN102289778A (en) * 2011-05-10 2011-12-21 南京大学 Method for converting image into music
CN202473206U (en) * 2012-05-04 2012-10-03 王其健 Self-composing electronic music device
CN103928036A (en) * 2013-01-14 2014-07-16 联想(北京)有限公司 Method and device for generating audio file according to image
CN107871151A (en) * 2017-10-23 2018-04-03 广东数相智能科技有限公司 A kind of color bar code and its production method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3602879A1 (en) * 1986-01-31 1987-08-06 Herbert Dr Ing Juettemann Sliding-block attachment for mechanical musical instruments
JPH08234782A (en) * 1995-02-28 1996-09-13 Victor Co Of Japan Ltd Music reproducing device
CN1185617A (en) * 1996-12-19 1998-06-24 田景华 Method for using modulated colour dispersion spectrum to represent multiple digital signal and application thereof
JP2005165194A (en) * 2003-12-05 2005-06-23 Nippon Hoso Kyokai <Nhk> Music data converter and music data conversion program
CN102289778A (en) * 2011-05-10 2011-12-21 南京大学 Method for converting image into music
CN202473206U (en) * 2012-05-04 2012-10-03 王其健 Self-composing electronic music device
CN103928036A (en) * 2013-01-14 2014-07-16 联想(北京)有限公司 Method and device for generating audio file according to image
CN107871151A (en) * 2017-10-23 2018-04-03 广东数相智能科技有限公司 A kind of color bar code and its production method and device

Also Published As

Publication number Publication date
CN108847204B (en) 2020-05-22

Similar Documents

Publication Publication Date Title
US9557956B2 (en) Information processing apparatus, information processing method, and program
CN106991995B (en) Constant-name keyboard digital video-song musical instrument with stepless tone changing and key kneading and tone changing functions
US10964298B2 (en) Network musical instrument
US7589727B2 (en) Method and apparatus for generating visual images based on musical compositions
US6541692B2 (en) Dynamically adjustable network enabled method for playing along with music
CN1172291C (en) Formant conversion device for correcting singing sound for imitating standard sound
US20190392802A1 (en) Audio extraction apparatus, machine learning apparatus and audio reproduction apparatus
US8138409B2 (en) Interactive music training and entertainment system
CN107430781B (en) Data structure of computer graphics, information processing apparatus, information processing method, and information processing system
US8872011B2 (en) Visual, tactile and motion-sensation system for representing music for an audience
JP2003509729A (en) Method and apparatus for playing musical instruments based on digital music files
DE69908846T2 (en) Device for sound and image generation
US20210074267A1 (en) Machine learning method, audio source separation apparatus, and electronic instrument
JP2017219699A (en) Music information creation device, music information creation method and program, as well as recording medium
CN102598117A (en) Device and method for controlling the playback of a file of signals to be reproduced
CN111048058A (en) Singing or playing method and terminal for adjusting song music score in real time
CN108766408A (en) A kind of electronic musical instrument ensemble system and method
CN104658529A (en) Electronic music synthesis method and device
CN100538560C (en) Electronic beat sound-calibrator and control method thereof
CN108847204A (en) The vocal cores production method and music box of music box
CN110706680A (en) Music composing method for double-row key playing
CN104978329A (en) Method for generating musical melody in line drawing form
JP2020021098A (en) Information processing equipment, electronic apparatus, and program
CN204480657U (en) A kind of electronic music synthesizer
CN106098037A (en) A kind of generation method of music playing prompting platform

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
GR01 Patent grant
GR01 Patent grant