1. Technical Field
The present invention relates to audio playback technology.
2. Background Art
One effect that is commonly applied to music signals is audio slicing. Audio slicing allows a user to define a desired start point and end point to create a slice of music signal data from a given music signal.
Patent Document 1 (Japanese Patent Application Laid-Open Publication No. 2001-306069) discloses one conventional technology for implementing an audio slicing feature, for example. In this conventional technology, the user can edit performance data divided into a plurality of segments. A series of blocks that represent each segment are displayed. The user uses the mouse pointer to select a block. The user can then drag the edges of the selected block (that is, the positions where divisions between the selected block and the adjacent blocks are inserted) to change the length of the selected block (and the length of the segment represented thereby). The lengths of the adjacent blocks are updated automatically. After the length of a block is changed, icons are displayed at the positions where the divisions between blocks were previously located for the user's reference. To play back the performance data when no segment is selected, the user uses a restart switch to move a grid pointer to the beginning of the performance data and then uses a start playback switch to play the performance data to the very end thereof. When a segment is selected, the restart switch moves the grid pointer to the beginning of the selected segment, and the start playback switch plays the performance data though to the end of the selected segment.
Patent Document 1: Japanese Patent Application Laid-Open Publication No. 2001-306069
In the conventional technology described above, however, the music signal to slice must be prepared ahead of time in a musical instrument and must conform to playback pointers inserted at designated locations in order to be able to later slice the data. Therefore, an arbitrary music signal from an external source, for example, could not be sliced in real time.
The present invention aims to provide an audio slicing feature for slicing music signal data in real time.
To achieve these and other advantages and in accordance with the purpose of the present invention, as embodied and broadly described, in one aspect, the present disclosure provides a playback device that includes a first buffer and a second buffer, each having a plurality of storage regions, and a processing unit, wherein the processing unit performs: a storage process that causes input audio data to be stored in the storage regions of the first buffer in order; a first playback process that causes the stored audio data to be played back in the order in which the audio data was stored; a designation process that designates, in response to a user input, at least one of the plurality of storage regions of the first buffer in which the audio data is stored; a copy process that causes the audio data stored in the designated storage region of the first buffer to be copied to the second buffer; and a second playback process that causes the audio data copied to the second buffer to be repeatedly played back.
In another aspect, the present disclosure provides a playback method for a playback device that includes a first ring buffer and a second ring buffer each having a plurality of storage regions, the playback method including: storing input audio data in the storage regions of the first ring buffer in order; playing back the stored audio data in the order in which the audio data was stored; designating at least one of the plurality of storage regions of the first ring buffer in which the audio data is stored in response to a user input; copying the audio data stored in the designated storage regions of the first ring buffer to the second ring buffer; and repeatedly playing back the audio data copied to the second ring buffer while terminating the playing back of the audio data stored in the first ring buffer.
In another aspect, the present disclosure provides a non-transitory storage medium that stores instructions executable by a playback device having a processor and a first ring buffer and a second ring buffer each having a plurality of storage regions, the instructions causing the processor of the playback device to perform the following: causing input audio data to be stored in the storage regions of the first ring buffer in order; causing the stored audio data to be played back in the order in which the audio data was stored; designating at least one of the plurality of storage regions of the first ring buffer in which the audio data is stored in accordance with a user input; causing the audio data stored in designated storage regions of the first ring buffer to be copied to the second ring buffer; and causing the audio data copied to the second ring buffer to be repeatedly played back.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory, and are intended to provide further explanation of the invention as claimed.
An embodiment of the present invention will be described in detail below with reference to figures.
As shown in
As shown in
Moreover, the user can tap the tap button 104 twice at a desired tempo to change the playback tempo accordingly.
As shown in
Once a group of sampled music signal data has been sequentially stored in storage region number 16 and the LED-timing sensor 101 in position number 1 on the ring-shaped chassis 102 lights up again, the existing group of sampled music signal data stored in storage region number 1 of the recording ring buffer 201 is overwritten with a new group of sampled music signal data. In this way, a full bar (a prescribed segment) of the input music signal data is stored sequentially in the storage regions of the recording ring buffer 201 (a first buffer) in a repeating and cyclical manner. Moreover, the process by which the sampled music signal data are actually stored in the storage regions may be synchronized with the intervals at which the input music signal data is sampled and performed each time a full sample group is taken, for example.
The playback ring buffer 202 in
As described above, when the user starts playback of the sequencer sound/external music signal mix, the 16 LED-timing sensors 101 on the ring-shaped chassis 102 light up and turn off in order one by one in the clockwise direction indicated by arrow A in
While listening to the music signal data being played at the current tempo, the user can press one of the LED-timing sensors 101 in order to create a slice of music signal data starting at that point. In the following description, the sixteenth notes corresponding to each LED-timing sensor 101 are referred to simply as “steps”. Moreover, the step the user designates as the starting point for the slice is the “slice start step”.
In the present embodiment, music signal data is copied in order to the playback ring buffer starting from the starting address thereof. However, the present embodiment may also be configured such that a consistent offset from the starting addresses of the recording ring buffer and the playback ring buffer is maintained (that is, such that the samples stored in storage region number M in the recording ring buffer 201 are always copied to storage region number M in the playback ring buffer 202, for example).
In this way, one full bar of music signal data starting from the user-designated slice start step is copied to the playback ring buffer 202, as shown in
Once the user designates a slice start step, the musical sound playback device stops playing the input music signal data and starts playing the slice of music signal data stored in the playback ring buffer 202. Here, the user has only designated the slice start step at which the slice should start and has not yet designated the step at which the slice should end. The default behavior of the musical sound playback device in this case is to repeatedly play 2 steps of music signal data (an amount equal in duration to an eighth note), for example, starting from the slice start step.
Next, the user can press another one of the LED-timing sensors 101 in order to end the slice of music signal data at that point. Here, the step the user designates as the ending point for the slice is the “slice end step”.
In this way, as the input music signal data is sequentially stored in the recording ring buffer 201 and played back, the user can designate a slice of music signal data by designating a slice start step and a slice end step, and the full bar of music signal data that includes the designated slice and is stored in the recording ring buffer 201 is copied to the playback ring buffer 202. Furthermore, of the music signal data copied to the playback ring buffer 202, the music signal data corresponding to the user-designated slice is repeatedly played back. In this way, a music signal can be sliced in real time. Moreover, the user can easily switch between playback of input music signal data that includes the external music signal and playback of the internally stored slice of music signal data by using the LED-timing sensors 101. Playback of the slice of music signal data is looped, thereby making it possible to smoothly recompose an music signal in an intuitive manner and without inadvertently creating periods of silence. Moreover, there is no need to prepare music signal data ahead of time, and any arbitrary music signal can be edited in real time. Conventional audio slicing technologies require pointers to be aligned at the appropriate playback positions. The present embodiment, however, provides a user interface with which a slice start step and a slice end step can be designated immediately while listening to music signal data being played in real time.
In the state shown in
If, while in the states shown in
While the device is in the state shown in
Furthermore, after the groups of sampled music signal data corresponding to the most recent bar of music signal data are copied from the recording ring buffer 201 to the playback ring buffer 202, the contents of the recording ring buffer 201 begin to be overwritten with new groups of sampled music signal data as the input music signal data continues to play back. However, the contents of the playback ring buffer 202 do not change.
When the user presses the freeze button 103, the musical sound playback device does not transition into the looped slice playback mode. Moreover, after the user taps the freeze button 103, the current freeze state persists as long as the user does not press the freeze button 103 again. During this freeze state, the user can designate a slice start step and a slice end step as described above.
However, slicing works slightly differently when the device is in the freeze state as compared to the normal slice behavior described in reference to
Finally, the user can disable the current freeze state by pressing the freeze button 103 again.
The CPU 901 controls the overall musical sound playback device. The ROM 903 stores the control programs illustrated by the flowcharts in
The switch group 904 includes various types of switches typically found in electronic musical instruments as well as switches for the tap button 104 and the freeze button 103 shown in
The keyboard 905 serves as a user interface that allows the user to play an electronic keyboard instrument. Any music the user plays on the keyboard 905 is input to a musical sound generation unit (not shown in the figures) controlled by the CPU 901, which generates music signal data corresponding to the music played by the user. This music signal data is then converted to an analog signal by the DAC 908, amplified by the sound system 909, and then sent to speakers, a headphone jack, a line-out terminal, or the like built into the sound system 909 for playback.
When the user starts the sequencer using the switch group 904, the CPU 901 inputs any preset or user-configured automatic musical performance data stored in the ROM 903 or the RAM 902 to the CPU 901-controlled musical sound generation unit (not shown in the figures), which generates the corresponding music signal data for the sequencer. The user can then use a slider switch or the like (not shown in the figures) in the switch group 904 to mix the music signal data from the sequencer with an external music signal input via the line-in unit 907. The user can then perform the slicing and freeze operations described above on this mixed music signal data. Any sliced music signal data is converted to an analog signal by the DAC 908, amplified by the sound system 909, and then sent to speakers, a headphone jack, a line-out terminal, or the like built into the sound system 909 for playback in the manner described above.
In the present embodiment, the musical sound playback device is configured to include components necessary for playback of music, such as the DAC 908 and the sound system 909. However, the musical sound playback device may also be configured not to include these components internally and such that these components can be connected to the musical sound playback device externally.
In the musical sound playback device of the present embodiment, the CPU 901 executes programs such as those depicted by the flowcharts in
The LED display unit 906 includes the 16 LED-timing sensors 101 and the ring-shaped chassis 102 shown in
First, the CPU 901 determines the current value of a slice start flag stored in the RAM 902 as a variable. Here, a logical value of 1 indicates that the flag is on and a logical value of 0 indicates that the flag is off, for example (S1001).
The first time the user has presses one of the LED-timing sensors 101 (shown in
Next, the CPU 901 reads the default slice length value from the ROM 903 and sets that value to a slice length variable in the RAM 902 (S1003). This default value corresponds to the eighth note's worth of groups of sampled music signal data (that is, two steps) described above in reference to
Next, the CPU 901 sets the slice start flag variable in the RAM 902 to on (that is, to a logical value of 1, for example) (S1004).
The CPU 901 then uses the variables stored in the RAM 902 to send an instruction to stop the revolving illumination of the LEDs in the 16 LED-timing sensors 101 shown in
Then, the CPU 901 turns on the LED of the Nth LED-timing sensor 101 corresponding to the designated slice start step (S1006).
Finally, the CPU 901 sets a prescribed value to a prescribed variable in the RAM 902 in order to make the LEDs in the LED-timing sensors 101 from the slice start step+1 (that is, N+1) to the step calculated using the slice length variable stored in the RAM 902 turn on and off (S1008). The CPU 901 then finishes the current scan of the switches in the switch group 904.
For the case shown in
Meanwhile, if the user has already designated a slice start step and the CPU 901 detects that the user has pressed another LED-timing sensor 101, the CPU 901 determines that the slice start flag is on and proceeds to step S1007. Here, the CPU 901 subtracts the slice start step value stored in the RAM 902 in step S1002 from the newly detected step N and sets the result to the slice length variable in the RAM 902 (S1007). Finally, the CPU 901 sets a prescribed value to a prescribed variable in the RAM 902 in order to make the LEDs in the LED-timing sensors 101 from the slice start step+1 to the step calculated using the slice length variable stored in the RAM 902 turn on and off (S1008). The CPU 901 then finishes the current scan of the switches in the switch group 904.
For the case shown in
First, the CPU 901 determines whether the LED-timing sensor 101 corresponding to the slice start step has been pressed again by determining whether the step N for which another button press was just detected is the same step stored as the slice start step in the RAM 902 (S1101).
If the LED-timing sensor 101 for which another button press was just detected is not the slice start step (that is, if the determination in step S1101 yields NO), the CPU 901 simply finishes the current scan of the switches in the switch group 904. In this case, as in the case described in reference to
If the determination in step S1101 yields YES, the CPU 901 sets the slice start flag variable in the RAM 902 to off (that is, to a logical value of 0, for example) (S1102).
Next, the CPU 901 clears the slice start step variable in the RAM 902 to clear the slice start step (S1103).
The CPU 901 then uses the variables stored in the RAM 902 to send an instruction to restart the revolving illumination of the LEDs in the 16 LED-timing sensors 101 shown in
Finally, the CPU 901 turns off the LED of the Nth LED-timing sensor 101 corresponding to the previously designated slice start step (S1105). The CPU 901 then finishes the current scan of the switches in the switch group 904.
The freeze button 103 functions like a toggle switch. First, the CPU 901 determines whether a freeze flag variable stored in the RAM 902 is currently set to on or off (S1201).
If the musical sound playback device was not already in the freeze state and the freeze flag is currently set to off, the CPU 901 sets the freeze flag in the RAM 902 to on (that is, to a logical value of 1, for example) (S1202).
Next, the CPU 901 illuminates a freeze LED embedded in the freeze button 103 shown in
Meanwhile, if the musical sound playback device is already in the freeze state and the freeze flag is currently set to on, the CPU 901 sets the freeze flag in the RAM 902 to off (that is, to a logical value of 0, for example) (S1204).
Then, the CPU 901 turns off the freeze LED embedded in the freeze button 103 shown in
First, the CPU 901 determines whether the tap button 104 was pressed within a certain most recent period of time X (S1301).
If the determination in step S1301 yields NO, the CPU 901 resets a tempo count variable stored in the RAM 902 (S1302).
Next, the CPU 901 modifies a trigger time variable that is stored in the RAM 902 and used to turn a tempo LED (not shown in the figures) in the switch group 904 shown in
The CPU 901 then resets the position of the next LED-timing sensor 101 to be illuminated to position number 1 (S1304). The CPU 901 then finishes the current scan of the switches in the switch group 904.
In this way, when the user taps the tap button 104 shown in
Meanwhile, if the determination in step 1301 yields YES, the CPU 901 calculates a new tempo value using the time that has elapsed since the tap button 104 was last pressed (S1305).
Next, the CPU 901 changes the tempo value stored in the RAM 902 to the new tempo value calculated in step S1305 (S1306). During playback of automatic musical performance data from the sequencer, the CPU 901 references this new tempo value and changes the rate at which the revolving illumination of the LEDs in the 16 LED-timing sensors 101 shown in
Finally, the CPU 901 changes a tempo LED illumination rate variable stored in the RAM 902 to match the new tempo (S1307). The CPU 901 then finishes the current scan of the switches in the switch group 904.
This process runs at fixed time intervals corresponding to timer interrupts. First, the CPU 901 increments a time variable T stored in the RAM 902 (S1401).
Next, the CPU 901 divides the current value of the time variable T by 16 and determines whether the result is greater than a step variable N′ stored in the RAM 902 (S1402).
If the determination in step S1402 yields YES, the CPU 901 increments the value of the step variable N′ by 1 (S1403). This step variable N′ represents a step number from 1 to 16 within a bar of music signal data and is reset to 1 when incremented beyond the maximum value of 16.
If the determination in step S1402 yields NO, the CPU 901 skips step S1403.
Next, the CPU 901 uses the variables stored in the RAM 902 to determine whether an instruction to illuminate the LEDs in the 16 LED-timing sensors 101 shown in
If the determination in step S1404 yields YES, the CPU 901 illuminates the LED in the LED-timing sensor 101 corresponding to the current value of the step variable N′ that was incremented in step S1403 (S1405). The CPU 901 then turns off the LED in the LED-timing sensor 101 in position N′-1 (S1406). Finally, the CPU 901 completes the current timer process. In this way, the 16 LED-timing sensors 101 on the ring-shaped chassis 102 shown in
If the determination in step S1404 yields NO, the CPU 901 determines whether the slice start flag stored in the RAM 902 is set to on (S1407).
If the determination in step S1407 yields ON, the CPU 901 turns the LEDs in the LED-timing sensors 101 within the current slice, as indicated by variables stored in the RAM 902 (that is, from the slice start step+1 to the step calculated using the slice length variable stored in the RAM 902) on and off (S1408).
If the determination in step S1407 yields OFF, the CPU 901 skips step S1408.
Finally, the CPU 901 completes the current timer process.
In this way, the LEDs in the LED-timing sensors 101 within the current slice can be turned on and off as appropriate. As shown by the dotted circles in
First, as described in reference to
Next, the CPU 901 determines whether the freeze flag variable stored in the RAM 902 is currently set to on (S1502).
First, the case in which the device is not in the freeze state and the freeze flag is currently set to off will be described. The process for this case is illustrated by the flowchart in
If the determination in step S1507 yields OFF, the CPU 901 outputs the input music signal data as-is to the DAC 908 shown in
If the determination in step S1507 yields ON, this indicates that the user has started using the slicing feature. The CPU 901 then determines whether the freeze flag variable stored in the RAM 902 is currently set to on (S1508).
If the freeze flag is currently set to off, the CPU 901 determines whether the slice start flag variable stored in the RAM 902 was set to on during the previous sampling period (S1509). In order to be able to perform this determination, the CPU 901 may store the current state of the slice start flag in the RAM 902 in preparation for the next sampling period (at which point the value stored is used as the value of the slice start flag for the previous sampling period).
If the slice start flag was set to off during the previous sampling period, the CPU 901 determines which samples in the current slice in the recording ring buffer 201 to use for playback (S1510).
Next, the CPU 901 sequentially copies the data for the current slice from the recording ring buffer 201 to the playback ring buffer 202 (S1512). As described above in reference to
Next, the CPU 901 retrieves the music signal data (represented as pitch values) from the playback ring buffer 202 starting at the current address and outputs those values to the DAC 908 (S1513). The CPU 901 then ends the slice insertion process for the current sampling period.
If the slice start flag was set to on during the previous sampling period, the CPU 901 determines whether the process for copying the slice (1 full bar) of music signal data determined in step S1510 from the recording ring buffer 201 to the playback ring buffer 202 is complete (S1511).
If the determination in step S1511 yields YES, the CPU 901 proceeds to step S1513 and begins looped playback of the slice of music signal data that was copied to the playback ring buffer 202.
If the determination in step S1511 yields NO, the CPU 901 proceeds to step S1512 and continues copying the current slice of music signal data (1 full bar starting from the slice start step) from the recording ring buffer 201 to the playback ring buffer 202.
Next, the case in which the device is in the freeze state and the freeze flag is currently set to on will be described. In this case, the determination in step S1502 in
If the freeze flag was set to off during the previous sampling period, the CPU 901 determines which samples in the current freeze range in the recording ring buffer 201 to use for playback (S1504).
Next, the CPU 901 sequentially copies the data for the current freeze range from the recording ring buffer 201 to the playback ring buffer 202 (S1506). As described above in reference to
Next, the CPU 901 proceeds to step S1507 in
If the freeze flag was set to on during the previous sampling period, the CPU 901 determines whether the process for copying the current freeze range (1 full bar) of music signal data determined in step S1504 from the recording ring buffer 201 to the playback ring buffer 202 is complete (S1505).
If the determination in step S1505 yields YES, the CPU 901 proceeds to step S1507 in
If the determination in step S1505 yields NO, the CPU 901 proceeds to step S1506 and continues copying the current freeze range of music signal data from the recording ring buffer 201 to the playback ring buffer 202.
Next, the behavior of the device when the user uses the slicing feature while the device is in the freeze state will be described. This corresponds to when the determination in step S1507 in
If the determination in step S1514 yields NO, the CPU 901 first copies the music signal data corresponding to the sliced playback range from the recording ring buffer 201 to the playback ring buffer 202 in parallel with the process for copying music signal data from the recording ring buffer 201 to the playback ring buffer 202 from step S1506 in
If the determination in step S1514 yields YES, the CPU 901 skips step S1515.
Next, the CPU 901 proceeds to step S1513 and retrieves the music signal data (represented as pitch values) from the playback ring buffer 202 starting at the current address and outputs those values to the DAC 908 (S1513).
In the above description of the present embodiment, it was assumed that the musical sound playback device required a crossfader and the like and would be used in conjunction with a musical instrument having an external input and a built-in sequencer supporting configuration of tempo settings. However, the essential technical feature of the present embodiment is the audio slicing feature, and the methods/components used to input music signal data to the musical sound playback device are not limited in any way. Moreover, the present embodiment is configured for a situation in which each bar of music signal data is divided into 16 segments during playback. However, the present embodiment is not limited to this configuration.
It will be apparent to those skilled in the art that various modification and variations can be made in the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention cover modifications and variations that come within the scope of the appended claims and their equivalents. In particular, it is explicitly contemplated that any part or whole of any two or more of the embodiments and their modifications described above can be combined and regarded within the scope of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
2014-146327 | Jul 2014 | JP | national |