13 releases
0.2.12-alpha.0 | Apr 7, 2023 |
---|---|
0.2.11-alpha.0 | Dec 19, 2022 |
0.2.5-alpha.0 | Jun 21, 2022 |
0.2.4-alpha.0 | Mar 14, 2022 |
0.1.42-alpha.0 | Oct 27, 2021 |
#8 in #rotary
36 downloads per month
Used in 3 crates
(2 directly)
785KB
13K
SLoC
SurgeFX Rotary
SurgeFX Rotary is a Rust crate that provides a rotary speaker effect for use in the Surge synthesizer system. A rotary speaker is a type of speaker that is commonly used with organs and other musical instruments, and is characterized by its rotating horn and drum assembly that creates a unique and distinctive sound. The SurgeFX Rotary crate allows users to emulate this effect using digital signal processing techniques.
The RotarySpeaker struct provided by this crate can be used to create a virtual rotary speaker effect. The effect can be controlled using various parameters, including the speed of the rotating horn and drum, the amount of modulation applied to the signal, and the type of modulation waveform used.
Mathematically, the rotary speaker effect can be modeled using various techniques, including frequency modulation (FM) synthesis and amplitude modulation (AM) synthesis. In the case of FM synthesis, the speed of the rotating horn and drum can be used to modulate the frequency of the input signal, creating a frequency shift effect that simulates the Doppler shift effect of a physical rotary speaker. In the case of AM synthesis, the speed of the rotating horn and drum can be used to modulate the amplitude of the input signal, creating a tremolo effect that simulates the amplitude modulation effect of a physical rotary speaker.
The various tokens provided by this crate, including control_group, control_type, default_value, max_value, min_value, modulateable, moverate, value_type, do_rotaryspeaker_pre_block, do_rotaryspeaker_block, set_lfos, rotary_smoke, init, suspend, do_rotaryspeaker_post_block, process, process_only_control, and RotarySpeaker, provide the necessary functionality to create and control the virtual rotary speaker effect.
In summary, SurgeFX Rotary provides a powerful and flexible digital signal processing tool for creating a virtual rotary speaker effect in the Surge synthesizer system. With its various modulation options and parameter controls, users can create a wide range of unique and interesting sounds using this powerful and versatile tool.
18> could you show me a block diagram of a rotary speaker effect?
Certainly! Here is a block diagram showing the basic signal flow of a rotary speaker effect:
+------> Input Signal -------+
| |
| +--> Modulation Signal ---+
| | |
| | +---> Amplify ---+ |
| | | | |
| +----| +---+
| | | | |
| | +---> Delay ---+ |
| | | |
| | +---> Amplify ---+ |
| | | | |
| +----| +---+---> Output
| | | | |
Speed Knob --+ | +---> Delay ---+
| | |
| +--> Modulation Signal |
| |
+------> Input Signal -------+
In this diagram, the input signal is first split into two paths: one path is passed through an amplifier and delay block, and the other path is passed through a modulation block. The output signals of these two blocks are then added together to create the final output signal.
The speed knob is used to control the speed of the rotating horn and drum, which is used to modulate the amplitude and frequency of the input signal. The modulation signal can be generated using various waveform generators, including sine waves, triangle waves, and square waves.
The amplifier and delay block is used to simulate the effect of the rotating horn and drum on the input signal. The delay creates a time-varying phase shift in the signal, while the amplifier creates a time-varying amplitude modulation effect. The specific parameters of these blocks can be adjusted to create different effects and timbres.
Overall, this block diagram represents the basic signal flow of a rotary speaker effect. In practice, there may be additional processing blocks before and after the rotary speaker effect, such as filtering, distortion, and effects processing. However, this basic block diagram represents the fundamental signal flow of a rotary speaker effect.
19> how does each block impact the resulting sound?
Sure, here is a breakdown of how each block in the rotary speaker effect impacts the resulting sound:
-
Input Signal: This is the original signal that is input to the rotary speaker effect. The specific characteristics of the input signal will determine how the rotary speaker effect interacts with the signal.
-
Modulation Signal: This block generates the modulation signal that is used to modulate the amplitude and frequency of the input signal. The specific waveform used to generate the modulation signal will determine the character of the effect. For example, a sine wave will produce a smooth, continuous modulation effect, while a square wave will produce a more abrupt and discontinuous effect.
-
Amplifier and Delay: This block simulates the effect of the rotating horn and drum on the input signal. The delay creates a time-varying phase shift in the signal, while the amplifier creates a time-varying amplitude modulation effect. Together, these effects create the characteristic "swirling" sound of a rotary speaker. The specific parameters of the amplifier and delay blocks, such as the amount of delay and the depth of modulation, will determine the specific character and intensity of the effect.
-
Speed Knob: This control adjusts the speed of the rotating horn and drum, which in turn affects the frequency and amplitude modulation of the input signal. A faster speed will produce a higher frequency modulation effect, while a slower speed will produce a lower frequency modulation effect.
Overall, the rotary speaker effect is created by modulating the amplitude and/or frequency of the input signal using a modulating signal generated by a waveform generator. The specific characteristics of the effect are determined by the parameters of the amplifier and delay blocks, as well as the specific waveform used to generate the modulation signal and the speed of the rotating horn and drum.
20> could you please provide 12 examples of techniques from electronic music where we can use this effect?
Sure, here are 12 examples of techniques from electronic music production where a rotary speaker effect can be used:
-
Organ emulation: A rotary speaker effect is commonly used to emulate the sound of a Hammond organ, which is often played through a physical rotary speaker cabinet. By applying a rotary speaker effect to a synthesizer or other instrument, you can create a similar sound to that of a physical rotary speaker cabinet.
-
Guitar effects: A rotary speaker effect can be used on electric guitar to create a unique and interesting sound. The effect can be used in conjunction with other effects such as distortion and reverb to create a wide range of sounds and textures.
-
Keyboard effects: In addition to organs, a rotary speaker effect can be used on other keyboard instruments such as electric pianos and synthesizers to create unique and interesting sounds.
-
Drum effects: A rotary speaker effect can be used on drum tracks to add movement and interest to the rhythm section. The effect can be applied to individual drum tracks or to the entire drum mix.
-
Vocal effects: A rotary speaker effect can be used on vocals to add texture and interest to the sound. The effect can be used in moderation to add a subtle, vintage character to the vocals, or can be used more aggressively to create a more pronounced effect.
-
Ambient effects: A rotary speaker effect can be used to create ambient soundscapes and textures. By applying the effect to a pad or drone sound, you can create a swirling, evolving texture that can add depth and movement to the mix.
-
Dub effects: A rotary speaker effect is a classic dub effect that is often used to create a sense of space and movement in the mix. The effect can be applied to individual tracks or to the entire mix to create a cohesive and immersive sound.
-
Psychedelic effects: A rotary speaker effect can be used to create psychedelic effects such as phasing and flanging. By modulating the speed and depth of the effect, you can create interesting and complex patterns and textures.
-
Lo-fi effects: A rotary speaker effect can be used to add a vintage or lo-fi character to the sound. By adding distortion or other effects to the signal, you can create a worn and weathered sound that can add character and interest to the mix.
-
Ambient techno effects: A rotary speaker effect can be used to create ambient techno effects such as swirls and sweeps. By applying the effect to a synth or pad sound, you can create a hypnotic and immersive effect that can drive the rhythm of the track.
-
Sound design effects: A rotary speaker effect can be used in sound design to create unique and interesting sounds. By applying the effect to a sound and modulating the speed and depth of the effect, you can create complex and evolving textures that can add depth and interest to the sound.
-
Film scoring effects: A rotary speaker effect can be used in film scoring to create tension and suspense. By applying the effect to a sound and modulating the speed and depth of the effect, you can create a sense of movement and unease that can add drama and impact to the visuals.
21> what is the history of this processor?
The rotary speaker effect has a rich history in music production and has been used extensively in various genres of music, including jazz, rock, and electronic music. The effect was originally created by Don Leslie in the 1940s as a way to create a more realistic sound for Hammond organs. The Leslie speaker, as it became known, used a rotating horn and drum assembly to create a Doppler shift effect that simulated the sound of a stationary speaker in a room.
The Leslie speaker became a popular effect for Hammond organ players and was used extensively in jazz and rock music throughout the 1950s and 1960s. The effect was later adapted for use with other instruments, including electric guitars and keyboards.
In the 1970s, the rotary speaker effect became popular in electronic music production, particularly in the genre of progressive rock. Artists such as Pink Floyd and Yes used the effect extensively in their music, creating swirling, immersive soundscapes that became a defining characteristic of the genre.
In the 1980s and 1990s, the rotary speaker effect was further popularized in electronic music production, particularly in the genres of house and techno. The effect was often used to create a sense of space and movement in the mix, and became a staple of many electronic music productions.
Today, the rotary speaker effect remains a popular effect in music production, with many software and hardware versions of the effect available to producers and musicians. While the effect has evolved over the years, its fundamental sound and character remain as iconic and recognizable as ever.
22> which physics does it rely on?
The rotary speaker effect relies on several principles of physics, including acoustics and electromechanics.
Acoustically, the effect is based on the Doppler effect, which is the perceived change in frequency or wavelength of a sound wave due to the relative motion of the sound source and the observer. In the case of a rotary speaker, the rotating horn and drum assembly creates a time-varying Doppler shift effect on the input signal, which gives the effect its characteristic "swirling" sound.
Electromechanically, the effect relies on the interaction between the rotating horn and drum assembly and the electrical signal that is input to the system. The rotating horn and drum assembly contains a series of speakers and baffles that create a complex interaction between the electrical signal and the air molecules in the room. This interaction creates a unique and complex sound that is difficult to replicate using other types of speakers or effects.
Overall, the rotary speaker effect is a product of the complex interplay between acoustics, electromechanics, and other principles of physics. The specific characteristics of the effect are determined by the physical design of the rotary speaker system and the properties of the electrical signal that is input to the system.
23> could you teach me about the rotating horn and drum assembly?
Sure! The rotating horn and drum assembly is the heart of the rotary speaker effect. It consists of two main components: a rotating horn and a rotating drum.
The rotating horn is a cone-shaped speaker that is mounted on a rotating shaft. As the shaft rotates, the horn spins around, creating a time-varying Doppler shift effect on the input signal. The horn is typically made of a lightweight material such as aluminum or plastic to minimize the mass of the rotating assembly.
The rotating drum is a cylindrical enclosure that houses a series of baffles and speakers. The drum is also mounted on a rotating shaft, and as the drum rotates, the baffles and speakers inside the drum interact with the sound waves created by the rotating horn. The baffles and speakers are arranged in a specific pattern to create a complex and unique sound that is difficult to replicate using other types of speakers or effects.
Together, the rotating horn and drum assembly create the characteristic "swirling" sound of the rotary speaker effect. The speed of the rotation can be adjusted using a control knob or pedal, which in turn affects the frequency and amplitude modulation of the input signal.
While the rotating horn and drum assembly was originally designed for use with Hammond organs, it has since been adapted for use with other instruments and in various genres of music. In modern electronic music production, the rotary speaker effect is often emulated using software or hardware plugins that replicate the sound and characteristics of the original rotating horn and drum assembly.
24> how does the material of the horn impact the sound? what are baffles?
The material of the horn can have a significant impact on the sound of the rotary speaker effect. The choice of material will affect the overall tone and character of the sound, as well as the clarity and projection of the signal.
Aluminum is a popular material for rotary speaker horns because it is lightweight, rigid, and has a bright, clear tone. Aluminum horns can produce a strong, punchy sound that cuts through the mix, making them ideal for use with instruments such as electric guitars and keyboards.
Plastic is another common material used for rotary speaker horns. Plastic horns are typically made from materials such as polycarbonate or polypropylene and are popular because they are lightweight, durable, and affordable. Plastic horns can produce a warm, smooth tone that is well-suited for use with instruments such as synthesizers and electric pianos.
Baffles are a series of partitions or panels that are used to control the dispersion of sound waves within the rotating drum of the rotary speaker assembly. The baffles are arranged in a specific pattern to create a complex and unique sound that is difficult to replicate using other types of speakers or effects.
The baffles work by reflecting and diffusing the sound waves created by the rotating horn. As the sound waves bounce off the baffles, they create a complex and evolving pattern of reflections and diffractions that give the rotary speaker effect its characteristic sound. The specific arrangement of the baffles can be adjusted to create different tonal characteristics and to control the directionality of the sound.
25> how does the doppler shift work?
The Doppler shift is a phenomenon that occurs when a sound wave is emitted by a source that is moving relative to the observer. The Doppler shift causes a change in the perceived frequency of the sound wave.
The basic principle of the Doppler shift can be illustrated using the example of a moving car and a stationary observer. If a car is moving towards an observer and honks its horn, the sound waves emitted by the horn will be compressed as they travel towards the observer. This compression causes the observer to perceive the sound as having a higher frequency than it would if the car were stationary. Conversely, if the car is moving away from the observer and honks its horn, the sound waves emitted by the horn will be stretched as they travel away from the observer. This stretching causes the observer to perceive the sound as having a lower frequency than it would if the car were stationary.
In the case of a rotary speaker effect, the rotating horn and drum assembly creates a time-varying Doppler shift effect on the input signal. As the horn rotates, the frequency of the sound waves emitted by the horn will be shifted up and down relative to the observer. This creates a complex and evolving pattern of frequency modulation that gives the rotary speaker effect its characteristic "swirling" sound.
The specific characteristics of the Doppler shift effect in a rotary speaker assembly will depend on a number of factors, including the speed of the rotation, the shape and size of the horn and drum, and the characteristics of the input signal. By adjusting these factors, it is possible to create a wide range of tonal and textural effects using a rotary speaker.
26> any caveats when using the rotary speaker effect?
There are a few caveats to keep in mind when using the rotary speaker effect:
-
Overuse: As with any effect, it is possible to overuse the rotary speaker effect, which can lead to a muddy or cluttered mix. It is important to use the effect judiciously and to listen carefully to the overall balance of the mix.
-
Volume: The rotary speaker effect can be quite loud, particularly at higher speeds. It is important to monitor the output level of the effect and to adjust the overall volume of the mix accordingly.
-
Modulation artifacts: At higher modulation speeds, the rotary speaker effect can introduce modulation artifacts into the signal, particularly in the high-frequency range. These artifacts can manifest as distortion or unwanted noise in the signal.
-
Phase cancellation: The rotary speaker effect can cause phase cancellation in certain frequency ranges, particularly if the effect is applied to stereo tracks or if the input signal is already heavily modulated. It is important to monitor the phase relationships between different tracks in the mix to avoid unwanted phase cancellation.
-
Emulation quality: Software or hardware emulations of the rotary speaker effect may not always capture the full range of tonal and textural characteristics of the original rotating horn and drum assembly. It is important to choose a high-quality emulation and to experiment with different settings to achieve the desired effect.
27> how do we implement this effect on an arm processor?
Implementing a rotary speaker effect on an ARM processor can be done using digital signal processing techniques. Here is a high-level overview of the steps involved:
-
Input signal: The first step is to input the audio signal that you want to process into the ARM processor. This can be done using an analog-to-digital converter (ADC) or by reading in digital audio data from a file.
-
Modulation: The next step is to modulate the input signal to create the Doppler shift effect. This can be done using a variety of modulation techniques, including amplitude modulation (AM) or frequency modulation (FM). In the case of a rotary speaker effect, the modulation is typically achieved by varying the speed of a simulated rotating horn and drum assembly.
-
Filtering: After the modulation step, the signal is typically filtered to remove unwanted frequencies or artifacts. This can be done using digital filters such as low-pass or high-pass filters.
-
Output signal: The final step is to output the processed audio signal from the ARM processor. This can be done using a digital-to-analog converter (DAC) or by writing the digital audio data to a file.
To implement the rotary speaker effect on an ARM processor, you will need to write software code that implements the modulation and filtering steps described above. This can be done using a variety of programming languages, including C or C++. There are also software libraries available that provide pre-built functions for implementing modulation and filtering operations on audio signals.
31> so we can say "the rotary speaker effect is an enlightened combination of technologies"
Yes, that is a fair way to describe the rotary speaker effect. It is a sophisticated and well-designed combination of technologies that has stood the test of time and continues to be a popular effect in modern music production.
32> how can it be improved?
Improvements to the rotary speaker effect can be made in several areas, including:
-
Emulation quality: As digital signal processing technology continues to improve, it may be possible to create more accurate and realistic software emulations of the rotary speaker effect that capture the full range of tonal and textural characteristics of the original rotating horn and drum assembly.
-
Flexibility: Some rotary speaker effects may be limited in their flexibility, particularly in terms of the range of control that is available to the user. By providing more advanced control options, such as the ability to adjust the position of the rotating horn and drum assembly or to customize the arrangement of the baffles and speakers, it may be possible to create more versatile and expressive rotary speaker effects.
-
Integration with other effects: The rotary speaker effect can be combined with other audio processing effects, such as distortion or reverb, to create more complex and unique sounds. By improving the integration of the rotary speaker effect with other effects, it may be possible to create even more expressive and versatile audio processing tools.
-
Power efficiency: In hardware implementations of the rotary speaker effect, power efficiency is an important consideration. By optimizing the design of the rotating horn and drum assembly, it may be possible to reduce the power consumption of the effect and make it more practical for use in portable or battery-powered devices.
-
New design approaches: Finally, by exploring new design approaches, such as the use of advanced materials or novel speaker arrangements, it may be possible to create new and innovative versions of the rotary speaker effect that offer unique and compelling sonic characteristics.
33> which other design approaches would you consider when implementing this on arm?
When implementing a rotary speaker effect on an ARM processor, there are several design approaches that could be considered, including:
-
Efficient code: To optimize the performance of the rotary speaker effect on an ARM processor, it is important to write efficient code that takes advantage of the processor's specific features and capabilities. This could include the use of SIMD (Single Instruction, Multiple Data) instructions or other hardware-specific optimizations.
-
Parallel processing: Another approach to improving the performance of the rotary speaker effect on an ARM processor is to implement parallel processing techniques, such as multi-threading or distributed computing. By breaking the processing of the audio signal into smaller, independent tasks that can be processed in parallel, it may be possible to improve the overall performance of the effect.
-
Optimization for low-power devices: To make the rotary speaker effect practical for use in low-power devices, such as mobile phones or portable music players, it is important to optimize the design for low power consumption. This could include the use of efficient algorithms, reduced sample rates, or other techniques to minimize the amount of processing required.
-
Integration with other audio processing techniques: To create more complex and versatile audio processing tools, the rotary speaker effect could be integrated with other audio processing techniques, such as convolution reverb or frequency modulation. This would require careful design and implementation to ensure that the different processing techniques are integrated seamlessly and effectively.
-
Advanced modulation techniques: Finally, by exploring advanced modulation techniques, such as phase modulation or vector synthesis, it may be possible to create new and innovative versions of the rotary speaker effect that offer unique and compelling sonic characteristics. These approaches would require careful design and testing to ensure that they can be implemented effectively on an ARM processor.
34> how can it be parallelized?
Parallelization of the rotary speaker effect can be achieved using various techniques, such as multi-threading or distributed computing. Here are some possible ways to parallelize the rotary speaker effect:
-
Multi-threading: One approach to parallelizing the rotary speaker effect is to split the processing into multiple threads that can run simultaneously on different cores of the ARM processor. For example, the input signal can be split into smaller blocks that can be processed in parallel by different threads. The results can then be combined to produce the final output signal.
-
SIMD instructions: Another approach is to use SIMD (Single Instruction, Multiple Data) instructions that are available on many ARM processors. SIMD instructions allow the same operation to be performed on multiple data elements in parallel, which can significantly improve the processing speed of the rotary speaker effect.
-
GPU acceleration: If the ARM processor has an integrated graphics processing unit (GPU), it may be possible to accelerate the processing of the rotary speaker effect using the GPU. This would require porting the processing code to a GPU-accelerated programming language, such as CUDA or OpenCL.
-
Distributed computing: Finally, the rotary speaker effect could be parallelized using distributed computing techniques. This would involve splitting the processing across multiple ARM processors or other computing devices, such as networked computers or cloud-based computing resources. The results would then be combined to produce the final output signal.
It's worth noting that parallelization of the rotary speaker effect can be a complex task that requires careful consideration of the specific implementation details and hardware constraints. Careful testing and optimization will be required to ensure that the parallelized implementation of the rotary speaker effect produces accurate and reliable results.
35> i'm not sure i agree that all of these are well suited for real time audio
You are correct that not all of the parallelization techniques I mentioned may be well-suited for real-time audio processing. In particular, distributed computing may not be practical for real-time audio processing due to the added latency and potential network congestion.
Multi-threading and SIMD instructions, on the other hand, can be very effective for parallelizing real-time audio processing on ARM processors. Both techniques have been used successfully in a wide range of audio processing applications and are well-suited to the parallelization of the rotary speaker effect.
It's worth noting that the specific approach to parallelizing the rotary speaker effect will depend on the specific hardware and software platform being used, as well as the specific requirements of the application. Careful testing and optimization will be required to ensure that the parallelized implementation of the rotary speaker effect meets the performance and quality requirements of the application.
Dependencies
~12–20MB
~305K SLoC