- Home/
- Software/
- Software modules
- /UPlayerNext
LATEST VERSION 2.3 (20.12.2017)
UPlayerNext is an URBI module enabling sound reproduction and recording. Its purpose is to provide programmers with powerful and efficient sample and stream (MP3, MP2, MP1, OGG, WAV, AIFF, and more) options. It enables the robot to play back various sounds, sentences recorded by external text-to-speech software, play music or broadcast radio streams. It also enables recording audio from multiple input devices (microphones, Kinect,...).
The module was enriched with a set of real-time DSP functions/effects including reverse playback, seeking, tempo & pitch control, equalizer, phaser, autowah, echo, distortion, chorus, dynamic aplification, BPM counter and beat trigger.
All functions are based on BASS audio library. BASS is free for non-commercial use. If you are a non-commercial entity (eg. an individual) and you are not making any money from your product (through sales, advertising, etc), then you can use BASS in it for free. More info about BASS can be found here: http://www.un4seen.com
Links to the RMF FM list of streams can be found here (use m3u or pls links): http://files.kusmierz.be/rmf
DryMix - | Dry (unaffected) signal mix | [-2....+2] |
WetMix - | Wet (affected) signal mix | [-2....+2] |
Feedback - | Output signal to feed back into input | [-1....+1] |
Rate - | Rate of sweep in cycles per second | [0<...<10] |
Range - | Sweep range in octaves | [0<...<10] |
Freq - | Base frequency of sweep range | [0<..1000] |
DryMix - | Dry (unaffected) signal mix | [-2....+2] |
WetMix - | Wet (affected) signal mix | [-2....+2] |
Feedback - | Output signal to feed back into input | [-1....+1] |
Rate - | Rate of sweep in cycles per second | [0<...<10] |
Range - | Sweep range in octaves | [0<...<10] |
Freq - | Base frequency of sweep range | [0<..1000] |
Target - | Target volume level | [0<....1] linear |
Quiet - | Quiet volume level | [0.....1] linear |
Rate - | Amplification adjustment rate | [0.....1] linear |
Gain - | Amplification level | [0..1..n] linear |
Delay - | Delay in seconds before increasing level | [0.....n] linear |
DryMix - | Dry (unaffected) signal mix | [-2....+2] |
WetMix - | Wet (affected) signal mix | [-2....+2] |
Feedback - | Output signal to feed back into input | [-1....+1] |
MinSweep - | Minimum delay in ms | [0<..6000] |
MaxSweep - | Maximum delay in ms | [0<..6000] |
Rate - | Rate in ms/s | [0<..1000] |
Drive - | Distortion drive | [0....5] |
DryMix - | Dry (unaffected) signal mix | [-5..+5] |
WetMix - | Wet (affected) signal mix | [-5..+5] |
Feedback - | Output signal to feed back into input | [-1..+1] |
Volume - | Distortion volume | [0...+2] |
DryMix - | Dry (unaffected) signal mix | [-2..+2] |
WetMix - | Wet (affected) signal mix | [-2..+2] |
Feedback - | Output signal to feed back into input | [-1..+1] |
Delay - | Delay in seconds | [0<...n] |
UPlayerNext.RemoveAllEffects() - remove all added effects.
Phasers use an internal low frequency oscillator to automatically move notches in the frequency response up and down the frequency spectrum. An important difference between phasing and flanging is that phasers space these notches evenly across the frequency spectrum, while the notches in flanging and chorus are harmonically (musically) related. You don't hear the notches as such (because they are the frequencies that are removed). What you hear is the resulting frequency peaks between these notches. Phasing works by mixing the original signal with one that is phase shifted over the frequency spectrum. For example, a four stage phaser signal could be from 0 degrees at 100Hz, shifted to 720 degrees at 5kHz (these extremes are not quite possible practically, but are near enough to explain the effect). This is how the term phase shifter comes about. A 4 stage phaser has 2 notches with bass response, a central peak, and treble response. By using resonance to enhance the central peak, you can get a sound similar to an automatic wah. Using a phaser with lots of stages and setting the resonance high can give a sound similar to flanging, although they are really quite different.
The DryMix is the volume of input signal & the WetMix is the volume of delayed signal. The Feedback sets feedback of phaser. The Rate and Range control how fast and far the frequency notches move. The Rate is the rate of sweep in cycles per second, Range is the width of sweep in octaves. And the the Freq is the base frequency of sweep.
Examples
Dry | Wet | Feedback | Rate | Range | Freq | |
Phase shift | 0.999 | 0.999 | 0.0 | 1.0 | 4.0 | 100.0 |
Slow invert phase shift with feedback | 0.999 | -0.999 | -0.6 | 0.2 | 6.0 | 100.0 |
Basic phase | 0.999 | 0.999 | 0.0 | 1.0 | 4.3 | 50.0 |
Phase w/ FB | 0.999 | 0.999 | 0.6 | 1.0 | 4.0 | 40.0 |
Med. phase | 0.999 | 0.999 | 0.0 | 1.0 | 7.0 | 100.0 |
Fast phase | 0.999 | 0.999 | 0.0 | 1.0 | 7.0 | 400.0 |
Invert w/ invert FB | 0.999 | -0.999 | -0.2 | 1.0 | 7.0 | 200.0 |
Tremolo Wah | 0.999 | 0.999 | 0.6 | 1.0 | 4.0 | 60.0 |
The effect implements the auto-wah by using a 4-stage phaser effect which moves a peak in the frequency response up and down the frequency spectrum by amplitude of input signal.
The DryMix is the volume of input signal & the WetMix is the volume of delayed signal. The Feedback sets feedback of auto wah (phaser). The Rate and Range control how fast and far the frequency notches move. The Rate is the rate of sweep in cycles per second, Range is the width of sweep in octaves. And the the Freq is the base frequency of sweep.
Examples
Dry | Wet | Feedback | Rate | Range | Freq | |
Slow Auto Wah | 0.500 | 1.500 | 0.5 | 2.0 | 4.3 | 50.0 |
Fast Auto Wah | 0.500 | 1.500 | 0.5 | 5.0 | 5.3 | 50.0 |
Hi Fast Auto Wah | 0.500 | 1.500 | 0.5 | 5.0 | 4.3 | 500.0 |
True vintage chorus works the same way as flanging. It mixes a varying delayed signal with the original to produce a large number of harmonically related notches in the frequency response. Chorus uses a longer delay than flanging, so there is a perception of "spaciousness", although the delay is too short to hear as a distinct slap-back echo. There is also little or no feedback, so the effect is more subtle.
The DryMix is the volume of input signal & the WetMix is the volume of delayed signal. The Feedback sets feedback of chorus. The Rate, MinSweep and MaxSweep control how fast and far the frequency notches move. The Rate is the rate of delay change in millisecs per sec, MaxSweep-MinSweep is the range or width of sweep in ms.
Examples
Dry | Wet | Feedback | Min | Max | Rate | |
Flanger | 1.0 | 0.35 | 0.5 | 1.0 | 5.0 | 1.0 |
Exaggerated chorus leads to multiple pitch shifted voices | 0.7 | 0.25 | 0.5 | 1.0 | 200.0 | 50.0 |
Motorcycle | 0.9 | 0.45 | 0.5 | 1.0 | 100.0 | 25.0 |
Devil | 0.9 | 0.35 | 0.5 | 1.0 | 50.0 | 200.0 |
Who say that there're not many voices? | 0.9 | 0.35 | 0.5 | 1.0 | 400.0 | 200.0 |
Back chipmunk | 0.9 | -0.2 | 0.5 | 1.0 | 400.0 | 400.0 |
Water | 0.9 | -0.4 | 0.5 | 1.0 | 2.0 | 1.0 |
This is the airplane | 0.3 | 0.4 | 0.5 | 1.0 | 10.0 | 5.0 |
Similar to Pre/Post Gain & Drive controls on amps. They were first introduced as a trick to added color to a guitar's tone. Usually produced back then by turning the amp all the way up, or slightly pulling out a tube from its socket. These tones are now today referred to as Overdrives. Today, there are an almost infinite variety of these effects, and they range in 3 classes: Distortions, Fuzz, and Overdrive. One common feature to mostly all of these types of pedals is a volume and drive (also noted as distortion, fuzz, gain, ...etc.). Overdrives are usually a sustain and volume boosting pedal. Used by more traditional rock and country bands. Next are the Distortions, which range from punk style to death metal screams. They are similar to Overdrives, but have more buzzing quality to them. Finally, there are the Fuzzes which are more distorted than distortions, but are more mellow and compressed sounding. Many pedals can be confused within these names, and some may be named other than what they are. Towards the end of this era, the back-to-back diode pair became popular as a technique to provide soft clipping (with germanium diodes) and hard clipping (with silicon diodes). Today, overdrive effects usually means soft clipping, where gain is reduced beyond the clipping point, while distortion usually means hard clipping, where the level is fixed beyond the clipping point. Distortion is a little harder sound, good for rock, while overdrive gives a more natural sound.
The Drive controls the amount of overdrive. The Volume to balance the effect volume with the bypassed level. It can also be used to boost the signal for solos. The DryMix is the volume of input signal & the WetMix is the volume of distorted signal. The Feedback sets feedback of distortion.
Normal Sin Wave Wave distorted by algorithm
*
* *
**** * *
* * * * *
* * * * * *
* * * * * *
* * * * * *
* * * * *
------------*------------- ------------*-------------
* * * * *
* * * * * *
* * * * * *
* * * * * *
* * * * *
**** * *
* *
*
Examples
Drive | Dry | Wet | Feedback | Volume | |
Hard Distortion | 1.0 | 0.0 | 1.0 | 0.0 | 1.0 |
Very Hard Distortion | 5.0 | 0.0 | 1.0 | 0.1 | 1.0 |
Medium Distortion | 0.2 | 1.0 | 1.0 | 0.1 | 1.0 |
Soft Distortion | 0.0 | -2.95 | -0.05 | -0.18 | 0.25 |
This is an echo effect that replays what you have played one or more times after a period of time. It's something like the echoes you might hear shouting against a canyon wall. For reverb effect enable feedback.
The DryMix is the volume of input signal & the WetMix is the volume of delayed signal. The Delay is the delay time in sec. The Feedback sets how much delay is feed back to the input (for repeating delays).
Examples
Dry | Wet | Feedback | Delay | |
Small Echo | 0.999 | 0.999 | 0.0 | 0.20 |
Many Echoes | 0.999 | 0.999 | 0.7 | 0.50 |
Reverse Echoes | 0.999 | 0.999 | -0.7 | 0.80 |
Robotic Voice | 0.500 | 0.800 | 0.5 | 0.10 |
// init module loadModule("UPlayerNext"); var Global.playerNext = UPlayerNext.new();
// play a simple file playerNext.Play("music.mp3"), playerNext.position = 100; playerNext.volume = 50; echo(playerNext.vumeter);
// play from url playerNext.Play("http://files.kusmierz.be/rmf/club.m3u"), echo(playerNext.urlInfo); echo(playerNext.urlName); echo(playerNext.urlBitrate); echo(playerNext.urlTag);
// record playerNext.StartRecord(0,"new_sound.wav"); sleep(5s); playerNext.StopRecord();
// set effects playerNext.SetEqualizer(2,-1,2); playerNext.RemoveEqualizer(); playerNext.SetAutoWah(0.5,1.5,0.5,5.0,5.3,50.0); playerNext.RemoveAutoWah(); playerNext.SetChorus(1.0,0.35,0.5,1.0,5.0,1.0); playerNext.RemoveChorus();
// use tempo playerNext.tempoEnable = true; playerNext.Play("still.mp3"), playerNext.tempoTempo=-4; playerNext.tempoPitch=1;
// reverse playerNext.tempoEnable = false; playerNext.reverseEnable = true; playerNext.Play("music.mp3"),
// bpm playerNext.bpmEnable = true; playerNext.Play("music.mp3"), echo(playerNext.bpmBPM); echo(playerNext.bpmPosition);